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 | Total number of after-sales records matching the query. | 4 |
pending_count | number | Number of after-sales records with status pending . | 2 |
processing_count | number | Number of after-sales records with status processing . | 0 |
post_sales | array | An array of after-sales objects, each containing detailed information. | (See below for details.) |
post_sales[].browser_ip | string | The IP address from which the after-sales request was made. | "183.15.177.205" |
post_sales[].created_at | string (timestamp) | The date/time the after-sales record was created. | "2024-04-22T07:22:51Z" |
post_sales[].credit_card_number | string | The last few digits of the credit card used (if any). | "0000" |
post_sales[].currency_code | string | The currency code (e.g., "CNY" , "USD" ). | "CNY" |
post_sales[].customer_name | string | The customer’s name. | "zhang senjun" |
post_sales[].device | string | The device type used when placing the order. | "PC" |
post_sales[].discount_code | string | Any discount code applied to the original order. | "" |
post_sales[].financial_status | string | The financial status of the original order (e.g., "partially_refunded" ). | "partially_refunded" |
post_sales[].fulfillment_status | string | The fulfillment/shipping status of the original order. | "waiting" |
post_sales[].fulfillments | array | Array of fulfillment objects (if any). | [] |
post_sales[].id | string | Unique identifier for this after-sales record. | "e18d1fc2-df36-4d6e-8e03-f1586d..." |
post_sales[].line_items | array | A list of line items associated with this after-sales record. | (See line item details below.) |
post_sales[].number | string | The after-sales document number (often the original order number plus a suffix). | "00000013-S1" |
post_sales[].order_number | string | The original order number. | "00000013" |
post_sales[].order_total | string | The total price of the original order. | "242.00" |
post_sales[].payment_method | string | The payment method used for the original order. | "bogus_gateway" |
post_sales[].recipient_name | string | The name of the recipient in shipping details. | "test test" |
post_sales[].sales_platform | string | The platform on which the sale took place (e.g., "shoplazza" ). | "shoplazza" |
post_sales[].shipping_address_extra_info | object | Any extra shipping address info provided. | {} |
post_sales[].shipping_country | string | The country of the shipping address. | "China mainland" |
post_sales[].shipping_email | string | The email used for shipping notifications. | "[email protected]" |
post_sales[].shipping_line_name | string | The name of the shipping method/line. | "test" |
post_sales[].shipping_phone | string | The phone number for the shipping address. | "+8615014471143" |
post_sales[].source | string | The URL or source reference for the original order. | "https://test-shoplazza.stg..." |
post_sales[].source_name | string (JSON) | A JSON string with additional source data. | "{\"created_at\":\"\",\"data\":\"\"}" |
post_sales[].placed_at | string (timestamp) | The date/time the original order was placed. | "2024-04-22T07:21:48Z" |
post_sales[].refund_amount | string | The total amount refunded for this after-sales request. | "162.00" |
post_sales[].post_sale_note | string | Any note regarding this after-sales request. | "" |
post_sales[].last_referrer_show | string (JSON) | A JSON string describing the last referrer data, if any. | "{\"created_at\":\"\",\"data\":\"\"}" |
post_sales[].last_landing_url | string | The last landing page URL recorded for the order. | "" |
post_sales[].shipping_line_desc | string | Description of the shipping line, if any. | "11111" |
post_sales[].delivery_method | number | Delivery method identifier (custom usage). | 1 |
post_sales[].shipping_tax_total | string | Total shipping tax for the original order. | "0.00" |
post_sales[].shipping_tax_type | number | Type of shipping tax. | 0 |
post_sales[].all_tax_total | string | The total tax on the order. | "0.00" |
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 | The status of the after-sales request. Common values: pending , processing , or finished . | "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-baf0-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. | "ccf0794c594bad32a320eea0d6bfe40c.jpeg" |
image.src | string | URL or relative path to the product image. | "//cdn.shoplazza.com/ccf0794c594bad32a320e..." |
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-a1d4-47e4-a2f2-ba6e131cf447" |
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-5dd7-4902-9466-e21bd02688b4" |
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://shoplazza.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 |