Skip to main content

/v1/data/order/returns

GET /v1/data/order/returns

Summary

This API endpoint retrieves the details of product returns for orders within a specified date range, paginated by a provided page index and page size. The endpoint is rate-limited to enhance performance and prevent abuse.

Rate Limit

  • Limit: 30 requests per minute
  • Minimum Gap Between Requests: 200 miliseconds

Request Headers

HeaderValue
AuthorizationBearer API_TOKEN

Query Parameters

ParameterTypeMandatoryDefault ValueDescription
page_indexintNo0Index of the page to retrieve.
page_sizeintNo50Number of records per page. Maximum allowed limit is 1000.
start_datedateYesNoneStart date for filtering the returns.
end_datedateYesNoneEnd date for filtering the returns.

Note: The start_date and end_date parameters are mandatory for this API call.

Example Request

GET /v1/data/order/returns?page_index=0&page_size=10&start_date=2022-01-01&end_date=2022-12-31

Responses

400: Bad Request

Returned when the page size exceeds the maximum allowed limit of 1000, when the start and end dates are not provided, or when other validation errors occur.

401: Unauthorized

Returned when the API token is invalid or missing.

429: Too Many Requests

Returned when the request rate limit is exceeded.

200: Successful Response

The successful response returns JSON with the following structure:

{
"data": [
{
"order_id": "1234",
"product_id": "1234",
"sku": "1234",
"return_reason": "1",
"return_date": "2022-02-05T18:40:00.000Z",
"external_id": "o-123"
}
],
"message": "Get order product returns",
"total_records": 1,
"status": "OK"
}

Note: The data array contains the product return details for each order. The total_records field indicates the total number of records available for the query.