Add a custom product
POST https://{handle}.myshopline.com/admin/openapi/v20260301/orders/order_edit_add_customized_item.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
Request informationid string requiredEdit order draft order id ( can be obtained from call order editing-start interface return parameters )Example:2106072100189862661619862135965454location_id stringProduct storage position id , if not transferred , then take the default locationIdExample:6072083990000965196priceobject required
Custom price of goodsamount stringAmount information , two precision double type stringsExample:1.15currency_code stringCurrencyExample:USDquantity integer requiredCustomize Product quantityExample:1title stringProduct titleExample:merge-cst-test-001
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
user_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:PARAM_ILLEGALfield arrayThe path to the input field that caused the error. leads to the path of incorrect input fieldsExample:["[\"id\"]"]message stringError messageExample:param is nullcalculated_line_itemobject
This editor will add a custom listingoriginal_unit_price_setobject
Original price , no application favorable pricepresentment_moneyobject
Currency amount for the marketamount stringValue of the amount , two precision double type stringsExample:10.0currency_code stringCurrencyExample:USDshop_moneyobject
Store currency amount informationamount stringValue of the amount , two precision double type stringsExample:10.0currency_code stringCurrencyExample:USDquantity stringQuantityExample:1required_shipping booleanShipping or notExample:truetaxable booleanTax or not requiredExample:truetitle stringProduct titleExample:customized itemvariant_id stringProduct skuExample:18057243001210740422372124added_discount_staged_changeobject
Product line custom discount informationdescription stringDiscount descriptionExample:customized discountfixed_valueobject
The Discount value of the fixed amount supports two decimal points . the discount is the fixed amount type , which is worthwhilecurrency_code stringCurrencyExample:USDamount stringAmount , two precision double type stringsExample:1.0id stringDiscount idExample:6068787948765604961percent_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:0id 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:2106068787725276328168095160459272
API Explorer
Debugger
Was this article helpful to you?