curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/allocation-availability \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/allocation-availability"
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}/allocation-availability', 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}/allocation-availability",
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}/allocation-availability"
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}/allocation-availability")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/allocation-availability")
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": {
"sales_order_id": 3048,
"ship_complete": false,
"lines": [
{
"sales_order_item_id": 6982,
"rfq_id": 4464,
"sku": "AS-9061-1.5ER-HESPER-THISTLE",
"name": "Cloud Cosy End Chair Right - HESPER - THISTLE",
"line_quantity": 1,
"already_allocated": 0,
"is_kit": false,
"suggested_channel_id": 14,
"preferred_vendor_id": null,
"preferred_vendor_name": null,
"warehouse_groups": [
{
"warehouse_group_id": 2,
"warehouse_group_name": "Sydney",
"channels": [
{
"id": 14,
"label": "SYD"
}
],
"on_hand_available": 0,
"incoming_pos": [
{
"purchase_order_id": 28,
"purchase_order_item_id": 731,
"alternate_id": "SYD7967",
"warehouse_name": "Sydney DC",
"eta": "2026-08-21",
"available_to_allocate": 1
}
],
"incoming_totals": {
"po_count": 1,
"free_to_allocate": 1
},
"has_more_incoming": false
}
],
"components": [
{
"sales_item_id": 14961,
"sales_order_item_id": 7001,
"rfq_id": 1801,
"sku": "COMP-A",
"name": "<string>",
"line_quantity": 1,
"already_allocated": 0,
"is_kit": false,
"suggested_channel_id": 14,
"preferred_vendor_id": null,
"preferred_vendor_name": null,
"warehouse_groups": [
{
"warehouse_group_id": 2,
"warehouse_group_name": "Sydney",
"channels": [
{
"id": 14,
"label": "SYD"
}
],
"on_hand_available": 0,
"incoming_pos": [
{
"purchase_order_id": 28,
"purchase_order_item_id": 731,
"alternate_id": "SYD7967",
"warehouse_name": "Sydney DC",
"eta": "2026-08-21",
"available_to_allocate": 1
}
],
"incoming_totals": {
"po_count": 1,
"free_to_allocate": 1
},
"has_more_incoming": false
}
]
}
]
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Get purchase-to-order allocation availability
Read what each fulfillable line of a sales order can be sourced from right now — the read surface
behind the in-app allocation planner, exposed so a caller can see availability before calling
POST /purchase-orders/{purchaseOrderId}/allocate (rather than allocating blind and guessing the
PO line).
Per line: on-hand by warehouse group and each open incoming purchase-order line — with its
purchase_order_item_id (the id you peg against), the container’s alternate id, its ETA and how
much of it is still free to allocate — plus the routing-suggested channel. A kit line is flagged
is_kit and carries a components array: one entry per component (the same availability shape),
each carrying its own sales_item_id, which is the grain a kit allocation targets.
Allocation workflow
- See what a line can be sourced from — this endpoint.
- (optional) find the container PO by its number / alternate id —
GET /purchase-ordersfiltered on the alternate id (e.g. a container code likeSYD7967). - Allocate —
POST /purchase-orders/{purchaseOrderId}/allocate. - Read the pegs back —
GET /purchase-orders/{id}; each line’sallocations[].peg_idslists the peg ids. - Reverse (unallocate) —
POST /purchase-orders/reverse-allocationwith apeg_id.
Requires the purchase-to-order feature; without it the endpoint returns 422.
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/allocation-availability \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/allocation-availability"
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}/allocation-availability', 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}/allocation-availability",
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}/allocation-availability"
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}/allocation-availability")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/sales-orders/{salesOrderId}/allocation-availability")
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": {
"sales_order_id": 3048,
"ship_complete": false,
"lines": [
{
"sales_order_item_id": 6982,
"rfq_id": 4464,
"sku": "AS-9061-1.5ER-HESPER-THISTLE",
"name": "Cloud Cosy End Chair Right - HESPER - THISTLE",
"line_quantity": 1,
"already_allocated": 0,
"is_kit": false,
"suggested_channel_id": 14,
"preferred_vendor_id": null,
"preferred_vendor_name": null,
"warehouse_groups": [
{
"warehouse_group_id": 2,
"warehouse_group_name": "Sydney",
"channels": [
{
"id": 14,
"label": "SYD"
}
],
"on_hand_available": 0,
"incoming_pos": [
{
"purchase_order_id": 28,
"purchase_order_item_id": 731,
"alternate_id": "SYD7967",
"warehouse_name": "Sydney DC",
"eta": "2026-08-21",
"available_to_allocate": 1
}
],
"incoming_totals": {
"po_count": 1,
"free_to_allocate": 1
},
"has_more_incoming": false
}
],
"components": [
{
"sales_item_id": 14961,
"sales_order_item_id": 7001,
"rfq_id": 1801,
"sku": "COMP-A",
"name": "<string>",
"line_quantity": 1,
"already_allocated": 0,
"is_kit": false,
"suggested_channel_id": 14,
"preferred_vendor_id": null,
"preferred_vendor_name": null,
"warehouse_groups": [
{
"warehouse_group_id": 2,
"warehouse_group_name": "Sydney",
"channels": [
{
"id": 14,
"label": "SYD"
}
],
"on_hand_available": 0,
"incoming_pos": [
{
"purchase_order_id": 28,
"purchase_order_item_id": 731,
"alternate_id": "SYD7967",
"warehouse_name": "Sydney DC",
"eta": "2026-08-21",
"available_to_allocate": 1
}
],
"incoming_totals": {
"po_count": 1,
"free_to_allocate": 1
},
"has_more_incoming": false
}
]
}
]
}
]
}
}{
"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
Response
Allocation availability for the sales order
Show child attributes
Show child attributes