Cancel order
POST https://{handle}.myshopline.com/admin/openapi/v20230301/orders/:id/cancel.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
.Cancel order
Path Parameters
- id string requiredOrder numberExample:
"21050342939778451436179579"
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
- amount doubleamountExample:
100
- cancel_reason stringcancelReasonExample:
I don't want to buy it.
- currency stringcurrencyExample:
"CNY"
- email booleanSend mail or not
- processed_at string
Response
- 200
- 401
- 429
For more information about status codes, see Http status code.
Response Headers
traceId
traceId
Response Body
orderobject
For order information, field descriptions and examples, please refer to the response result of the order listapp_id stringApp IDbilling_addressobject
billingAddressaddress1 stringaddress1address2 stringaddress2city stringcitycompany stringCompany namecountry stringcountrycountry_code stringcountryCodefirst_name stringfirstNamelast_name stringlastNamename stringnamephone stringphoneprovince stringprovinceprovince_code stringprovinceCodezip stringzipbrowser_ip stringbrowserIpcancel_reason stringcancelReasoncancelled_at stringcancelledAtcart_token stringcartTokencheckout_id stringDiscard idExample:2404785166526352972864
checkout_token stringcheckoutTokenclient_detailsobject
clientDetailsbrowser_ip stringbrowserIpsession_hash stringsessionHashuser_agent stringuserAgentcreated_at stringcreatedAtcurrency stringcurrencycurrent_subtotal_price stringcurrentSubtotalPricecurrent_subtotal_price_setobject
currentSubtotalPriceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodecurrent_total_discounts stringcurrentTotalDiscountscurrent_total_discounts_setobject
currentTotalDiscountsSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodecurrent_total_price stringcurrentTotalPricecurrent_total_price_setobject
currentTotalPriceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodecurrent_total_tax stringcurrentTotalTaxcurrent_total_tax_setobject
currentTotalTaxSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodecustomerobject
customeraddressesobject
addressesaddress1 stringaddress1address2 stringaddress2city stringcitycountry stringcountrycountry_code stringcountryCodefirst_name stringfirstNamelast_name stringlastNamename stringnamephone stringphoneprovince stringprovinceprovince_code stringprovinceCodezip stringziparea_code stringareaCodecreated_at stringcreatedAtcurrency stringcurrencyemail stringemailfirst_name stringfirstNameid stringidlast_name stringlastNamephone stringphoneupdated_at stringupdatedAtcustomer_locale stringcustomerLocalededuct_member_point_amount stringCurrent order membership creditdiscount_applicationsobject[]
All discount information for this order applicationallocation_method stringDiscount application range 1 ) across ( the value is distributed in all authorized lines ) 2 ) the echo ( the value is applied to each authorized line )Example:across
code stringSpecific description of the eventExample:1Q3UMQM8RBP5
description stringSpecific description of the eventExample:Description
target_selection stringDiscount application for event specific object 1 ) explicit ( discount distribution to clear selected Product or shipping ) 2 ) all ( discount distribution to all Product or shipping ) 3 ) ENTITLED ( discount only distribution to its right to the shipping line ) 3 ) ENTITLED ( discount only to the shipping line of theExample:explicit
target_type stringDiscount application for event object 1 ) line_item 2 ) shipping_lineExample:line_item
title stringSpecific description of the eventExample:Description
type stringEvent discount type 1 ) manual 2 ) automatic ( auto discount type ) 3 ) discount_code ( discount code type )Example:manual
value stringDiscount value for eventExample:20
value_type stringActivity discount value type , containing percentage and fixed amount two typesExample:fixed_amount
discount_codesobject[]
discountCodesamount stringamountcode stringcodetype stringtypeemail stringemailfinancial_status stringfinancialStatusExample:"paid"
fulfillment_status stringfulfillmentStatusfulfillmentsobject[]
fulfillmentscreated_at stringcreatedAtid stringidline_itemsobject[]
lineItemsfulfillable_quantity integerfulfillableQuantityfulfillment_service stringfulfillmentServicefulfillment_status stringfulfillmentStatusgrams doublegramsid stringidname stringnameprice stringpriceproduct_id stringproductIdquantity integerquantityrequires_shipping booleanrequiresShippingsku stringskutax_linesobject[]
taxLinesprice stringpriceprice_setobject
priceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCoderate doubleratetitle stringtitletaxable booleantaxabletitle stringtitlevariant_id stringvariantIdvariant_title stringvariantTitlevendor stringvendororder_id stringorderIdshipment_status stringshipmentStatusstatus stringstatustracking_company stringtrackingCompanytracking_number stringtrackingNumbertracking_url stringtrackingUrlupdated_at stringupdatedAtid stringidline_itemsobject[]
lineItemsdiscount_allocationsobject[]
Marketing discount detail amount multi-currencyamount stringDiscount detailsExample:8.00
amount_setobject
Discount details multi-currencypresentment_moneyobject
Payment currencyamount stringAmount, Precision 2Example:8.00
currency_code stringCurrencyExample:USD
shop_moneyobject
Store currencyamount stringAmount, Precision 2Example:8.00
currency_code stringCurrencyExample:USD
discount_application_index integerDiscount index information : marked in the position of the discount detailsExample:1
fulfillable_quantity integerfulfillableQuantityfulfillment_service stringfulfillmentServicefulfillment_status stringfulfillmentStatusgift_card booleanWhether it is a gift card productgrams doublegramsid stringidlocation_id stringPos locationExample:5327026538935748524
name stringnameprice stringpriceproduct_id stringproductIdquantity integerquantityrequires_shipping booleanrequiresShippingsku stringskutax_linesobject[]
taxLinesprice stringpriceprice_setobject
priceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCoderate doubleratetitle stringtitletype stringTax fee type , used to distinguish whether it is a product tax or a shipping tax , the value of the item is as follows : product_tax : product tax shipping_tax : shipping taxExample:shipping_tax
taxable booleantaxabletitle stringtitlevariant_id stringvariantIdvariant_title stringvariantTitlevendor stringvendorname stringnamenote stringnotenote_attributesobject[]
noteAttributescreate_time stringcreateTimename stringnamevalue stringvalueorder_status_url stringorderStatusUrlpayment_detailsobject[]
paymentDetailscreate_time stringcreateTimeorder_seq stringorderSeqpay_amount doublepayAmountpay_channel_deal_id stringpayChannelDealIdpay_seq stringpaySeqpay_status stringpayStatuspayment_gateway_names arraypaymentGatewayNamesExample: ``phone stringphonepresentment_currency stringpresentmentCurrencyprocessed_user_id stringOrder creatorExample:4201057495
refundsobject[]
refundscreated_at stringcreatedAtid stringidnote stringnoteorder_id stringorderIdprocessed_at stringprocessedAtrefund_line_itemsobject[]
refundLineItemsid stringidline_itemobject
lineItemfulfillable_quantity integerfulfillableQuantityfulfillment_service stringfulfillmentServicefulfillment_status stringfulfillmentStatusgrams doublegramsid stringidname stringnameprice stringpriceproduct_id stringproductIdquantity integerquantityrequires_shipping booleanrequiresShippingsku stringskutax_linesobject[]
taxLinesprice stringpriceprice_setobject
priceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCoderate doubleratetitle stringtitletaxable booleantaxabletitle stringtitlevariant_id stringvariantIdvariant_title stringvariantTitlevendor stringvendorline_item_id stringlineItemIdquantity integerquantityrestock_type stringrestockTypesubtotal doublesubtotalsubtotal_setobject
subtotalSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetotal_tax doubletotalTaxtotal_tax_setobject
totalTaxSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetransactionsobject[]
transactionsamount stringamountcreated_at stringcreatedAtcurrency stringcurrencyid stringidkind stringkindorder_id stringorderIdprocessed_at stringprocessedAtstatus stringstatususer_id stringuserIduser_id stringuserIdshipping_addressobject
shippingAddressaddress1 stringaddress1address2 stringaddress2city stringcitycompany stringCompany namecountry stringcountrycountry_code stringcountryCodefirst_name stringfirstNamelast_name stringlastNamelatitude stringLatitudelongitude stringLongitudename stringnamephone stringphoneprovince stringprovinceprovince_code stringprovinceCodezip stringzipshipping_linesobject[]
shippingLinescode stringcodediscount_allocationsobject[]
Discount detailsamount stringDiscount amount, precision 2Example:8.00
amount_setobject
Discount multi-currency amountpresentment_moneyobject
Buyer side amount informationamount stringAmount, Precision 2Example:8.00
currency_code stringCurrencyExample:USD
shop_moneyobject
Store side amount informationamount stringAmount, Precision 2Example:8.00
currency_code stringCurrencyExample:USD
discount_application_index integerDiscount index information : marked in the position of the discount detailsExample:1
discounted_price stringdiscountedPricediscounted_price_setobject
Discount multi-currency amountpresentment_moneyobject
Buyer side amount informationamount stringAmount, Precision 2Example:8.00
currency_code stringCurrencyExample:USD
shop_moneyobject
Store side amount informationamount stringAmount, Precision 2Example:8.00
currency_code stringCurrencyExample:USD
price stringpriceprice_setobject
priceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCoderequested_fulfillment_service_id stringTransportation service codeshipping_price stringOriginal shipping value ( non-discounted amount )Example:8.00
source stringShipping sourceExample:SHOPLINE
tax_linesobject[]
taxLinesprice stringpriceprice_setobject
priceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCoderate doubleratetitle stringtitletitle stringtitlestore_id stringstoreIdsubtotal_price stringsubtotalPricesubtotal_price_setobject
subtotalPriceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetags stringtagstax_linesobject[]
taxLinesprice stringpriceprice_setobject
priceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCoderate doubleratetitle stringtitletax_number stringtaxNumbertax_type stringtaxTypetaxes_included booleantaxesIncludedtotal_discounts stringtotalDiscountstotal_discounts_setobject
totalDiscountsSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetotal_line_items_price stringtotalLineItemsPricetotal_line_items_price_setobject
totalLineItemsPriceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetotal_outstanding stringtotalOutstandingtotal_shipping_price_setobject
totalShippingPriceSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetotal_tax stringtotalTaxtotal_tax_setobject
totalTaxSetpresentment_moneyobject
presentmentMoneyamount stringamountcurrency_code stringcurrencyCodeshop_moneyobject
shopMoneyamount stringamountcurrency_code stringcurrencyCodetotal_tip_received stringtotalTipReceivedtotal_weight doubletotalWeightupdated_at stringupdatedAtuser_id stringuserIdExample:4201057495
API Explorer
Debugger
Was this article helpful to you?
Error loading component.