Create a vehicle
POST
/vehicles
const url = 'https://example.com/vehicles';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","registration":"example","startLocationId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","endLocationId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f","areas":["example"],"payloadKg":1,"volumeLitres":1,"notes":"example","motDueOn":"2026-04-15","servicedOn":"2026-04-15","serviceDueOn":"2026-04-15"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/vehicles \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "name": "example", "registration": "example", "startLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "endLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "areas": [ "example" ], "payloadKg": 1, "volumeLitres": 1, "notes": "example", "motDueOn": "2026-04-15", "servicedOn": "2026-04-15", "serviceDueOn": "2026-04-15" }'Refused once the plan is full. Vans are what a plan is sold by; drivers are never rationed.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
registration
string | null
startLocationId
UUID v7
string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fendLocationId
UUID v7
string | null format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fareas
Array<string>
payloadKg
integer | null
volumeLitres
integer | null
notes
string | null
motDueOn
string | null format: date
servicedOn
string | null format: date
serviceDueOn
string | null format: date
Responses
Section titled “Responses”Added
Media typeapplication/json
object
id
required
UUID v7
string format: uuid
name
required
string
registration
required
string | null
startLocationId
required
UUID v7
string | null format: uuid
endLocationId
required
UUID v7
string | null format: uuid
areas
required
Array<string>
payloadKg
required
integer | null
volumeLitres
required
integer | null
notes
required
string | null
motDueOn
required
string | null format: date
servicedOn
required
string | null format: date
serviceDueOn
required
string | null format: date
archivedAt
required
string | null format: date-time
usualDriverUserId
required
string | null
usualDriverName
required
string | null
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "name": "Van 1", "registration": "KT65 ABC", "startLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "endLocationId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "payloadKg": 1200, "volumeLitres": 10000}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}The plan carries no more vehicles
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}