Add items in order
POST https://{handle}.myshopline.com/admin/openapi/v20260301/orders/order_edit_add_variant.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .Request Headers
- Content-Type string requiredThe field must be set to the fixed value
application/json; charset=utf-8. - Authorization string requiredThe access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
requestobject required
Request bodylocation_id stringProduct storage position id , if not transferred , then take the default locationIdExample:5664572485024620742quantity integer requiredQuantityExample:2variant_id string requiredProduct id , skuExample:18059373523598358705063774id string requiredModify the draft order id , you can edit from call order-start interface return parametersExample:21098923432423423423
Status Codes
- 200
- 401
- 429
For the complete list of codes and messages, see Http status code.
Response Headers
traceId
A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
calculated_line_itemobject
Product information for this editororiginal_unit_price_setobject
Original price , no application favorable pricepresentment_moneyobject
Market currency amount informationcurrency_code stringCurrencyExample:USDamount stringValue of amount , 2- bit accuracy stringExample:10.0shop_moneyobject
Store currency amount informationamount stringValue of amount , 2- bit accuracy stringExample:10.0currency_code stringCurrencyExample:USDquantity stringQuantityExample:11required_shipping booleanShipping or notExample:truetaxable booleanTax or not requiredExample:truetitle stringProduct titleExample:normal itemvariant_id stringProduct skuExample:18057243001210740422372124added_discount_staged_changeobject
Product line custom discount informationpercent_value stringPercentage Discount value , two decimal points between 0-1 , such as 0.2=20%off as the discount is the percentage type , this item is worth itExample:0.89description stringDiscount descriptionExample:89% offfixed_valueobject
The Discount value of the fixed amount supports two decimal points . the discount is the fixed amount type , which is worthwhileamount stringAmount , two precision double type stringsExample:5.99currency_code stringCurrencyExample:USDid stringDiscount idExample:6068787948765604961id stringOrder editing Product line id in draft orderExample:6068787943765994592calculated_orderobject
Edit order draft order informationcommitted booleanHave submitted save to order or notExample:trueid stringOrder editing draft order idExample:2106068787725276328168095160459272user_errorsobject[]
Error prompt information of this editor , if there is an error in the execution , it will be return in this field , and the call can be tried again according to the error code ( note : try again and need to start the interface from the order_edit.json order editing to start the whole set ofcode stringThe wrong code , if the implementation result is wrong , it will be return the wrong code through this field , and the call can be tried again according to the wrong code ( note : try again and need to start the interface from the order_edit.json order editing to start the whole set of editing orderExample:UNAUTHORIZED_ACCESSfield arrayThe path to the input field that caused the error. leads to the path of incorrect input fieldsExample:["[\"id\"]"]message stringError messageExample:unauthorized access
API Explorer
Debugger
Was this article helpful to you?