Draft Order Attributes API

HTTP POST https://intercity.draftorder.app/draft/<draft_order_id>

 

Authorization

This API require an API Key in the HTTP Header, the header name is API_KEY .

Example :

API_KEY : 12345abcde

 

Add, update, or remove line item properties

 

HTTP POST https://intercity.draftorder.app/draft/<draft_order_id>

draft_order_id is the numeric ID of the Draft order, eg: 123455678

 

Body parameters, (in JSON format)

 

lineItems (array of line items you want to update) , each array element contain "id" and "customAttributes" (array of objects that contain "key" and "value").

 

Example structure of the body JSON :

 

 

Example cURL code :

 

 

If the "key" does not exist in the line item, this API will add the key and value to the line item (ie. attributes name and value).

 

If the "key" already exist in the line item, this API will update the value for the key.

 

If the "value" is set to null , the attribute will be removed from the line item.