Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nyuchidocs-mintlify-nyuchi-api-gateway-1778247744.mintlify.app/llms.txt

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

The logistics namespace serves the Nyuchi vehicle bookings backend. It exposes vehicles, bookings, drivers, and pickup or drop-off locations from the nyuchi_logistics_db Supabase project. Use these endpoints to power booking flows in consumer apps and partner integrations. Base path: /v1/logistics

Endpoints

MethodPathAuthPurpose
GET/v1/logistics/vehiclesOptionalList vehicles. Supports available, limit, offset.
GET/v1/logistics/vehicles/{vehicle_id}OptionalFetch a single vehicle.
POST/v1/logistics/bookingsRequiredCreate a booking for the calling customer.
GET/v1/logistics/bookingsRequiredList bookings owned by the caller.
GET/v1/logistics/bookings/{booking_id}RequiredFetch a booking owned by the caller.
GET/v1/logistics/locationsOptionalList pickup and drop-off locations.

Find an available vehicle

curl "https://api.nyuchi.com/v1/logistics/vehicles?available=true&limit=10"
{
  "data": [
    { "id": "v_01", "make": "Toyota", "model": "Hilux", "is_available": true }
  ],
  "count": 1
}

Create a booking

The booking is automatically scoped to the authenticated caller via customer_id.
curl -X POST https://api.nyuchi.com/v1/logistics/bookings \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vehicle_id": "v_01",
    "pickup_location_id": "loc_jhb",
    "dropoff_location_id": "loc_hre",
    "pickup_at": "2026-06-01T08:00:00Z",
    "return_at": "2026-06-05T18:00:00Z",
    "notes": "Long-haul rental, second driver included."
  }'

List my bookings

GET /v1/logistics/bookings only returns rows owned by the caller. Use limit and offset for pagination.
curl "https://api.nyuchi.com/v1/logistics/bookings?limit=20" \
  -H "Authorization: Bearer $TOKEN"