This API endpoint will allow you to get a list of trucks. You can filter by using different query parameters such as license_plate or truck_driver.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/trucks.json?license_plate=Octopi" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "trucks": [ { "id": 123, "active": true, "display_name": "00000 (Trucking Company: ABC TRANSPORT)", "year": null, "trucking_company": { "name": "ABC TRANSPORT", "code": null, }, "truck_driver": { "fullname": "John Doe", "license_number": "ABC1234", "number": "356396" }, "created_at": "2018-05-23T16:00:26Z", "updated_at": "2020-01-27T19:24:30Z" }, { "id": 456, "active": true, "display_name": "00001 (Trucking Company: ABC TRANSPORT)", "year": null, "trucking_company": { "name": "ABC TRANSPORT", "code": null, }, "created_at": "2020-07-17T23:19:32Z", "updated_at": "2021-06-17T05:02:26Z" }, { "id": 789, "active": true, "display_name": "00002 (Trucking Company: XYZ TRANSPORT)", "year": null, "trucking_company": { "name": "XYZ TRANSPORT", "code": "IGG897", }, "created_at": "2018-04-19T22:16:54Z", "updated_at": "2021-05-14T11:03:38Z" }, ] }
Param name | Description |
---|---|
license_plate optional |
Allows you to filter/search trucks by license plate Validations:
|
trucking_company optional |
Allows you to filter/search trucks by trucking company Validations:
|
truck_driver_number optional |
Allows you to filter/search trucks by truck driver number Validations:
|
active optional |
Filter for active trucks by setting to true. Set to false to get all inactive trucks. If absent, Octopi will return both active and inactive trucks. Validations:
|
page optional |
Specify which page of results to fetch. This value defaults to 1. Validations:
|
per optional |
The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100. Validations:
|