get https://{shopdomain}.myshoplaza.com/openapi/2022-01/orders/after_sales_list
Requires
read_order
access scope. More access scope
The After Sales List API retrieves a list of after-sales records (e.g., returns or exchanges) associated with orders. By specifying various query parameters, you can filter and paginate the list of after-sales items based on status, creation date, and more.
This API is especially useful for:
- Monitoring and managing post-purchase activities (like returns or refunds).
- Filtering after-sales records by status for streamlined customer service.
- Tracking metrics on pending, processing, and finished after-sales requests.
Request Parameters
Public Request Parameters
Query Parameters
Name | Type | Required | Desc | Example |
---|---|---|---|---|
status | string | No | After-sales status. Can be one of: pending , processing , or finished . | "pending" |
page | int32 | No | Page number for pagination. Defaults to 1 if not provided. | 1 |
per_page | int32 | No | Number of records per page (limit). Defaults vary (often 20 ) if not specified. | 20 |
created_at_start | string | No | Filter to include records created after this date/time (ISO 8601). | "2016-01-18T23:41:00Z" |
created_at_end | string | No | Filter to include records created before this date/time (ISO 8601). | "2016-01-18T23:41:00Z" |
Response Explanation
Public Response Parameters
Success Response
Name | Type | Description | Example |
---|---|---|---|
count |
number |
4 |
Total number of after-sales records matching the query. |
pending_count |
number |
2 |
Number of after-sales records with status pending . |
processing_count |
number |
0 |
Number of after-sales records with status processing . |
post_sales |
array |
See below for details. | An array of after-sales objects, each containing detailed information. |
post_sales[].browser_ip |
string |
"183.15.177.205" |
The IP address from which the after-sales request was made. |
post_sales[].created_at |
string (timestamp) |
"2024-04-22T07:22:51Z" |
The date/time the after-sales record was created. |
post_sales[].credit_card_number |
string |
"0000" |
The last few digits of the credit card used (if any). |
post_sales[].currency_code |
string |
The currency code (e.g., "CNY" , "USD" ). |
"CNY" |
post_sales[].customer_name |
string |
"zhang sen" |
The customer’s name. |
post_sales[].device |
string |
"PC" |
The device type used when placing the order. |
post_sales[].id |
string |
"e18d1fc2-df36-4d6e-8e03-f1586d..." | Unique identifier for this after-sales record. |
post_sales[].line_items |
array |
_(See line item details below.)_ | A list of line items associated with this after-sales record. |
post_sales[].number |
string |
"00000013-S1" | The after-sales document number (often the original order number plus a suffix). |
post_sales[].order_number |
string |
"00000013" | The original order number. |
post_sales[].order_total |
string |
"242.00" | The total price of the original order. |
post_sales[].payment_method |
string |
"bogus_gateway" | The payment method used for the original order. |
post_sales[].recipient_name |
string |
"test test" | The name of the recipient in shipping details. |
post_sales[].sales_platform |
string |
"shoplazza" | The platform on which the sale took place (e.g., "shoplazza"). |
post_sales[].shipping_address_extra_info |
object |
{} | Any extra shipping address info provided. |
post_sales[].shipping_country |
string |
"China mainland" | The country of the shipping address. |
post_sales[].shipping_email |
string |
"test@shoplazza.com" | The email used for shipping notifications. |
post_sales[].shipping_line_name |
string |
"test" | The name of the shipping method/line. |
post_sales[].shipping_phone |
string |
"+8615014471143" | The phone number for the shipping address. |
post_sales[].source |
string |
"https://test-shoplazza.stg..." | The URL or source reference for the original order. |
post_sales[].source_name |
string (JSON) |
"{\"created_at\": \"\",\"data\":\"\"}" | A JSON string with additional source data. |
post_sales[].placed_at |
string (timestamp) |
"2024-04-22T07:21:48Z" | The date/time the original order was placed. |
post_sales[].refund_amount |
string |
"162.00" | The total amount refunded for this after-sales request. |
post_sales[].post_sale_note |
string |
"" | Any note regarding this after-sales request. |
post_sales[].last_referrer_show |
string (JSON) |
"{\"created_at\": \"\",\"data\":\"\"}" | A JSON string describing the last referrer data, if any. |
post_sales[].last_landing_url |
string |
"" | The last landing page URL recorded for the order. |
post_sales[].shipping_line_desc |
string |
"11111" | Description of the shipping line, if any. |
post_sales[].delivery_method |
number |
1 | Delivery method identifier (custom usage). |
post_sales[].shipping_tax_total |
string |
"0.00" | Total shipping tax for the original order. |
post_sales[].shipping_tax_type |
number |
0 | Type of shipping tax. |
post_sales[].all_tax_total |
string |
"0.00" | The total tax on the order. |
post_sales[].shop_name |
string |
"" | The shop name associated with the order. |
post_sales[].staff_contact |
string |
"" | Contact info for any staff associated with this after-sales record. |
post_sales[].status |
string |
"finished" | The status of the after-sales request. Common values: pending , processing , or finished . |
Line Items (Inside post_sales[].line_items[]
)
post_sales[].line_items[]
)Name | Type | Description | Example |
---|---|---|---|
compare_at_price | string | Original price before discount, if any. | "97.00" |
fulfillment_status | string | Fulfillment status of this line item (e.g., "waiting" ). | "waiting" |
fulfillment | array | Array of fulfillment objects (if any). | [] |
id | string | Unique identifier for this line item. | "31d95f28-b af0-47c9- ad53-dbf3833f1b85" |
image.alt | string | Alternate text for the product image. | "" |
image.height | number | Height dimension of the product image. | 180 |
image.path | string | Internal path or reference for the image. | "ccf0794c5 94bad32a3 20eea0d6bfe 40c.jpeg" |
image.src | string | URL or relative path to the product image. | "//cdn.shopl azza.com /ccf0794c594b ad32a320e..." |
image.width | number | Width dimension of the product image. | 174 |
note | string | Any note associated with this line item. | "" |
options[] | array | Array of option objects, typically describing variant attributes (e.g., size). | [{"name":"size", "value":"L"}, ...] |
price | string | Unit price for this item. | "81.00" |
product_handle | string | The handle/slug for the product. | "shirt" |
product_id | string | The ID of the product. | "a1a88be0-a 1d4 -47e4-a2f2-ba6e 131cf447" |
product_tags[] | array | Array of tags associated with this product. | ["s1-s2"] |
product_title | string | The product title. | "shirt" |
properties | string | Any custom properties in string or JSON format. | "" |
quantity | number | Number of units purchased (and reflected in the after-sales request). | 2 |
refund_discount | string | Discount portion of the refund (if any). | "0.00" |
refund_price | string | Price portion of the refund (if any). | "0.00" |
refund_quantity | number | Number of units refunded for this line item. | 1 |
refund_tax | string | Tax portion of the refund (if any). | "0.00" |
refund_total | string | Total refunded amount (including price, tax, discount) for this line item. | "162.00" |
requires_shipping | boolean | Indicates if this item requires shipping. | true |
sku | string | Stock Keeping Unit for the variant. | "T-M-L-red-S-A001011" |
spu | string | Stock Product Unit or a general product code. | "T-M" |
taxable | boolean | Indicates if the item is taxable. | true |
total | string | Total cost for this line item (price * quantity ). | "162.00" |
variant_id | string | The variant’s unique ID. | "cbd7a7b0- 5dd 7-4902-9 466-e21 bd02688b4" |
variant_title | string | The title describing the variant attributes. | "L-red-S" |
vendor | string | The vendor or brand for this item. | "shoplazza" |
weight | string | The unit weight of this item. | "1.10" |
weight_unit | string | Unit of weight measurement (e.g., "kg" , "lb" ). | "kg" |
vendor_url | string | A URL pointing to the vendor site, if applicable. | "https://sho plazza.com" |
oversold_quantity | number | Quantity sold beyond available inventory (if overselling is allowed). | 0 |
main_currency_prices. compare_at_price | string | The compare-at price in the main/store currency. | "13.4" |
main_currency_prices. price | string | The unit price in the main currency. | "11.19" |
main_currency_prices. total | string | The total price (main_currency_prices.price * quantity ). | "22.38" |
main_currency_prices. actual_rate | string | The actual exchange rate used for conversion. | "7.239804" |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |