Order refund
POST https://{handle}.myshopline.com/admin/openapi/v20260301/order/refund.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 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 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
- processed_at stringRefund order launch timeExample:
Format : 2023-04-12T22 : 59 : 52+08 : 00 refund_line_itemsobject[]
Refund Product line information , can be associated with multiple Product linesrestock_type stringProduct inventory processingExample:returntype string requiredDangyi shipping status is required when making a refund when in Product Unshipped : Product not shipped , Returned : the product has been returnedExample:Unshippedline_item_id longProduct row idExample:601location_id stringProduct stock back placeExample:5409714787218633772quantity longTrial refund Product quantityExample:1shippingobject
Refund policy for shipping amountamount stringSpecify refund amountExample:1.23full_refund booleanReturn shipping fee or notExample:truetransactionsobject[] required
Payment slip refund informationid stringPayment slip number , start with 230Example:23057520029306658561302511kind stringPayment slip typeExample:refundtype booleanRefund type , ture : refund on the original roadExample:trueamount stringRefund amount, which the settlement currency amount corresponding to the payment orderExample:2.34currency stringthe settlement currency of the payment, which is optional. If the input currency is null, the application will verify whether the currency is the store currency, If it is not the store currency, an error will be reported and promp like: "the input currency must be the settlement currency of the payment”; If the input currency is passed, check whether the currency is the settlement currency of the payment. If not, an error will be reported and the prompt will be the same as abovegateway stringPayment channelsExample:Paypal- currency stringsettlement currency of the order, which is optional. If the input currency is null, the application will verify whether the order settlement currency is the store currency, If it is not the store currency, an error will be reported, prompting like: "currency must be X”; If the input currency is passed, check whether the currency is the settlement currency of the order. If not, an error will be reported and the prompt will be: "currency must be X"
- note stringRefund NotesExample:
Refund - notify booleanSend message notifications ( logic with existing b-end refund message )Example:
true - order_id string requiredOrder numberExample:
21057520029298437725452511
Status Codes
- 200
- 401
- 429
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
dataobject
Data return bodynote stringRefund NotesExample:Remarkorder_adjustmentsobject[]
Adjust the order informationamount stringAdjustment order amountExample:2.34kind stringAdjustment order type: refund_discrepancy, shipping_refundExample:refund_discrepancyorder_id stringOrder number for this adjustment of the single linkExample:21057520029298437725452511tax_amount_setobject
Adjust the single tax amount according to the store currency and transaction currencypresentment_moneyobject
Marketplace amount informationamount stringMarketplace amount informationExample:2.34currency_code stringMarket currencyExample:USDshop_moneyobject
Store amount informationcurrency_code stringStore currencyExample:USDamount stringStore amountExample:3.45amount_setobject
Adjust the single amount according to the store currency and transaction currencyshop_moneyobject
Store amount informationamount stringStore amountExample:2.34currency_code stringStore currencyExample:USDpresentment_moneyobject
Marketplace amount informationamount stringMarketplace amountExample:2.34currency_code stringMarket currencyExample:USDid stringAdjust single sizereason stringReason for adjustment: Refund discrepancy, shipping_refundExample:refund_discrepancyrefund_id stringRefund id , unique recognitiontax_amount stringAdjust single tax amountExample:978order_id stringOrder number associated with this refund orderExample:21057520029298437725452511refund_line_itemsobject[]
Refund related Product line informationquantity longRefund Product quantityExample:1restock_type stringReturn- returns only not backExample:returnsubtotal stringRefund Product row total amount , accuracy 2Example:3.45subtotal_setobject
Total amount of refund Product bank by store currency and transaction currencypresentment_moneyobject
Marketplace amount informationamount stringMarketplace amountExample:1.23currency_code stringMarket currencyExample:USDshop_moneyobject
Store currency amount informationamount stringStore amountExample:2.36currency_code stringStore currencyExample:USDtotal_tax stringRefund Product row tax total amount , accuracy 2Example:4.56total_tax_setobject
Total amount of refund Product bank tax , sold in store currency and transaction currencyshop_moneyobject
Store currency amount informationcurrency_code stringStore currencyExample:USDamount stringStore amountExample:6.14presentment_moneyobject
Marketplace amount informationamount stringStore amountExample:3.24currency_code stringStore currencyExample:USDid longProduct row idline_item_id longThe ID of the product snapshot table, generated by the system, uniquely confirms a product with the order numberExample:601total_duties_setobject
Refund total dutyshop_moneyobject
Sell side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDpresentment_moneyobject
Buyer side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDtransactionsobject[]
Refund payment slip informationamount longThe refund amount corresponding to the settlement currency of the refund payment order, precision 2create_at stringCreation timeExample:1673404700862currency stringPayment currency , payment slip corresponding settlement currencyExample:USDid stringPayment slip numberExample:23057520029306658561302511kind stringPayment slip type , here is only refundExample:refundorder_id stringOrder number for this adjustment of the single linkExample:21057520029298437725452511processed_at stringRefund form update timeExample:1673404700862status stringHandling status, pending, failure, success, and errorExample:pendingcreate_at stringRefund single creation timeExample:1673404700862id stringRefund id , unique recognitionExample:2605755870074105241861
API Explorer
Debugger
Was this article helpful to you?