Booking Services API
Integrate tractor discovery and booking creation via the Hello Tractor booking-services API.
All Hello Tractor APIs share one base URL. Your staging and production base URLs are shown in the partner dashboard after sign-in. Path prefixes differ by API family — see Authentication.
Overview
- Path prefix:
/booking-services/ - All requests and responses are JSON (
Content-Type: application/json).
Authentication
Send your portal-created Api-Key on every request:
Authorization header
Authorization: Api-Key <your-key>
Keys are scoped per endpoint. A valid key without scope for the endpoint returns 401. Create keys in the partner dashboard — the plain key is shown once; store it securely.
Find tractors
Available Available now
Nearby tractors
GET /booking-services/tractor/nearby/{lat}/{lng}/
Returns tractors near a coordinate. Rate limit: ~60 requests/minute.
Response fields include _id, TractorID, PositionLatitude, PositionLongitude, minsAway, distance.
Tractor details
GET /booking-services/tractor/{tractorId1,tractorId2,...}/detail/
Comma-separated tractor IDs. Rate limit: ~60 requests/minute.
Create booking
Available Available now
POST /booking-services/booking-agent/service-booking/
| Field | Type | Notes |
|---|---|---|
tractorId | int | Target tractor |
serviceType | int | Implement/service id |
serviceDate | date | YYYY-MM-DD, not in the past |
landArea | float | With areaType |
areaType | string | "ha" or "ac" |
farmerName, farmerPhone, gender | Farmer details (gender is an integer) | |
latitude, longitude, farmLocation, farmNote | Farm location | |
crop / crops / custom_crop | Crop(s) |
Response: { "bookingID": <int>, "clusterID": <int> }
Keep the bookingID — it is your handle to the booking.
Rate limit: ~50 requests/minute.
Example
curl -X POST "$API_BASE/booking-services/booking-agent/service-booking/" \
-H "Authorization: Api-Key $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tractorId": 99,
"serviceType": 1,
"serviceDate": "2026-07-20",
"landArea": 2.5,
"areaType": "ha",
"farmerName": "Adaobi",
"farmerPhone": "+2348000000000",
"gender": 1,
"latitude": 9.08,
"longitude": 7.49,
"farmLocation": "Kaduna",
"crop": "maize"
}'
Set $API_BASE and $API_KEY from your partner dashboard.
Booking status
Available Available now
Requires scope booking:bookings:read. Your key can only read bookings created under your organization.
Track referral progress by polling GET partner/booking/{booking_id} on an interval after you create a booking.
Poll by ID
GET /booking-services/partner/booking/{booking_id}
Returns current status and booking details. Unknown booking or cross-org access returns 404.
Poll booking status
curl "$API_BASE/booking-services/partner/booking/12345" \
-H "Authorization: Api-Key $API_KEY"
Example response fields: bookingID, bookingStatus (integer code — see status table below), tractorPairedTo, serviceDate, hectaresServiced, farmerName, farmerPhone, createdAt, updatedAt.
Map bookingStatus to the label using the status table below.
List bookings
GET /booking-services/partner/booking/{page}/{count}
Paginated list of your organization's bookings.
List bookings
curl "$API_BASE/booking-services/partner/booking/1/20" \
-H "Authorization: Api-Key $API_KEY"
Status values
| Code | Label |
|---|---|
0 | new |
1 | paired |
2 | confirmed |
3 | completed |
4 | declined |
5 | unpaired |
6 | in_progress |
7 | paused |
10 | pending_review |
20 | to_completed (tractor-owner marked complete) |
Errors & limits
| Status | Meaning |
|---|---|
200 | Success |
400 | Validation error — {"error": "..."} |
401 / 403 | Auth or scope failure |
404 | Not found |
429 | Rate limited |
Get started
Tell us what you are building and we will align on API access and telemetry integration.