Skip to main content

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​

HeaderValueRequiredDescription
X-API-Key{api_key}YesAPI key for authentication.
Content-Typeapplication/jsonYesThe 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​

FieldTypeRequiredDescription
currencyCodeStringstringYesThe ISO 4217 currency code (e.g., "USD", "EUR", "GBP").
orderDatestring (date)YesThe date the order was placed (ISO 8601 format: YYYY-MM-DD).
dueDatestring (date)YesThe due date for the order (ISO 8601 format: YYYY-MM-DD).
notesstringNoOptional notes or comments for the sales order.
authorizedbooleanYesWhether the sales order is authorized upon creation.
itemsarrayYesAn array of line items included in the sales order. At least one item is required.
chargesarrayNoAn array of additional charges applied to the sales order.

Items Array Fields​

Each object in the items array has the following fields:

FieldTypeRequiredDescription
itemCodestringYesThe code or SKU of the item being ordered (e.g., "LISTING-1").
qtynumberYesThe quantity of the item being ordered.
unitPricenumberYesThe unit price of the item.
amountnumberYesThe total amount for this line item (qty × unitPrice).

Charges Array Fields​

Each object in the charges array has the following fields:

FieldTypeRequiredDescription
amountnumberYesThe amount of the additional charge.
descriptionstringNoA description of the charge.
chargeTypestringNoThe type or category of the charge (e.g., "shipping", "tax", "handling").