curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview', 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-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"allowed": true,
"blocked_reason": "<string>",
"requires_force": true,
"fulfillment_order_exists": true,
"fulfillment_order_id": 123,
"fo_is_pushed": true,
"fo_action": "none",
"will_delete_fulfillment_order": true,
"will_recreate_fulfillment_order": true,
"will_delete_invoice": true,
"old_product_id": 123,
"new_product_id": 123,
"warnings": [
"<string>"
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}Preview a sales-order item remap
Dry-run a remap of a single posted line item to a different product. Reports
whether the remap is allowed, whether a force flag is required, and what
will happen to the fulfillment order — without mutating anything.
Purgatory mapping only covers pre-posting orders, so this (and the remap endpoint) are the posted-order counterpart: they let you correct an incorrect product mapping on an already-posted order and re-post that one line.
Always returns 200 — even when the remap is blocked — so the caller can
read blocked_reason. Shipped/cancelled/refunded orders and
already-shipped or invoiced line items are hard-blocked; a line item split
across multiple fulfillment orders is also blocked (the split block is
scoped to the target item, not the whole order); a pushed fulfillment
order sets requires_force.
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview', 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-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/items/{salesOrderItemId}/remap-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"allowed": true,
"blocked_reason": "<string>",
"requires_force": true,
"fulfillment_order_exists": true,
"fulfillment_order_id": 123,
"fo_is_pushed": true,
"fo_action": "none",
"will_delete_fulfillment_order": true,
"will_recreate_fulfillment_order": true,
"will_delete_invoice": true,
"old_product_id": 123,
"new_product_id": 123,
"warnings": [
"<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)
Query Parameters
ID of the product to remap the line item to
x >= 1Evaluate the plan as if force were passed — i.e. treat a pushed
fulfillment order as something that will be unpushed, deleted, and
recreated rather than a block.
Response
Remap plan (the remap may still be blocked — check allowed)
Result of analysing a posted-order line-item remap. Returned by the
remap-preview endpoint and by the remap endpoint when dry_run is true.
Lets a caller decide whether to proceed before mutating — whether the remap is
allowed, whether a force flag is required, and what will happen to the
fulfillment order.
Show child attributes
Show child attributes