Requires write_draft_orders access scope.
For more info, refer to:
POST 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 .
Create a draft order for the customer.
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The 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
  • draft_orderobject
    The draft order object.
  • billing_addressobject
    The address for mailing bills and invoices.
  • address1 string
    The first line of the billing address. This typically includes information such as the street address or a post office box number.
    Maximum length: 256
  • address2 string
    The second line of the billing address. This typically includes information such as apartment, suite, or unit number.
    Maximum length: 256
  • area string
    The district or county in the billing address.
    Maximum length: 64
  • area_code string
    The district or county code in the billing address.
    Example: 510007
  • city string
    The city in the billing address.
    Maximum length: 64
  • city_code string
    The city code in the billing address.
    Example: 510000
  • company string
    The company name of the billing recipient.
  • country string
    The country or region in the billing address.
  • country_code string
    The country or region code in the billing address. Two-letter country code (ISO 3166-1 standard) for the country or region.
    Example: US
  • email string
    Payment bill recipient's email.
  • first_name string
    Payment bill recipient's first name.
    Maximum length: 64
  • last_name string
    Payment bill recipient's last name.
    Maximum length: 64
  • phone string
    Payment bill recipient's phone number.
  • postcode string
    The postal code information of the address.
  • province string
    The province in the billing address.
  • province_code string
    The code for the province in the billing address, which can be a custom code or a two-character ISO 3166-2 international code.
    Example: 4220006
  • same_as_receiver boolean
    Indicates whether the billing_address is the same as the shipping_address.
    • true: same
    • false: different
  • calc_sku_stock_mode string required
    Used to identify the inventory mode. Valid values are:
    • not_limit: Infinity inventory
    • real: Actual inventory
    • reserve_real: Reserve inventory and actual inventory
    Example: string
  • customerobject
    Buyer's information.
  • area_code string
    International dialing code.
    Example: +1
  • email string
    Buyer's email address.
  • first_name string
    Buyer's first name.
    Maximum length: 64
  • id string required
    The unique identifier for the buyer.
    Example: string
  • last_name string
    Buyer's last name.
    Maximum length: 64
  • phone string
    Buyer's mobile phone number.
    Maximum length: 32
  • discount_amount_ext string
    Order discount amount. The value is rounded to two decimal places.
  • discount_amount_ext_name string
    Order discount description.
    Maximum length: 64
  • discountable boolean
    Deprecated
    This parameter is deprecated from API version v20251201.
  • language_infoobject required
    Language information.
  • customer_language string
    The language used by the buyer when placing an order. This language takes priority.
    Example: en
  • merchant_language string
    The language used by the seller. The buyer's language takes priority.
    Example: en
  • line_itemsobject[] required
    List of products.
  • applied_discountobject
    Product discount information.
  • description string
    The discount description.
  • title string
    Deprecated
    This parameter is deprecated from API version v20251201.
  • value long required
    Discount amount. When value_type is percentage, the minimum value is 0 and the maximum value is 100.
  • value_type string required
    The type of value. Valid values are:
    • fix_amount: fixed amount discount
    • percentage: percentage discount
    Example: string
  • discountable boolean
    Deprecated
    This parameter is deprecated from API version v20251201.
  • gift_card boolean
    Deprecated
    This parameter is deprecated from API version v20251201.
  • price string
    The product price.
  • product_id string required
    The unique identifier for the product corresponding to the variant.
    Example: 16056761559984840457934011
  • product_source string required
    Product source. Valid values are:
    • main_site: online store product
    • customize: custom product
    Example: string
  • propertiesobject[]
    Product customization information.
  • name string
    Custom attribute name.
  • show boolean
    Indicates whether this message should be displayed on the frontend.
    • true: Displayed
    • false: Not displayed
  • type string
    Custom information type. Valid values are:
    • text: character or string type
    • picture: image type
    • link: hyperlink type
  • urls array
    URL list.
    • If the type is picture, thumbnails are retrieved via the urls values.
    • If the type is link, the hyperlink is the first URL in the urls values.
  • value string
    Custom attribute value.
  • quantity integer required
    Quantity of Items in the draft order.
    Value range: 1-99999
  • requires_shipping boolean
    Indicates whether shipping is required.
    • true: Required
    • false: Not required
    Default: false
  • sku string
    Merchant-defined product SKU.
    Maximum length: 255
  • taxable boolean
    Indicates whether the product is subject to tax.
    • true: Tax is required.
    • false: No tax is required.
    Default: true
  • title string
    Product title.
  • variant_id string required
    The unique identifier for the variant.
    Example: 18056761559987524812644011
  • market_region_country_code string
    The country or region code of the target market. Complies with the ISO 3166 standard.
    Example: US
  • note string
    The note of the draft order.
    Maximum length: 1024
  • note_attributesobject[]
    Additional information for the draft order.
  • name string
    Custom attribute name.
  • value string
    Custom attribute value.
  • outer_id string
    The unique request ID generated by the client. Requests with the same ID will only be processed once.
  • payment_termsobject
    Payment information.
  • pay_channel_id string required
    The unique identifier for the order.
    Example: string
  • pay_status string
    Payment status. Valid values are:
    • unpaid: Order not yet paid
    • paid: Order paid
    Default: unpaid
  • payment_channel_name string
    Payment channel name.
  • shipping_addressobject
    Recipient's shipping address information.
  • address1 string
    The first line of the shipping address. This typically includes information such as the street address or a post office box number.
    Maximum length: 256
  • address2 string
    The second line of the shipping address. This typically includes information such as apartment, suite, or unit number.
    Maximum length: 256
  • city string
    The city in the shipping address.
    Maximum length: 64
  • city_code string
    The city code in the shipping address.
    Example: 510000
  • company string
    The company name of the recipient.
  • country string
    The country or region in the shipping address.
    Maximum length: 64
  • country_code string
    The country or region code in the shipping address. Two-letter country code (ISO 3166-1 standard) for the country or region.
    Example: US
  • district string
    The district or county in the shipping address.
    Maximum length: 64
  • district_code string
    The district or county code in the shipping address.
    Example: 510007
  • first_name string
    Recipient's first name.
  • last_name string
    Recipient's last name.
  • phone string
    Recipient's phone number.
  • province string
    The province in the shipping address.
  • province_code string
    The code for the province in the shipping address, which can be a custom code or a two-character ISO 3166-2 international code.
    Example: 4220006
  • zip string
    The postal code information of the address.
    Example: 510036
  • shipping_linesobject
    Logistics information.
    When shipping_type is set to system, delivery_id is required.
    When shipping_type is set to custom, both title and price are required.
    If free shipping is desired, shipping_type must be set to custom, and both title and price must be provided, with the price value set to 0.
  • delivery_id string
    Shipping template ID.
  • price string
    Custom shipping fee. The value is rounded to two decimal places.
  • shipping_type string required
    Logistics type. Valid values are:
    • system: system logistics
    • custom: custom logistics
    Example: string
  • title string
    Custom shipping carrier name.
  • stock_reserved boolean required
    Indicates whether there is a reserved product identifier at the order level.
    • true: with reserved product identifier
    • false: without reserved product identifier
  • stock_reserved_time long
    Product reservation time at the order level, formatted as a 13-digit millisecond timestamp.
    Example: 1667638652832
  • tags array
    A list of tags. Multiple tags are separated by commas. Maximum size: 99
  • tax_exempt boolean
    Indicates whether the product is subject to tax.
    • true: Tax is required.
    • false: Tax is not required.
Status Codes
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 order object.
  • billing_addressobject
    The address for mailing bills and invoices.
  • address1 string
    The first line of the billing address. This typically includes information such as the street address or a post office box number.
    Example: 8899 Garfield Street
  • address2 string
    The second line of the billing address. This typically includes information such as apartment, suite, or unit number.
    Example: Apartment 5
  • area string
    The district or county in the billing address.
    Example: Panyu District
  • area_code string
    The district or county code in the billing address.
    Example: 510007
  • city string
    The city in the billing address.
    Example: Guangzhou City
  • city_code string
    The city code in the billing address.
    Example: 510000
  • company string
    Company name of the billing recipient.
    Example: Company Name
  • country string
    The country in the payment billing address.
    Example: United States
  • country_code string
    The country or region code in the billing address. Two-letter country code (ISO 3166-1 standard) for the country or region.
    Example: US
  • email string
    Payment bill recipient's email.
    Example: test001@Gmail.com
  • first_name string
    Payment bill recipient's first name.
    Example: Tom
  • last_name string
    Payment bill recipient's last name.
    Example: Washington
  • phone string
    Payment bill recipient's phone number.
    Example: 13903004000
  • province string
    The province in the billing address.
    Example: New York State
  • province_code string
    The code for the province in the address, which is a system custom code.
    Example: 4220006
  • same_as_receiver boolean
    Indicates whether the billing_address is the same as the shipping_address.
    • true: same
    • false: different
  • standard_province_code string
    The code for the province in the billing address, which is a two-character ISO 3166-2 international code. It is different from the province_code parameter, which is a custom code.
    Example: NY
  • zip string
    The postal code for the billing address.
  • create_at long
    Creation time of the draft order, formatted as a 13-digit millisecond timestamp.
    Example: 1667638652832
  • currency string
    The store currency. The value of this parameter is a three-letter currency code that follows the ISO 4217 standard.
    Example: USD
  • customerobject
    The buyer's information.
  • area_code string
    International dialing code.
    Example: +1
  • email string
    The buyer's email address.
    Example: test001@Gmail.com
  • first_name string
    The buyer's first name.
    Example: Tom
  • id string
    The unique identifier for the buyer.
    Example: 4201057495
  • last_name string
    The buyer's last name.
    Example: Washington
  • phone string
    The buyer's phone number.
    Example: 13903004000
  • discount_amount_ext string
    Order discount amount. The value is rounded to two decimal places.
    Example: 8.00
  • discount_amount_ext_name string
    Order discount name.
  • discount_amount_ext_setobject
    Order discount amount information.
  • presentment_moneyobject
    The order discount amount information presented to the buyer.
  • amount string
    The order discount amount. The value is rounded to two decimal places.
    Example: 8.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The order discount amount information recorded by the merchant.
  • amount string
    The order discount amount. The value is rounded to two decimal places.
    Example: 8.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • id string
    The unique identifier for the draft order.
  • invoice_url string
    Invoice URL.
    Example: https://xxx.com/xxxx
  • line_itemsobject[]
    List of products.
  • applied_discountobject
    Custom product discount information.
  • amount string
    The amount after applying the discount.
    Example: 8.00
  • amount_setobject
    Detailed information of the discount amount.
  • presentment_moneyobject
    The product discount amount information presented to the buyer.
  • amount string
    The product discount amount. The value is rounded to two decimal places.
    Example: 8.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The product discount amount information recorded by the merchant.
  • amount string
    The product discount amount. The value is rounded to two decimal places.
    Example: 8.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • before_amount string
    Product price.
    Example: 8.00
  • before_amount_setobject
    Price information of the product.
  • presentment_moneyobject
    The product price information presented to the buyer.
  • amount string
    The product price. The value is rounded to two decimal places.
    Example: 8.00
  • currency_code string
    The value of this parameter is a three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The product price information recorded by the merchant.
  • amount string
    The product price. The value is rounded to two decimal places.
    Example: 8.00
  • currency_code string
    The value of this parameter is a three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • description string
    The discount description.
  • title string
    Deprecated
    This parameter is deprecated from API version v20251201.
  • value long
    Discount amount. When the discount type is percentage, the minimum value is 0 and the maximum value is 100.
  • value_type string
    Discount type.
    • fixed_amount: fixed amount
    • percentage: percentage
  • gift_card boolean
    Indicates whether the product is a gift card.
    • true: Gift card
    • false: Not a gift card
  • id string
    A unique identifier for the line item.
  • image_url string
    Product image URL.
    Example: https://xxx.com/xxxx
  • name string
    SKU title.
  • price string
    Product amount after applying custom discounts. The value is rounded to two decimal places.
    Example: 2.00
  • price_setobject
    Product amount after applying custom discounts.
  • presentment_moneyobject
    The product amount information after custom discount presented to the buyer.
  • amount string
    The product amount after custom discount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The product amount information after custom discount recorded by the merchant.
  • amount string
    The product amount after custom discount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • product_id string
    The unique identifier for the product.
    Example: 16056577393789045351043258
  • product_source string
    Product source. Valid values are:
    • main_site: online store product
    • customize: customize product
  • propertiesobject[]
    A list of product customization information.
  • name string
    Custom attribute name.
    Example: colors
  • show boolean
    Indicates whether this message should be displayed on the frontend.
    • true: Displayed
    • false: Not displayed
  • type string
    Custom information type. Valid values are:
    • text: character or string type
    • picture: image type
    • link: hyperlink type
  • urls array
    URL list.
    • If the type is picture,thumbnails are retrieved via the urls values.
    • If the type is link,the hyperlink is the first URL in the urls values.
  • value string
    Custom attribute value
    Example: red
  • quantity integer
    Quantity of items in the draft order.
  • requires_shipping boolean
    Indicates whether shipping is required.
    • true: Required
    • false: Not required
  • sku string
    Merchant-defined product item number.
  • tax_linesobject[]
    Tax information.
  • name string
    The name of the tax.
  • price string
    The amount of the tax.
  • price_setobject
    The tax amount information.
  • presentment_moneyobject
    The tax amount information presented to the buyer.
  • amount string
    The tax amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The tax amount information recorded by the merchant.
  • amount string
    The tax amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • rate double
    The tax rate.
  • type string
    Tax type. Valid values are:
    • product_tax: product tax
    • shipping_tax: shipping tax
    • duty_tax: duty tax
    Example: shipping_tax
  • title string
    Title of the variant.
  • variant_id string
    The unique identifier for the variant.
  • variant_title string
    Product SKU title.
  • logistics_price string
    Total shipping amount.
  • logistics_price_setobject
    Total shipping amount.
  • presentment_moneyobject
    The total shipping amount information presented to the buyer.
  • amount string
    The total shipping amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The total shipping amount information recorded by the merchant.
  • amount string
    The total shipping amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • logistics_tax string
    Total shipping tax.
  • logistics_tax_setobject
    Total shipping tax.
  • presentment_moneyobject
    The total shipping tax information presented to the buyer.
  • amount string
    The total shipping tax. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The total shipping tax information recorded by the merchant.
  • amount string
    The total shipping tax. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • market_name string
    Market name.
  • market_region_country_code string
    A two-letter country or region code that follows the ISO 3166-1 (alpha 2) standard, used to identify a specific market's country or region.
    Example: US
  • note string
    The note of the draft order.
  • note_attributesobject[]
    Additional information for the draft order.
  • name string
    The name of the note.
  • value string
    The value of the note.
  • order_id string
    Deprecated
    This parameter is deprecated from API version v20251201.
  • payment_termsobject
    Payment terms and payment information.
  • created_at string
    The date and time when the payment term was created.
    Format: ISO 8601.
    Example: 2024-08-31T02:20:26+08:00
  • due_in_days integer
    The number of days between the invoice date and the due date, as defined in the selected payment terms template. Provided when the payment_terms_type is NET.
  • id string
    The unique identifier for the payment term.
  • overdue boolean
    Indicates whether the payment terms have expired.
    • true: Expired
    • false: Not expired
  • pay_channel_id string
    The unique identifier for the payment channel.
  • pay_status string
    Payment status. Valid values are:
    • unpaid: unpaid
    • paid: paid
  • payment_channel_name string
    Payment channel name.
  • payment_schedulesobject[]
    A set of schedules associated with the payment terms.
  • completed_at string
    The date and time when the payment completion is recorded.
  • due_at string
    The date and time when the payment terms are due.
    When the value of payment_terms_type is FIXED, due_at must have a value.
    When the value of payment_terms_type is NET, the value of due_at is equal to issued_at plus due_in_days.
    When the value of payment_terms_type is FULFILLMENT, it has a value only when the order is shipped.
  • issued_at string
    The date and time when the payment terms take effect.
    When the value of payment_terms_type is FIXED, if issued_at is empty, then issued_at equals due_at.
    When the value of payment_terms_type is NET, issued_at must have a value.
    When the value of payment_terms_type is FULFILLMENT, it has a value only when the order is shipped.
    When the value of payment_terms_type is RECEIPT, it has a value only when the invoice is sent.
    Example: 2024-08-31T02:20:26+08:00
  • payment_terms_name string
    The name of the payment term template used to create the payment terms.
  • payment_terms_type string
    The type of payment terms template used to create the payment terms. Valid values are:
    • FIXED: Full payment by the specified date.
    • FULFILLMENT: Full payment when the order is fulfilled.
    • RECEIPT: Full payment when the invoice is sent.
    • NET: NET.
  • updated_at string
    The date and time when the payment term was last updated.
    Format: ISO 8601.
    Example: 2024-08-31T02:20:26+08:00
  • po_number string
    Purchase order number recorded on the order in B2B scenarios.
  • presentment_currency_code string
    Market currency.
  • product_tax string
    Product total tax.
  • product_tax_setobject
    Product total tax, displayed in both the buyer's currency and the store's currency.
  • presentment_moneyobject
    The product total tax information presented to the buyer.
  • amount string
    The product total tax. The value is rounded to two decimal places.
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The product total tax information recorded by the merchant.
  • amount string
    The product total tax. The value is rounded to two decimal places.
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • seller_id string
    Merchant ID.
  • shipping_addressobject
    Recipient's shipping address.
  • address1 string
    The first line of the address. This typically includes information such as the street address or a post office box number.
    Example: 8899 Garfield Street
  • address2 string
    The second line of the address. This typically includes information such as apartment, suite, or unit number.
    Example: Apartment 5
  • city string
    The city in the shipping address.
    Example: Guangzhou City
  • city_code string
    The city code in the shipping address.
    Example: 510000
  • company string
    Company name of the recipient.
    Example: Company Name
  • country string
    The country or region in the shipping address.
    Example: China
  • country_code string
    The country or region code in the shipping address.
    Two-letter country code (ISO 3166-1 standard) for the country or region.
    Example: US
  • district string
    The city in the shipping address.
    Example: Panyu District
  • district_code string
    The code for city in the shipping address.
    Example: 510007
  • first_name string
    The recipient's first name.
    Example: Tom
  • last_name string
    The recipient's last name.
    Example: Washington
  • name string
    The recipient's full name.
  • phone string
    The recipient's phone number.
    Example: 13903004000
  • province string
    The province in the shipping address.
    Example: Guangdong Province
  • province_code string
    The code for the province in the address, which is a system custom code.
    Example: 4220006
  • standard_province_code string
    The code for the province in the shipping address, which is a two-character ISO 3166-2 international code. It is different from the province_code parameter, which is a custom code.
    Example: NY
  • zip string
    The postal code information of the shipping address.
    Example: 510036
  • shipping_linesobject
    Logistics information.
    When shipping_type is set to system, delivery_id is required.
    When shipping_type is set to custom, both title and price are required.
    If free shipping is desired, shipping_type must be set to custom, and both title and price must be provided, with the price value set to 0.
  • delivery_id string
    Shipping template ID.
  • price string
    The shipping cost for logistics.
  • price_setobject
    The shipping cost for logistics.
  • presentment_moneyobject
    The shipping cost information presented to the buyer.
  • amount string
    The shipping cost. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The shipping cost information recorded by the merchant.
  • amount string
    The shipping cost. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shipping_type string
    Logistics type. Valid values are :
    • system: system logistics
    • custom: custom logistics
  • title string
    Logistics name.
  • status integer
    Draft order status. Valid values are:
    • open: processing
    • completed: has been completed
  • stock_reserved boolean
    Indicates whether there is a reserved product identifier at the order level.
    • true: with reserved product identifier
    • false: without reserved product identifier
  • stock_reserved_time long
    Product reservation time at the order level, formatted as a 13-digit millisecond timestamp.
    Example: 1669280400000
  • store_id string
    The unique identifier for the store.
  • tags array
    A list of tags. Multiple tags are separated by commas.
  • tax_linesobject[]
    Tax information.
  • name string
    Tax name.
  • price string
    Specific tax amount.
  • price_setobject
    Tax information.
  • presentment_moneyobject
    The tax amount information presented to the buyer.
  • amount string
    The tax amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The tax amount information recorded by the merchant.
  • amount string
    The tax amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • rate double
    Tax rate.
  • type string
    Tax type. Valid values are:
    • product_tax: product tax
    • shipping_tax: shipping tax
    • duty_tax: duty tax
  • total_duties_setobject
    Total duty.
  • presentment_moneyobject
    The total duty information presented to the buyer.
  • amount string
    The total duty amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The total duty information recorded by the merchant.
  • amount string
    The total duty amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • total_line_items_price string
    The total amount of products in the current draft order.
  • total_line_items_price_setobject
    The total amount of products in the current draft order information.
  • presentment_moneyobject
    The total product amount information presented to the buyer.
  • amount string
    The total product amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The total product amount information recorded by the merchant.
  • amount string
    The total product amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • total_price string
    Total amount of the current draft order: the sum of the product selling prices minus the discount, plus tax and shipping fee.
  • total_price_setobject
    Total amount.
  • presentment_moneyobject
    The total amount information presented to the buyer.
  • amount string
    The total amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • shop_moneyobject
    The total amount information recorded by the merchant.
  • amount string
    The total amount. The value is rounded to two decimal places.
    Example: 2.00
  • currency_code string
    A three-letter currency code that follows the ISO 4217 standard.
    Example: CNY
  • update_at long
    The date and time when the draft order was last updated, formatted as a 13-digit millisecond timestamp.
    Example: 1667638652832
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "draft_order": {
    "billing_address": {
      "address1": null,
      "address2": null,
      "area": null,
      "area_code": "510007",
      "city": null,
      "city_code": "510000",
      "company": null,
      "country": null,
      "country_code": "US",
      "email": null,
      "first_name": null,
      "last_name": null,
      "phone": null,
      "postcode": null,
      "province": null,
      "province_code": "4220006",
      "same_as_receiver": null
    },
    "calc_sku_stock_mode": "string",
    "customer": {
      "area_code": "+1",
      "email": null,
      "first_name": null,
      "id": "string",
      "last_name": null,
      "phone": null
    },
    "discount_amount_ext": null,
    "discount_amount_ext_name": null,
    "discountable": null,
    "language_info": {
      "customer_language": "en",
      "merchant_language": "en"
    },
    "line_items": [
      {
        "applied_discount": {
          "description": null,
          "title": null,
          "value": 0,
          "value_type": "string"
        },
        "discountable": null,
        "gift_card": null,
        "price": null,
        "product_id": "16056761559984840457934011",
        "product_source": "string",
        "properties": [
          {
            "name": null,
            "show": null,
            "type": null,
            "urls": null,
            "value": null
          }
        ],
        "quantity": 0,
        "requires_shipping": null,
        "sku": null,
        "taxable": null,
        "title": null,
        "variant_id": "18056761559987524812644011"
      }
    ],
    "market_region_country_code": "US",
    "note": null,
    "note_attributes": [
      {
        "name": null,
        "value": null
      }
    ],
    "outer_id": null,
    "payment_terms": {
      "pay_channel_id": "string",
      "pay_status": null,
      "payment_channel_name": null
    },
    "shipping_address": {
      "address1": null,
      "address2": null,
      "city": null,
      "city_code": "510000",
      "company": null,
      "country": null,
      "country_code": "US",
      "district": null,
      "district_code": "510007",
      "first_name": null,
      "last_name": null,
      "phone": null,
      "province": null,
      "province_code": "4220006",
      "zip": "510036"
    },
    "shipping_lines": {
      "delivery_id": null,
      "price": null,
      "shipping_type": "string",
      "title": null
    },
    "stock_reserved": false,
    "stock_reserved_time": 1667638652832,
    "tags": null,
    "tax_exempt": null
  }
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/orders/draft_orders.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Create a draft order
Request
{
"draft_order": {
"billing_address": {
"address1": "Address 1",
"address2": "Address 2",
"area": "Livermore Valley",
"area_code": "*****300",
"city": "New York",
"city_code": "510000",
"company": "ABC",
"country": "USA",
"country_code": "US",
"email": "*********@example.com",
"first_name": "T**",
"last_name": "W****",
"name": "T** W****",
"phone": "139****1234",
"postcode": "94550",
"province": "California",
"province_code": "4200006",
"same_as_receiver": "true",
"zip": "94550"
},
"calc_sku_stock_mode": "not_limit",
"customer": {
"area_code": "+86",
"email": "*********@example.com",
"first_name": "T**",
"id": "********495",
"last_name": "W*****",
"phone": "139****1234"
},
"discount_amount_ext": "1.00",
"discountable": true,
"language_info": {
"customer_language": "en",
"merchant_language": "en"
},
"line_items": {
"applied_discount": {
"description": "ABC",
"title": "ABC",
"value": "5",
"value_type": "percentage"
},
"gift_card": "false",
"name": "ABC",
"price": "8.00",
"product_id": "***************934011",
"product_source": "main_site",
"properties": {
"name": "ABC",
"show": "false",
"type": "text",
"urls": [
"https://www.url.com"
],
"value": "ABC"
},
"quantity": "1",
"requires_shipping": "true",
"sku": "***************7644011",
"taxable": "true",
"title": "ABC",
"variant_id": "*************44011"
},
"market_region_country_code": "US",
"note": "ABC",
"note_attributes": {
"name": "ABC",
"value": "ABC"
},
"outer_id": "**********37820034",
"payment_terms": {
"pay_channel_id": "**********6272824",
"pay_status": "paid",
"payment_channel_name": "PayPal"
},
"shipping_address": {
"address1": "Address 1",
"address2": "Address 2",
"city": "New York",
"city_code": "510000",
"company": "ABC",
"country": "USA",
"country_code": "US",
"district": "Livermore Valley",
"district_code": "*****300",
"first_name": "T**",
"last_name": "W****",
"name": "T** W****",
"phone": "139****1234",
"province": "California",
"province_code": "4200006",
"zip": "94550"
},
"shipping_lines": {
"delivery_id": "**********6122774",
"price": "1.00",
"shipping_type": "system",
"title": "ABC"
},
"stock_reserved": "true",
"stock_reserved_time": "2021-08-16T08:27:57+00:00",
"tax_exempt": "false"
}
}
Response
{
"draft_order": {
"billing_address": {
"address1": "Address 1",
"address2": "Address 2",
"area": "Livermore Valley",
"area_code": "*****300",
"city": "New York",
"city_code": "510000",
"company": "ABC",
"country": "USA",
"country_code": "US",
"email": "*********@example.com",
"first_name": "T**",
"last_name": "W****",
"name": "T** W****",
"phone": "139****1234",
"province": "California",
"province_code": "4200006",
"same_as_receiver": "true",
"standard_province_code": "US",
"zip": "94550"
},
"create_at": "2022-11-04T10:18:46+00:00",
"currency": "USD",
"customer": {
"area_code": "+86",
"created_at": "2022-11-04T10:18:46+00:00",
"email": "*********@example.com",
"first_name": "T**",
"id": "********495",
"last_name": "W*****",
"phone": "139****1234"
},
"discount_amount_ext": "1.00",
"discount_amount_ext_name": "ABC",
"discount_amount_ext_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"gift_card": "false",
"id": "***************0823856",
"image_url": "www.example.com",
"invoice_url": "www.example.com",
"line_items": {
"applied_discount": {
"amount": "1.00",
"amount_set": {
"presentment_money": {
"amount": "8.88",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.88",
"currency_code": "USD"
}
},
"before_amount": "1.00",
"before_amount_set": {
"presentment_money": {
"amount": "8.88",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.88",
"currency_code": "USD"
}
},
"description": "ABC",
"title": "ABC",
"value": "5",
"value_type": "fixed_amount"
}
},
"logistics_price": "1.00",
"logistics_price_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"logistics_tax": "2.00",
"logistics_tax_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"market_name": "ABC",
"market_region_country_code": "US",
"name": "ABC",
"note": "ABC",
"note_attributes": {
"name": "ABC",
"value": "ABC"
},
"order_id": "**********076529630",
"payment_terms": {
"created_at": "2022-11-04T10:18:46+00:00",
"due_in_days": "5",
"id": "***************096553",
"overdue": "true",
"pay_channel_id": "***************53153",
"pay_status": "paid",
"payment_channel_name": "PayPal",
"payment_schedules": {
"completed_at": "2022-11-04T10:18:46+00:00",
"due_at": "2022-11-05T10:18:46+00:00",
"issued_at": "2022-11-06T10:18:46+00:00"
},
"payment_terms_name": "ABC",
"payment_terms_type": "NET",
"updated_at": "2022-11-04T10:18:46+00:00"
},
"po_number": "*************07162913",
"presentment_currency_code": "USD",
"price": "1.00",
"price_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"product_id": "*****************51043258",
"product_source": "customize",
"product_tax": "1.00",
"product_tax_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"properties": {
"name": "ABC",
"show": "true",
"type": "text",
"urls": [
"https://www.url.com"
],
"value": "ABC"
},
"quantity": "1",
"requires_shipping": "true",
"seller_id": "***************21415968",
"shipping_address": {
"address1": "Address 1",
"address2": "Address 2",
"city": "New York",
"city_code": "510000",
"company": "ABC",
"country": "USA",
"country_code": "US",
"district": "Livermore Valley",
"district_code": "*****300",
"first_name": "T**",
"last_name": "W****",
"name": "T** W****",
"phone": "139****1234",
"province": "California",
"province_code": "4200006",
"standard_province_code": "US",
"zip": "94550"
},
"shipping_lines": {
"delivery_id": "**********6122774",
"price": "1.00",
"price_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"shipping_type": "system",
"title": "ABC"
},
"sku": "*****************644011",
"status": "open",
"stock_reserved": "false",
"stock_reserved_time": "2022-11-05T10:18:46+00:00",
"store_id": "**************62105031",
"tags": "ABC",
"tax_lines": {
"name": "ABC",
"price": "1.00",
"price_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"rate": "0.02",
"type": "duty_tax"
},
"title": "ABC",
"total_duties_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"total_line_items_price": "8.00",
"total_line_items_price_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"total_price": "10.00",
"total_price_set": {
"presentment_money": {
"amount": "8.00",
"currency_code": "USD"
},
"shop_money": {
"amount": "8.00",
"currency_code": "USD"
}
},
"update_at": "2022-11-04T10:18:46+00:00",
"variant_id": "*****************644011",
"variant_title": "ABC"
}
}
Was this article helpful to you?