Order refund trial
POST https://{handle}.myshopline.com/admin/openapi/v20260301/orders/:order_id/refunds/calculate.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 .Path Parameters
- order_id string requiredOrder id
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
shippingobject
Shipping ratesamount stringShipping amount to be returned , double type string , accuracy 2Example:"10.00"full_refund booleanReturn shipping fee or notExample:true- 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"Example:
USD refund_line_itemsobject[]
Trial Productquantity longTrial refund Product quantityExample:1type string requiredThe Product to calculate belongs to , Unshipped : Product not shipped , Returned : the product has been returnedline_item_id stringTrial refund Product row idExample:"12343423111"
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
refundobject
Trial resultstotal_duties_setobject
Refund total dutypresentment_moneyobject
Buyer side amount informationcurrency_code stringCurrencyExample:"USD"amount stringAmountExample:8.88shop_moneyobject
Sell side amount informationamount stringAmountExample:8.88currency_code stringCurrencyExample:USDtransactonsobject[]
When the trial amount is greater than 0 , the original return system automatically returns the payment slip and amount according to the rulesamount stringpayment amount, which the corresponding amount in the settlement currency of the payment orderExample:"41.89"currency stringthe currency, which the settlement currency corresponding of the paymentExample:USDgateway stringPayment channelsExample:boguskind stringsuggested_refundExample:suggested_refundmaximum_refundable stringCurrent payment slip when the largest amount is returnedExample:"41.89"order_id stringOrder numberExample:"21056836827909126061559008"parent_id stringPayment slip numberExample:"26056836827909126061559008"currency stringthe currency, which the settlement currency corresponding to the refundExample:USDrefund_line_itemsobject[]
When Product should return the amount to the request for trial , returntotal_tax stringProduct the tax refund amount should be availableExample:"195.67"type stringThe Product to calculate belongs to , Unshipped : Product not shipped , Shipped : Product has been shipped , Returned : the product has been returneddiscount_total_amount stringProduct total discount amountExample:"199.00"line_item_id stringProduct line ( Product line in ginseng )Example:"33121216544"price stringProduct selling priceExample:"199.00"quantity integerQuantity ( actual can be returned )Example:1subtotal stringProduct should be refundedExample:"195.67"shippingobject
When shipping charges are required returnamount stringOrder shippingExample:"5.00"maximum_refundable stringMaximum return shippingExample:"10.00"tax stringOrder shipping taxExample:"1.00"
API Explorer
Debugger
Was this article helpful to you?