Skip to content
  •  
  •  
  •  
37 changes: 37 additions & 0 deletions postman/collections/Fleetbase API/Contacts/.resources/object.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
$kind: object
name: Contact
description: |-
A contact represents a contact record managed through the Fleetbase API. It includes a stable identifier, lifecycle state, timestamps, and the resource-specific attributes returned by the API.
example: |-
{
"id": "contact_abc123",
"object": "contact",
"name": "John Doe",
"type": "customer",
"email": "john@example.com",
"phone": "+15555550100",
"created_at": "2026-05-07T12:00:00Z"
}
fields:
- name: id
type: string
description: "Unique identifier for the resource."
- name: object
type: string
description: "Object type returned by the API."
- name: name
type: string
description: "Display name for the resource."
- name: type
type: enum
values: ["customer", "vendor", "driver"]
description: "Classification used to group or process the resource."
- name: email
type: string
description: "Email address for the person or customer."
- name: phone
type: string
description: "Phone number for the person or customer."
- name: created_at
type: timestamp
description: "Time when the resource was created."
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$kind: http-request
description: Delete a Contact.
description: |-
Deletes a contacts resource. The response confirms the resource that was removed.
url: "{{base_url}}/{{namespace}}/contacts/:id"
method: DELETE
headers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$kind: http-request
description: |-
Returns a paginated list of contacts for the current organization. Use filters such as `query`, `limit`, `offset`, and `sort` to narrow and order the results.
Returns contacts matching the supplied filters. Use pagination and query parameters to control the result set.
url: "{{base_url}}/{{namespace}}/contacts"
method: GET
headers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$kind: http-request
description: Update a Contact
description: |-
Updates a contact. Parameters not supplied remain unchanged.
url: "{{base_url}}/{{namespace}}/contacts/:id"
method: PUT
headers:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/:id/current-organization"
method: GET
headers:
Accept: application/json
pathVariables:
id: ""
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/:id/organizations"
method: GET
headers:
Accept: application/json
pathVariables:
id: ""
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"data": [
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
],
"meta": {
"limit": 25,
"offset": 0
}
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/login"
method: POST
headers:
Accept: application/json
body:
type: json
content: |-
{
"identity": "{{driver_identity}}",
"password": "{{driver_password}}"
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/register-device"
method: POST
headers:
Accept: application/json
body:
type: json
content: |-
{
"token": "{{device_token}}",
"platform": "ios"
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/:id/register-device"
method: POST
headers:
Accept: application/json
pathVariables:
id: ""
body:
type: json
content: |-
{
"token": "{{device_token}}",
"platform": "ios"
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/login-with-sms"
method: POST
headers:
Accept: application/json
body:
type: json
content: |-
{
"phone": "{{driver_phone}}"
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/:id/simulate"
method: POST
headers:
Accept: application/json
pathVariables:
id: ""
body:
type: json
content: |-
{
"start": {
"latitude": 1.3521,
"longitude": 103.8198
},
"end": {
"latitude": 1.2903,
"longitude": 103.8519
}
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/:id/switch-organization"
method: POST
headers:
Accept: application/json
pathVariables:
id: ""
body:
type: json
content: |-
{
"next": "{{organization_id}}"
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/drivers/:id/toggle-online"
method: POST
headers:
Accept: application/json
pathVariables:
id: ""
body:
type: json
content: |-
{
"online": true
}

response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "driver_abc123",
"object": "driver",
"name": "Alex Driver",
"status": "active",
"phone": "+15555550101",
"online": false,
"created_at": "2026-05-07T12:00:00Z"
}
order: 1000
Loading
Loading