Google OAuth 2.0 with session cookie gomi_session.
Invite-only registration. Admin creates invite, user signs in with Google, account created if email matches.
All list endpoints accept:
limit — default 20, max 100offset — default 0Errors: {"error": "message"}
on_job is set automatically when a driver starts a job.
Admin/dispatcher can cancel at any point.
Redirects the browser to Google's consent screen. After approval, Google redirects to /auth/callback.
Creates the user account if a matching invite exists. Sets session cookie. Shows welcome page.
Returns the complete user record from the database.
| Field | Type | Description | |
|---|---|---|---|
| first_name | string | required | First name |
| last_name | string | Last name |
Returns all waste types. Filter by country with ?country=JP or ?country=UG.
Burnable, Non-burnable, Plastic packaging, Paper/Cardboard, Bottles & Cans, PET bottles, Oversized, Hazardous
General, Organic, Recyclables, Plastics, Hazardous/Medical, Construction debris, E-waste, Market waste
Invite a new user by email. Invites expire in 7 days.
| Field | Type | Description | |
|---|---|---|---|
| string | required | Email to invite | |
| role | string | admin, dispatcher, or driver (default) |
Returns all invites with inviter details. Supports limit and offset.
Marks a pending invite as expired.
| Param | Description |
|---|---|
| search | Search by name or email (partial match) |
| role | Filter: admin, dispatcher, or driver |
| limit | Items per page |
| offset | Items to skip |
Full user profile by ID.
| Field | Type | Values | |
|---|---|---|---|
| status | string | required | online, offline, or on_job |
| Field | Type | Values | |
|---|---|---|---|
| role | string | required | admin, dispatcher, or driver |
Login, logout, failed login, and invite acceptance events. Includes IP, user agent, timestamps.
Supports limit and offset.
Accessible by admin and dispatcher roles.
| Field | Type | Description | |
|---|---|---|---|
| title | string | required | Job title |
| description | string | Details | |
| country_code | string | JP or UG | |
| waste_type_id | string | ID from /api/waste-types | |
| priority | string | low, normal (default), high, urgent | |
| driver_id | string | Assign immediately, or assign later | |
| latitude | number | GPS latitude | |
| longitude | number | GPS longitude | |
| address | string | Human-readable address | |
| area_name | string | Ward or district name | |
| scheduled_at | string | RFC 3339. e.g. 2026-04-01T09:00:00Z | |
| pickup_window_start | string | RFC 3339 | |
| pickup_window_end | string | RFC 3339 | |
| estimated_volume | string | e.g. "3 bags", "1 truck" | |
| contact_name | string | On-site contact | |
| contact_phone | string | Contact phone | |
| recurring | boolean | Is this a recurring job? | |
| recurrence_rule | string | e.g. weekly:mon,thu | |
| notes | string | Additional notes |
| Param | Description |
|---|---|
| status | pending, assigned, in_progress, completed, cancelled |
| country | JP or UG |
| limit | Items per page |
| offset | Items to skip |
Returns the full job record with waste type details and the complete audit trail of all actions taken on this job.
Update job details. Same fields as create (except driver_id and recurring).
Validates the driver exists, has the driver role, and is not offline.
| Field | Type | |
|---|---|---|
| driver_id | string | required |
Only works if the job is in pending or assigned status. Previous driver is notified.
| Field | Type | |
|---|---|---|
| driver_id | string | required |
| Field | Type | Description |
|---|---|---|
| notes | string | Cancellation reason |
Every action taken on this job: created, assigned, reassigned, started, completed, cancelled. Includes actor name and timestamp.
Set yourself online (clocking in) or offline (clocking out). The on_job status is set automatically when you start a job and cleared when you complete it.
| Field | Type | Values | |
|---|---|---|---|
| status | string | required | online or offline |
Jobs assigned to you. Filter with ?status=assigned etc. Supports pagination.
Full details for a job assigned to you, including waste type, location, pickup window, and contact info.
Marks the job as in_progress. Records started_at. Sets your status to on_job.
Marks the job as completed. Records completed_at. Sets your status back to online.
| Field | Type | Description |
|---|---|---|
| notes | string | Completion notes |
| actual_volume | string | Actual volume collected, e.g. "4 bags" |
| photo_url_after | string | URL of proof-of-completion photo |
?json=1 for JSON.