post
https://{store}/api/rest/orders//add-items
Request Fields:
| Field | Type | Required | Description |
|---|---|---|---|
| items | array | Yes | Array of items to add |
| items[].product_id | integer | Yes | Product entity ID |
| items[].qty | number | Yes | Quantity to add |
| items[].price | number | No | Custom price per unit (uses catalog price if not provided) |
| items[].variation_id | integer | No | Variation product ID (for configurable products) |
| items[].customizations | object | No | Product customizations (option_id => value) |
| items[].unique_in_quote | integer | No | Controls merge behavior. 0 (default) = merge with existing matching item. Non-zero = force new line item. |
| items[].use_discount | integer | No | Whether discounts apply to this item (default: 1) |
| items[].uses_markdown | integer | No | Markdown pricing flag |
| items[].comment | string | No | Item-level comment |
| items[].attachments | mixed | No | Item attachments |
| items[].option_inventory_location | mixed | No | Inventory location data |
| preview | boolean | No | If true, returns what the order would look like without saving changes (dry-run) |
Error Responses:
| Code | Description | Example |
|---|---|---|
| 400 | Bad Request - Validation error | "Items array is required." |
| 400 | Product not found | "Product with SKU 'X' does not exist." |
| 400 | Order in finished state | "Cannot add items to order in complete state." |
| 400 | Negative/zero price | "Price must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-001) |
| 400 | Negative quantity | "Quantity must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002) |
| 400 | Extreme quantity | "Quantity cannot exceed 10,000 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002) |
| 400 | Configurable without variation | "Configurable product X requires a variation_id." |
| 401 | Unauthorized | "Invalid authentication credentials." |
| 404 | Order not found | "Order not found." |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
