The TrustRide Ambassador Program enables trusted platform users to act as booking agents for people who cannot book online themselves. Ambassadors walk into transport terminals, take seat orders from travellers in person, and confirm the bookings directly in TrustRide. They earn a percentage commission on every seat they book and help drivers fill their vehicles faster.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/trustride/llms.txt
Use this file to discover all available pages before exploring further.
What Is an Ambassador?
An ambassador is a verified TrustRide user who has been approved to book seats on behalf of third parties. When an ambassador creates a booking, thebooked_by_ambassador field on the Booking record is set to the ambassador’s user ID, and the actual traveller’s details (rider_name, rider_phone, rider_email) are stored separately on the booking.
Key characteristics:
- Ambassadors are not a separate user role — they hold
role=riderorrole=driverand gain ambassador capability as an overlay. - Before booking any driver’s trip, an ambassador must request and receive explicit per-trip approval from the driver.
- Ambassadors earn
ambassador_commission_rate(default 5%) on each booking they facilitate.
Applying to Become an Ambassador
Any registered TrustRide user can apply to become an ambassador.POST /apply-ambassador/ — submits an AmbassadorApplication record with the following fields:
| Field | Description |
|---|---|
full_name | Applicant’s full name |
phone | Contact phone number |
email | Contact email |
location | City or area where the ambassador will operate |
reason | Motivation statement reviewed by admin |
referral_source | Optional — how they heard about the program |
If a user already has a pending application, submitting a second one redirects them to their profile with a warning. Only one active pending application is allowed per user at a time.
Ambassador Approval Flow
Application Submitted
User posts to
/apply-ambassador/. An AmbassadorApplication record is created with status=pending.Admin Reviews Application
Admin reviews the application in the Django admin panel, checks the applicant’s location, reputation, and reason statement.
Admin Approves
Admin sets
AmbassadorApplication.status=approved and updates the user’s User record:is_ambassador = Trueambassador_status = 'active'ambassador_approved_at = now()ambassador_approved_by = <admin user>ambassador_commission_rateis set (defaults to5.0%)
Ambassador Status States
Theambassador_status field on User controls an ambassador’s operational access:
active — Full ambassador access. Can request trip approvals, book seats, and view commissions.paused — Admin has temporarily suspended ambassador activity. The ambassador can still log in and view their dashboard but cannot book new seats. A warning banner is displayed.revoked — Permanently revoked by admin. Attempting to access the ambassador dashboard redirects the user to the homepage with an error message. is_ambassador remains True as an audit trail, but all booking capabilities are blocked.Ambassador Dashboard
GET /ambassador/dashboard/ — requires is_ambassador=True. Users with ambassador_status=revoked are immediately redirected.
The dashboard surfaces:
- Approved trips —
AmbassadorTripApprovalrecords whereis_approved=True, grouped by departure date. - Pending trip requests — approvals where
is_approved=Falseandapproved_atisNULL(never approved). - Paused approvals — approvals where
is_approved=Falsebutapproved_atis set (previously approved, then paused by driver). - Active bookings — upcoming bookings made by the ambassador where
trip.departure_date >= today. - All published trips — a list of bookable trips the ambassador has not yet requested access to.
- Status counts — badge counts for approved, pending, and paused approvals.
Requesting Trip Approval
Before an ambassador can book seats on a driver’s trip, they must request explicit approval for that specific trip.POST /ambassador/request-approval/<uuid>/ — creates an AmbassadorTripApproval record:
/driver/ambassador-requests/. An ambassador cannot request approval on their own trip, and submitting a duplicate request (for a trip they already requested) is gracefully ignored with an informational message.
Driver Approves the Ambassador
GET/POST /driver/ambassador-requests/ — the driver sees all pending AmbassadorTripApproval records where is_approved=False.
Posting action=approve with a request_id:
- Sets
is_approved=True - Records
approved_at=now()
action=reject:
- Deletes the
AmbassadorTripApprovalrecord entirely
GET/POST /driver/manage-ambassadors/, which groups all approvals by trip and allows pause, resume, or remove actions per ambassador.
Booking on Behalf of Riders
Once approved for a trip, an ambassador books seats at the booking form page.GET /ambassador/book-seat/<uuid>/ — renders a seat map identical to the one riders see.POST /ambassador/book-seat/<uuid>/ — creates bookings with the following key differences from a standard rider booking:
| Field | Value |
|---|---|
booked_by_ambassador | Set to the ambassador’s User ID |
rider | Set to the ambassador (temporary placeholder) |
rider_name | Third-party passenger’s full name (required) |
rider_phone | Third-party passenger’s phone number (required) |
rider_email | Third-party passenger’s email (optional) |
status | Created as confirmed immediately — no payment verification step |
Managing Ambassador Bookings
GET /ambassador/my-bookings/— lists all bookings created by the ambassador. Supportsfilterquery parameter:upcoming(default),past, orall.POST /ambassador/cancel-booking/<uuid>/— cancels a confirmed booking, releases the seat, and decrementsavailable_seats. Only future-trip bookings can be cancelled.
Trip Approvals List
GET /ambassador/trip-approvals/ — shows the full history of trip approval requests for the ambassador. Displays a table with:
- Trip origin and destination
- Driver name
- Approval status (
is_approved=True/ pending) - Approved timestamp
approved_count and pending_count are displayed in the page header. From this page, ambassadors can cancel a pending request (POST /ambassador/cancel-request/<id>/) or leave an already-approved trip (POST /ambassador/leave-trip/<id>/).
Commission
Theambassador_commission_rate field stores the ambassador’s commission as a percentage:
Commission rates, payout schedules, and ambassador-specific notes are stored in
ambassador_notes on the User model — visible only to admin. Ambassadors can contact the support team to query their commission balance.