Save a reviewed service record and its source document
POST
/vehicles/{id}/service-documents
const url = 'https://example.com/vehicles/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/service-documents';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"maintenance":{"kind":"service","title":"example","performedOn":"2026-04-15","mileage":1,"costPence":1,"provider":"example","notes":"example","nextDueOn":"2026-04-15","nextDueMileage":1,"lineItems":[{"description":"example","quantity":1,"amountPence":1}]},"document":{"name":"example","data":"example","updateMileage":true,"acceptMileageConflict":false}}'};
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/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/service-documents \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "maintenance": { "kind": "service", "title": "example", "performedOn": "2026-04-15", "mileage": 1, "costPence": 1, "provider": "example", "notes": "example", "nextDueOn": "2026-04-15", "nextDueMileage": 1, "lineItems": [ { "description": "example", "quantity": 1, "amountPence": 1 } ] }, "document": { "name": "example", "data": "example", "updateMileage": true, "acceptMileageConflict": false } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
maintenance
required
object
kind
required
string
title
required
string
performedOn
required
string format: date
mileage
integer | null
costPence
integer | null
provider
string | null
notes
string | null
nextDueOn
string | null format: date
nextDueMileage
integer | null
lineItems
Array<object>
object
description
required
string
quantity
required
number | null
amountPence
required
integer | null
document
required
object
name
required
string
data
required
string
updateMileage
boolean
acceptMileageConflict
boolean
Responses
Section titled “Responses”The service work and its document were saved together
Media typeapplication/json
object
maintenance
required
object
id
required
UUID v7
string format: uuid
vehicleId
required
UUID v7
string format: uuid
kind
required
string
title
required
string
performedOn
required
string format: date
mileage
required
integer | null
costPence
required
integer | null
provider
required
string | null
notes
required
string | null
nextDueOn
required
string | null format: date
nextDueMileage
required
integer | null
lineItems
required
Array<object>
object
description
required
string
quantity
required
number | null
amountPence
required
integer | null
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
document
required
object
id
required
UUID v7
string format: uuid
vehicleId
required
UUID v7
string format: uuid
kind
required
string
name
required
string
contentType
required
string
byteSize
required
integer
documentDate
required
string | null format: date
mileage
required
integer | null
mileageAppliedAt
required
string | null format: date-time
expiresOn
required
string | null format: date
createdAt
required
string format: date-time
url
required
string
Example
{ "maintenance": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "vehicleId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "kind": "service" }, "document": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "vehicleId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "kind": "mot", "contentType": "application/pdf" }}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"}No such vehicle or record
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}The reading is older or lower than the current vehicle mileage
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" } ]}