T-patroller API Documentation
This document provides the necessary details to interact with the T-patroller API endpoints. The API allows users to retrieve information about T-patroller, including various filtering options.
Base URL
https://talabatkw.wearyourebrand.com/api/v2
Endpoints
GET /patrollerchecksRetrieve information about patroller checks. This endpoint allows various filtering options to narrow down the results based on the provided parameters.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
tpatroller_id | bigint | (optional) Filter by patroller ID. |
rider_id | bigint | (optional) Filter by rider ID. |
check_date_from | date | (optional) Filter by check date (start range). |
check_date_to | date | (optional) Filter by check date (end range). |
is_validation | boolean | (optional) Filter by ID validation status. |
license_plate | boolean | (optional) Filter by license plate validation status. |
sticker_validation | boolean | (optional) Filter by sticker validation status. |
Response
The response will be a JSON array of patroller check details. Each object in the array contains the following fields:
| Field | Description |
|---|---|
ID | (bigint) ID of the patroller check. |
Rider_ID | (bigint) ID of the rider. |
Rider_name | (text) Name of the rider. |
3PL | (text) Name of the third-party logistics. |
Tpatroller_ID | (bigint) ID of the patroller. |
Check_date | (datetime) Date when the check was performed. |
ID_validation | (boolean) ID validation status. |
License_plate | (boolean) License plate validation status. |
Reported_item | (array) Array of reported items. |
Questioner | (array) Array of questioner answers. |
Sticker_validation | (boolean) Sticker validation status. |
Fake_ID_note | (array) Note for the fake id. |
Example Request
GET /patrollerchecks?tpatroller_id=89025&check_date_from=2024-01-01&check_date_to=2024-06-01[ { "ID": 93, "Rider_ID": 152200, "Rider_name": "Monisha Alva-TEST", "3PL": "Talabat Internal Rider", "Tpatroller_ID": 89025, "Check_date": "2024-05-08 10:20:03", "ID_validation": 1, "License_plate": 1, "Reported_item": [], "Questioner": [ { "question": "Is the Rider Apperance in Compliance?", "answer": "Uniform is complete but dirty", "imageUrl": "https://talabatae.wearyourebrand.com/storage/questioner_questions/4/261785/photo.png", "score": "0", "category": "Appearance" }, { "question": "What is missing in the rider's appearance? (select what is applicable)", "answer": null, "imageUrl": null, "score": null, "category": "Appearance" }, { "question": "What looks unclean about the rider's appearance? (select what is applicable)", "answer": ["Safety Gear"], "imageUrl": "https://talabatae.wearyourebrand.com/storage/questioner_questions/6/261914/photo.png", "score": "-2", "category": "Appearance" }, { "question": "Is the rider Hygiene acceptable?", "answer": "YES", "imageUrl": "https://talabatae.wearyourebrand.com/storage/questioner_questions/7/261915/photo.png", "score": "0", "category": "Appearance" }, { "question": "What is wrong with the rider hygiene?", "answer": ["Has a bad odou"], "imageUrl": "https://talabatae.wearyourebrand.com/storage/questioner_questions/8/261919/photo.png", "score": "-1", "category": "Appearance" }, { "question": "What type of vehicle is he driving?", "answer": ["walker"], "imageUrl": null, "score": "1", "category": "Appearance" } ], "Sticker_validation": 0, "Fake_ID_note": { "note": "test", "images": [ "https://talabatae.wearyourebrand.com/storage/patroller_checks/110415/6801105/Screenshot-2024-07-12-093916.webp" ] } }]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 patroller check details.
Example
Scenario: Filtering by Patroller ID and Date Range To retrieve patroller checks performed by patroller with ID 89025 between 2024-01-01 and 2024-06-01:
GET /patrollerchecks?tpatroller_id=89025&check_date_from=2024-01-01&check_date_to=2024-06-01
Response
[ { "ID": 93, "Rider_ID": 152200, "Rider_name": "Monisha Alva-TEST", "3PL": "Talabat Internal Rider", "Tpatroller_ID": 89025, "Check_date": "2024-05-08 10:20:03", "ID_validation": 1, "License_plate": 1, "Reported_item": [], "Questioner": [ { "question": "Is the Rider Apperance in Compliance?", "answer": "Uniform is complete but dirty", "imageUrl": "https://talabatae.wearyourebrand.com/storage/questioner_questions/4/261785/photo.png", "score": "0", "category": "Appearance" } ], "Sticker_validation": 1, "Fake_ID_note": { "note": "test", "images": [ "https://talabatae.wearyourebrand.com/storage/patroller_checks/110415/6801105/Screenshot-2024-07-12-093916.webp" ] } }]