curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": 2,
"add_as_alternate_sku": false,
"force": false,
"dry_run": false
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap"
payload = {
"product_id": 2,
"add_as_alternate_sku": False,
"force": False,
"dry_run": False
}
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, force: false, dry_run: false})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap', 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/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap",
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,
'force' => false,
'dry_run' => false
]),
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/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap"
payload := strings.NewReader("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"force\": false,\n \"dry_run\": false\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/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"force\": false,\n \"dry_run\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap")
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 \"force\": false,\n \"dry_run\": false\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>"
}{
"message": "<string>"
}Remap a sales-order item
Remap a single posted line item to a different product and re-post the order’s sales items. Use this to correct an incorrect product mapping on an already-posted sales order (purgatory mapping only covers pre-posting orders).
The service evaluates a guardrail matrix before acting:
- If a fulfillment order exists, it is deleted and recreated for the new product.
- A pushed fulfillment order is blocked unless
forceistrue, in which case it is unpushed, deleted, and recreated. - Shipped, cancelled, and refunded orders are hard-blocked, as are line items that have already shipped or been invoiced — invoices are never auto-voided.
- The split-fulfillment block is scoped to the target line item: a remap is blocked only when that item itself spans multiple fulfillment orders, not merely because the order as a whole is split.
Pass dry_run=true to get the same plan as the
preview
endpoint without mutating. When a guardrail blocks the remap at commit time
the endpoint returns 422 with a message.
curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": 2,
"add_as_alternate_sku": false,
"force": false,
"dry_run": false
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap"
payload = {
"product_id": 2,
"add_as_alternate_sku": False,
"force": False,
"dry_run": False
}
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, force: false, dry_run: false})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap', 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/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap",
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,
'force' => false,
'dry_run' => false
]),
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/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap"
payload := strings.NewReader("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"force\": false,\n \"dry_run\": false\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/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": 2,\n \"add_as_alternate_sku\": false,\n \"force\": false,\n \"dry_run\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap")
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 \"force\": false,\n \"dry_run\": false\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>"
}{
"message": "<string>"
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
Sales order ID
Sales order line-item ID (must belong to the sales order)
Body
ID of the product to remap the line item to
x >= 1When true, record the line's original SKU as an alternate SKU
on the new product so future orders auto-map to it.
Proceed even when the fulfillment order is pushed — unpushes, deletes, and recreates it. Without this, a pushed fulfillment order blocks the remap.
Evaluate only and return the remap plan; mutate nothing. The
response is the same plan shape as the remap-preview endpoint.
Response
When dry_run is false, the remapped line item. When dry_run is
true, the remap plan.
- Remapped line item
- Remap plan (dry run)
Show child attributes
Show child attributes