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:

  1. Monitoring and managing post-purchase activities (like returns or refunds).
  2. Filtering after-sales records by status for streamlined customer service.
  3. Tracking metrics on pending, processing, and finished after-sales requests.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

NameTypeRequiredDescExample
statusstringNoAfter-sales status. Can be one of: pending, processing, or finished."pending"
pageint32NoPage number for pagination. Defaults to 1 if not provided.1
per_pageint32NoNumber of records per page (limit). Defaults vary (often 20) if not specified.20
created_at_startstringNoFilter to include records created after this date/time (ISO 8601)."2016-01-18T23:41:00Z"
created_at_endstringNoFilter to include records created before this date/time (ISO 8601)."2016-01-18T23:41:00Z"

Response Explanation

Public Response Parameters

📘

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[])

NameTypeDescriptionExample
compare_at_pricestringOriginal price before discount, if any."97.00"
fulfillment_statusstringFulfillment status of this line item (e.g., "waiting")."waiting"
fulfillmentarrayArray of fulfillment objects (if any).[]
idstringUnique identifier for this line item."31d95f28-b af0-47c9- ad53-dbf3833f1b85"
image.altstringAlternate text for the product image.""
image.heightnumberHeight dimension of the product image.180
image.pathstringInternal path or reference for the image."ccf0794c5 94bad32a3 20eea0d6bfe 40c.jpeg"
image.srcstringURL or relative path to the product image."//cdn.shopl azza.com /ccf0794c594b ad32a320e..."
image.widthnumberWidth dimension of the product image.174
notestringAny note associated with this line item.""
options[]arrayArray of option objects, typically describing variant attributes (e.g., size).[{"name":"size", "value":"L"}, ...]
pricestringUnit price for this item."81.00"
product_handlestringThe handle/slug for the product."shirt"
product_idstringThe ID of the product."a1a88be0-a 1d4 -47e4-a2f2-ba6e 131cf447"
product_tags[]arrayArray of tags associated with this product.["s1-s2"]
product_titlestringThe product title."shirt"
propertiesstringAny custom properties in string or JSON format.""
quantitynumberNumber of units purchased (and reflected in the after-sales request).2
refund_discountstringDiscount portion of the refund (if any)."0.00"
refund_pricestringPrice portion of the refund (if any)."0.00"
refund_quantitynumberNumber of units refunded for this line item.1
refund_taxstringTax portion of the refund (if any)."0.00"
refund_totalstringTotal refunded amount (including price, tax, discount) for this line item."162.00"
requires_shippingbooleanIndicates if this item requires shipping.true
skustringStock Keeping Unit for the variant."T-M-L-red-S-A001011"
spustringStock Product Unit or a general product code."T-M"
taxablebooleanIndicates if the item is taxable.true
totalstringTotal cost for this line item (price * quantity)."162.00"
variant_idstringThe variant’s unique ID."cbd7a7b0- 5dd 7-4902-9 466-e21 bd02688b4"
variant_titlestringThe title describing the variant attributes."L-red-S"
vendorstringThe vendor or brand for this item."shoplazza"
weightstringThe unit weight of this item."1.10"
weight_unitstringUnit of weight measurement (e.g., "kg", "lb")."kg"
vendor_urlstringA URL pointing to the vendor site, if applicable."https://sho plazza.com"
oversold_quantitynumberQuantity sold beyond available inventory (if overselling is allowed).0
main_currency_prices. compare_at_pricestringThe compare-at price in the main/store currency."13.4"
main_currency_prices. pricestringThe unit price in the main currency."11.19"
main_currency_prices. totalstringThe total price (main_currency_prices.price * quantity)."22.38"
main_currency_prices. actual_ratestringThe 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.

FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!