Add Items

Request Fields:

FieldTypeRequiredDescription
itemsarrayYesArray of items to add
items[].product_idintegerYesProduct entity ID
items[].qtynumberYesQuantity to add
items[].pricenumberNoCustom price per unit (uses catalog price if not provided)
items[].variation_idintegerNoVariation product ID (for configurable products)
items[].customizationsobjectNoProduct customizations (option_id => value)
items[].unique_in_quoteintegerNoControls merge behavior. 0 (default) = merge with existing matching item. Non-zero = force new line item.
items[].use_discountintegerNoWhether discounts apply to this item (default: 1)
items[].uses_markdownintegerNoMarkdown pricing flag
items[].commentstringNoItem-level comment
items[].attachmentsmixedNoItem attachments
items[].option_inventory_locationmixedNoInventory location data
previewbooleanNoIf true, returns what the order would look like without saving changes (dry-run)

Error Responses:

CodeDescriptionExample
400Bad Request - Validation error"Items array is required."
400Product not found"Product with SKU 'X' does not exist."
400Order in finished state"Cannot add items to order in complete state."
400Negative/zero price"Price must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-001)
400Negative quantity"Quantity must be greater than 0 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002)
400Extreme quantity"Quantity cannot exceed 10,000 for item X." (code: ORDEDIT-INPUT-ERROR-CODE-002)
400Configurable without variation"Configurable product X requires a variation_id."
401Unauthorized"Invalid authentication credentials."
404Order not found"Order not found."
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Order entity ID

Body Params
items
array of objects
items
Response

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json