Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OluwagbeminiyiA/agro_pulse-API/llms.txt

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

The Transporters API manages TransporterProfile records for users with the TRANSPORTER role on the AgroPulse platform. A transporter profile extends a base User account with logistics details — the type of vehicle operated, a registration plate number, and the geographic area the transporter covers. These records are used to match transporters with delivery requests from buyers and sellers. All endpoints require a valid JWT Bearer token. The user field is automatically set to the authenticated user and must not be included in the request body.

Base path

/api/transporters/

Authentication

All endpoints require a JWT Bearer token in the Authorization header.
The user field is automatically set to the authenticated user when creating a record. You do not need to supply it in the request body.

Endpoints

MethodPathDescriptionAuth required
GET/api/transporters/List transporter profilesYes
POST/api/transporters/Create a new transporter profileYes
GET/api/transporters/{id}/Retrieve a single transporter profile by UUIDYes
PUT/api/transporters/{id}/Full update of a transporter profileYes
PATCH/api/transporters/{id}/Partial update of a transporter profileYes
DELETE/api/transporters/{id}/Delete a transporter profileYes

Create a transporter profile

POST /api/transporters/ Creates a TransporterProfile linked to the authenticated user. The user field is set automatically from the Bearer token and is read-only. Provide the vehicle details and service area so the platform can match this transporter to relevant delivery requests.
vehicle_type
string
required
Type of vehicle used for deliveries (e.g., Motorcycle, Pickup Truck, Van). Max 255 characters.
plate_number
string
required
Vehicle registration plate number (max 50 characters). Must be unique per profile.
service_area
string
required
Geographic area the transporter operates in (max 255 characters).

Example request

curl --request POST \
  --url https://api.agropulse.example.com/api/transporters/ \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "vehicle_type": "Pickup Truck",
    "plate_number": "GR-4521-22",
    "service_area": "Greater Accra Region, Ghana"
  }'

Example response

{
  "id": "e9f3b2d1-6a74-4c8e-a0d5-31b2c4e7f890",
  "user": "a3f1c2e4-84b7-4d1e-b9a0-12c3d4e5f678",
  "user_email": "[email protected]",
  "user_full_name": "Kwame Boateng",
  "vehicle_type": "Pickup Truck",
  "plate_number": "GR-4521-22",
  "service_area": "Greater Accra Region, Ghana",
  "created_at": "2026-05-13T12:05:00.000000Z",
  "updated_at": "2026-05-13T12:05:00.000000Z"
}

List transporters

GET /api/transporters/ Returns an array of transporter profiles ordered by created_at descending. Non-admin users receive only their own profile. Staff users receive all profiles.

Query parameters

Filter results by a search term matched against transporter profile fields.
ordering
string
Sort results by a field name. Prefix with - for descending order (e.g., -created_at).

Example request

curl --request GET \
  --url 'https://api.agropulse.example.com/api/transporters/?search=Accra&ordering=-created_at' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

TransporterProfile object

id
string
required
UUID primary key. Auto-generated on creation, never editable.
user
string
required
UUID of the linked User account. Set automatically from the authenticated user. Read-only.
user_email
string
required
Email address of the linked user. Read-only, derived from the User record.
user_full_name
string
required
Full name of the linked user. Read-only, derived from the User record.
vehicle_type
string
required
Type of vehicle used for deliveries.
plate_number
string
required
Vehicle registration plate number.
service_area
string
required
Geographic area the transporter operates in.
created_at
string
required
ISO 8601 timestamp of profile creation. Read-only.
updated_at
string
required
ISO 8601 timestamp of the last update. Read-only.

Build docs developers (and LLMs) love