Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FlasheyEstudi/Oasis-Liquido/llms.txt

Use this file to discover all available pages before exploring further.

Delivery drivers are the last-mile layer of Oasis Liquido. Once a pharmacy processes a sale with home delivery, the resulting order becomes visible to available drivers. You pick up the package, update status at each stage of the journey, and broadcast your GPS position so the patient can follow you on the live map.

What drivers can do

  • Browse open delivery orders scoped to your availability status
  • Accept an order to become its assigned driver
  • Progress the order through each handoff status (pending → assigned → picked_up → in_transit → delivered)
  • Share your current GPS coordinates with each status update
  • View pickup and drop-off addresses and coordinates for routing

Driver profile fields

Your account is backed by a DeliveryDriverProfile record with the following fields:
FieldTypeDescription
vehicle_typestringType of vehicle used for deliveries (default: "motocicleta")
license_platestringVehicle license plate number
is_availablebooleanWhether you appear in the pool of assignable drivers
current_latfloatLatest reported latitude
current_lngfloatLatest reported longitude
Toggle is_available to false when you are off shift. Orders are only assigned to drivers marked available.

Delivery status lifecycle

Every delivery order moves through a defined sequence of statuses. You advance the status by calling the status update endpoint and including your current coordinates.
pending → assigned → picked_up → in_transit → delivered
        ↘                                    ↘
          cancelled                            cancelled
StatusAction
pendingOrder created by the pharmacy; no driver assigned yet
assignedYou accepted the order (assigned_at is recorded)
picked_upYou collected the package from the pharmacy (picked_up_at is recorded)
in_transitYou are en route to the patient’s address
deliveredPackage handed to the patient (delivered_at is recorded)
cancelledOrder cancelled before delivery was completed

Updating status with GPS coordinates

Each status transition should include your current position so the patient’s map stays accurate.
// PATCH /api/v1/delivery-orders/{id}/status
{
  status: DeliveryStatus;
  current_lat?: number;
  current_lng?: number;
}
The platform records each coordinate pair in DeliveryRoute entries attached to the order, building a full route history that both the patient and administrators can review.

Viewing available orders

The order list endpoint returns orders filtered by your role automatically. You can apply additional filters:
GET /api/v1/delivery-orders?status=pending
GET /api/v1/delivery-orders?delivery_driver_id={your_id}
Each DeliveryOrder includes pickup_address, pickup_lat, pickup_lng, delivery_address, delivery_lat, and delivery_lng — everything needed to plan your route before accepting.
Once you accept an order it is locked to your driver ID. If you cannot complete a delivery, contact your pharmacy administrator to reassign or cancel the order.

Build docs developers (and LLMs) love