Complete draft order
PUT https://{handle}.myshopline.com/admin/openapi/v20260301/orders/draft_orders/:id/complete.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 .Push draft single into order
Path Parameters
- id string requiredDraft order numberExample:
2505751787769346133516
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 authorizationto obtain the access token, and then pass the obtained token in the Bearer format.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
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
draft_orderobject
Draft orderbilling_addressobject
Billing address informationaddress1 stringDetailed address information 1 , used as complementary informationExample:8899 Garfield Streetaddress2 stringDetailed address information 2 , used as complementary informationExample:Apartment 5area stringAdministrative region nameExample:East townarea_code stringAdministrative district encoding , custom numberExample:4200006city stringCity nameExample:Riversidecity_code stringCity coding , custom numberExample:4200006company stringCompany NameExample:SHOPLINEcountry stringCountry nameExample:美国country_code stringCountry or region code , two ISO-3166-1Example:USemail stringUser mailboxExample:test@shoplineapp.comfirst_name stringUser nameExample:Tomlast_name stringUser last nameExample:Washingtonphone stringContact numberExample:13100000000province stringState or provincial nameExample:加利福尼亚州province_code stringState or provincial code , custom numberExample:4200006same_as_receiver booleanSame as receiving information : true、falseExample:truestandard_province_code stringThe code for the province in the billing address, which is a two-digit ISO 3166-2 international code.This differs fromprovince_code- theprovince_coderesponse field uses a custom code.street_name stringStreet nameExample:Streetstreet_number stringStreet encoding , custom numberingExample:4200006zip stringShipping address postal numberExample:92503companyobject
Company infoid stringCompany idExample:1005619945158043247856location_id stringLocation idExample:3005619945158043247856tax_registration_id stringTax registration idExample:213213create_at longCreate time , time stamp formatExample:1667638652832currency stringStore currencyExample:USDcustomerobject
Buyer informationarea_code stringContact area idExample:0000email stringUser mailboxExample:xxx@gmail.comfirst_name stringUser nameExample:Xiaoliuid stringUser IDExample:2200000611last_name stringUser's last nameExample:Wangphone stringUser mobile phone numberExample:1888888888888discount_amount_ext stringOrder Discount amount , double type string for accuracy 2 , eg : " 12.41 "Example:12.41discount_amount_ext_name stringOrder Discount nameExample:Order Discount namediscount_amount_ext_setobject
Order Discount amount , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDid stringDraft order numberExample:2505659131831930856670invoice_url stringInvoice linkExample:https://xxxxx.myshopline.com/invoices/xxxx?secret=xxxxline_itemsobject[]
Listing listapplied_discountobject
Product custom discount informationamount stringDiscount amount , double type string for accuracy 2 , eg : " 12.41 "Example:1.00amount_setobject
Discount amount , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDbefore_amount stringProduct selling price , double type string for precision 2 , eg : " 12.41 "Example:3.00before_amount_setobject
Zhekou selling price before discount , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDdescription stringDiscount descriptionExample:满两件减5元title stringDiscount nameExample:满减value longDiscount amount, discount value, when the discount type is DISCOUNT_AMOUNT_PERCENTAGE, the minimum value is 0 and the maximum value is 100 by defaultExample:1value_type stringDiscount type : fixed_amount ( fixed amount ) 、percentage ( % )Example:fixed_amountgift_card booleanWei for gift cards or not : true、falseExample:trueid stringProduct line id , unique confirm a Product lineExample:123123image_url stringpicture urlExample:http://www.abc.com/123price stringProduct amount after participating in custom discountsExample:2.00price_setobject
Product amount after participating in custom discounts , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDproduct_id stringProduct s pu serial numberExample:16056577393789045351043258product_source stringProduct source main_site main station product、customize custom productExample:main_sitequantity integerProduct quantityExample:1requires_shipping booleanNeeds physical transportation and delivery or not : true、falseExample:truetax_linesobject[]
Tax informationname stringTax nameExample:taxprice stringTax ( store currency amount ) , accuracy 2Example:8.00price_setobject
Multi-currency information of taxpresentment_moneyobject
Buy side currencyamount stringAmountExample:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side currencyamount stringAmountExample:8.00currency_code stringCurrencyExample:USDrate doubleTax rateExample:1type stringTax fee type, used to distinguish between commodity tax and freight tax. The enumeration value is as follows product_tax: commodity tax shipping_tax: freight taxExample:shipping_taxtitle stringProduct titleExample:Product titlevariant_id stringProduct SKU serial numberExample:18056577393793239655103258variant_title stringCommercial sku titleExample:Commercial sku titlenote stringDraft order noteExample:客户想要尽快发货note_attributesobject[]
Additional informationname stringNameExample:xxxxvalue stringValueExample:2order_id stringOrder number generated by current draft orderExample:21056577640603870897253153payment_termsobject
Payment informationcreated_at stringCreate timeExample:2024-06-05 08:00:00due_in_days integerWhen the terms type is NET, the payment is due after how many days if the payment is not madeExample:2id stringThe unique identifier (ID) that identifies this payment termExample:6497210673894431747overdue booleanIs the payment term overdue: true/falseExample:truepay_channel_id stringPayment channel idExample:5341701129888599091pay_status stringPayment slip status : after not paying for the paid draft order and generating the order , the payment slip state will not synchronize the payment status of the orderExample:unpaidpayment_channel_name stringPayment channel nameExample:Custom payment --uploadfilepayment_schedulesobject[]
A set of schedules associated with the payment termscompleted_at stringPayment completion dateExample:2024-06-05 08:00:00due_at stringExpected payment dateExample:2024-06-05 08:00:00issued_at stringThe time when the payment terms are triggered. When the type is FIXED, it is the saved time (if the draft order becomes an order, the order inherits the draft order time); when the type is FULFILLMENT/RECEIPT, it is the effective time of the condition; when the type is NET, it is the saved time (if the draft order becomes an order, the order inherits the draft order time).Example:2024-06-05 08:00:00payment_terms_name stringThe name of the payment terms template used to create the payment terms.Example:Due on receiptpayment_terms_type stringThe type of payment terms template used to create the payment terms: FIXED: Merchant specified date FULFILLMENT: Fulfillment (Shipment) completion date NET: Fixed condition date RECEIPT: Billing sent date UNKNOWN: Unknown typeExample:RECEIPTupdated_at stringUpdate timeExample:2024-06-05 08:00:00po_number stringPurchase order number recorded on the order in B2B scenariosseller_id stringMerchant idExample:160123123shipping_addressobject
Logistics informationaddress1 stringDetailed address information 1 , used as complementary informationExample:8899 Garfield Streetaddress2 stringDetailed address information 2 , used as complementary informationExample:Apartment 5city stringCity nameExample:Riversidecity_code stringCity coding , custom numberExample:4200006company stringCompany NameExample:Company Namecountry stringCountry nameExample:美国country_code stringCountry or region code , two ISO-3166-1Example:USdelivery_store_code stringStore code , custom numberExample:4200006delivery_store_name stringStore nameExample:Store namedistrict stringAdministrative region nameExample:Administrative region namedistrict_code stringAdministrative district encoding , custom numberExample:4200006first_name stringFirst nameExample:Tomlast_name stringLast nameExample:Washingtonphone stringContact numberExample:13100000000province stringProvinceExample:Californiaprovince_code stringProvince-codingExample:4200006standard_province_code stringThe code for the province in the shipping address, which is a two-digit ISO 3166-2 international code.This differs fromprovince_code- theprovince_coderesponse field uses a custom code.street_name stringStreet nameExample:Streetstreet_number stringStreet encoding , custom numberingExample:4200006zip stringShipping address postal numberExample:92503shipping_linesobject
Logistics informationdelivery_id stringShipping method id , shipping template idExample:109012039908express_type_source stringLogistics type system- system logistics ; custom- custom logisticsExample:systemprice stringLogistics shipping , double type string with accuracy 2Example:12.41price_setobject
Logistics shipping , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.00currency_code stringCurrencyExample:USDtitle stringShipping template nameExample:Shipping template namestatus stringDraft order status : open 、 completeExample:openstock_reserved booleanOrder dimension inventory reserve mark : true、flaseExample:truestock_reserved_time longOrder dimension inventory pre-reserved timeExample:1669280400000subtotal_price stringOrder amount , double type string for accuracy 2 , eg : " 12.41 "Example:12.41tags arrayThe draft order tag uses separated by ',' between multiple tag rooms , and the shop dimension supports up to 99 tagExample:["shine,bili"]tax_linesobject[]
Tax informationname stringTax nameExample:TAXprice stringTax ( store currency amount ) , accuracy 2Example:8.00price_setobject
Multi-currency information of taxpresentment_moneyobject
Buyer side amount informationamount stringAmount, Precision 2Example:8.00currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmount, Precision 2Example:8.00currency_code stringCurrencyExample:USDrate doubleTax rateExample:1type stringTax fee type, used to distinguish between commodity tax and freight tax. The enumeration value is as follows product_tax: commodity tax shipping_tax: freight taxExample:shipping_taxtotal_discounts stringTotal discount amount , double type string for precision 2 , eg : " 12.41 "Example:12.41total_duties_setobject
Total dutypresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDtotal_line_items_price stringCurrent draft order Product total amountExample:2.00total_line_items_price_setobject
Current draft order Product total amount , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDtotal_tax stringTotal tax , double type string for precision 2 , eg : " 12.41 "Example:12.41total_tax_setobject
Total tax , multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDshop_moneyobject
Sell side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDupdate_at longUpdate time , time stamp formatExample:1667638652832
API Explorer
Debugger
Was this article helpful to you?