curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_orders": [
{
"order_date": "2026-11-10",
"supplier_id": 123,
"order_status": "draft",
"order_numbers": [
"PO-1001"
],
"items": [
{
"sku": "WIDGET-001",
"quantity": 10,
"unit_price": 4.5
}
]
},
{
"supplier_id": 123,
"order_status": "draft",
"items": [
{
"sku": "WIDGET-002",
"quantity": 5,
"unit_price": 9.99
}
]
}
]
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk"
payload = { "purchase_orders": [
{
"order_date": "2026-11-10",
"supplier_id": 123,
"order_status": "draft",
"order_numbers": ["PO-1001"],
"items": [
{
"sku": "WIDGET-001",
"quantity": 10,
"unit_price": 4.5
}
]
},
{
"supplier_id": 123,
"order_status": "draft",
"items": [
{
"sku": "WIDGET-002",
"quantity": 5,
"unit_price": 9.99
}
]
}
] }
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({
purchase_orders: [
{
order_date: '2026-11-10',
supplier_id: 123,
order_status: 'draft',
order_numbers: ['PO-1001'],
items: [{sku: 'WIDGET-001', quantity: 10, unit_price: 4.5}]
},
{
supplier_id: 123,
order_status: 'draft',
items: [{sku: 'WIDGET-002', quantity: 5, unit_price: 9.99}]
}
]
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk', 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/purchase-orders/bulk",
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([
'purchase_orders' => [
[
'order_date' => '2026-11-10',
'supplier_id' => 123,
'order_status' => 'draft',
'order_numbers' => [
'PO-1001'
],
'items' => [
[
'sku' => 'WIDGET-001',
'quantity' => 10,
'unit_price' => 4.5
]
]
],
[
'supplier_id' => 123,
'order_status' => 'draft',
'items' => [
[
'sku' => 'WIDGET-002',
'quantity' => 5,
'unit_price' => 9.99
]
]
]
]
]),
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/purchase-orders/bulk"
payload := strings.NewReader("{\n \"purchase_orders\": [\n {\n \"order_date\": \"2026-11-10\",\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"order_numbers\": [\n \"PO-1001\"\n ],\n \"items\": [\n {\n \"sku\": \"WIDGET-001\",\n \"quantity\": 10,\n \"unit_price\": 4.5\n }\n ]\n },\n {\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"items\": [\n {\n \"sku\": \"WIDGET-002\",\n \"quantity\": 5,\n \"unit_price\": 9.99\n }\n ]\n }\n ]\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/purchase-orders/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_orders\": [\n {\n \"order_date\": \"2026-11-10\",\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"order_numbers\": [\n \"PO-1001\"\n ],\n \"items\": [\n {\n \"sku\": \"WIDGET-001\",\n \"quantity\": 10,\n \"unit_price\": 4.5\n }\n ]\n },\n {\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"items\": [\n {\n \"sku\": \"WIDGET-002\",\n \"quantity\": 5,\n \"unit_price\": 9.99\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk")
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 \"purchase_orders\": [\n {\n \"order_date\": \"2026-11-10\",\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"order_numbers\": [\n \"PO-1001\"\n ],\n \"items\": [\n {\n \"sku\": \"WIDGET-001\",\n \"quantity\": 10,\n \"unit_price\": 4.5\n }\n ]\n },\n {\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"items\": [\n {\n \"sku\": \"WIDGET-002\",\n \"quantity\": 5,\n \"unit_price\": 9.99\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"index": 0,
"id": 1001,
"order_numbers": [
"PO-1001"
]
},
{
"index": 1,
"error": {
"order_date": [
"Order date is required."
]
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Bulk create purchase orders
Create up to 100 purchase orders in one request. Each element of purchase_orders is the same object
as POST /purchase-orders and is
validated and created on its own, in the order given.
Partial success
A well-formed request returns 200 even when some or all elements fail. Each element gets one slot
in data, identified by its index in the request array:
- Created:
index,idandorder_numbers. - Failed:
indexanderror, that element’s validation messages keyed by field.
A missing, non-array or empty purchase_orders, or more than 100 elements, returns 422 and creates
nothing.
There is no all-or-nothing transaction: purchase orders created before a failing element are kept, and a failure after an element’s header is saved can leave that purchase order in place while its slot reports an error.
Things to send on every element
order_status: elements without it are created as active and post incoming stock, the same as the single create. Sendorder_status: "draft"for purchase orders that should stay drafts.currency_codewhen the purchase order should not be in the supplier’s default currency. Omitted, the supplier’s default currency is applied (base currency when the supplier has none).
Retries and idempotency
Accepts an optional Idempotency-Key header. A retry with the same key and body replays the first
response (with an Idempotent-Replay: true header); the same key with a different body, or while
the first request is still running, returns 409. Keys are kept for 24 hours and are scoped to your
API token. Order numbers are not unique, so a retry without a key can create duplicate purchase orders.
Limited to 30 requests per minute.
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_orders": [
{
"order_date": "2026-11-10",
"supplier_id": 123,
"order_status": "draft",
"order_numbers": [
"PO-1001"
],
"items": [
{
"sku": "WIDGET-001",
"quantity": 10,
"unit_price": 4.5
}
]
},
{
"supplier_id": 123,
"order_status": "draft",
"items": [
{
"sku": "WIDGET-002",
"quantity": 5,
"unit_price": 9.99
}
]
}
]
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk"
payload = { "purchase_orders": [
{
"order_date": "2026-11-10",
"supplier_id": 123,
"order_status": "draft",
"order_numbers": ["PO-1001"],
"items": [
{
"sku": "WIDGET-001",
"quantity": 10,
"unit_price": 4.5
}
]
},
{
"supplier_id": 123,
"order_status": "draft",
"items": [
{
"sku": "WIDGET-002",
"quantity": 5,
"unit_price": 9.99
}
]
}
] }
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({
purchase_orders: [
{
order_date: '2026-11-10',
supplier_id: 123,
order_status: 'draft',
order_numbers: ['PO-1001'],
items: [{sku: 'WIDGET-001', quantity: 10, unit_price: 4.5}]
},
{
supplier_id: 123,
order_status: 'draft',
items: [{sku: 'WIDGET-002', quantity: 5, unit_price: 9.99}]
}
]
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk', 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/purchase-orders/bulk",
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([
'purchase_orders' => [
[
'order_date' => '2026-11-10',
'supplier_id' => 123,
'order_status' => 'draft',
'order_numbers' => [
'PO-1001'
],
'items' => [
[
'sku' => 'WIDGET-001',
'quantity' => 10,
'unit_price' => 4.5
]
]
],
[
'supplier_id' => 123,
'order_status' => 'draft',
'items' => [
[
'sku' => 'WIDGET-002',
'quantity' => 5,
'unit_price' => 9.99
]
]
]
]
]),
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/purchase-orders/bulk"
payload := strings.NewReader("{\n \"purchase_orders\": [\n {\n \"order_date\": \"2026-11-10\",\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"order_numbers\": [\n \"PO-1001\"\n ],\n \"items\": [\n {\n \"sku\": \"WIDGET-001\",\n \"quantity\": 10,\n \"unit_price\": 4.5\n }\n ]\n },\n {\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"items\": [\n {\n \"sku\": \"WIDGET-002\",\n \"quantity\": 5,\n \"unit_price\": 9.99\n }\n ]\n }\n ]\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/purchase-orders/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_orders\": [\n {\n \"order_date\": \"2026-11-10\",\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"order_numbers\": [\n \"PO-1001\"\n ],\n \"items\": [\n {\n \"sku\": \"WIDGET-001\",\n \"quantity\": 10,\n \"unit_price\": 4.5\n }\n ]\n },\n {\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"items\": [\n {\n \"sku\": \"WIDGET-002\",\n \"quantity\": 5,\n \"unit_price\": 9.99\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/bulk")
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 \"purchase_orders\": [\n {\n \"order_date\": \"2026-11-10\",\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"order_numbers\": [\n \"PO-1001\"\n ],\n \"items\": [\n {\n \"sku\": \"WIDGET-001\",\n \"quantity\": 10,\n \"unit_price\": 4.5\n }\n ]\n },\n {\n \"supplier_id\": 123,\n \"order_status\": \"draft\",\n \"items\": [\n {\n \"sku\": \"WIDGET-002\",\n \"quantity\": 5,\n \"unit_price\": 9.99\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"index": 0,
"id": 1001,
"order_numbers": [
"PO-1001"
]
},
{
"index": 1,
"error": {
"order_date": [
"Order date is required."
]
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}