The Couriers API provides full fleet lifecycle management — registering couriers, updating their operational status, assigning and responding to order offers, and paginating delivery history. Assignment logic respects theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CRISTIANCAMACH34/Zippi/llms.txt
Use this file to discover all available pages before exploring further.
MAX_ACTIVE_ORDERS_PER_COURIER and ORDER_ASSIGNMENT_TIMEOUT_SECONDS environment variables, ensuring dispatch stays within safe capacity bounds.
Environment Variables
| Variable | Default | Description |
|---|---|---|
MAX_ACTIVE_ORDERS_PER_COURIER | 1 | Maximum concurrent active orders a courier can hold. Assignment is rejected when this limit is reached. |
ORDER_ASSIGNMENT_TIMEOUT_SECONDS | 60 | Seconds a courier has to accept or reject an order offer before it expires and is re-queued. |
Permissions
| Permission | Description |
|---|---|
couriers.read | List couriers, view profiles, delivery history, and performance metrics |
couriers.manage | Register, update, and delete couriers; manage fleet status and blocks |
couriers.settlements | View courier discrepancies, close-outs, and liquidation records |
orders.assign | Assign orders to couriers and process accept/reject offers |
GET /api/v1/couriers
Returns a paginated list of couriers with optional status and date-range filters. Permission required:couriers.read
Query Parameters
Page number (1-indexed).
Number of results per page.
Filter by courier status. Common values:
active, inactive, blocked.When
true (also accepts 1, yes, si), returns only couriers currently on shift.ISO 8601 date (
YYYY-MM-DD) — lower bound for registration or activity date.ISO 8601 date (
YYYY-MM-DD) — upper bound for registration or activity date.Response
Whether the request succeeded.
Paginated courier list.
Array of courier profile objects.
Total matching couriers.
Current page number.
Page size used.
POST /api/v1/couriers
Registers a new courier. If a courier with the same identifying info already exists, the service returns200 OK with created: false; a genuinely new record returns 201 Created with created: true.
Permission required: couriers.manage
Body
Full name of the courier.
Mobile phone number in E.164 format (e.g.
"+573001234567").Vehicle type. E.g.
bicycle, motorcycle, car.Vehicle plate number (if applicable).
City ID the courier is assigned to.
Internal notes or background check references.
Response
Always
true on success.Courier record with
courier_id, name, phone, status, and created flag.true if a new record was created; false if an existing record was matched.GET /api/v1/couriers/by-phone/
Retrieves a single courier profile by their mobile phone number. Useful for onboarding flows where the courier ID is unknown. Permission required:couriers.read
Path Parameters
Phone number to look up (URL-encoded E.164, e.g.
%2B573001234567).Response
Whether the request succeeded.
Courier profile object or
null if not found.GET /api/v1/couriers/
Retrieves the full profile and performance summary of a single courier, optionally scoped to a date window. Permission required:couriers.read
Path Parameters
Numeric courier ID.
Query Parameters
ISO 8601 date — start of performance window.
ISO 8601 date — end of performance window.
Response
Whether the request succeeded.
Full courier profile including
courier_id, name, phone, status, vehicle_type, vehicle_plate, city_id, and optional performance metrics for the requested date window.PATCH /api/v1/couriers/
Partially updates a courier record. Commonly used to toggle operational status (active ↔ blocked) or update vehicle details.
Permission required: couriers.manage
Path Parameters
Numeric courier ID.
Body
New status value. Accepted values:
active, inactive, blocked.Updated display name.
Updated phone number in E.164 format.
Updated vehicle type.
Updated plate number.
Updated internal notes.
Response
Always
true on success.Updated courier record.
DELETE /api/v1/couriers/
Soft-deletes a courier from the fleet. The record is retained for audit and history purposes but the courier will no longer appear in active lists. Permission required:couriers.manage
Path Parameters
Numeric courier ID.
Response
Always
true on success.Confirmation payload including the deleted courier’s ID and
deleted_at timestamp.POST /api/v1/couriers//assignments
Assigns an order directly to a courier. The system enforcesMAX_ACTIVE_ORDERS_PER_COURIER (default 1) — if the courier is already at capacity the call returns an error. Returns 201 Created on successful assignment.
Permission required: orders.assign
Path Parameters
Numeric ID of the courier to assign the order to.
Body
ID of the order to assign.
Optional dispatcher note attached to the assignment event.
Response
Always
true on success.Assignment record including
assignment_id, courier_id, order_id, and assigned_at.POST /api/v1/couriers//offers//accept
The courier (or dispatcher on their behalf) accepts a pending order offer. Once accepted the order moves to the courier’s active delivery queue. Permission required:orders.assign
Path Parameters
Courier ID.
Order ID of the pending offer.
Response
Always
true on success.Updated order and assignment state.
POST /api/v1/couriers//offers//reject
The courier (or dispatcher on their behalf) rejects a pending order offer. The order is returned to the dispatch queue for reassignment. Permission required:orders.assign
After rejection the order offer timer (
ORDER_ASSIGNMENT_TIMEOUT_SECONDS, default 60) is reset and the order becomes eligible for the next available courier.Path Parameters
Courier ID.
Order ID of the pending offer.
Response
Always
true on success.Updated order state indicating the offer was rejected and the order returned to queue.
GET /api/v1/couriers//history
Returns a paginated delivery history for a courier, optionally filtered by date range. Useful for generating courier performance reports and settlement calculations. Permission required:couriers.read
Path Parameters
Numeric courier ID.
Query Parameters
Page number (1-indexed).
Number of results per page.
ISO 8601 date — earliest delivery date to include.
ISO 8601 date — latest delivery date to include.
Response
Whether the request succeeded.
Paginated history object.
Array of delivery records, each with order ID, status, timestamps, and delivery fee in centavos.
Total number of matching deliveries.
Current page.
Page size used.