Skip to content

Rider Product Returns API Documentation

This document provides the necessary details to interact with the Rider Product Returns API endpoints. The API allows users to retrieve information about products returned by riders, including various filtering options.

Base URL

https://talabatkw.wearyourebrand.com/api/v2

Endpoints

Terminal window
GET /product-returns

Retrieve information about products returned by riders. This endpoint allows various filtering options to narrow down the results based on the provided parameters.

Query Parameters

ParameterTypeDescription
rider_idbigint(optional) Filter by rider ID.
3pltext(optional) Filter by third-party logistics (3PL) name.
product_idbigint(optional) Filter by product ID.
variation_idbigint(optional) Filter by product variation ID.
return_date_fromdate(optional) Filter by return date (start range).
return_date_todate(optional) Filter by return date (end range).
return_conditiontext(optional) Filter by return condition.

Response

The response will be a JSON array of product return details. Each object in the array contains the following fields:

FieldDescription
Rider ID(bigint) ID of the rider.
3PL(text) Name of the third-party logistics.
Product ID(bigint) ID of the product.
Product Name(longtext) Name of the product.
Product Variation ID(bigint) ID of the product variation.
Product Variation Name(longtext) Name of the product variation.
Return Date(datetime) Date when the product was returned.
App User ID(bigint) ID of the user who processed the return.
Return Condition(text) Condition of the returned product.

Example Request

Terminal window
GET /product-returns?rider_id=50&return_date_from=2024-01-01&return_date_to=2024-06-01

Example Response

[
{
"Rider ID": 50,
"3PL": "Logistics Company A",
"Product ID": 123,
"Product Name": "Helmet",
"Product Variation ID": 1,
"Product Variation Name": "Size L",
"Return Date": "2024-01-15 10:30:00",
"App User ID": 10,
"Return Condition": "Good"
},
{
"Rider ID": 50,
"3PL": "Logistics Company B",
"Product ID": 456,
"Product Name": "Jacket",
"Product Variation ID": 2,
"Product Variation Name": "Size M",
"Return Date": "2024-02-10 14:45:00",
"App User ID": 15,
"Return Condition": "Damaged"
}
]

Notes

Ensure that the date format for return_date_from and return_date_to is YYYY-MM-DD. The parameter names are case-sensitive. If no parameters are provided, the endpoint returns all product return details.

Example

Scenario: Filtering by Rider ID and Date Range To retrieve products returned by rider with ID 50 between 2024-01-01 and 2024-06-01:

Terminal window
GET /product-returns?rider_id=50&return_date_from=2024-01-01&return_date_to=2024-06-01

Response

[
{
"Rider ID": 50,
"3PL": "Logistics Company A",
"Product ID": 123,
"Product Name": "Helmet",
"Product Variation ID": 1,
"Product Variation Name": "Size L",
"Return Date": "2024-01-15 10:30:00",
"App User ID": 10,
"Return Condition": "Good"
}
]