Skip to the content

DoRoutes API · version 1

Vehicles

GET/v1/admin/vehicle-presets

Typical figures for common removal vehicles

Any signed-in staff member. They only pre-fill a new vehicle; the business confirms its own figures.

Response 200 · object

Done.

  • presetsarray of VehiclePreset, required
    • keystring
    • namestring
    • classstring

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger
    • payload_kginteger
    • load_volume_m3number
    • height_cminteger
    • width_cminteger
    • length_cminteger
    • axle_countinteger
    • trailer_countinteger
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber

      Litres per 100 km, or kWh per 100 km for electric.

Example response 200
{
  "presets": [
    {
      "key": "string",
      "name": "string",
      "class": "van",
      "gross_weight_kg": 0,
      "payload_kg": 0,
      "load_volume_m3": 0,
      "height_cm": 0,
      "width_cm": 0,
      "length_cm": 0,
      "axle_count": 0,
      "trailer_count": 0,
      "weight_per_axle_kg": 0,
      "tyre_count": 0,
      "fuel_type": "diesel",
      "emission_standard": "euro1",
      "consumption": 0
    }
  ]
}

Response 401 · Error

No tenant key, or no valid session.

  • errorobject, required
    • codestring, required

      A short machine-readable name, such as not_found.

    • messagestring, required

      What went wrong, for people.

  • request_idstring, required

    Matches the X-Request-ID response header.

Example response 401
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "request_id": "string"
}

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

GET/v1/admin/vehicles

The business's vehicles

Any signed-in staff member.

Response 200 · object

Done.

  • vehiclesarray of Vehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicles": [
    {
      "id": 0,
      "yard_id": 0,
      "name": "string",
      "registration": "string",
      "class": "van",
      "gross_weight_kg": 0,
      "payload_kg": 0,
      "load_volume_m3": 0,
      "height_cm": 0,
      "width_cm": 0,
      "length_cm": 0,
      "axle_count": 0,
      "trailer_count": 0,
      "weight_per_axle_kg": 0,
      "tyre_count": 0,
      "fuel_type": "diesel",
      "emission_standard": "euro1",
      "consumption": 0,
      "mot_due": "date",
      "service_due": "date",
      "confirmed_at": "string",
      "confirmed_by": 0,
      "is_default": true,
      "status": "active",
      "hours": [
        {
          "weekday": 0,
          "starts": "string",
          "ends": "string"
        }
      ],
      "usual_driver_id": 0,
      "theft_watch": true
    }
  ]
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

POST/v1/admin/vehicles

Add a vehicle

Needs the vehicles.manage permission. Its figures start unconfirmed.

Request body · Vehicle

  • idinteger (int64)
  • yard_idinteger (int64), required
  • namestring, required
  • registrationstring

    Stored in capitals without spaces.

  • classstring, required

    van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

    One of: van rigid artic

  • gross_weight_kginteger, required
  • payload_kginteger, required
  • load_volume_m3number, required
  • height_cminteger, required
  • width_cminteger, required
  • length_cminteger, required
  • axle_countinteger, required
  • trailer_countinteger, required
  • weight_per_axle_kginteger
  • tyre_countinteger
  • fuel_typestring, required

    One of: diesel petrol electric

  • emission_standardstring

    The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

    One of: euro1 euro2 euro3 euro4 euro5 euro6

  • consumptionnumber, required

    Litres per 100 km, or kWh per 100 km for electric.

  • mot_duestring (date)
  • service_duestring (date)
  • confirmed_atstring
  • confirmed_byinteger (int64)
  • is_defaultboolean
  • statusstring

    One of: active retired

  • hoursarray of VehicleHours
    • weekdayinteger, required

      1 is Monday.

    • startsstring, required

      HH:MM in the business's time zone.

    • endsstring, required
  • usual_driver_idinteger (int64) or null

    Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

  • theft_watchboolean

    While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example request
{
  "id": 0,
  "yard_id": 0,
  "name": "string",
  "registration": "string",
  "class": "van",
  "gross_weight_kg": 0,
  "payload_kg": 0,
  "load_volume_m3": 0,
  "height_cm": 0,
  "width_cm": 0,
  "length_cm": 0,
  "axle_count": 0,
  "trailer_count": 0,
  "weight_per_axle_kg": 0,
  "tyre_count": 0,
  "fuel_type": "diesel",
  "emission_standard": "euro1",
  "consumption": 0,
  "mot_due": "date",
  "service_due": "date",
  "confirmed_at": "string",
  "confirmed_by": 0,
  "is_default": true,
  "status": "active",
  "hours": [
    {
      "weekday": 0,
      "starts": "string",
      "ends": "string"
    }
  ],
  "usual_driver_id": 0,
  "theft_watch": true
}

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

GET/v1/admin/vehicles/{id}

A vehicle

Any signed-in staff member.

Parameters

  • idstring, in the path, required

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

PUT/v1/admin/vehicles/{id}

Change a vehicle

Needs the vehicles.manage permission. Changing any figure clears its confirmation and its being the default.

Parameters

  • idstring, in the path, required

Request body · Vehicle

Fields as in Add a vehicle

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

POST/v1/admin/vehicles/{id}/confirm

Confirm a vehicle's figures

Needs the vehicles.manage permission. Records who confirmed them; only a confirmed vehicle is routed.

Parameters

  • idstring, in the path, required

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

POST/v1/admin/vehicles/{id}/default

Make a vehicle the one quotes route for

Needs the vehicles.manage permission. It must be active with confirmed figures (409 otherwise).

Parameters

  • idstring, in the path, required

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 409 · Error

It clashes with what is stored.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

POST/v1/admin/vehicles/{id}/retire

Take a vehicle out of use

Needs the vehicles.manage permission. The default vehicle can't be retired (409).

Parameters

  • idstring, in the path, required

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 409 · Error

It clashes with what is stored.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

PUT/v1/admin/vehicles/{id}/theft-watch

Turn a van's theft watch on or off

Needs the vehicles.manage permission. While it is on, the van's tracker points are kept whatever the tracker_window setting. Each change is published as vehicle.theft_watch with who made it.

Parameters

  • idstring, in the path, required

Request body · object

  • theft_watchboolean, required
Example request
{
  "theft_watch": true
}

Response 200 · object

Done.

  • vehicle_idinteger (int64), required
  • theft_watchboolean, required
Example response 200
{
  "vehicle_id": 0,
  "theft_watch": true
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

PUT/v1/admin/vehicles/{id}/driver

Set who usually drives a vehicle

Needs the vehicles.manage permission. The driver must be active staff with the Driver role; null clears it.

Parameters

  • idstring, in the path, required

Request body · object

  • driver_idinteger (int64) or null, required
Example request
{
  "driver_id": 0
}

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

PUT/v1/admin/vehicles/{id}/hours

Set a vehicle's working hours

Needs the vehicles.manage permission. Replaces them; a weekday left out is a day off.

Parameters

  • idstring, in the path, required

Request body · object

  • hoursarray of VehicleHours, required
    • weekdayinteger, required

      1 is Monday.

    • startsstring, required

      HH:MM in the business's time zone.

    • endsstring, required
Example request
{
  "hours": [
    {
      "weekday": 0,
      "starts": "string",
      "ends": "string"
    }
  ]
}

Response 200 · object

Done.

  • vehicleVehicle, required
    • idinteger (int64)
    • yard_idinteger (int64), required
    • namestring, required
    • registrationstring

      Stored in capitals without spaces.

    • classstring, required

      van is up to 3.5 t; rigid is a straight truck; artic is a tractor with a trailer.

      One of: van rigid artic

    • gross_weight_kginteger, required
    • payload_kginteger, required
    • load_volume_m3number, required
    • height_cminteger, required
    • width_cminteger, required
    • length_cminteger, required
    • axle_countinteger, required
    • trailer_countinteger, required
    • weight_per_axle_kginteger
    • tyre_countinteger
    • fuel_typestring, required

      One of: diesel petrol electric

    • emission_standardstring

      The Euro emission standard the vehicle meets, which decides charges such as London's ULEZ. Euro 6 when left out.

      One of: euro1 euro2 euro3 euro4 euro5 euro6

    • consumptionnumber, required

      Litres per 100 km, or kWh per 100 km for electric.

    • mot_duestring (date)
    • service_duestring (date)
    • confirmed_atstring
    • confirmed_byinteger (int64)
    • is_defaultboolean
    • statusstring

      One of: active retired

    • hoursarray of VehicleHours
      • weekdayinteger, required

        1 is Monday.

      • startsstring, required

        HH:MM in the business's time zone.

      • endsstring, required
    • usual_driver_idinteger (int64) or null

      Who usually drives it; the day plan uses it on days they are available. Set with PUT /v1/admin/vehicles/{id}/driver.

    • theft_watchboolean

      While on, the van's tracker points are kept whatever the tracker window. Set with PUT /v1/admin/vehicles/{id}/theft-watch.

Example response 200
{
  "vehicle": {
    "id": 0,
    "yard_id": 0,
    "name": "string",
    "registration": "string",
    "class": "van",
    "gross_weight_kg": 0,
    "payload_kg": 0,
    "load_volume_m3": 0,
    "height_cm": 0,
    "width_cm": 0,
    "length_cm": 0,
    "axle_count": 0,
    "trailer_count": 0,
    "weight_per_axle_kg": 0,
    "tyre_count": 0,
    "fuel_type": "diesel",
    "emission_standard": "euro1",
    "consumption": 0,
    "mot_due": "date",
    "service_due": "date",
    "confirmed_at": "string",
    "confirmed_by": 0,
    "is_default": true,
    "status": "active",
    "hours": [
      {
        "weekday": 0,
        "starts": "string",
        "ends": "string"
      }
    ],
    "usual_driver_id": 0,
    "theft_watch": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

GET/v1/admin/yards

The business's yards

Any signed-in staff member.

Response 200 · object

Done.

  • yardsarray of Yard, required
    • idinteger (int64)
    • namestring
    • house_numberinteger
    • house_namestring
    • streetstring
    • townstring
    • citystring
    • countystring
    • postcodestring
    • latitudenumber
    • longitudenumber
    • match_levelstring

      One of: house street postcode manual

    • needs_checkboolean
Example response 200
{
  "yards": [
    {
      "id": 0,
      "name": "string",
      "house_number": 0,
      "house_name": "string",
      "street": "string",
      "town": "string",
      "city": "string",
      "county": "string",
      "postcode": "string",
      "latitude": 0,
      "longitude": 0,
      "match_level": "house",
      "needs_check": true
    }
  ]
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

POST/v1/admin/yards

Add a yard

Needs the vehicles.manage permission. Its address is found like a customer's; its postcode must be live in Great Britain.

Request body · YardInput

  • namestring, required
  • house_numberinteger
  • house_namestring
  • streetstring, required
  • townstring
  • citystring
  • countystring
  • postcodestring, required
  • latitudenumber

    Sent with longitude and match_level from a chosen suggestion.

  • longitudenumber
  • match_levelstring
Example request
{
  "name": "string",
  "house_number": 0,
  "house_name": "string",
  "street": "string",
  "town": "string",
  "city": "string",
  "county": "string",
  "postcode": "string",
  "latitude": 0,
  "longitude": 0,
  "match_level": "string"
}

Response 200 · object

Done.

  • yardYard, required
    • idinteger (int64)
    • namestring
    • house_numberinteger
    • house_namestring
    • streetstring
    • townstring
    • citystring
    • countystring
    • postcodestring
    • latitudenumber
    • longitudenumber
    • match_levelstring

      One of: house street postcode manual

    • needs_checkboolean
Example response 200
{
  "yard": {
    "id": 0,
    "name": "string",
    "house_number": 0,
    "house_name": "string",
    "street": "string",
    "town": "string",
    "city": "string",
    "county": "string",
    "postcode": "string",
    "latitude": 0,
    "longitude": 0,
    "match_level": "house",
    "needs_check": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 409 · Error

It clashes with what is stored.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

PUT/v1/admin/yards/{id}

Change a yard

Needs the vehicles.manage permission.

Parameters

  • idstring, in the path, required

Request body · YardInput

Fields as in Add a yard

Response 200 · object

Done.

  • yardYard, required
    • idinteger (int64)
    • namestring
    • house_numberinteger
    • house_namestring
    • streetstring
    • townstring
    • citystring
    • countystring
    • postcodestring
    • latitudenumber
    • longitudenumber
    • match_levelstring

      One of: house street postcode manual

    • needs_checkboolean
Example response 200
{
  "yard": {
    "id": 0,
    "name": "string",
    "house_number": 0,
    "house_name": "string",
    "street": "string",
    "town": "string",
    "city": "string",
    "county": "string",
    "postcode": "string",
    "latitude": 0,
    "longitude": 0,
    "match_level": "house",
    "needs_check": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 409 · Error

It clashes with what is stored.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

DELETE/v1/admin/yards/{id}

Delete a yard

Needs the vehicles.manage permission. Refused (409) while a vehicle has it as its home.

Parameters

  • idstring, in the path, required

Response 200 · object

Done.

  • messagestring, required
Example response 200
{
  "message": "string"
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 409 · Error

It clashes with what is stored.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

PUT/v1/admin/yards/{id}/position

Place a yard by hand

Needs the vehicles.manage permission.

Parameters

  • idstring, in the path, required

Request body · Position

  • latitudenumber, required
  • longitudenumber, required
Example request
{
  "latitude": 0,
  "longitude": 0
}

Response 200 · object

Done.

  • yardYard, required
    • idinteger (int64)
    • namestring
    • house_numberinteger
    • house_namestring
    • streetstring
    • townstring
    • citystring
    • countystring
    • postcodestring
    • latitudenumber
    • longitudenumber
    • match_levelstring

      One of: house street postcode manual

    • needs_checkboolean
Example response 200
{
  "yard": {
    "id": 0,
    "name": "string",
    "house_number": 0,
    "house_name": "string",
    "street": "string",
    "town": "string",
    "city": "string",
    "county": "string",
    "postcode": "string",
    "latitude": 0,
    "longitude": 0,
    "match_level": "house",
    "needs_check": true
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

GET/v1/admin/positions/live

Each vehicle's latest position today

Needs the tracking.read permission. Each vehicle with a position today in the business's time zone, at its latest one, with the driver who sent it, by vehicle name.

Response 200 · object

Done.

  • vehiclesarray of LivePosition, required
    • vehicle_idinteger (int64), required
    • vehicle_namestring, required
    • driver_idinteger (int64) or null, required

      The driver whose phone last reported from the vehicle today; null when only its tracker did.

    • driver_namestring, required
    • positionVehiclePosition, required

      A point a phone or a vehicle tracker recorded. recorded_at is RFC 3339 when a phone sends it, and UTC as YYYY-MM-DD HH:MM:SS when the API gives it. A vehicle's tracker points come first; its phone's fill the tracker's gaps of more than 2 minutes.

      • sourcestring

        One of: phone tracker

      • recorded_atstring, required
      • latitudenumber, required
      • longitudenumber, required
      • accuracy_mnumber, required

        The phone's estimate of the error, in metres.

      • speed_mpsnumber or null
      • headingnumber or null

        Degrees from north, 0 to under 360.

Example response 200
{
  "vehicles": [
    {
      "vehicle_id": 0,
      "vehicle_name": "string",
      "driver_id": 0,
      "driver_name": "string",
      "position": {
        "source": "phone",
        "recorded_at": "string",
        "latitude": 0,
        "longitude": 0,
        "accuracy_m": 0,
        "speed_mps": 0,
        "heading": 0
      }
    }
  ]
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles

GET/v1/admin/vehicles/{id}/trail

A vehicle's positions on a day

Needs the tracking.read permission; an unknown vehicle is 404. The vehicle's positions on one of the business's days, oldest first, and the metres it covered; once the day has been added up, its kept distance, which outlasts the positions.

Parameters

  • idstring, in the path, required
  • datestring, in the query, required

    The day, YYYY-MM-DD.

Response 200 · object

Done.

  • trailTrail, required
    • vehicle_idinteger (int64), required
    • datestring, required
    • metresinteger, required
    • positionsarray of VehiclePosition, required
      • sourcestring

        One of: phone tracker

      • recorded_atstring, required
      • latitudenumber, required
      • longitudenumber, required
      • accuracy_mnumber, required

        The phone's estimate of the error, in metres.

      • speed_mpsnumber or null
      • headingnumber or null

        Degrees from north, 0 to under 360.

Example response 200
{
  "trail": {
    "vehicle_id": 0,
    "date": "string",
    "metres": 0,
    "positions": [
      {
        "source": "phone",
        "recorded_at": "string",
        "latitude": 0,
        "longitude": 0,
        "accuracy_m": 0,
        "speed_mps": 0,
        "heading": 0
      }
    ]
  }
}

Response 400 · Error

The request is not valid.

Fields as in Typical figures for common removal vehicles

Response 401 · Error

No tenant key, or no valid session.

Fields as in Typical figures for common removal vehicles

Response 403 · Error

The session may not do this.

Fields as in Typical figures for common removal vehicles

Response 404 · Error

Not found, or not yours.

Fields as in Typical figures for common removal vehicles

Response 500 · Error

Something failed on our side.

Fields as in Typical figures for common removal vehicles