Create an order
POST https://{handle}.myshopline.com/admin/openapi/v20230901/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
.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
orderobject required
Order informationbilling_addressobject
Billing addressaddress1 stringBilling consignee detailed address ( up to 255 characters )Example:Guangdong guangzhou panyu district nancun wanbo
address2 stringBill consignee additional to detailed address ( up to 255 characters )Example:Guangdong guangzhou panyu district small valley street
area stringBilling consignee district county ( up to 64 characters )Example:Panyu District
area_code stringBilling consignee zone county encodingExample:510006
city stringBilling consignee city ( up to 64 characters )Example:Guangzhou
city_code stringBilling consignee city codingExample:510000
company stringCompany NameExample:Company name
country stringBilling consignee country ( up to 64 characters )Example:China
country_code stringBilling consignee national encodingExample:CHN
email stringBilling consignee mailboxExample:test001@Gmail.com
first_name stringBilling consignee nameExample:tom
last_name stringBill consignee last nameExample:Washington
phone stringBill consignee name mobile phone numberExample:13903004000
province stringBilling consignee name provinceExample:Guangdong Province
province_code stringBilling consignee name province encodingExample:4220006
same_as_receiver booleanSame as the receiving information ( same other parameters can not be transmitted ) or notExample:true
zip stringBilling consignee name zipExample:510036
buyer_note stringBuyer messageExample:message
currency stringOrder currency , only supports store currency , strong verificationExample:USD
customerobject
Buyer informationarea_code stringUser mobile phone area codeExample:+86
email stringUser mailboxExample:test001@Gmail.com
first_name stringFirst nameExample:tom
id stringUser IDExample:4201057495
last_name stringLast nameExample:Washington
phone stringUser mobile phone numberExample:13903004000
financial_status stringNon-mandatory field, unpaid by default. Strongly check the enumeration value. If the enumeration value fails to pass the verification, the creation of the order will fail, and an error will be reported: financial_status is invalid unpaid - unpaid; partially_paid - partially paid; paid - paid - paidExample:paid
fulfillment_status stringNon-required field , default not shipped , strong verification , and the value , if the verification of the official value does not pass , the creation of the order fails , the error is reported : fulfillment_status is invalid . unshipped- is not shipped ; shipped- has been shippedExample:shipped
inventory_behaviour stringInventory processing method ,Support three units : 1bypass : no inventory 2decrement_ignoring_policy : deduction inventory ( not affected by inventory strategy of merchant configuration ) 3decrement_obeying_policy : according to merchantInventory strategy deduction inventory setExample:bypass
line_itemsobject[] required
Order product snapshot informationdiscount_priceobject
Product custom discount detailsamount stringDiscount amountExample:1.00
title stringDiscount nameExample:Discount name
location_id stringLocation informationExample:5445886274929439997
price stringCommodity price, precision 2Example:3.25
product_id stringSPU serial numberExample:16056761559984840457934011
quantity longQuantity of items in the orderExample:1
requires_shipping booleanNeed to be transported or notExample:true
tax_lineobject
Product tax detailsprice stringTax amountExample:3.25
rate stringTax rateExample:2
title stringTax nameExample:Tax name
taxable booleanTax or not?title stringProduct titleExample:beautiful dress
variant_id stringProduct SKU serial numberExample:18056761559987524812644011
name stringOrder custom numberExample:D101
note stringOrder notes , up to 50 charactersExample:Remark
note_attributesobject[]
Additional informationname stringnameExample:Note source
value stringContentExample:Notes
order_note stringOrder notesExample:Remark
price_infoobject required
Price informationcurrent_extra_total_discounts stringOrder Discount amount , non Discount code amountExample:8.00
taxes_included booleanFor incl . orders , default is false or nottotal_shipping_price stringShipping fee , dubbo string with 2 accuracyExample:8.00
processed_at stringOrder time , format : 2023-04-12T22 : 59 : 52+08 : 00Example:2023-04-12T22:59:52+08:00
send_fulfillment_receipt booleanSend an order to ship mail or notExample:true
send_receipt booleanSend an order confirmation mail or notExample:true
shipping_addressobject required
Consignee address informationaddress1 stringConsignee detailed address ( up to 255 characters )Example:Guangdong guangzhou panyu district nancun wanbo
address2 stringConsignee additional to detailed address ( up to 255 characters )Example:Guangdong guangzhou panyu district small valley street
area stringConsignee district county name ( up to 64 characters )Example:Panyu District
area_code stringConsignee district county encodingExample:510006
city stringConsignee city name ( up to 64 characters )Example:Guangzhou
city_code stringConsignee city codingExample:510000
company stringCompany NameExample:Company name
country stringConsignee's country name (less than 64 characters)Example:China
country_code stringCountry , please refer to country codeExample:CHN
email stringConsignee contact mailboxExample:test001@Gmail.com
first_name stringConsignee name ( up to 64 characters )Example:tom
last_name stringConsignee last name ( up to 64 characters )Example:Washington
latitude stringlatitudeExample:43
longitude stringlongitudeExample:34
phone stringConsignee contact information ( up to 32 characters )Example:13903004000
province stringConsignee province ( up to 64 characters )Example:Guangdong Province
province_code stringConsignee provincial codingExample:4220006
zip stringPostal codeExample:510036
shipping_lineobject
Shipping informationcode stringLogistics numberExample:SF
price stringShipping amount , accuracy 2 digitsExample:3.25
tax_lineobject
Shipping tax detailsprice stringTax amount , the price is subject to this , two accuracyExample:100
rate stringTax rate , precision twoExample:0.02
title stringTax nameExample:Tax name
title stringShipping nameExample:Shipping name
transaction_listobject[]
Payment slip listingamount stringPayment slip amountExample:3.25
gateways stringPayment channelsExample:PayPal
processed_at stringPayment creation time , format : 2023-04-12T22 : 59 : 52+08 : 00Example:2023-04-12T22:59:52+08:00
status string requiredPayment status , value : pending\failure\success\errorExample:success
transactionsobject
Payment slip informationid stringPayment method IDExample:424243
Response
- 200
- 401
- 429
For more information about status codes, see Http status code.
Response Headers
traceId
traceId
Response Body
orderobject
Order informationadjust_price stringAdjust the amountExample:7.23
adjust_price_setobject
Adjust the amountpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
billing_addressobject
Billing address informationaddress1 stringDetailed address 1Example:Guangdong guangzhou panyu district nancun wanbo
address2 stringDetailed address 2, optionalExample:Guangdong guangzhou xiaoguwei street
city stringCityExample:Guangzhou
company stringCompany NameExample:New company
country stringCountryExample:China
country_code stringCountry codeExample:CHN
first_name stringLast nameExample:tom
last_name stringFirst nameExample:Washington
phone stringPhoneExample:13100000000
province stringProvinceExample:Guangdong Province
province_code stringProvince codeExample:4200006
zip stringPostal codeExample:510000
created_at stringOrder creation time (see IOS8601 for the format)Example:2021-08-16T08:27:57+00:00
currency stringTransaction currencyExample:USD
current_subtotal_price stringSum of current products, total price of products * quantityExample:7.12
current_subtotal_price_setobject
Multi-currency information of the current commodity sum, the buyer's and seller's currency and the amount are the samepresentment_moneyobject
Buy side currencyamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side currencyamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
current_total_discounts stringSum of discounts, precision 2, marketing offers + artificial discountsExample:0.25
current_total_discounts_setobject
presentment_moneyobject
Currency informationamount stringAmountExample:3.25
currency_code stringCurrency informationExample:USD
shop_moneyobject
Sell side amountamount stringAmountExample:3.25
currency_code stringCurrency informationExample:USD
current_total_duties_setobject
Current Product total dutypresentment_moneyobject
Buyer side amount informationamount stringAmountcurrency_code stringCurrencyshop_moneyobject
Sell side amount informationamount stringAmountcurrency_code stringCurrencycurrent_total_price stringCurrent order total, value logic: total product - total discount + shipping + taxExample:1000.25
current_total_price_setobject
Multi-currency information of the current order total, the buyer's and seller‘s currency and the amount are the samepresentment_moneyobject
Currency informationamount stringAmountExample:3.25
currency_code stringCurrency informationExample:USD
shop_moneyobject
Sell side amountamount stringAmountExample:3.25
currency_code stringCurrency informationExample:USD
current_total_tax stringTotal tax, product tax + shipping taxExample:2.41
current_total_tax_setobject
Multi-currency information of the sum of taxes, the currency and amount of buyers and sellers are the samepresentment_moneyobject
Currency informationamount stringCurrency informationExample:1.03
currency_code stringCurrency informationExample:USD
shop_moneyobject
Sell side amountamount stringCurrency informationExample:1.03
currency_code stringCurrency informationExample:USD
customerobject
Buyer informationarea_code stringPhone area codeExample:+86
currency stringCurrencyExample:USD
email stringUser mailboxExample:test001@Gmail.com
first_name stringFirst nameExample:tom
id stringUser IDExample:4201057495
last_name stringLast nameExample:Washington
phone stringUser mobile phone numberExample:13100000000
deduct_member_point_amount stringCurrent order member point deduction amountExample:3.25
discount_codesobject
Promo code informationamount stringDiscount amount, precision 2Example:3.25
code stringPromo codeExample:82UD6BTPX9L2
type stringType of discount, reduced amount; discount; free shipping; fixed price; the lowest price item is free; package price; the Nth item is discounted;Example:manual
email stringBuyer mailboxExample:test001@Gmail.com
financial_status stringPayment status, unpaid, authorized, pending, partially_paid, paid, partially_refunded, refundedExample:unpaid
id stringSystem order numberExample:21050224312121887324667162, 21050224312121887324667164
line_itemsobject[]
Order product snapshot informationattribute stringCommodity attribute: name - attribute value multiple separated by comma ", " such as: color - red, size - XExample:red
country_code_of_origin stringCountry of originExample:Country of origin
dutiesobject[]
Duty informationcountry_code_of_origin stringCountry code from country of origin / shipping placeharmonized_system_code stringCustoms codeid stringDuty codepriceobject
Duty multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountcurrency_code stringCurrencyshop_moneyobject
Sell side amount informationamount stringAmountcurrency_code stringCurrencytax_linesobject[]
Tax details listprice_setobject
Multi-currency information of taxpresentment_moneyobject
Buyer side amount informationamount stringAmountcurrency_code stringCurrencyshop_moneyobject
Sell side amount informationamount stringAmountcurrency_code stringCurrencyrate doubleTax raterate_percentage doubleTax rates ( values of 100 percent ratio , rate * 100 )title stringTax titleharmonized_system_code stringHarmonized system codeExample:Harmonized system code
image_url stringproduct pictureExample:https://d2n979dmt31clo.cloudfront.net/image/store/4211449909/1667384795847/63928f08a7174ab2958c6a969
name stringSKU title, same as titleExample:Skirt
price stringCommodity price, precision 2Example:100
product_id stringSPU serial numberExample:16056761559984840457934011
propertiesobject[]
Product customization informationname stringCustom attribute nameExample:Attribute name
type stringAttribute type, text-character, the display format is name: value; picture-picture, the display type is name: get the rendered thumbnail through URLs; link-hyperlink, the display type is name: value, supports clicking on the link to jump to urls FirstExample:text
urls stringURL resource listExample:https://www.url.com
value stringCustom attribute valuesExample:Attribute value
quantity integerQuantity of items in the orderExample:1
requires_shipping booleanShipping or notExample:true
sku stringProduct code, barCodeExample:18056761559987524812644011
tags stringCommodity tags (separated by multiple commas)Example:watch
tax_linesobject[]
Tax informationname stringTax nameExample:tax
price stringTax, precision 2Example:3.25
price_setobject
Multi-currency information of taxpresentment_moneyobject
Buy side currencyamount stringAmountExample:1.03
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side currencyamount stringAmountExample:1.03
currency_code stringCurrencyExample:USD
rate doubleTax rateExample:1
title stringTax descriptionExample:tax
taxable booleanTax or not?Example:true
title stringProduct titleExample:beautiful dress
variant_id stringProduct SKU serial numberExample:18056761559987524812644011
variant_title stringCommodity attribute value, multiple divided by " / ", such as: "155 / red / large"Example:155 / red / large
vendor stringSupplierExample:Supplier
name stringCustom order numberExample:test1001
note stringMerchant notesExample:Remark
note_attributesobject[]
Additional informationname stringNote sourceExample:Note source
value stringNotesExample:Notes
order_status_url stringOrder status page URLExample:https://shoptest.myshoplinestg.com/trade/thank_you?mainOrderMark=xxx&mainOrderSeq=200565776406008509
payment_detailsobject[]
Payment slip informationpay_amount stringPayment amountExample:3.25
pay_channel stringPayment channelsExample:Paypal
pay_channel_deal_id stringExternal channel payment serial numberExample:pi_3MI897Hezv8FxjBO1uGxMPhX
pay_seq stringPayment slip numberExample:23057287797738260472676128
pay_status stringPayment slip statusExample:unpaid
processed_at stringPayment creation time , format : 2023-04-12T22 : 59 : 52+08 : 00Example:2023-04-12T22:59:52+08:00
phone stringBuyer contactExample:13900000000
presentment_currency stringBuy side currencyExample:USD
processed_at stringOrder time , format : 2023-04-12T22 : 59 : 52+08 : 00Example:2023-04-12T22:59:52+08:00
shipping_addressobject
Shipping addressaddress1 stringDetailed address 1Example:Address 1
address2 stringDetailed address 2, optionalExample:Address 2
city stringCityExample:New York
company stringCompany NameExample:new company name
country stringCountryExample:U.S.
country_code stringCountry codeExample:US
district stringDistrictExample:Manhattan
district_code stringDistrict codeExample:NY100xx
first_name stringLast nameExample:tom
last_name stringFirst nameExample:Washington
latitude stringlatitudeExample:40.7831 °n
longitude stringlongitudeExample:73.9712 °w
phone stringPhoneExample:19821119121
province stringProvinceExample:New york state
province_code stringProvince codeExample:NY
zip stringPostal codeExample:10007
status stringOrder status open=processing, canceled-cancelledExample:open
subtotal_price stringTotal product price after discount, total product price - marketing discount - artificial discountExample:4.12
subtotal_price_setobject
Multi-currency information of total product price after discountpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:4.12
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:4.12
currency_code stringCurrencyExample:USD
tax_linesobject[]
Tax informationname stringTax nameExample:tax
price stringTax, precision 2Example:3.25
price_setobject
Multi-currency information of taxpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
rate doubleTax rateExample:1
title stringTax descriptionExample:tax
tax_number stringTINExample:111111111111
tax_type stringTypes of tax IDExample:Type
taxes_included booleanDoes the total include tax?Example:true
total_discounts stringTotal discount, marketing discount + artificial discountExample:3.25
total_discounts_setobject
Multi-currency information of discount totalpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
total_line_items_price stringSum of original prices of goods, precision 2Example:3.25
total_line_items_price_setobject
Sum of original price of goods, multi-currency informationpresentment_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
total_outstanding stringSum of unpaid amount, precision 2Example:3.25
total_shipping_price_setobject
Order shipping sum, multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
total_tax stringSum of taxes, precision 2, commodity tax + shipping taxExample:3.25
total_tax_setobject
Tax summation, multi-currency informationpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
shop_moneyobject
Sell side amount informationamount stringAmountExample:3.25
currency_code stringCurrencyExample:USD
total_tip_received stringTip, precision 2Example:3.25
total_weight stringTotal product weight ( g )Example:1000
API Explorer
Debugger
Was this article helpful to you?
Error loading component.