Query draft order
GET https://{handle}.myshopline.com/admin/openapi/v20260301/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 .Query information of the draft order according to specified conditions.
Query Parameters
- updated_at_max stringSet the query end point for the draft order update time. This should be used in conjunction with
updated_at_minto define the query time range. Format: ISO 8601.Example:2023-01-05T10:05:45+00:00 - updated_at_min stringSet the query start point for the draft order update time. This should be used in conjunction with
updated_at_maxto define the query time range. Format: ISO 8601.Example:2023-01-04T10:05:45+00:00 - ids stringThe unique identifier for the draft order, multiple IDs should be separated by commas.Maximum size: 100Example:
10 - status stringDraft order status. Valid values are:
open: processingcompleted: has been completed
Example:open - checkout_ids stringDraft order number, multiple separated by ',' and maximum support of 100.Example:
2505749057828590456543, 2505749057828590456543 - limit stringQuery the quantity limit of draft orders.Default value:
50Value range: 0-1000Example:50 - page_info stringThe unique identifier for pagination queries, used to locate a specific page.This parameter value is obtained from the
linkvalue in the response header of this API after you have queried the pagination information.For example, if thelinkvalue you obtained is<https://{handle}.myshopline.com/admin/openapi/{version}/orders/draft_orders.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next", the value ofpage_infoiseyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9.For more information on how to use pagination, refer to Paging Mechanism.Example:7AFD7393C6E7CF18672C038477E2EF6A463464BDBAF766DD8F8CB8E0085F82419A94B80084BCDA0B838B3F13C302A2C9044E - sort_condition stringSorting rule. For fields like
create_at:desc,id:asc, first sort in descending order bycreate_at, and then sort in ascending order byid.Example:create_at:desc,id:asc
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
link
The URL link that provides the pagination data. You can obtainpage_infofrom this parameter for subsequent pagination requests.This parameter is returned when the requested page has a previous or next page.For more information on how to use pagination, refer to Paging Mechanism.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_ordersobject[]
Draft order listing information.billing_addressobject
Payment billing address.address1 stringThe first line of the payment billing address. This typically includes information such as the street address or a post office box number.Example:8899 Garfield Streetaddress2 stringThe second line of the payment billing address. This typically includes information such as apartment, suite, or unit number.Example:Apartment 5area stringThe administrative region name in payment billing address.Example:East townarea_code stringThe code for administrative district, custom number.Example:4200006city stringThe city in the payment billing address.Example:Riversidecity_code stringThe code for city in the payment billing address.Example:4200006company stringCompany name.Example:SHOPLINEcountry stringThe country in the payment billing address.Example:Usacountry_code stringThe country code in the payment billing address. A two-letter country or region code that follows the ISO 3166-1 standard, used to identify a specific market's country or region. For example,US.Example:USemail stringThe bill recipient's email address.Example:test@shoplineapp.comfirst_name stringThe bill recipient's first name.Example:Tomlast_name stringThe bill recipient's last name.Example:Washingtonphone stringThe bill recipient's contact information.Example:13100000000province stringThe province in the addressExample:Californiaprovince_code stringThe code for the province in the payment billing address, which can be a custom code or a two-digit ISO 3166-2 international code.Example:Californiasame_as_receiver booleanIndicates whether the address is the same as the shipping information.true: samefalse: different
Example: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 name.Example:Streetstreet_number stringStreet encoding, custom numbering.Example:4200006zip stringShipping address postal number.Example:92503checkout_ids stringThe unique identifier for abandoned orders, multiple of which are concatenated with commas.companyobject
Company information.id stringThe unique identifier for the company.Example:1005619945158043247856location_id stringThe unique identifier for the company location.Example:3005619945158043247856tax_registration_id stringTax registration ID.Example:213213create_by stringCreator account ID.Example:4201057379create_time longThe date and time when the draft order was created. Format: ISO 8601.Example:2024-08-31T02:20:26+08:00Example:1667638652832currency stringThe store currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDcustomerobject
Buyer information.area_code stringContact area ID.Example:0000email stringUser mailbox.Example:xxx@gmail.comfirst_name stringUser's first name.Example:Xiaoliuid stringThe unique identifier for the user.Example:2200000611last_name stringUser's last name.Example:Wangphone stringUser mobile phone number.Example:1888888888888discount_amount_ext stringThe discount amount, displayed in the store's currency.Example:2.00discount_amount_ext_setobject
The discount amount, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDdiscountable booleanIndicates whether marketing discounts can be stacked.true: stackedfalse: not stacked
Defalut value:falseExample:trueid stringThe unique identifier for the draft order.Example:2505659131831930856670invoice_url stringInvoice link.Example:https://xxxxx.myshopline.com/invoices/xxxx?secret=xxxxline_itemsobject[]
A list of product line information.applied_discountobject
Product custom discount information.amount stringThe discount amount. The value is rounded to two decimal places. For example,88.98.Example:1.00amount_setobject
The discount amount,displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDbefore_amount stringThe product price. The value is rounded to two decimal places. For example,88.98.Example:3.00before_amount_setobject
The product price, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information..amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDdescription stringThe discount description.Example:5 yuan off for two more piecestitle stringThe discount title.Example:Full reductionvalue stringDiscount amount. When the discount type isDISCOUNT_AMOUNT_PERCENTAGE, the maximum default value of this amount is 100, and the minimum value is 0.Example:1.00value_type stringThe type of value. Valid values are:fix_amount: fixed amount discountpercentage: percentage discount
Example:fixed_amountgift_card booleanIndicates whether the product is a gift card item.true: gift card itemfalse: not a gift card item
Example:trueid stringThe unique identifier for the product line.Example:100000000image_url stringProduct image link.Example:http://www.abc.com/123price stringProduct amount after participating in custom discounts.Example:2.00price_setobject
Product amount after participating in custom discounts, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDproduct_id stringProduct SPU serial number.Example:16056577393789045351043258product_source stringProduct source. Valid values are:main_site: main station productcustomize: custom product
Example:main_sitepropertiesobject[]
Product customization information.name stringCustom name.Example:valueshow booleanIndicates whether this message should be displayed on the frontend.true: displayedfalse: not displayed
Example:truetype stringProperty type. Valid values are:text:text typepicture:picture typelink:link type
Example:text-oneurls arrayThe URL for the additional information type redirection.Example:["https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0"]value stringCustom attribute values.Example:valuequantity integerQuantity of items in the order.Example:1requires_shipping booleanIndicates whether the product is subject to physical shipping.true: requiredfalse: not required
Default value:trueExample:truesku stringA unique identifier for the item in the fulfillment. Applicable only to custom line items.tax_linesobject[]
The returned product tax information.name stringTax name.Example:TAXprice stringThe tax amount. The actual tax collected on the product is based on this field value.Example:8.00price_setobject
Multi-currency information of tax, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:8.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:8.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDrate doubleThe tax rate.Example:1type stringTax fee type, used to distinguish between commodity tax and freight tax. Valid values are:product_tax: commodity taxshipping_tax: freight tax
Example:shipping_taxtaxable booleanIndicates whether the product is taxable.true:taxablefalse:not taxable
Default value:trueExample:truetitle stringThe title of the product.Example:CustomProductsvariant_id stringThe SKU of the product. The unique identifier for the product style.Example:18056577393793239655103258variant_title stringProduct attribute value.Example:RED / Llogistics_amount stringTotal shipping amount. The value is rounded to two decimal places. For example,88.98.Example:2.00logistics_amount_setobject
Total shipping cost, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDlogistics_tax stringTotal shipping tax.Example:2.00logistics_tax_setobject
Total shipping tax, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDshop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.Example:2.00currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.Example:USDmarket_name stringMarket name.Example:Usa marketmarket_region_country_code stringMarket country.Example:USnote stringDraft order note.Example:Customer wants to ship asapnote_attributesobject[]
Additional information.name stringName.Example:xxxxvalue stringValue.Example:2order_id stringOrder number generated by current draft order.payment_termsobject
Payment channel information.created_at stringThe date and time when the payment term is created. Format: ISO 8601.Example:2024-08-31T02:20:26+08:00due_in_days integerWhen the terms type isNET, the payment is due after how many days if the payment is not made.id stringThe unique identifier (ID) that identifies this payment term.overdue booleanIndicates whether the payment terms have expired.true:expiredfalse:not expired
pay_channel_deal_id stringExternal channel payment serial number.pay_status stringPayment order status. Valid values are:unpaid: unpaidpaid: paid
After a draft order is generated into an order, this status will not synchronize with the payment status of the order.payment_channel_name stringPayment channels.payment_schedulesobject[]
A set of schedules associated with the payment terms.completed_at stringPayment completion date. Format: ISO 8601.Example:2024-08-31T02:20:26+08:00due_at stringExpected payment date. Format: ISO 8601.Example:2024-08-31T02:20:26+08:00issued_at stringThe time when the payment terms are triggered. When the type isFIXED, it is the saved time (if the draft order becomes an order, the order inherits the draft order time); when the type isFULFILLMENT/RECEIPT, it is the effective time of the condition; when the type isNET, it is the saved time (if the draft order becomes an order, the order inherits the draft order time).payment_terms_name stringThe name of the payment terms template used to create the payment terms.payment_terms_type stringThe type of payment terms template used to create the payment terms. Valid values are:FIXED: Merchant specified date.FULFILLMENT: Fulfillment (Shipment) completion date.NET: Fixed condition date.RECEIPT: Billing sent date.UNKNOWN: Unknown type.
updated_at stringThe date and time when the payment term is last updated. Format: ISO 8601.Example:2024-08-31T02:20:26+08:00po_number stringPurchase order number recorded on the order in B2B scenarios.presentment_currency_code stringMarket currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.product_tax stringProduct total tax.product_tax_setobject
Product total tax, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shipping_addressobject
Shipping address information.address1 stringThe first line of the address. This typically includes information such as the street address or a post office box number.address2 stringThe second line of the address. This typically includes information such as apartment, suite, or unit number.city stringThe city in the shipping address.city_code stringThe code for city in the shipping address.company stringCompany name.country stringCountry name.country_code stringA two-letter country or region code that follows the ISO 3166-1 standard, used to identify a specific country or region in the address. For example,US.delivery_store_code stringStore code, custom number.delivery_store_name stringStore name.district stringDistrict of the shipping address.district_code stringThe code for district in of the shipping address.first_name stringThe first name of the recipient.last_name stringThe last name of the recipient.name stringThe name of the recipient.phone stringContact number.province stringThe province in the address.province_code stringThe code for the province in the shipping address, which can be a custom code or a two-digit ISO 3166-2 international code.standard_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 name.street_number stringStreet encoding, custom numbering.zip stringShipping address postal number.shipping_linesobject
Order logistics information.delivery_id stringShipping method ID.price stringLogistics shipping. The value is rounded to two decimal places. For example,88.98.price_setobject
Shipping costs, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shipping_type stringLogistics type system. Valid values are:system: system logisticscustom: custom logistics
title stringShipping template name.status stringDraft order status. Valid values are:open: processingcompleted: has been completed
stock_reserved booleanInventory return type. Valid values are:no_restock: not returnedcancel: canceledreturn: returned
stock_reserved_time longOrder dimension inventory pre-reserved time.tags arrayThe draft order tag uses separated by ',' between multiple tag rooms, and the shop dimension supports up to 99 tag.tax_linesobject[]
The draft order tax information.name stringTax information.price stringThe tax amount. The actual tax collected on the product is based on this field value.price_setobject
Multi-currency information of tax, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information. The value is rounded to two decimal places. For example,88.98.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.rate doubleThe tax rate, for display only.type stringTax fee type, used to distinguish between commodity tax and freight tax. Valid values are:product_tax: commodity taxshipping_tax: freight tax
total_duties_setobject
Total duty.presentment_moneyobject
Buyer side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.total_line_items_price stringCurrent draft order Product total amount.total_line_items_price_setobject
Product total amount, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard.Example:USD.total_price stringThe total amount of the products, calculated as the product of the unit price and quantity, displayed in the store's currency.total_price_setobject
The total amount of the products, calculated as the product of the unit price and quantity, displayed in both the buyer's currency and the store's currency.presentment_moneyobject
Buyer-side amount information.amount stringBuyer-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe buyer-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.shop_moneyobject
Merchant-side amount information.amount stringMerchant-side amount. The value is rounded to two decimal places. For example,88.98.currency_code stringThe merchant-side currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard. For example,USD.update_by stringUpdate account ID.update_time longThe date and time when the draft order is last updated. Format: ISO 8601.Example:2024-08-31T02:20:26+08:00
API Explorer
Debugger
Was this article helpful to you?