The Vehicle object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

license_plate string required
make string required
model string required
last_odometer integer required
acquisition_date string
location string
chassis_no string
vehicle_value number
employee string
insurance_company string
policy_no string
start_date string
end_date string
fuel_type string required
uom string required
carbon_check_date string
color string
wheels integer
doors integer
company string
The Vehicle object
{
  "id": "vehicle_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "license_plate": "license_plate_example",
  "make": "make_example",
  "model": "model_example",
  "last_odometer": 0,
  "acquisition_date": "2024-01-15",
  "location": "location_example",
  "chassis_no": "chassis_no_example",
  "vehicle_value": 0,
  "employee": "employee_example",
  "insurance_company": "Example Corp",
  "policy_no": "policy_no_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "fuel_type": "fuel_type_example",
  "uom": "uom_example",
  "carbon_check_date": "2024-01-15",
  "color": "color_example",
  "wheels": 0,
  "doors": 0,
  "company": "Example Corp"
}
GET /api/setup/vehicle/{id}

Retrieve a vehicle

Retrieves the details of an existing vehicle. Supply the unique vehicle ID that was returned from a previous request.

Path parameters

id string required

The identifier of the vehicle to retrieve.

Returns

Returns the vehicle object if a valid identifier was provided.

GET /api/setup/vehicle/{id}
curl https://api.overplane.dev/api/setup/vehicle/vehicle_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "vehicle_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "license_plate": "license_plate_example",
  "make": "make_example",
  "model": "model_example",
  "last_odometer": 0,
  "acquisition_date": "2024-01-15",
  "location": "location_example",
  "chassis_no": "chassis_no_example",
  "vehicle_value": 0,
  "employee": "employee_example",
  "insurance_company": "Example Corp",
  "policy_no": "policy_no_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "fuel_type": "fuel_type_example",
  "uom": "uom_example",
  "carbon_check_date": "2024-01-15",
  "color": "color_example",
  "wheels": 0,
  "doors": 0,
  "company": "Example Corp"
}
GET /api/setup/vehicle

List all vehicles

Returns a list of vehicles. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of vehicle objects.

GET /api/setup/vehicle
curl https://api.overplane.dev/api/setup/vehicle \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "vehicle_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "license_plate": "license_plate_example",
      "make": "make_example",
      "model": "model_example",
      "last_odometer": 0,
      "acquisition_date": "2024-01-15",
      "location": "location_example",
      "chassis_no": "chassis_no_example",
      "vehicle_value": 0,
      "employee": "employee_example",
      "insurance_company": "Example Corp",
      "policy_no": "policy_no_example",
      "start_date": "2024-01-15",
      "end_date": "2024-01-15",
      "fuel_type": "fuel_type_example",
      "uom": "uom_example",
      "carbon_check_date": "2024-01-15",
      "color": "color_example",
      "wheels": 0,
      "doors": 0,
      "company": "Example Corp"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/setup/vehicle

Create a vehicle

Creates a new vehicle object.

Body parameters

license_plate string required
make string required
model string required
last_odometer integer required
acquisition_date string
location string
chassis_no string
vehicle_value number
employee string
insurance_company string
policy_no string
start_date string
end_date string
fuel_type string required
uom string required
carbon_check_date string
color string
wheels integer
doors integer
company string

Returns

Returns the newly created vehicle object if the call succeeded.

POST /api/setup/vehicle
curl https://api.overplane.dev/api/setup/vehicle \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"license_plate":"license_plate_example","make":"make_example","model":"model_example","last_odometer":0,"fuel_type":"fuel_type_example","uom":"uom_example"}'
Response
{
  "id": "vehicle_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "license_plate": "license_plate_example",
  "make": "make_example",
  "model": "model_example",
  "last_odometer": 0,
  "acquisition_date": "2024-01-15",
  "location": "location_example",
  "chassis_no": "chassis_no_example",
  "vehicle_value": 0,
  "employee": "employee_example",
  "insurance_company": "Example Corp",
  "policy_no": "policy_no_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "fuel_type": "fuel_type_example",
  "uom": "uom_example",
  "carbon_check_date": "2024-01-15",
  "color": "color_example",
  "wheels": 0,
  "doors": 0,
  "company": "Example Corp"
}
PATCH /api/setup/vehicle/{id}

Update a vehicle

Updates the specified vehicle by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the vehicle to update.

Body parameters

license_plate string
make string
model string
last_odometer integer
acquisition_date string
location string
chassis_no string
vehicle_value number
employee string
insurance_company string
policy_no string
start_date string
end_date string
fuel_type string
uom string
carbon_check_date string
color string
wheels integer
doors integer
company string

Returns

Returns the updated vehicle object.

PATCH /api/setup/vehicle/{id}
curl https://api.overplane.dev/api/setup/vehicle/vehicle_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"license_plate":"license_plate_example","make":"make_example"}'
Response
{
  "id": "vehicle_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "license_plate": "license_plate_example",
  "make": "make_example",
  "model": "model_example",
  "last_odometer": 0,
  "acquisition_date": "2024-01-15",
  "location": "location_example",
  "chassis_no": "chassis_no_example",
  "vehicle_value": 0,
  "employee": "employee_example",
  "insurance_company": "Example Corp",
  "policy_no": "policy_no_example",
  "start_date": "2024-01-15",
  "end_date": "2024-01-15",
  "fuel_type": "fuel_type_example",
  "uom": "uom_example",
  "carbon_check_date": "2024-01-15",
  "color": "color_example",
  "wheels": 0,
  "doors": 0,
  "company": "Example Corp"
}
DELETE /api/setup/vehicle/{id}

Delete a vehicle

Permanently deletes a vehicle. This cannot be undone.

Path parameters

id string required

The identifier of the vehicle to delete.

Returns

Returns a confirmation that the vehicle has been deleted.

DELETE /api/setup/vehicle/{id}
curl https://api.overplane.dev/api/setup/vehicle/vehicle_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "vehicle_abc123",
  "deleted": true
}