API Create Sales Order
Create a sales order using an API key, typically used for automated or listing-plan orders.
Endpoint
POST /sales-orders
Authentication
API Key (passed in the X-API-Key header)
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
X-API-Key | {api_key} | Yes | API key for authentication. |
Content-Type | application/json | Yes | The content type of the request body. |
Example Request
curl -X POST "https://api.example.com/sales-orders" \
-H "X-API-Key: {api_key}" \
-H "Content-Type: application/json" \
-d '{
"currencyCodeString": "USD",
"orderDate": "2026-05-26",
"dueDate": "2026-06-02",
"notes": "Listing plan - Once Off",
"authorized": true,
"items": [
{
"itemCode": "LISTING-1",
"qty": 1,
"unitPrice": 60.0,
"amount": 60.0
}
],
"charges": []
}'
Request Schema
The request body must be a JSON object with the following structure:
Root Fields
| Field | Type | Required | Description |
|---|---|---|---|
currencyCodeString | string | Yes | The ISO 4217 currency code (e.g., "USD", "EUR", "GBP"). |
orderDate | string (date) | Yes | The date the order was placed (ISO 8601 format: YYYY-MM-DD). |
dueDate | string (date) | Yes | The due date for the order (ISO 8601 format: YYYY-MM-DD). |
notes | string | No | Optional notes or comments for the sales order. |
authorized | boolean | Yes | Whether the sales order is authorized upon creation. |
items | array | Yes | An array of line items included in the sales order. At least one item is required. |
charges | array | No | An array of additional charges applied to the sales order. |
Items Array Fields
Each object in the items array has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
itemCode | string | Yes | The code or SKU of the item being ordered (e.g., "LISTING-1"). |
qty | number | Yes | The quantity of the item being ordered. |
unitPrice | number | Yes | The unit price of the item. |
amount | number | Yes | The total amount for this line item (qty × unitPrice). |
Charges Array Fields
Each object in the charges array has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | The amount of the additional charge. |
description | string | No | A description of the charge. |
chargeType | string | No | The type or category of the charge (e.g., "shipping", "tax", "handling"). |