curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"substitute_product_id": 1234,
"priority": 1
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions"
payload = {
"substitute_product_id": 1234,
"priority": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({substitute_product_id: 1234, priority: 1})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions', 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/products/{productId}/substitutions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'substitute_product_id' => 1234,
'priority' => 1
]),
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/products/{productId}/substitutions"
payload := strings.NewReader("{\n \"substitute_product_id\": 1234,\n \"priority\": 1\n}")
req, _ := http.NewRequest("POST", 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.post("https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"substitute_product_id\": 1234,\n \"priority\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"substitute_product_id\": 1234,\n \"priority\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"priority": 123,
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"landed_cost": 123,
"manufacturing_fee": 123,
"product_weight": [
{
"value": 1
}
],
"product_weight_oz": 123,
"product_weight_lb": 123,
"dimensional_weight": [
{
"value": 1
}
],
"dimensional_weight_oz": 123,
"dimensional_weight_lb": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"box_weight": [
{
"value": 1
}
],
"box_weight_oz": 123,
"box_weight_lb": 123,
"box_length": 123,
"box_width": 123,
"box_height": 123,
"carton_weight": [
{
"value": 1
}
],
"carton_weight_oz": 123,
"carton_weight_lb": 123,
"carton_length": 123,
"carton_width": 123,
"carton_height": 123,
"shipping_weight": [
{
"value": 1
}
],
"shipping_weight_oz": 123,
"shipping_weight_lb": 123,
"shipping_length": 123,
"shipping_width": 123,
"shipping_height": 123,
"pallet_weight": [
{
"value": 1
}
],
"pallet_weight_oz": 123,
"pallet_weight_lb": 123,
"pallet_length": 123,
"pallet_width": 123,
"pallet_height": 123,
"sellable": true,
"discontinued": true,
"lot_tracking": true,
"image_url": "<string>",
"category": {
"id": 123,
"name": "<string>"
},
"subcategory": {
"id": 123,
"name": "<string>"
},
"custom_fields": {},
"attachments": [
{
"id": 123,
"name": "<string>",
"type": "<string>",
"size": 123,
"full_url": "<string>",
"thumb_url": "<string>"
}
],
"variants": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"product_weight": [
{
"value": 1
}
],
"product_weight_oz": 123,
"product_weight_lb": 123,
"dimensional_weight": [
{
"value": 1
}
],
"dimensional_weight_oz": 123,
"dimensional_weight_lb": 123,
"box_weight": [
{
"value": 1
}
],
"box_weight_oz": 123,
"box_weight_lb": 123,
"carton_weight": [
{
"value": 1
}
],
"carton_weight_oz": 123,
"carton_weight_lb": 123,
"shipping_weight": [
{
"value": 1
}
],
"shipping_weight_oz": 123,
"shipping_weight_lb": 123,
"pallet_weight": [
{
"value": 1
}
],
"pallet_weight_oz": 123,
"pallet_weight_lb": 123,
"attachments": [
{
"id": 123,
"name": "<string>",
"type": "<string>",
"size": 123,
"full_url": "<string>",
"thumb_url": "<string>"
}
],
"retail_price": 123,
"wholesale_price": 123,
"custom_fields": [
{}
],
"variant_attributes": [
{
"variant_name": "<string>",
"variant_terms": [
"<string>"
]
}
],
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"variant_attributes": [
{
"variant_name": "<string>",
"variant_terms": [
"<string>"
]
}
],
"sku": "<string>",
"alternate_skus": [
{
"id": 123,
"sku": "<string>"
}
],
"upc": "<string>",
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
],
"substitutions": [
{
"id": 123,
"priority": 123,
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"product_weight": [
{
"value": 1
}
],
"product_weight_oz": 123,
"product_weight_lb": 123,
"dimensional_weight": [
{
"value": 1
}
],
"dimensional_weight_oz": 123,
"dimensional_weight_lb": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"box_weight": [
{
"value": 1
}
],
"box_weight_oz": 123,
"box_weight_lb": 123,
"box_length": 123,
"box_width": 123,
"box_height": 123,
"carton_weight": [
{
"value": 1
}
],
"carton_weight_oz": 123,
"carton_weight_lb": 123,
"carton_length": 123,
"carton_width": 123,
"carton_height": 123,
"shipping_weight": [
{
"value": 1
}
],
"shipping_weight_oz": 123,
"shipping_weight_lb": 123,
"shipping_length": 123,
"shipping_width": 123,
"shipping_height": 123,
"pallet_weight": [
{
"value": 1
}
],
"pallet_weight_oz": 123,
"pallet_weight_lb": 123,
"pallet_length": 123,
"pallet_width": 123,
"pallet_height": 123,
"sellable": true,
"discontinued": true,
"image_url": "<string>",
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
],
"supplier": {},
"kit_items": [
{
"id": 123,
"product_id": 123,
"quantity": 123,
"uom_id": 123,
"base_uom_quantity": 123,
"price": 123,
"original_price": 123,
"total": 123,
"product": {
"id": 123,
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123
},
"unit_of_measure": {
"id": 123,
"name": "<string>",
"description": "<string>",
"base_unit": true
}
}
],
"priority_list": {
"id": 123,
"name": "<string>",
"description": "<string>"
},
"boms": [
{
"id": 123,
"name": "<string>",
"items": [
{
"id": 123,
"bom_id": 123,
"product_id": 123,
"quantity": 123,
"product": {
"id": 123,
"name": "<string>",
"sku": "<string>",
"description": "<string>"
},
"base_quantity": 123,
"note": "<string>",
"uom_id": 123,
"unit_of_measure": {
"id": 123,
"name": "<string>"
},
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"extra_costs": [
{
"id": 123,
"name": "<string>",
"quantity": 123,
"unit_price": 123,
"line_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Add product substitution
Add a substitute product to a product. Substitutes are alternative products that can fulfill the same demand — useful when the primary product is out of stock or unavailable.
Each substitution links the primary product to a single substitute product and an optional priority. Priority controls the order substitutes are considered (lower numbers are tried first). Call this endpoint once per substitute product you want to attach.
The response returns the created substitution record, including the embedded substitute
product. The id field on the response is the substitution row’s ID — use it with the
DELETE endpoint to remove the substitution later.
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"substitute_product_id": 1234,
"priority": 1
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions"
payload = {
"substitute_product_id": 1234,
"priority": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({substitute_product_id: 1234, priority: 1})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions', 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/products/{productId}/substitutions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'substitute_product_id' => 1234,
'priority' => 1
]),
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/products/{productId}/substitutions"
payload := strings.NewReader("{\n \"substitute_product_id\": 1234,\n \"priority\": 1\n}")
req, _ := http.NewRequest("POST", 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.post("https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"substitute_product_id\": 1234,\n \"priority\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/products/{productId}/substitutions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"substitute_product_id\": 1234,\n \"priority\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"priority": 123,
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"landed_cost": 123,
"manufacturing_fee": 123,
"product_weight": [
{
"value": 1
}
],
"product_weight_oz": 123,
"product_weight_lb": 123,
"dimensional_weight": [
{
"value": 1
}
],
"dimensional_weight_oz": 123,
"dimensional_weight_lb": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"box_weight": [
{
"value": 1
}
],
"box_weight_oz": 123,
"box_weight_lb": 123,
"box_length": 123,
"box_width": 123,
"box_height": 123,
"carton_weight": [
{
"value": 1
}
],
"carton_weight_oz": 123,
"carton_weight_lb": 123,
"carton_length": 123,
"carton_width": 123,
"carton_height": 123,
"shipping_weight": [
{
"value": 1
}
],
"shipping_weight_oz": 123,
"shipping_weight_lb": 123,
"shipping_length": 123,
"shipping_width": 123,
"shipping_height": 123,
"pallet_weight": [
{
"value": 1
}
],
"pallet_weight_oz": 123,
"pallet_weight_lb": 123,
"pallet_length": 123,
"pallet_width": 123,
"pallet_height": 123,
"sellable": true,
"discontinued": true,
"lot_tracking": true,
"image_url": "<string>",
"category": {
"id": 123,
"name": "<string>"
},
"subcategory": {
"id": 123,
"name": "<string>"
},
"custom_fields": {},
"attachments": [
{
"id": 123,
"name": "<string>",
"type": "<string>",
"size": 123,
"full_url": "<string>",
"thumb_url": "<string>"
}
],
"variants": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"product_weight": [
{
"value": 1
}
],
"product_weight_oz": 123,
"product_weight_lb": 123,
"dimensional_weight": [
{
"value": 1
}
],
"dimensional_weight_oz": 123,
"dimensional_weight_lb": 123,
"box_weight": [
{
"value": 1
}
],
"box_weight_oz": 123,
"box_weight_lb": 123,
"carton_weight": [
{
"value": 1
}
],
"carton_weight_oz": 123,
"carton_weight_lb": 123,
"shipping_weight": [
{
"value": 1
}
],
"shipping_weight_oz": 123,
"shipping_weight_lb": 123,
"pallet_weight": [
{
"value": 1
}
],
"pallet_weight_oz": 123,
"pallet_weight_lb": 123,
"attachments": [
{
"id": 123,
"name": "<string>",
"type": "<string>",
"size": 123,
"full_url": "<string>",
"thumb_url": "<string>"
}
],
"retail_price": 123,
"wholesale_price": 123,
"custom_fields": [
{}
],
"variant_attributes": [
{
"variant_name": "<string>",
"variant_terms": [
"<string>"
]
}
],
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"variant_attributes": [
{
"variant_name": "<string>",
"variant_terms": [
"<string>"
]
}
],
"sku": "<string>",
"alternate_skus": [
{
"id": 123,
"sku": "<string>"
}
],
"upc": "<string>",
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
],
"substitutions": [
{
"id": 123,
"priority": 123,
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"product_weight": [
{
"value": 1
}
],
"product_weight_oz": 123,
"product_weight_lb": 123,
"dimensional_weight": [
{
"value": 1
}
],
"dimensional_weight_oz": 123,
"dimensional_weight_lb": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"box_weight": [
{
"value": 1
}
],
"box_weight_oz": 123,
"box_weight_lb": 123,
"box_length": 123,
"box_width": 123,
"box_height": 123,
"carton_weight": [
{
"value": 1
}
],
"carton_weight_oz": 123,
"carton_weight_lb": 123,
"carton_length": 123,
"carton_width": 123,
"carton_height": 123,
"shipping_weight": [
{
"value": 1
}
],
"shipping_weight_oz": 123,
"shipping_weight_lb": 123,
"shipping_length": 123,
"shipping_width": 123,
"shipping_height": 123,
"pallet_weight": [
{
"value": 1
}
],
"pallet_weight_oz": 123,
"pallet_weight_lb": 123,
"pallet_length": 123,
"pallet_width": 123,
"pallet_height": 123,
"sellable": true,
"discontinued": true,
"image_url": "<string>",
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
],
"supplier": {},
"kit_items": [
{
"id": 123,
"product_id": 123,
"quantity": 123,
"uom_id": 123,
"base_uom_quantity": 123,
"price": 123,
"original_price": 123,
"total": 123,
"product": {
"id": 123,
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123
},
"unit_of_measure": {
"id": 123,
"name": "<string>",
"description": "<string>",
"base_unit": true
}
}
],
"priority_list": {
"id": 123,
"name": "<string>",
"description": "<string>"
},
"boms": [
{
"id": 123,
"name": "<string>",
"items": [
{
"id": 123,
"bom_id": 123,
"product_id": 123,
"quantity": 123,
"product": {
"id": 123,
"name": "<string>",
"sku": "<string>",
"description": "<string>"
},
"base_quantity": 123,
"note": "<string>",
"uom_id": 123,
"unit_of_measure": {
"id": 123,
"name": "<string>"
},
"order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"extra_costs": [
{
"id": 123,
"name": "<string>",
"quantity": 123,
"unit_price": 123,
"line_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"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 product receiving the substitute
Body
Response
Substitution created
Substitution row ID. Use this with the DELETE endpoint to remove the substitution.
Ordering hint — lower numbers are tried first when looking for a substitute.
Embedded substitute product. Always present on responses from the substitutions endpoints (the substitute product is eager-loaded server-side).
Show child attributes
Show child attributes