Edit draft order
PUT https://{handle}.myshopline.com/admin/openapi/v20220901/orders/draft_orders.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
.Update draft single
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
Request Body
draft_orderobject
Draft order objectbilling_addressobject
Payment slip addressaddress1 stringPay the bill recipient detail address ( 255 characters max )Example:8899 Garfield Street
address2 stringPay the bill recipient detail address additional ( 255 characters max )Example:Apartment 5
area stringAdministrative region name ( up to 64 characters )area_code stringAdministrative district encoding , custom numberExample:4200006
city stringCity name ( up to 64 characters )city_code stringCity coding , custom numbercompany stringCompany nameExample:SHOPLINE
country stringCountry name ( up to 64 characters )Example:Usa
country_code stringCountry or region code , two ISO-3166-1Example:US
email stringUser mailboxExample:test@shoplineapp.com
first_name stringUser name ( up to 64 characters )Example:Tom
last_name stringUser last name ( up to 64 characters )Example:Washington
phone stringContact number ( 32 characters max )Example:13100000000
province stringState or provincial encoding , custom number ( up to 64 characters )Example:California
province_code stringPayment slip consignee provincial codingExample:4200006
same_as_receiver booleanSame as the delivery information? (if they are same, parameters below may not be transmitted)zip stringShipping address postal numberExample:92503
calc_sku_stock_mode string requiredCalculate inventory mode : not_limit , Infinity inventory ; real , real inventory ; reserve_real : reserve inventory + real inventoryExample:not_limit
customerobject
Buyer informationarea_code stringContact area idemail stringUser mailboxid string requiredUser IDphone stringUser mobile phone numberdiscount_amount_ext stringOrder Discount amount , double type string for accuracy 2 , eg : " 12.41 "Example:2.00
discount_amount_ext_name stringOrder discount name (less than 64 characters)id string requiredDraft order numberExample:2505659131831930856670
language_infoobject
Language informationcustomer_language stringBuyer side checkout language (preferred)merchant_language stringSeller side checkout language (buyer side preferred)line_itemsobject[] required
Listing listapplied_discountobject
Product discount informationdescription stringDiscount descriptiontitle stringDiscount namevalue longDiscount amount, discount value, when the discount type is DISCOUNT_AMOUNT_PERCENTAGE, the minimum value is 0 and the maximum value is 100 by defaultvalue_type stringDiscount type : fixed_amount ( fixed amount ) 、percentage ( % )gift_card booleanWhether it is a gift card productid stringOrder Product line id , unique confirm a Product lineprice stringProduct selling price , double type string for precision 2 , eg : " 12.41 "product_id string requiredProduct IDproduct_source string requiredProduct source main_site main station product、customize custom productquantity integer requiredProduct quantitytitle stringProduct namevariant_id string requiredProduct SKUIDnote stringDraft order noteExample:Customer wants to ship asap
note_attributesobject[]
Additional informationname stringNamevalue stringvalueouter_id stringThe only identification of operation , the same id can only perform one operationpayment_termsobject
Payment informationpay_channel_id string requiredPayment method IDpay_status string requiredPayment statuspayment_channel_name stringPayment channel nameshipping_addressobject
Consignee address informationaddress1 stringDetailed address information 1 , used as a complementary information ( up to 255 characters )Example:8899 Garfield Street
address2 stringDetailed address information 2 , used as a complementary information ( up to 255 characters )Example:Apartment 5
city stringCity name ( up to 64 characters )Example:Riverside
company stringCompany nameExample:SHOPLINE
country stringCountry name ( up to 64 characters )Example:Usa
country_code stringCountry or region code , two ISO-3166-1district stringAdministrative region name ( up to 64 characters )district_code stringAdministrative district encoding , custom numberExample:4200006
first_name stringName ( up to 64 characters )Example:Tom
last_name stringLast name ( up to 64 characters )Example:Washington
phone stringContact number ( 32 characters max )Example:13100000000
province stringState or provincial name ( up to 64 characters )Example:California
province_code stringState or provincial code , custom numberExample:4200006
zip stringShipping address postal numberExample:92503
shipping_linesobject
Logistics informationdelivery_id stringShipping method id , shipping template idprice stringCustom shipping , DOUBLE type string with accuracy 2 , eg : 12.41shipping_type string requiredLogistics type system- system logistics; custom- custom logistics. When logistics is system logistics, you only need to transmit delivery_id , and when logistics type is custom logistics, transmit the fields of title and pricetitle stringCustomize shipping namestock_reserved boolean requiredOrder dimension inventory reserve mark : true、flaseExample:true
stock_reserved_time longOrder dimension inventory pre-reserved timeExample:1669280400000
tags arrayThe draft order tag uses separated by ',' between multiple tag rooms , and the shop dimension supports up to 99 tagExample:shine,bili
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
zip stringShipping address postal numberExample:92503
buyer_infoobject
Buyer informationarea_code stringContact area idemail stringUser mailboxid stringUser IDphone stringUser mobile phone numbercreate_time longCreate time , time stamp formatExample:1667638652832
currency stringStore currencyExample:USD
discount_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 titlelogistics_price stringTotal shipping amountExample:2.00
logistics_tax stringTotal shipping taxExample:2.00
note stringDraft order noteExample:Customer wants to ship asap
note_attributesobject[]
Additional informationname stringNamevalue stringvaluepayment_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 nameproduct_tax stringProduct total taxExample:2.00
shipping_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
company stringCompany nameExample:SHOPLINE
country stringCountry nameExample:Usa
country_code stringCountry or region code , two ISO-3166-1Example:US
district stringAdministrative region namedistrict_code stringAdministrative district encoding , custom numberfirst_name stringFirst nameExample:Tom
last_name stringLast nameExample:Washington
phone stringContact numberprovince stringState or provincial nameExample:California
province_code stringState or provincial code , custom numberExample:4200006
zip stringShipping address postal numberExample:92503
shipping_linesobject
Logistics informationdelivery_id stringShipping method id , shipping template idprice longLogistics shipping , double type string with accuracy 2.shipping_type stringLogistics type system- system logistics ; custom- custom logisticsExample:system
title stringLogistics namestatus integerDraft order status : open 、 completestock_reserved booleanOrder dimension inventory reserve mark : true、flaseExample:true
stock_reserved_time longOrder dimension inventory pre-reserved timeExample:1669280400000
store_id stringstore IDtags arrayThe draft order tag uses separated by ',' between multiple tag rooms , and the shop dimension supports up to 99 tagExample:shine,bili
total_line_items_price stringCurrent draft order Product total amountExample:2.00
total_price stringCurrent total draft order amount , Product selling price-discount + tax + shippingExample:2.00
update_time longUpdate time , time stamp formatExample:1667638652832
API Explorer
Debugger
Was this article helpful to you?
Error loading component.