curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": 2,
"add_as_alternate_sku": false,
"non_physical_item": true,
"ignore_item": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}"
payload = {
"product_id": 2,
"add_as_alternate_sku": False,
"non_physical_item": True,
"ignore_item": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: 2,
add_as_alternate_sku: false,
non_physical_item: true,
ignore_item: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 2,
'add_as_alternate_sku' => false,
'non_physical_item' => true,
'ignore_item' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}"
payload := strings.NewReader("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"non_physical_item\": true,\n \"ignore_item\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"non_physical_item\": true,\n \"ignore_item\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"non_physical_item\": true,\n \"ignore_item\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"line_number": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sku": "<string>",
"name": "<string>",
"image_url": "<string>",
"weight": {},
"quantity": 123,
"unit_price": 123,
"tax": 123,
"shipping": 123,
"warehouse_location": "<string>",
"options": {},
"fulfillment_sku": "<string>",
"adjustment": 123,
"upc": "<string>",
"stock_id": 123,
"kit_id": 123,
"non_physical_item": true,
"ignore_item": true,
"quantity_shipped": 123,
"quantity_cancelled": 123,
"quantity_invoiced": 123,
"quantity_ordered": 123,
"base_uom_id": 123,
"ordered_uom_id": 123,
"product_id": 123,
"total_returned_base_quantity": 123,
"parent_id": 123,
"status": "<string>",
"discount": 123,
"estimated_ship_date": "2023-12-25",
"custom_fields": {},
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"product_weight": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"sellable": true,
"discontinued": true,
"image_url": "<string>",
"category": {
"id": 123,
"name": "<string>"
},
"subcategory": {
"id": 123,
"name": "<string>"
},
"custom_fields": {},
"variant_attributes": {},
"sku": "<string>",
"alternate_skus": [
{
"id": 123,
"sku": "<string>"
}
],
"upc": "<string>",
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
],
"supplier": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>",
"discount_structure": {},
"markup_structure": {}
}
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Map a line item to a product / toggle flags
Maps a non-posted sales order line item to a Luminous product, and/or
toggles the ignore_item / non_physical_item flags so unmappable lines
can clear purgatory.
Side effects:
- When
product_idis set, the line’srfq_idis updated. If the parent order has awarehouse_group_id, a stock record for that product/warehouse-group pair is resolved or created. - When
add_as_alternate_sku=trueand the channel SKU differs from the product’s internal SKU, an alternate SKU row is upserted so future orders with that SKU auto-map. - After the save, the parent order is re-evaluated against the current
purgatory settings. If
post_clean_orders=trueand the last unmapped line just became mapped, the order can post automatically in the same step.
Returns 422 if the parent order is already posted.
curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": 2,
"add_as_alternate_sku": false,
"non_physical_item": true,
"ignore_item": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}"
payload = {
"product_id": 2,
"add_as_alternate_sku": False,
"non_physical_item": True,
"ignore_item": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_id: 2,
add_as_alternate_sku: false,
non_physical_item: true,
ignore_item: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 2,
'add_as_alternate_sku' => false,
'non_physical_item' => true,
'ignore_item' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}"
payload := strings.NewReader("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"non_physical_item\": true,\n \"ignore_item\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"non_physical_item\": true,\n \"ignore_item\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/purgatory/order-items/{salesOrderItemId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"non_physical_item\": true,\n \"ignore_item\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"line_number": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sku": "<string>",
"name": "<string>",
"image_url": "<string>",
"weight": {},
"quantity": 123,
"unit_price": 123,
"tax": 123,
"shipping": 123,
"warehouse_location": "<string>",
"options": {},
"fulfillment_sku": "<string>",
"adjustment": 123,
"upc": "<string>",
"stock_id": 123,
"kit_id": 123,
"non_physical_item": true,
"ignore_item": true,
"quantity_shipped": 123,
"quantity_cancelled": 123,
"quantity_invoiced": 123,
"quantity_ordered": 123,
"base_uom_id": 123,
"ordered_uom_id": 123,
"product_id": 123,
"total_returned_base_quantity": 123,
"parent_id": 123,
"status": "<string>",
"discount": 123,
"estimated_ship_date": "2023-12-25",
"custom_fields": {},
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"product_weight": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"sellable": true,
"discontinued": true,
"image_url": "<string>",
"category": {
"id": 123,
"name": "<string>"
},
"subcategory": {
"id": 123,
"name": "<string>"
},
"custom_fields": {},
"variant_attributes": {},
"sku": "<string>",
"alternate_skus": [
{
"id": 123,
"sku": "<string>"
}
],
"upc": "<string>",
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
],
"supplier": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>",
"discount_structure": {},
"markup_structure": {}
}
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
ID of the sales order line item
Body
Luminous product ID to map this line to. Omit to leave the mapping untouched (useful when only toggling flags).
x >= 1When true and the line's channel SKU differs from the product's
internal SKU, upsert an alternate SKU record so future orders with
that SKU auto-map.
Mark the line as non-physical (no inventory effect on post).
Mark the line as ignored for purgatory evaluation.
Response
Updated sales order line item
Show child attributes
Show child attributes