Create a Return
POST https://{handle}.myshopline.com/admin/openapi/v20261201/return/create.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 .Open API to create return orders
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 eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA
Request Body
return_line_itemsobject[] required
Return Product line informationreturn_reason stringThe return reasons for the product line: COLOR(Incorrect color), DEFECTIVE(Product is damaged or defective), NOT_AS_DESCRIBED(Product does not match the description), OTHER(Other reasons), SIZE_TOO_LARGE(Size is too large), SIZE_TOO_SMALL(Size is too small), STYLE(Issues with the style), UNWANTED(Customer changed their mind), WRONG_ITEM(Received the wrong item)Example:NOT_AS_DESCRIBEDreturn_reason_note stringProduct line return reason detailed notes, maximum 128 characters supported.Example:Product does not match the descriptionfulfillment_id string requiredInvoice numberExample:23131line_item_id string requiredProduct row idExample:12321quantity integer requiredReturn Product quantityExample:2- return_reason stringReturn reasonExample:
7 days no reason - notify_customer boolean requiredMessage the return to the consumer true ( notification ) or not \false ( not notification )Example:
true - order_seq string requiredOrder numberExample:
2132131231231 - processed_at stringActual time of return occurrence, format: 2023-04-12T22:59:52+08:00Example:
2023-04-12T22:59:52+08:00
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
returnobject
Return order informationstatus stringReturn order status ; open ( in return ) , CLOSED ( returned goods are completed and refunded is completed )Example:OPENcreated_at stringReturn order creation timeExample:2022-11-04T10:18:46+00:00id stringReturn idExample:2605860580357012238342order_id stringOrder idExample:21058605762597644309430942return_line_itemsobject[]
Return listingfulfillment_id stringInvoice number associated with return orderExample:22058605790725653626950942fulfillment_line_itemobject
Shipping message for return list associationline_itemobject
Invoice Product line informationtitle stringGpu Product titleExample:It's good Productpropertiesobject[]
Product customization informationvalue stringCustomized information contentExample:Freedomname stringCustom information objectExample:Texttype stringCustom information type : text、picture、link 1 ) when type is text , take name and value ;2 ) when type is picture , the display type is name , and the details of the thumb of urls to obtain Product 3 ) when type is link , support click urls to use the picture .Example:texturls arrayAddress link informationExample:["https://image.shopline.com"]id stringProduct row idExample:405tags stringProduct tag , separated by ',' when there are multipleExample:salesvariant_id stringProduct SKU serial numberExample:18056898121355865678441487tax_linesobject[]
Product tax detailstitle stringTax nameExample:CNMPprice stringTax amountExample:18.00price_setobject
Tax amount measured in store currency and transaction currencypresentment_moneyobject
Transaction currencyamount stringTax amountExample:18.00currency_code stringCurrencyExample:USDshop_moneyobject
Store currencycurrency_code stringCurrencyExample:USDamount stringTax amountExample:18.00rate doubleTax rateExample:10taxable booleanProduct incl . : false、trueExample:truefulfillment_service stringLogistics company nameExample:Sf internationalvariant_title stringProduct attribute value , multiple divided by " / "Example:L/Redproduct_id stringSpu serial number , Product unique identification numberExample:16056898121352174690861487sku stringMerchant custom numberExample:SKU1234fulfillment_status stringProduct delivery status : fulfilled- shipped ; partial- partially shipped ; null- not shippedExample:fulfilledgrams doubleProduct weight ( grams )Example:1image_url stringProduct link urlExample:https://image.shopline.com/abc.jpgquantity stringProduct quantityExample:1fulfillable_quantity integerRemaining Product number of requiredExample:1gift_card booleanWei for gift cards or not : false、trueExample:trueattribute stringProduct attribute information : name-attribute value , multiple attribute values are measured commaExample:Color-red , size-xname stringSKU title, same as titleExample:It's good Productprice stringProduct selling price , Product detail page sale priceExample:100.0location_id string1 ) pick up location unique no .2 ) non-local Product location informationExample:5327026538935748524vendor stringProduct supplierExample:Product supplierrequires_shipping stringProduct need to be shipped : false、trueExample:truequantity integerShipping quantity of invoiceExample:2id stringReturn Product line numberExample:RDP5860580372212396041quantity integerReturn order Product number of returnsExample:1return_reason stringReturn reasonExample:no reason
API Explorer
Debugger
Was this article helpful to you?