Orders
Part of the Sales API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).
List orders
GET/admin/api/v1/sales/ordersRetrieve a paginated list of orders with filtering and sorting
🔒 Requires a valid Bearer token.
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: partner, partnerInvoice, partnerShipping, user, team, company, currency, paymentTerm, fiscalPosition, journal, campaign, utmSource, medium, warehouse, lines, lines.product, lines.linkedSaleOrderSale, lines.uom, lines.productPackaging, lines.currency, lines.orderPartner, lines.salesman, lines.warehouse, lines.route, lines.company | partner,lines |
filter[id] | string | No | Comma-separated list of IDs to filter by | |
filter[state] | string | No | Filter by state | |
filter[partner_id] | string | No | Comma-separated list of partner IDs to filter by | |
filter[trashed] | string | No | Filter by trashed status. Available options: with, only | with |
sort | string | Yes | Sort field | -created_at |
page | integer | Yes | Page number | 1 |
curl -X GET "https://your-domain.com/admin/api/v1/sales/orders?include=partner%2Clines&filter%5Btrashed%5D=with&sort=-created_at&page=1" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders?include=partner%2Clines&filter%5Btrashed%5D=with&sort=-created_at&page=1", {
method: "GET",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/sales/orders?include=partner%2Clines&filter%5Btrashed%5D=with&sort=-created_at&page=1', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders?include=partner%2Clines&filter%5Btrashed%5D=with&sort=-created_at&page=1"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": [
{
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": null,
"origin": "SO-8080",
"reference": "distinctio",
"date_order": "2026-10-06T00:00:00.000000Z",
"validity_date": "2026-10-15T00:00:00.000000Z",
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 1041.497,
"amount_tax": 156.2246,
"amount_total": 1197.7216,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": null,
"access_token": "7238c265-1ccd-3164-9a90-29eee45fcfb2",
"partner_id": 11,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 200,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
{
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-5716",
"origin": "SO-2922",
"reference": null,
"date_order": "2026-09-29T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 512.4504,
"amount_tax": 76.8676,
"amount_total": 589.318,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": null,
"access_token": "87145f50-0ce7-362d-a72b-df018bcab06d",
"partner_id": 12,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 201,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}Error response — 401
{
"message": "Unauthenticated."
}Create order
POST/admin/api/v1/sales/ordersCreate a new order with line items
🔒 Requires a valid Bearer token.
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
partner_id | integer | Yes | Customer (partner) ID. Must match an existing stored value. |
payment_term_id | integer | Yes | Payment term ID. Must match an existing stored value. |
date_order | string | Yes | Order date in YYYY-MM-DD format. Must be a valid date. |
validity_date | string | No | Quotation validity date in YYYY-MM-DD format. Must be a valid date. |
commitment_date | string | No | Must be a valid date. |
client_order_ref | string | No | Must not be greater than 255 characters. |
origin | string | No | Must not be greater than 255 characters. |
note | string | No | Terms and conditions or internal note. |
user_id | integer | No | Must match an existing stored value. |
company_id | integer | No | Company ID. Must match an existing stored value. |
currency_id | integer | No | Currency ID. Ignored when a price list is given, as the order then follows the price list currency. Must match an existing stored value. |
price_list_id | integer | No | Price list ID. Its currency becomes the order currency, and its rules price any line sent without a unit price. Must match an existing stored value. |
campaign_id | integer | No | Must match an existing stored value. |
utm_source_id | integer | No | Must match an existing stored value. |
medium_id | integer | No | Must match an existing stored value. |
sales_order_tags | integer[] | No | Must match an existing stored value. |
lines | object[] | Yes | Array of order line items with writable fields from the quotation form. Must have at least 1 items. |
lines[].id | integer | No | Must match an existing stored value. |
lines[].product_id | integer | Yes | Must match an existing stored value. |
lines[].product_qty | number | Yes | Must be at least 0. Must not be greater than 99999999999. |
lines[].qty_delivered | number | No | Must be at least 0. Must not be greater than 99999999999. |
lines[].product_packaging_qty | number | No | Must be at least 0. Must not be greater than 99999999999. |
lines[].price_unit | number | No | This field is required when price_list_id is not present. Must be at least 0. Must not be greater than 99999999999. |
lines[].discount | number | No | Must be at least 0. Must not be greater than 100. |
lines[].customer_lead | number | No | Must be at least 0. Must not be greater than 99999999999. |
lines[].product_uom_id | integer | No | Must match an existing stored value. |
lines[].product_packaging_id | integer | No | Must match an existing stored value. |
lines[].taxes | integer[] | No | Must match an existing stored value. |
curl -X POST "https://your-domain.com/admin/api/v1/sales/orders" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"partner_id": 1,
"payment_term_id": 1,
"date_order": "2026-02-18",
"validity_date": "2026-02-28",
"commitment_date": "2026-10-12T10:50:03",
"client_order_ref": "b",
"origin": "n",
"note": "Delivery within 7 business days.",
"user_id": 16,
"company_id": 1,
"currency_id": 1,
"price_list_id": 1,
"campaign_id": 16,
"utm_source_id": 16,
"medium_id": 16,
"sales_order_tags": [
16
],
"lines": [
{
"product_id": 10,
"product_qty": 2,
"product_uom_id": 1,
"price_unit": 120.5,
"discount": 5,
"customer_lead": 8,
"product_packaging_id": null,
"product_packaging_qty": 16,
"taxes": [
1,
2
]
}
]
}'const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"partner_id": 1,
"payment_term_id": 1,
"date_order": "2026-02-18",
"validity_date": "2026-02-28",
"commitment_date": "2026-10-12T10:50:03",
"client_order_ref": "b",
"origin": "n",
"note": "Delivery within 7 business days.",
"user_id": 16,
"company_id": 1,
"currency_id": 1,
"price_list_id": 1,
"campaign_id": 16,
"utm_source_id": 16,
"medium_id": 16,
"sales_order_tags": [
16
],
"lines": [
{
"product_id": 10,
"product_qty": 2,
"product_uom_id": 1,
"price_unit": 120.5,
"discount": 5,
"customer_lead": 8,
"product_packaging_id": null,
"product_packaging_qty": 16,
"taxes": [
1,
2
]
}
]
}),
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/sales/orders', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'partner_id' => 1,
'payment_term_id' => 1,
'date_order' => '2026-02-18',
'validity_date' => '2026-02-28',
'commitment_date' => '2026-10-12T10:50:03',
'client_order_ref' => 'b',
'origin' => 'n',
'note' => 'Delivery within 7 business days.',
'user_id' => 16,
'company_id' => 1,
'currency_id' => 1,
'price_list_id' => 1,
'campaign_id' => 16,
'utm_source_id' => 16,
'medium_id' => 16,
'sales_order_tags' => [
16,
],
'lines' => [
[
'product_id' => 10,
'product_qty' => 2,
'product_uom_id' => 1,
'price_unit' => 120.5,
'discount' => 5,
'customer_lead' => 8,
'product_packaging_id' => null,
'product_packaging_qty' => 16,
'taxes' => [
1,
2,
],
],
],
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"partner_id": 1,
"payment_term_id": 1,
"date_order": "2026-02-18",
"validity_date": "2026-02-28",
"commitment_date": "2026-10-12T10:50:03",
"client_order_ref": "b",
"origin": "n",
"note": "Delivery within 7 business days.",
"user_id": 16,
"company_id": 1,
"currency_id": 1,
"price_list_id": 1,
"campaign_id": 16,
"utm_source_id": 16,
"medium_id": 16,
"sales_order_tags": [
16,
],
"lines": [
{
"product_id": 10,
"product_qty": 2,
"product_uom_id": 1,
"price_unit": 120.5,
"discount": 5,
"customer_lead": 8,
"product_packaging_id": None,
"product_packaging_qty": 16,
"taxes": [
1,
2,
],
},
],
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 201
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-0564",
"origin": "SO-5625",
"reference": null,
"date_order": "2026-09-29T00:00:00.000000Z",
"validity_date": "2026-11-02T00:00:00.000000Z",
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 9953.7406,
"amount_tax": 1493.0611,
"amount_total": 11446.8017,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Deserunt aut ab provident perspiciatis quo omnis nostrum. Adipisci quidem nostrum qui commodi incidunt iure. Et et modi ipsum nostrum.",
"access_token": "6b72fe4a-5b40-307c-bc24-f79acf9a1bb9",
"partner_id": 13,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 202,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order created successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Show order
GET/admin/api/v1/sales/orders/{id}Retrieve a specific order by its ID
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: partner, partnerInvoice, partnerShipping, user, team, company, currency, paymentTerm, fiscalPosition, journal, campaign, utmSource, medium, warehouse, lines, lines.product, lines.linkedSaleOrderSale, lines.uom, lines.productPackaging, lines.currency, lines.orderPartner, lines.salesman, lines.warehouse, lines.route, lines.company | partner,lines |
curl -X GET "https://your-domain.com/admin/api/v1/sales/orders/{id}?include=partner%2Clines" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}?include=partner%2Clines", {
method: "GET",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/sales/orders/{id}?include=partner%2Clines', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}?include=partner%2Clines"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-1881",
"origin": "SO-4902",
"reference": null,
"date_order": "2026-10-09T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 119.7035,
"amount_tax": 17.9555,
"amount_total": 137.659,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Ipsum nostrum omnis autem et consequatur aut dolores enim. Facere tempora ex voluptatem laboriosam. Quis adipisci molestias fugit deleniti distinctio eum.",
"access_token": "d03cceb8-0e59-3c26-8133-808072ac8a4c",
"partner_id": 14,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 203,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
}
}Error response — 401
{
"message": "Unauthenticated."
}Update order
PUT/admin/api/v1/sales/orders/{id}Update an existing order and sync line items
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
partner_id | integer | No | Customer (partner) ID. Must match an existing stored value. |
payment_term_id | integer | No | Payment term ID. Must match an existing stored value. |
date_order | string | No | Order date in YYYY-MM-DD format. Must be a valid date. |
validity_date | string | No | Quotation validity date in YYYY-MM-DD format. Must be a valid date. |
commitment_date | string | No | Must be a valid date. |
client_order_ref | string | No | Must not be greater than 255 characters. |
origin | string | No | Must not be greater than 255 characters. |
note | string | No | Terms and conditions or internal note. |
user_id | integer | No | Must match an existing stored value. |
company_id | integer | No | Company ID. Must match an existing stored value. |
currency_id | integer | No | Currency ID. Ignored when a price list is given, as the order then follows the price list currency. Must match an existing stored value. |
price_list_id | integer | No | Price list ID. Its currency becomes the order currency, and its rules price any line sent without a unit price. Must match an existing stored value. |
campaign_id | integer | No | Must match an existing stored value. |
utm_source_id | integer | No | Must match an existing stored value. |
medium_id | integer | No | Must match an existing stored value. |
sales_order_tags | integer[] | No | Must match an existing stored value. |
lines | object[] | No | Array of order line items with writable fields from the quotation form. Must have at least 1 items. |
lines[].id | integer | No | Must match an existing stored value. |
lines[].product_id | integer | Yes | Must match an existing stored value. |
lines[].product_qty | number | Yes | Must be at least 0. Must not be greater than 99999999999. |
lines[].qty_delivered | number | No | Must be at least 0. Must not be greater than 99999999999. |
lines[].product_packaging_qty | number | No | Must be at least 0. Must not be greater than 99999999999. |
lines[].price_unit | number | No | This field is required when price_list_id is not present. Must be at least 0. Must not be greater than 99999999999. |
lines[].discount | number | No | Must be at least 0. Must not be greater than 100. |
lines[].customer_lead | number | No | Must be at least 0. Must not be greater than 99999999999. |
lines[].product_uom_id | integer | No | Must match an existing stored value. |
lines[].product_packaging_id | integer | No | Must match an existing stored value. |
lines[].taxes | integer[] | No | Must match an existing stored value. |
curl -X PUT "https://your-domain.com/admin/api/v1/sales/orders/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"partner_id": 1,
"payment_term_id": 1,
"date_order": "2026-02-18",
"validity_date": "2026-02-28",
"commitment_date": "2026-10-12T10:50:03",
"client_order_ref": "b",
"origin": "n",
"note": "Delivery within 7 business days.",
"user_id": 16,
"company_id": 1,
"currency_id": 1,
"price_list_id": 1,
"campaign_id": 16,
"utm_source_id": 16,
"medium_id": 16,
"sales_order_tags": [
16
],
"lines": [
{
"product_id": 10,
"product_qty": 2,
"product_uom_id": 1,
"price_unit": 120.5,
"discount": 5,
"customer_lead": 8,
"product_packaging_id": null,
"product_packaging_qty": 16,
"taxes": [
1,
2
]
}
]
}'const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}", {
method: "PUT",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"partner_id": 1,
"payment_term_id": 1,
"date_order": "2026-02-18",
"validity_date": "2026-02-28",
"commitment_date": "2026-10-12T10:50:03",
"client_order_ref": "b",
"origin": "n",
"note": "Delivery within 7 business days.",
"user_id": 16,
"company_id": 1,
"currency_id": 1,
"price_list_id": 1,
"campaign_id": 16,
"utm_source_id": 16,
"medium_id": 16,
"sales_order_tags": [
16
],
"lines": [
{
"product_id": 10,
"product_qty": 2,
"product_uom_id": 1,
"price_unit": 120.5,
"discount": 5,
"customer_lead": 8,
"product_packaging_id": null,
"product_packaging_qty": 16,
"taxes": [
1,
2
]
}
]
}),
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-domain.com/admin/api/v1/sales/orders/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'partner_id' => 1,
'payment_term_id' => 1,
'date_order' => '2026-02-18',
'validity_date' => '2026-02-28',
'commitment_date' => '2026-10-12T10:50:03',
'client_order_ref' => 'b',
'origin' => 'n',
'note' => 'Delivery within 7 business days.',
'user_id' => 16,
'company_id' => 1,
'currency_id' => 1,
'price_list_id' => 1,
'campaign_id' => 16,
'utm_source_id' => 16,
'medium_id' => 16,
'sales_order_tags' => [
16,
],
'lines' => [
[
'product_id' => 10,
'product_qty' => 2,
'product_uom_id' => 1,
'price_unit' => 120.5,
'discount' => 5,
'customer_lead' => 8,
'product_packaging_id' => null,
'product_packaging_qty' => 16,
'taxes' => [
1,
2,
],
],
],
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"partner_id": 1,
"payment_term_id": 1,
"date_order": "2026-02-18",
"validity_date": "2026-02-28",
"commitment_date": "2026-10-12T10:50:03",
"client_order_ref": "b",
"origin": "n",
"note": "Delivery within 7 business days.",
"user_id": 16,
"company_id": 1,
"currency_id": 1,
"price_list_id": 1,
"campaign_id": 16,
"utm_source_id": 16,
"medium_id": 16,
"sales_order_tags": [
16,
],
"lines": [
{
"product_id": 10,
"product_qty": 2,
"product_uom_id": 1,
"price_unit": 120.5,
"discount": 5,
"customer_lead": 8,
"product_packaging_id": None,
"product_packaging_qty": 16,
"taxes": [
1,
2,
],
},
],
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-0564",
"origin": "SO-5625",
"reference": null,
"date_order": "2026-09-29T00:00:00.000000Z",
"validity_date": "2026-11-02T00:00:00.000000Z",
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 9953.7406,
"amount_tax": 1493.0611,
"amount_total": 11446.8017,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Deserunt aut ab provident perspiciatis quo omnis nostrum. Adipisci quidem nostrum qui commodi incidunt iure. Et et modi ipsum nostrum.",
"access_token": "6b72fe4a-5b40-307c-bc24-f79acf9a1bb9",
"partner_id": 15,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 204,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order updated successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Delete order
DELETE/admin/api/v1/sales/orders/{id}Soft delete an order
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
curl -X DELETE "https://your-domain.com/admin/api/v1/sales/orders/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/sales/orders/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"message": "Order deleted successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Restore order
POST/admin/api/v1/sales/orders/{id}/restoreRestore a soft-deleted order
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
curl -X POST "https://your-domain.com/admin/api/v1/sales/orders/{id}/restore" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}/restore", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/sales/orders/{id}/restore', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}/restore"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-1881",
"origin": "SO-4902",
"reference": null,
"date_order": "2026-10-09T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 119.7035,
"amount_tax": 17.9555,
"amount_total": 137.659,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Ipsum nostrum omnis autem et consequatur aut dolores enim. Facere tempora ex voluptatem laboriosam. Quis adipisci molestias fugit deleniti distinctio eum.",
"access_token": "d03cceb8-0e59-3c26-8133-808072ac8a4c",
"partner_id": 16,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 205,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order restored successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Force delete order
DELETE/admin/api/v1/sales/orders/{id}/forcePermanently delete an order
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
curl -X DELETE "https://your-domain.com/admin/api/v1/sales/orders/{id}/force" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}/force", {
method: "DELETE",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/sales/orders/{id}/force', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}/force"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"message": "Order permanently deleted."
}Error response — 401
{
"message": "Unauthenticated."
}Confirm order
POST/admin/api/v1/sales/orders/{id}/confirmConfirm a quotation and convert it to a sale order
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
curl -X POST "https://your-domain.com/admin/api/v1/sales/orders/{id}/confirm" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}/confirm", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/sales/orders/{id}/confirm', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}/confirm"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-1881",
"origin": "SO-4902",
"reference": null,
"date_order": "2026-10-09T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 119.7035,
"amount_tax": 17.9555,
"amount_total": 137.659,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Ipsum nostrum omnis autem et consequatur aut dolores enim. Facere tempora ex voluptatem laboriosam. Quis adipisci molestias fugit deleniti distinctio eum.",
"access_token": "d03cceb8-0e59-3c26-8133-808072ac8a4c",
"partner_id": 17,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 206,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order confirmed successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Cancel order
POST/admin/api/v1/sales/orders/{id}/cancelCancel a sale order
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
partners | integer[] | No | Must match an existing stored value. |
subject | string | No | This field is required when partners_partners is present. Must not be greater than 255 characters. |
description | string | No | This field is required when partners_partners is present. |
curl -X POST "https://your-domain.com/admin/api/v1/sales/orders/{id}/cancel" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"partners": [
16
],
"subject": "n",
"description": "Eius et animi quos velit et."
}'const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}/cancel", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"partners": [
16
],
"subject": "n",
"description": "Eius et animi quos velit et."
}),
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/sales/orders/{id}/cancel', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'partners' => [
16,
],
'subject' => 'n',
'description' => 'Eius et animi quos velit et.',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}/cancel"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"partners": [
16,
],
"subject": "n",
"description": "Eius et animi quos velit et.",
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-0841",
"origin": null,
"reference": null,
"date_order": "2026-09-16T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 5472.9264,
"amount_tax": 820.939,
"amount_total": 6293.8654,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Perspiciatis quo omnis nostrum aut adipisci quidem nostrum qui. Incidunt iure odit et et modi ipsum. Omnis autem et consequatur. Dolores enim non facere tempora.",
"access_token": "5707ca55-f609-3528-be8b-1baeaee1567e",
"partner_id": 18,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 207,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order canceled successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Set order as quotation
POST/admin/api/v1/sales/orders/{id}/set-as-quotationSet a canceled sale order back to quotation
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
curl -X POST "https://your-domain.com/admin/api/v1/sales/orders/{id}/set-as-quotation" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}/set-as-quotation", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/sales/orders/{id}/set-as-quotation', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}/set-as-quotation"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-1881",
"origin": "SO-4902",
"reference": null,
"date_order": "2026-10-09T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 119.7035,
"amount_tax": 17.9555,
"amount_total": 137.659,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Ipsum nostrum omnis autem et consequatur aut dolores enim. Facere tempora ex voluptatem laboriosam. Quis adipisci molestias fugit deleniti distinctio eum.",
"access_token": "d03cceb8-0e59-3c26-8133-808072ac8a4c",
"partner_id": 19,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 208,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order set as quotation successfully."
}Error response — 401
{
"message": "Unauthenticated."
}Toggle sale order lock
POST/admin/api/v1/sales/orders/{id}/toggle-lockToggle lock status for a confirmed sale order
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The order ID |
curl -X POST "https://your-domain.com/admin/api/v1/sales/orders/{id}/toggle-lock" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"const response = await fetch("https://your-domain.com/admin/api/v1/sales/orders/{id}/toggle-lock", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/sales/orders/{id}/toggle-lock', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);import requests
url = "https://your-domain.com/admin/api/v1/sales/orders/{id}/toggle-lock"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
data = response.json()
print(data)Example response 200
{
"data": {
"id": null,
"name": null,
"state": "draft",
"invoice_status": "to_invoice",
"client_order_ref": "PO-1881",
"origin": "SO-4902",
"reference": null,
"date_order": "2026-10-09T00:00:00.000000Z",
"validity_date": null,
"commitment_date": null,
"currency_rate": 1,
"amount_untaxed": 119.7035,
"amount_tax": 17.9555,
"amount_total": 137.659,
"locked": false,
"require_signature": false,
"require_payment": false,
"signed_by": null,
"signed_on": null,
"prepayment_percent": 0,
"note": "Ipsum nostrum omnis autem et consequatur aut dolores enim. Facere tempora ex voluptatem laboriosam. Quis adipisci molestias fugit deleniti distinctio eum.",
"access_token": "d03cceb8-0e59-3c26-8133-808072ac8a4c",
"partner_id": 20,
"partner_invoice_id": 1,
"partner_shipping_id": 1,
"user_id": 1,
"team_id": null,
"company_id": 1,
"currency_id": 209,
"price_list_id": null,
"payment_term_id": null,
"fiscal_position_id": null,
"journal_id": null,
"campaign_id": null,
"utm_source_id": null,
"medium_id": null,
"warehouse_id": null,
"created_at": null,
"updated_at": null,
"deleted_at": null
},
"message": "Order lock state updated successfully."
}Error response — 401
{
"message": "Unauthenticated."
}