This API endpoint will allow you to create new trucks within Octopi.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl --location --request POST 'https://app.octopi.co/api/v1/trucks.json' --header 'Authorization: Bearer token_value' --header 'Content-Type: application/json' --data-raw '{ "truck": { "license_plate": "ABC123", "number": "12345", "weight": 10000, "color": "#00528D", "make": "A", "model": "M", "year": 1987, "active": true } }'
{ "truck": { "id": 27095, "active": true, "license_plate": "ABC123", "number": "12345", "weight": 4535, "color": "#00528D", "is_mule": false, "allowed_until": null, "year": 1987, "make": "A", "model": "M", "created_at": "2022-06-22T09:10:16Z", "updated_at": "2022-06-22T09:10:16Z" } }
Param name | Description |
---|---|
truck required |
Truck data Validations:
|
truck[license_plate] required |
Truck license plate Validations:
|
truck[number] optional |
Truck number Validations:
|
truck[truck_driver_license_number] optional |
Truck driver’s license number Validations:
|
truck[trucking_company] optional |
Trucking company’s name Validations:
|
truck[weight] optional |
Truck weight in your organization’s weight unit preference Validations:
|
truck[active] optional |
Is the truck active? Validations:
|
truck[color] optional |
Truck color hex code Validations:
|
truck[make] optional |
Truck make Validations:
|
truck[model] optional |
Truck model Validations:
|
truck[year] optional |
Truck year Validations:
|
truck[allowed_until] optional |
Until when is this truck allowed at the terminal? Sample valid entries: ‘2022-06-02’, ‘2/6/2022’, ‘June 2, 2022’ Validations:
|
truck[is_mule] optional |
Is the truck a mule? Validations:
|