For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Order Item

Adds a line item to an existing order and recalculates the order totals.

To add several items at once, pass them in an order_items array to the PUT /orders/{order_id} operation instead, which consumes a single rate limit token rather than one per item.

post
Authorizations
ORDERDESK-API-KEYstringRequired

Your API key, found under Store Settings on the API tab. This should be kept server-side.

ORDERDESK-STORE-IDstringRequired

Your store ID, found under Store Settings on the API tab.

Path parameters
order_idintegerRequired

Order Desk's internal order ID. This is not your source_id.

Example: 736745
Body
idintegerOptional

If an id field is passed the item will be updated. Otherwise it will be added.

Example: 1670028
namestringOptionalExample: ODU Campus Hoodie
pricenumber · doubleOptionalDefault: 0Example: 19
quantityintegerOptionalDefault: 1Example: 2
weightnumber · doubleOptionalExample: 1.2
codestringOptional

Item SKU or product code.

Example: ODU-HOOD-NVY-L
delivery_typestring · enumOptional

Available options are ship, noship, download, or future. Defaults to ship.

Default: shipPossible values:
category_codestringOptional

Further details about the type of item. Freeform text.

Example: Apparel
fulfillment_methodstringOptional

Fulfillment method responsible for this item, when one applies.

Other propertiesanyOptional
Other propertiesanyOptional
Responses
200

The item was added.

application/json
statusstring · enumRequired

Either success or error.

Possible values:
messagestringOptional

Describes the result. Always present when an error occurs.

execution_timestringOptional

Time taken to process the request.

Example: 0.1524 seconds
post/orders/{order_id}/order-items
curl "https://app.orderdesk.me/api/v2/orders/736745/order-items" \
  -X POST \
  -H "ORDERDESK-STORE-ID: your-store-id" \
  -H "ORDERDESK-API-KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "ODU Campus Hoodie", "code": "ODU-HOOD-NVY-L", "price": 19, "quantity": 1, "weight": 1.2, "delivery_type": "ship", "variation_list": {"Size": "Large", "Color": "Red"}}'
{
  "status": "success",
  "message": "Order Item Added",
  "execution_time": "0.1524 seconds"
}

Last updated

Was this helpful?