Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions postman/collections/Fleetbase API/.resources/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ variables:
driver_password_reset_code: ""
manifest_id: ""
manifest_stop_id: ""
# Fleet hierarchy. The parent is the fleet created first; the subfleet is
# created beneath it and deleted before it.
parent_fleet_id: ""
subfleet_id: ""
# The Vehicles and Drivers folders delete their own resources before the
# Fleets folder runs, so the membership requests create — and clean up — a
# vehicle and a driver of their own.
fleet_vehicle_id: ""
fleet_driver_id: ""
# A driver created with neither an email address nor a phone number.
operational_driver_id: ""
scripts:
- type: http:afterResponse
code: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers?name=<string>&email=<string>&password=<string>&phone_number=<string>&phone_country_code=<string>&country=<string>&city=<string>&vehicle=<string>&status=<string>"
url: "{{base_url}}/{{namespace}}/drivers"
method: POST
headers:
Accept: application/json
queryParams:
- key: name
value: <string>
description: (Required) The name of the driver.
- key: email
value: <string>
description: (Required) The email of the driver.
- key: password
value: <string>
description: (Required) The password the driver will use for authenticating Fleetbase Navigator.
- key: phone_number
value: <string>
description: (Required) The drivers phone number, this can also be used to authenticating Fleetbase Navigator.
- key: phone_country_code
value: <string>
description: (Required) The country code of the drivers phone number.
- key: country
value: <string>
description: "(Required) The 2 letter country code of the country the driver is operating in. Example: 'US' or 'DE'. All accepted values can be found on the Official ISO Website. Sending a country is always required."
- key: city
value: <string>
description: The city the driver is operating in.
- key: vehicle
value: <string>
description: An Vehicle object id that you want to assign to the driver.
- key: status
value: <string>
description: The drivers standing status. Can either be "active" or "inactive". Defaults to "active"
body:
type: json
content: |-
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+15555550111",
"internal_id": "DRV-1001",
"drivers_license_number": "S1234567A",
"license_expiry": "2030-06-30",
"country": "SG",
"city": "Singapore",
"current_status": "on_duty",
"skills": ["hazmat"],
"max_travel_time": 28800,
"max_distance": 250000,
"time_window_start": "08:00",
"time_window_end": "18:00",
"meta": { "badge": "A12" }
}
response:
statusCode: 200
statusText: OK
Expand All @@ -41,25 +33,45 @@ response:
type: json
content: |-
{
"id": "<string>",
"current_job": "<string>",
"vehicle": "<string>",
"email": "<string>",
"phone_number": "<string>",
"phone_country_code": "<string>",
"signup_token_used": "<string>",
"drivers_license_number": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"heading": "<string>",
"altitude": "<string>",
"speed": "<string>",
"country": "<string>",
"currency": "<string>",
"city": "<string>",
"online": "<number>",
"status": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
"id": "driver_A1b2C3d4E5",
"user": "user_1A2b3C4d5E",
"internal_id": "DRV-1001",
"company": "company_6zV1KqN9pR",
"company_name": "Fleetbase",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+15555550111",
"timezone": "Asia/Singapore",
"drivers_license_number": "S1234567A",
"license_expiry": "2030-06-30",
"photo_url": null,
"avatar_url": "https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/driver-icons/moto-driver.png",
"vehicle_avatar": "https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/vehicle-icons/mini_bus.svg",
"vehicle_id": null,
"vendor_id": null,
"job_id": null,
"vehicle": null,
"vendor": null,
"current_job": null,
"location": { "type": "Point", "coordinates": [0, 0] },
"heading": 0,
"bearing": null,
"altitude": 0,
"speed": 0,
"country": "SG",
"currency": "SGD",
"city": "Singapore",
"online": false,
"current_status": "on_duty",
"status": "available",
"token": null,
"skills": ["hazmat"],
"max_travel_time": 28800,
"max_distance": 250000,
"time_window_start": "08:00:00",
"time_window_end": "18:00:00",
"meta": { "badge": "A12" },
"updated_at": "2026-05-07T08:30:00.000000Z",
"created_at": "2026-05-07T08:30:00.000000Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers"
method: POST
headers:
Accept: application/json
body:
type: json
content: |-
{
"name": "John Doe",
"email": "not-an-email",
"phone": "+15555550111"
}
response:
statusCode: 422
statusText: Unprocessable Entity
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"errors": [
"The email address must be a valid email address.",
"The phone number has already been taken."
]
}
order: 2000
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers"
method: POST
headers:
Accept: application/json
body:
type: json
content: |-
{
"name": "Yard Driver",
"internal_id": "DRV-7788"
}
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_Z9y8X7w6V5",
"user": "user_9K8j7H6g5F",
"internal_id": "DRV-7788",
"company": "company_6zV1KqN9pR",
"company_name": "Fleetbase",
"name": "Yard Driver",
"email": null,
"phone": null,
"drivers_license_number": null,
"license_expiry": null,
"vehicle_id": null,
"vendor_id": null,
"job_id": null,
"vehicle": null,
"vendor": null,
"current_job": null,
"online": false,
"status": "available",
"meta": {},
"updated_at": "2026-05-07T08:32:00.000000Z",
"created_at": "2026-05-07T08:32:00.000000Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers?id=<string>"
url: "{{base_url}}/{{namespace}}/drivers?internal_id=DRV-1001&limit=25"
method: GET
headers:
Accept: application/json
queryParams:
- key: id
value: <string>
description: The id of the driver you want to retrieve.
- key: internal_id
value: DRV-1001
description: |-
The identifier the operator's own system uses. This is the lookup that decides whether a driver already exists before one is created.
- key: limit
value: "25"
description: A limit on the number of objects to be returned.
response:
statusCode: 200
statusText: OK
Expand All @@ -16,26 +20,29 @@ response:
body:
type: json
content: |-
{
"id": "<string>",
"current_job": "<string>",
"vehicle": "<string>",
"email": "<string>",
"phone_number": "<string>",
"phone_country_code": "<string>",
"signup_token_used": "<string>",
"drivers_license_number": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"heading": "<string>",
"altitude": "<string>",
"speed": "<string>",
"country": "<string>",
"currency": "<string>",
"city": "<string>",
"online": "<number>",
"status": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
}
[
{
"id": "driver_A1b2C3d4E5",
"user": "user_1A2b3C4d5E",
"internal_id": "DRV-1001",
"company": "company_6zV1KqN9pR",
"company_name": "Fleetbase",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+15555550111",
"drivers_license_number": "S1234567A",
"license_expiry": "2030-06-30",
"vehicle_id": null,
"vendor_id": null,
"job_id": null,
"country": "SG",
"city": "Singapore",
"online": false,
"current_status": "on_duty",
"status": "available",
"meta": { "badge": "A12" },
"updated_at": "2026-05-07T08:30:00.000000Z",
"created_at": "2026-05-07T08:30:00.000000Z"
}
]
order: 1000
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ request:
headers:
Accept: application/json
pathVariables:
id: ""
id: "driver_A1b2C3d4E5"
response:
statusCode: 200
statusText: OK
Expand All @@ -15,25 +15,49 @@ response:
type: json
content: |-
{
"id": "<string>",
"current_job": "<string>",
"vehicle": "<string>",
"email": "<string>",
"phone_number": "<string>",
"phone_country_code": "<string>",
"signup_token_used": "<string>",
"drivers_license_number": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"heading": "<string>",
"altitude": "<string>",
"speed": "<string>",
"country": "<string>",
"currency": "<string>",
"city": "<string>",
"online": "<number>",
"status": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
"id": "driver_A1b2C3d4E5",
"user": "user_1A2b3C4d5E",
"internal_id": "DRV-1002",
"company": "company_6zV1KqN9pR",
"company_name": "Fleetbase",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+15555550111",
"timezone": "Asia/Singapore",
"drivers_license_number": "S1234567A",
"license_expiry": "2030-06-30",
"photo_url": null,
"avatar_url": "https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/driver-icons/moto-driver.png",
"vehicle_id": "vehicle_7YqM3KpL2n",
"vendor_id": null,
"job_id": null,
"vehicle": {
"id": "vehicle_7YqM3KpL2n",
"plate_number": "ABC123",
"make": "Toyota",
"model": "Camry"
},
"vendor": null,
"current_job": null,
"location": { "type": "Point", "coordinates": [103.8198, 1.3521] },
"heading": 0,
"bearing": null,
"altitude": 0,
"speed": 0,
"country": "SG",
"currency": "SGD",
"city": "Johor Bahru",
"online": false,
"current_status": "off_duty",
"status": "available",
"token": null,
"skills": ["hazmat"],
"max_travel_time": 28800,
"max_distance": 250000,
"time_window_start": "08:00:00",
"time_window_end": "18:00:00",
"meta": { "badge": "B34" },
"updated_at": "2026-05-07T09:12:00.000000Z",
"created_at": "2026-05-07T08:30:00.000000Z"
}
order: 1000
Loading
Loading