Skip to content

Rider Equipment API Documentation

This document provides the necessary details to interact with the Rider Equipment API endpoints. The API allows users to retrieve information about equipment assigned to riders, including various filtering options.

Base URL

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

Endpoints

Terminal window
GET /riders

Retrieve information about equipment assigned to 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.
assign_date_fromdate(optional) Filter by assign date (start range).
assign_date_todate(optional) Filter by assign date (end range).
assign_typetinyint(1)(optional) Filter by assign type (0 or 1).

Response

The response will now be a JSON array where each object represents a rider and contains a Products block that lists all equipment assigned to the rider:

FieldDescription
Rider ID(bigint) ID of the rider.
3PL(text) Name of the third-party logistics.
Products(array) Array containing products assigned to the rider.

Each Products array contains the following fields for each product:

FieldDescription
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.
Assign Date(datetime) Date when the product was assigned.
Assigne Name(text) Name of the user who assigned the product.
Manual Assign or Physical Assign(tinyint(1)) Indicates if the assignment was manual or physical.
Returned at(datetime, nullable) Date when the product was returned.

Example Request

Terminal window
GET /riders?user_id=50&assign_date_from=2024-01-01&assign_date_to=2024-06-01

Example Response

[
{
"Rider ID": 50,
"3PL": "Logistics Company A",
"Products": [
{
"Product ID": 123,
"Product Name": "Helmet",
"Product Variation ID": 1,
"Product Variation Name": "Size L",
"Assign Date": "2024-01-15 10:30:00",
"Assigne Name": "John Doe",
"Manual Assign or Physical Assign": "Manual",
"Returned at": null
},
{
"Product ID": 456,
"Product Name": "Jacket",
"Product Variation ID": 2,
"Product Variation Name": "Size M",
"Assign Date": "2024-02-10 14:45:00",
"Assigne Name": "Jane Smith",
"Manual Assign or Physical Assign": "Physical",
"Returned at": "2024-03-20 09:00:00"
}
]
}
]

Notes

Ensure that the date format for assign_date_from and assign_date_to is YYYY-MM-DD. The parameter names are case-sensitive. If no parameters are provided, the endpoint returns all rider equipment details.

Example

Scenario: Filtering by Rider ID and Date Range To retrieve equipment assigned to rider with ID 50 between 2024-01-01 and 2024-06-01:

Terminal window
GET /riders?user_id=50&assign_date_from=2024-01-01&assign_date_to=2024-06-01

Response

[
{
"Rider ID": 50,
"3PL": "Logistics Company A",
"Products": [
{
"Product ID": 123,
"Product Name": "Helmet",
"Product Variation ID": 1,
"Product Variation Name": "Size L",
"Assign Date": "2024-01-15 10:30:00",
"Assigne Name": "John Doe",
"Manual Assign or Physical Assign": "Manual",
"Returned at": null
}
]
}
]