Read the mileage and date from vehicle paperwork
POST
/vehicles/{id}/documents/read
const url = 'https://example.com/vehicles/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/documents/read';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"data":"example","expectedKind":"service"}'};
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/documents/read \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "data": "example", "expectedKind": "service" }'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
data
required
string
expectedKind
string
Responses
Section titled “Responses”Values Bottle could read, or an unavailable result
Media typeapplication/json
object
read
required
boolean
kind
required
string | null
mileage
required
integer | null
documentDate
required
string | null format: date
service
required
object
title
required
string
performedOn
required
string | null 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
Example
{ "kind": "mot"}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"}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" } ]}