Complete draft order
PUT https://{handle}.myshopline.com/admin/openapi/v20230901/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 requiredThe value of this field is fixed to
application/json; charset=utf-8
- Authorization string requiredThe access token for the API. Please refer to App authorization to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Response
- 200
- 401
- 429
For more information about status codes, see Http status code.
Response Headers
traceId
traceId
Response Body
draft_orderobject
Draft orderbilling_addressobject
Payment slip addressaddress1 stringDetailed address information 1 , used as complementary informationExample:8899 Garfield Street
address2 stringDetailed address information 2 , used as complementary informationExample:Apartment 5
area stringAdministrative region namearea_code stringAdministrative district encoding , custom numberExample:4200006
city stringCity nameExample:Riverside
city_code stringCity coding , custom numberExample:4200006
company stringCompany nameExample:SHOPLINE
country stringCountry nameExample:Usa
country_code stringCountry or region code , two ISO-3166-1Example:US
email stringUser mailboxExample:test@shoplineapp.com
first_name stringUser nameExample:Tom
last_name stringUser last nameExample:Washington
phone stringContact numberExample:13100000000
province stringState or provincial nameExample:California
province_code stringState or provincial code , custom numberExample:4200006
same_as_receiver booleanSame as receiving information : true、falseExample:true
street_name stringStreet namestreet_number stringStreet encoding , custom numberingExample:4200006
zip stringShipping address postal numberExample:92503
create_at longCreate time , time stamp formatExample:1667638652832
currency stringStore currencyExample:USD
customerobject
Buyer informationarea_code stringContact area idemail stringUser mailboxfirst_name stringUser's first nameExample:Xiaoliu
id stringUser IDlast_name stringUser's last nameExample:Wang
phone stringUser mobile phone numberdiscount_amount_ext stringOrder Discount amount , double type string for accuracy 2 , eg : " 12.41 "discount_amount_ext_name stringOrder Discount nameid stringDraft order numberExample:2505659131831930856670
invoice_url stringInvoice linkline_itemsobject[]
Listing listapplied_discountobject
Product custom discount informationamount stringDiscount amount , double type string for accuracy 2 , eg : " 12.41 "Example:1.00
before_amount stringProduct selling price , double type string for precision 2 , eg : " 12.41 "Example:3.00
description stringDiscount descriptionExample:5 yuan off for two more pieces
title stringDiscount nameExample:Full reduction
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:1
value_type stringDiscount type : fixed_amount ( fixed amount ) 、percentage ( % )Example:fixed_amount
gift_card booleanWei for gift cards or not : true、falseExample:true
id stringProduct line id , unique confirm a Product lineprice stringProduct amount after participating in custom discountsExample:2.00
product_id stringProduct s pu serial numberExample:16056577393789045351043258
product_source stringProduct source main_site main station product、customize custom productExample:main_site
quantity integerProduct quantityExample:1
requires_shipping booleanNeeds physical transportation and delivery or not : true、falseExample:true
title stringProduct titlevariant_id stringProduct SKU serial numberExample:18056577393793239655103258
variant_title stringCommercial sku titlenote stringDraft order noteExample:Customer wants to ship asap
note_attributesobject[]
Additional informationname stringNamevalue stringvalueorder_id stringOrder number generated by current draft orderExample:21056577640603870897253153
payment_termsobject
Payment informationpay_channel_id stringPayment channel idpay_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:unpaid
payment_channel_name stringPayment channel nameseller_id stringMerchant idshipping_addressobject
Shipping addressaddress1 stringDetailed address information 1 , used as complementary informationExample:8899 Garfield Street
address2 stringDetailed address information 2 , used as complementary informationExample:Apartment 5
city stringCity nameExample:Riverside
city_code stringCity coding , custom numberExample:4200006
company stringCompany namecountry stringCountry nameExample:Usa
country_code stringCountry or region code , two ISO-3166-1Example:US
delivery_store_code stringStore code , custom numberExample:4200006
delivery_store_name stringStore namedistrict stringAdministrative region namedistrict_code stringAdministrative district encoding , custom numberExample:4200006
first_name stringFirst nameExample:Tom
last_name stringLast nameExample:Washington
phone stringContact numberExample:13100000000
province stringProvinceprovince_code stringProvince-codingstreet_name stringStreet namestreet_number stringStreet encoding , custom numberingExample:4200006
zip stringShipping address postal numberExample:92503
shipping_linesobject
Logistics informationdelivery_id stringShipping method id , shipping template idexpress_type_source stringLogistics type system- system logistics ; custom- custom logisticsExample:system
price stringLogistics shipping , double type string with accuracy 2Example:12.41
title stringShipping template namestatus stringDraft order status : open 、 completeExample:open
stock_reserved booleanOrder dimension inventory reserve mark : true、flaseExample:true
stock_reserved_time longOrder dimension inventory pre-reserved timeExample:1669280400000
subtotal_price stringOrder amount , double type string for accuracy 2 , eg : " 12.41 "tags arrayThe draft order tag uses separated by ',' between multiple tag rooms , and the shop dimension supports up to 99 tagExample:shine,bili
total_discounts stringTotal discount amount , double type string for precision 2 , eg : " 12.41 "total_duties_setobject
Total dutypresentment_moneyobject
Buyer side amount informationamount stringAmountcurrency_code stringCurrencyshop_moneyobject
Sell side amount informationamount stringAmountcurrency_code stringCurrencytotal_line_items_price stringCurrent draft order Product total amountExample:2.00
total_tax stringTotal tax , double type string for precision 2 , eg : " 12.41 "update_at longUpdate time , time stamp formatExample:1667638652832
API Explorer
Debugger
Examples
Was this article helpful to you?
Error loading component.