Requires write_return access scope.
For more info, refer to:
POST https://{handle}.myshopline.com/admin/openapi/v20260301/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 required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The 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
  • notify_customer boolean required
    Message the return to the consumer true ( notification ) or not \false ( not notification )
    Example: true
  • order_seq string required
    Order number
    Example: 2132131231231
  • processed_at string
    Actual time of return occurrence, format: 2023-04-12T22:59:52+08:00
    Example: 2023-04-12T22:59:52+08:00
  • return_line_itemsobject[] required
    Return Product line information
  • return_reason string
    The 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_DESCRIBED
  • return_reason_note string
    Product line return reason detailed notes, maximum 128 characters supported.
    Example: Product does not match the description
  • fulfillment_id string required
    Invoice number
    Example: 23131
  • line_item_id string required
    Product row id
    Example: 12321
  • quantity integer required
    Return Product quantity
    Example: 2
  • return_reason string
    Return reason
    Example: 7 days no reason
Status Codes
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 information
  • id string
    Return id
    Example: 2605860580357012238342
  • order_id string
    Order id
    Example: 21058605762597644309430942
  • return_line_itemsobject[]
    Return listing
  • fulfillment_id string
    Invoice number associated with return order
    Example: 22058605790725653626950942
  • fulfillment_line_itemobject
    Shipping message for return list association
  • line_itemobject
    Invoice Product line information
  • image_url string
    Product link url
    Example: https://image.shopline.com/abc.jpg
  • location_id string
    1 ) pick up location unique no .2 ) non-local Product location information
    Example: 5327026538935748524
  • quantity string
    Product quantity
    Example: 1
  • vendor string
    Product supplier
    Example: Product supplier
  • tags string
    Product tag , separated by ',' when there are multiple
    Example: sales
  • variant_title string
    Product attribute value , multiple divided by " / "
    Example: L/Red
  • variant_id string
    Product SKU serial number
    Example: 18056898121355865678441487
  • requires_shipping string
    Product need to be shipped : false、true
    Example: true
  • tax_linesobject[]
    Product tax details
  • price string
    Tax amount
    Example: 18.00
  • price_setobject
    Tax amount measured in store currency and transaction currency
  • presentment_moneyobject
    Transaction currency
  • amount string
    Tax amount
    Example: 18.00
  • currency_code string
    Currency
    Example: USD
  • shop_moneyobject
    Store currency
  • currency_code string
    Currency
    Example: USD
  • amount string
    Tax amount
    Example: 18.00
  • rate double
    Tax rate
    Example: 10
  • title string
    Tax name
    Example: CNMP
  • taxable boolean
    Product incl . : false、true
    Example: true
  • fulfillable_quantity integer
    Remaining Product number of required
    Example: 1
  • product_id string
    Spu serial number , Product unique identification number
    Example: 16056898121352174690861487
  • sku string
    Merchant custom number
    Example: SKU1234
  • gift_card boolean
    Wei for gift cards or not : false、true
    Example: true
  • title string
    Gpu Product title
    Example: It's good Product
  • attribute string
    Product attribute information : name-attribute value , multiple attribute values are measured comma
    Example: Color-red , size-x
  • name string
    SKU title, same as title
    Example: It's good Product
  • price string
    Product selling price , Product detail page sale price
    Example: 100.0
  • fulfillment_status string
    Product delivery status : fulfilled- shipped ; partial- partially shipped ; null- not shipped
    Example: fulfilled
  • propertiesobject[]
    Product customization information
  • value string
    Customized information content
    Example: Freedom
  • name string
    Custom information object
    Example: Text
  • type string
    Custom 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: text
  • urls array
    Address link information
    Example: ["https://image.shopline.com"]
  • id string
    Product row id
    Example: 405
  • fulfillment_service string
    Logistics company name
    Example: Sf international
  • grams double
    Product weight ( grams )
    Example: 1
  • quantity integer
    Shipping quantity of invoice
    Example: 2
  • id string
    Return Product line number
    Example: RDP5860580372212396041
  • quantity integer
    Return order Product number of returns
    Example: 1
  • return_reason string
    Return reason
    Example: no reason
  • status string
    Return order status ; open ( in return ) , CLOSED ( returned goods are completed and refunded is completed )
    Example: OPEN
  • created_at string
    Return order creation time
    Example: 2022-11-04T10:18:46+00:00
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "processed_at": "2023-04-12T22:59:52+08:00",
  "return_line_items": [
    {
      "return_reason": "NOT_AS_DESCRIBED",
      "return_reason_note": "Product does not match the description",
      "fulfillment_id": "23131",
      "line_item_id": "12321",
      "quantity": 2
    }
  ],
  "return_reason": "7 days no reason",
  "notify_customer": true,
  "order_seq": "2132131231231"
}

Language

curl --request POST \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/return/create.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Was this article helpful to you?