Skip to the content

DoRoutes API · version 1

Drivers

POST/v1/devices/pair

Pair a driver's device with a pairing code

Request body · object

  • codestring, required
  • device_namestring

    Listed for staff; up to 100 characters.

Example request
{
  "code": "string",
  "device_name": "string"
}

Response 200 · object

Done.

  • tokenstring, required

    The device session; it lasts until the device is unpaired.

  • driverDriver, required
    • idinteger (int64)
    • first_namestring, required
    • last_namestring, required
    • phonestring
Example response 200
{
  "token": "string",
  "driver": {
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "phone": "string"
  }
}

Response 400 · Error

The request is not valid.

  • 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 400
{
  "error": {
    "code": "string",
    "message": "string"
  },
  "request_id": "string"
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 429 · Error

Too many attempts; see Retry-After.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

GET/v1/driver/me

The driver a device is paired to

A paired driver's device.

Response 200 · object

Done.

  • driverDriver, required
    • idinteger (int64)
    • first_namestring, required
    • last_namestring, required
    • phonestring
Example response 200
{
  "driver": {
    "id": 0,
    "first_name": "string",
    "last_name": "string",
    "phone": "string"
  }
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

GET/v1/driver/day

The paired driver's day

A paired driver's device. The driver's run from the day's approved plan, with its stops, route and jobs in order; when the plan has no run for the driver, the jobs assigned to them in appointment order, each with its own route. Only the driver's own jobs.

Parameters

  • datestring (date), in the query, required

    The day in the business's time zone, YYYY-MM-DD.

Response 200 · object

Done.

  • dayDriverDay, required

    A driver's day.

    • datestring (date), required
    • plannedboolean, required

      True when the stops and route come from the day's approved plan.

    • plan_idinteger (int64) or null, required

      The approved plan the run comes from; null when the day isn't planned for the driver.

    • vehicleVehicle or null, required

      The run's vehicle, or the first assigned job's vehicle on a day with no plan.

      • 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.

    • stopsarray of PlanStop, required

      The run's stops in order; empty on a day with no plan.

      • kindstring, required

        One of: departure collection delivery disposal break arrival

      • job_idinteger (int64)
      • disposal_stopinteger

        A disposal stop's position among its job's disposal stops, from 0.

      • addressstring
      • latitudenumber, required
      • longitudenumber, required
      • arrivesstring, required

        The business's local time, YYYY-MM-DD HH:MM.

      • departsstring, required

        The business's local time, YYYY-MM-DD HH:MM.

    • route_pointsarray of array of number or null, required

      The run's route line as [latitude, longitude] pairs, once the plan is approved and routed.

    • jobsarray of DriverJob, required
      • job_idinteger (int64), required
      • statusstring, required
      • job_typestring, required

        One of: house office items parcels waste delivery

      • service_datestring, required

        YYYY-MM-DD, the business's day of the job.

      • appointment_timestring, required

        YYYY-MM-DD HH:MM in the business's time zone. Empty on a parcels or delivery job, whose time the planner sets.

      • window_startstring

        HH:MM in the business's time zone, when the customer gave a window.

      • window_endstring

        HH:MM in the business's time zone, when the customer gave a window.

      • from_addressAddress, required
        • address_idinteger (int64)
        • customer_idinteger (int64)
        • quote_idinteger (int64)
        • house_numberinteger
        • house_namestring
        • streetstring
        • townstring
        • citystring
        • countystring
        • postcodestring

          Must be a live postcode in England, Scotland or Wales; stored as "AB1 2CD".

        • latitudenumber

          Sent with longitude and match_level from a chosen suggestion; otherwise the address is found when saved.

        • longitudenumber
        • match_levelstring

          How the position was found. postcode means the postcode's centre was used.

          One of: house street postcode manual

        • needs_checkboolean

          Set when staff should check the position. Ignored when sent.

      • to_addressAddress, required
        • address_idinteger (int64)
        • customer_idinteger (int64)
        • quote_idinteger (int64)
        • house_numberinteger
        • house_namestring
        • streetstring
        • townstring
        • citystring
        • countystring
        • postcodestring

          Must be a live postcode in England, Scotland or Wales; stored as "AB1 2CD".

        • latitudenumber

          Sent with longitude and match_level from a chosen suggestion; otherwise the address is found when saved.

        • longitudenumber
        • match_levelstring

          How the position was found. postcode means the postcode's centre was used.

          One of: house street postcode manual

        • needs_checkboolean

          Set when staff should check the position. Ignored when sent.

      • customerobject, required
        • first_namestring, required
        • last_namestring, required
        • phonestring, required
      • recipient_namestring, required

        Who takes a drop, when the booking named someone; empty otherwise.

      • recipient_phonestring, required
      • itemsarray of object, required

        The items of the job's own leg.

        • typestring, required
        • quantityinteger, required
        • fragileboolean, required
      • waste_kindsarray of string, required

        The kinds of waste in a waste job's load; empty on other jobs.

      • disposal_stopsarray of object, required

        The sites a waste job's load goes to, in order; empty on other jobs.

        • positioninteger, required
        • namestring, required
        • addressAddress, required
          • address_idinteger (int64)
          • customer_idinteger (int64)
          • quote_idinteger (int64)
          • house_numberinteger
          • house_namestring
          • streetstring
          • townstring
          • citystring
          • countystring
          • postcodestring

            Must be a live postcode in England, Scotland or Wales; stored as "AB1 2CD".

          • latitudenumber

            Sent with longitude and match_level from a chosen suggestion; otherwise the address is found when saved.

          • longitudenumber
          • match_levelstring

            How the position was found. postcode means the postcode's centre was used.

            One of: house street postcode manual

          • needs_checkboolean

            Set when staff should check the position. Ignored when sent.

      • ticket_photostring, required

        On a job with disposal stops, whether Tipped needs a photo of the site's ticket; empty on other jobs.

        One of: optional required

      • crewarray of Person, required
        • idinteger (int64), required
        • namestring, required
      • special_instructionsstring, required
      • loading_minutesinteger, required
      • unloading_minutesinteger, required
      • signature_rulestring, required

        What a driver must record on Delivered. The business's setting signature_rule is the default (signature_or_reason unless set).

        One of: signature_required signature_or_reason signature_optional

      • route_pointsarray of array of number or null, required

        The job's own route line, on a day with no plan.

      • alertsarray of TagAlert

        The job's open cargo tag alerts.

        • idinteger (int64), required
        • tag_idinteger (int64), required
        • job_idinteger (int64), required
        • kindstring, required

          away_from_van, further than tag_away_metres from its van for tag_away_minutes; wrong_stop, left at another of its van's drops that day; silent, no point for tag_silent_minutes; delivered_away, last seen further than tag_dropoff_metres from its drop when delivered.

          One of: away_from_van wrong_stop silent delivered_away

        • labelstring, required
        • itemstring, required
        • raised_atstring, required
        • handled_atstring
      • tagsarray of JobTag

        The cargo tags on the job not yet delivered; Delivered releases them.

        • idinteger (int64), required
        • job_idinteger (int64), required
        • tracker_idinteger (int64), required
        • labelstring, required
        • identifierstring, required
        • itemstring, required
        • attached_atstring, required
        • loaded_atstring

          When the job's Loaded step happened; the tag is watched from then. Absent before.

        • released_atstring

          When it was delivered or moved to another job.

        • last_seen_atstring

          When it last reported while watched.

Example response 200
{
  "day": {
    "date": "date",
    "planned": true,
    "plan_id": 0,
    "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
    },
    "stops": [
      {
        "kind": "departure",
        "job_id": 0,
        "disposal_stop": 0,
        "address": "string",
        "latitude": 0,
        "longitude": 0,
        "arrives": "string",
        "departs": "string"
      }
    ],
    "route_points": [
      [
        0
      ]
    ],
    "jobs": [
      {
        "job_id": 0,
        "status": "string",
        "job_type": "house",
        "service_date": "string",
        "appointment_time": "string",
        "window_start": "string",
        "window_end": "string",
        "from_address": {
          "address_id": 0,
          "customer_id": 0,
          "quote_id": 0,
          "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
        },
        "to_address": {
          "address_id": 0,
          "customer_id": 0,
          "quote_id": 0,
          "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
        },
        "customer": {
          "first_name": "string",
          "last_name": "string",
          "phone": "string"
        },
        "recipient_name": "string",
        "recipient_phone": "string",
        "items": [
          {
            "type": "string",
            "quantity": 0,
            "fragile": true
          }
        ],
        "waste_kinds": [
          "general"
        ],
        "disposal_stops": [
          {
            "position": 0,
            "name": "string",
            "address": {
              "address_id": 0,
              "customer_id": 0,
              "quote_id": 0,
              "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
            }
          }
        ],
        "ticket_photo": "",
        "crew": [
          {
            "id": 0,
            "name": "string"
          }
        ],
        "special_instructions": "string",
        "loading_minutes": 0,
        "unloading_minutes": 0,
        "signature_rule": "signature_required",
        "route_points": [
          [
            0
          ]
        ],
        "alerts": [
          {
            "id": 0,
            "tag_id": 0,
            "job_id": 0,
            "kind": "away_from_van",
            "label": "string",
            "item": "string",
            "raised_at": "string",
            "handled_at": "string"
          }
        ],
        "tags": [
          {
            "id": 0,
            "job_id": 0,
            "tracker_id": 0,
            "label": "string",
            "identifier": "string",
            "item": "string",
            "attached_at": "string",
            "loaded_at": "string",
            "released_at": "string",
            "last_seen_at": "string"
          }
        ]
      }
    ]
  }
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/driver/jobs/{id}/steps

Record a step on the driver's job

A paired driver's device, on one of the driver's own jobs (another's is 404). A client_id sent before gives back the step stored then and changes nothing, upload_ids included. Delivered must meet the job's signature rule, or is refused (400). signature_required needs a signature upload, signature_or_reason a signature or no_signature_reason, and signature_optional neither; a reason is refused alongside a signature. A job with disposal stops records arrived_disposal and tipped, each naming its stop, in place of arrived_delivery and delivered (refused there, 400); a stop the job doesn't have, or a stop on any other step, is refused (400). Tipped needs a photo of the site's ticket when the business's setting waste_ticket_photo is required (optional unless set). Delivered, and Tipped at the last disposal stop, set the job's status to delivered; every new step publishes job.updated or job.status.

Parameters

  • idstring, in the path, required

Request body · object

  • client_idstring (uuid), required

    The phone's own id for the step.

  • kindstring, required

    One of: arrived_collection loaded arrived_delivery delivered arrived_disposal tipped

  • stopinteger or null

    Arrived_disposal and tipped only; the position of the job's disposal stop, from 0.

  • happened_atstring, required

    When it happened on the phone, RFC 3339.

  • upload_idsarray of string (uuid)

    Uploads of this job that nothing names yet, at most 10. Loaded and tipped take photos; delivered takes photos and one signature; the arrivals take none.

  • no_signature_reasonstring

    Delivered only, without a signature; why the customer didn't sign. At most 500 characters, trimmed.

  • tagsarray of string

    Loaded only. The identifiers of the cargo tags the driver scanned; each is watched to this job's drop, moved from any other job it was on. An identifier no active cargo tag has is left out. Refused on a job whose load goes to disposal stops.

Example request
{
  "client_id": "uuid",
  "kind": "arrived_collection",
  "stop": 0,
  "happened_at": "string",
  "upload_ids": [
    "uuid"
  ],
  "no_signature_reason": "string",
  "tags": [
    "string"
  ]
}

Response 200 · object

Recorded, or recorded before.

  • stepJobStep, required

    A step a driver recorded. happened_at is the phone's time; received_at is the API's. Times are UTC, YYYY-MM-DD HH:MM:SS.

    • idinteger (int64), required
    • client_idstring, required
    • kindstring, required

      One of: arrived_collection loaded arrived_delivery delivered arrived_disposal tipped

    • stopinteger

      The disposal stop's position, on arrived_disposal and tipped.

    • driver_idinteger (int64) or null, required
    • happened_atstring, required
    • received_atstring, required
    • no_signature_reasonstring

      Why a delivery has no signature, when the driver gave one.

    • proofarray of ProofLink

      The photos and signature it names, on staff's job read only.

      • idstring (uuid), required
      • kindstring, required

        One of: photo signature

      • content_typestring, required
      • urlstring, required
      • expires_atstring, required
Example response 200
{
  "step": {
    "id": 0,
    "client_id": "string",
    "kind": "arrived_collection",
    "stop": 0,
    "driver_id": 0,
    "happened_at": "string",
    "received_at": "string",
    "no_signature_reason": "string",
    "proof": [
      {
        "id": "uuid",
        "kind": "photo",
        "content_type": "string",
        "url": "string",
        "expires_at": "string"
      }
    ]
  }
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/driver/jobs/{id}/issues

Report an issue on the driver's job

A paired driver's device, on one of the driver's own jobs (another's is 404). A client_id sent before gives back the issue stored then and changes nothing, upload_ids included. A new issue sets the job's status to customer issue and publishes job.issue with the note.

Parameters

  • idstring, in the path, required

Request body · object

  • client_idstring (uuid), required

    The phone's own id for the issue.

  • notestring, required

    1 to 2000 characters.

  • happened_atstring, required

    When it happened on the phone, RFC 3339.

  • upload_idsarray of string (uuid)

    Photos uploaded on this job that nothing names yet, at most 10.

Example request
{
  "client_id": "uuid",
  "note": "string",
  "happened_at": "string",
  "upload_ids": [
    "uuid"
  ]
}

Response 200 · object

Recorded, or recorded before.

  • issueJobIssue, required

    An issue a driver reported. Times as for JobStep.

    • idinteger (int64), required
    • client_idstring, required
    • notestring, required
    • driver_idinteger (int64) or null, required
    • happened_atstring, required
    • received_atstring, required
    • proofarray of ProofLink

      The photos and signature it names, on staff's job read only.

      • idstring (uuid), required
      • kindstring, required

        One of: photo signature

      • content_typestring, required
      • urlstring, required
      • expires_atstring, required
Example response 200
{
  "issue": {
    "id": 0,
    "client_id": "string",
    "note": "string",
    "driver_id": 0,
    "happened_at": "string",
    "received_at": "string",
    "proof": [
      {
        "id": "uuid",
        "kind": "photo",
        "content_type": "string",
        "url": "string",
        "expires_at": "string"
      }
    ]
  }
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/driver/clock

Clock the driver or crew in or out on the driver's job

A paired driver's device, on one of the driver's own jobs (another's is 404). staff_ids names the job's driver or crew, each once (anyone else is 400). A client_id sent before gives back the events stored then and changes nothing. A new event publishes job.updated.

Request body · object

  • client_idstring (uuid), required

    The phone's own id for the event.

  • job_idinteger (int64), required
  • kindstring, required

    One of: in out

  • happened_atstring, required

    When it happened on the phone, RFC 3339.

  • staff_idsarray of integer (int64), required

    The people clocked, at least one.

Example request
{
  "client_id": "uuid",
  "job_id": 0,
  "kind": "in",
  "happened_at": "string",
  "staff_ids": [
    0
  ]
}

Response 200 · object

Recorded, or recorded before.

  • clockarray of ClockEvent, required

    One event for each person, earliest first.

    • idinteger (int64), required
    • client_idstring, required
    • job_idinteger (int64), required
    • staff_idinteger (int64), required
    • kindstring, required

      One of: in out

    • driver_idinteger (int64) or null, required
    • happened_atstring, required
    • received_atstring, required
    • sourcestring, required

      One of: phone office

    • added_byinteger (int64) or null, required

      The staff member who added an office event.

    • notestring or null, required

      Why the office added it.

    • replaces_idinteger (int64) or null, required

      The event an office fix voided.

    • voided_atstring or null, required
    • voided_byinteger (int64) or null, required
    • void_reasonstring or null, required
Example response 200
{
  "clock": [
    {
      "id": 0,
      "client_id": "string",
      "job_id": 0,
      "staff_id": 0,
      "kind": "in",
      "driver_id": 0,
      "happened_at": "string",
      "received_at": "string",
      "source": "phone",
      "added_by": 0,
      "note": "string",
      "replaces_id": 0,
      "voided_at": "string",
      "voided_by": 0,
      "void_reason": "string"
    }
  ]
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/driver/positions

Send the phone's positions during the driver's shift

A paired driver's device. 1 to 500 points; each is stored with the vehicle the driver has on its day (the vehicle of their jobs that day, else the vehicle they drive that day, else the one they usually drive, else none). A point already received for the driver at that time is ignored. added is how many were new; share is as GET /v1/driver/tracking answers; plan_id is the id of today's approved plan when it has a run for the driver, else null, so the app reloads its day when it changes.

Request body · object

  • pointsarray 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 request
{
  "points": [
    {
      "source": "phone",
      "recorded_at": "string",
      "latitude": 0,
      "longitude": 0,
      "accuracy_m": 0,
      "speed_mps": 0,
      "heading": 0
    }
  ]
}

Response 200 · object

Stored, or stored before.

  • addedinteger, required
  • shareboolean, required
  • plan_idinteger (int64) or null, required
Example response 200
{
  "added": 0,
  "share": true,
  "plan_id": 0
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

GET/v1/driver/tracking

Whether the phone shares its location

A paired driver's device. share is false while the firm's pause_phone_with_tracker setting is on and the tracker of the driver's van today reported in the last 2 minutes; the phone then stops GPS and asks again every 2 minutes.

Response 200 · object

The answer.

  • shareboolean, required
Example response 200
{
  "share": true
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/driver/uploads

Upload a photo or signature on the driver's job

A paired driver's device, on one of the driver's own jobs (another's is 404). Gives a signed request that stores the file for an hour; the phone then sends PUT to upload_url with upload_headers and exactly size bytes, and names the upload's id on a step or issue. A client_id sent before gives back the upload stored then, with a new signed request. An upload no step or issue names within 7 days is deleted.

Request body · object

  • client_idstring (uuid), required

    The phone's own id for the upload.

  • job_idinteger (int64), required
  • kindstring, required

    One of: photo signature

  • content_typestring, required

    image/jpeg for a photo, image/png for a signature.

    One of: image/jpeg image/png

  • sizeinteger (int64), required

    The file's size in bytes, 1 to 10485760.

Example request
{
  "client_id": "uuid",
  "job_id": 0,
  "kind": "photo",
  "content_type": "image/jpeg",
  "size": 0
}

Response 200 · object

Stored, or stored before.

  • uploadProofUpload, required

    A photo or signature upload with the signed request that stores its file. expires_at is UTC, YYYY-MM-DD HH:MM:SS.

    • idstring (uuid), required
    • client_idstring (uuid), required
    • job_idinteger (int64), required
    • kindstring, required

      One of: photo signature

    • content_typestring, required
    • sizeinteger (int64), required
    • upload_urlstring, required

      Where to send PUT with the file.

    • upload_headersobject, required

      Headers the PUT must carry, Content-Type among them.

    • expires_atstring, required
Example response 200
{
  "upload": {
    "id": "uuid",
    "client_id": "uuid",
    "job_id": 0,
    "kind": "photo",
    "content_type": "string",
    "size": 0,
    "upload_url": "string",
    "upload_headers": {},
    "expires_at": "string"
  }
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/admin/drivers

Add a driver

Needs the drivers.pair permission. A driver is staff with the Driver role and no email or password; they sign in only through a paired device.

Request body · Driver

  • idinteger (int64)
  • first_namestring, required
  • last_namestring, required
  • phonestring
Example request
{
  "id": 0,
  "first_name": "string",
  "last_name": "string",
  "phone": "string"
}

Response 200 · object

Done.

  • messagestring, required
  • admin_idinteger (int64), required
Example response 200
{
  "message": "string",
  "admin_id": 0
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

POST/v1/admin/drivers/{user_id}/pairing-code

Make a code to pair a driver's device

Needs the drivers.pair permission.

Parameters

  • user_idstring, in the path, required

Response 200 · object

Done.

  • pairingobject, required
    • codestring, required

      Show as a QR code; it works once and lasts 10 minutes.

    • expires_atstring, required
Example response 200
{
  "pairing": {
    "code": "string",
    "expires_at": "string"
  }
}

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

GET/v1/admin/devices

Paired devices

Needs the drivers.pair permission.

Response 200 · object

Done.

  • devicesarray of Device, required
    • idinteger (int64)
    • driver_idinteger (int64)
    • driver_namestring
    • namestring
    • paired_atstring
    • last_used_atstring
Example response 200
{
  "devices": [
    {
      "id": 0,
      "driver_id": 0,
      "driver_name": "string",
      "name": "string",
      "paired_at": "string",
      "last_used_at": "string"
    }
  ]
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code

DELETE/v1/admin/devices/{id}

Unpair a device

Needs the drivers.pair permission.

Parameters

  • idstring, in the path, required

Response 200 · Message

Done.

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

Response 400 · Error

The request is not valid.

Fields as in Pair a driver's device with a pairing code

Response 401 · Error

No tenant key, or no valid session.

Fields as in Pair a driver's device with a pairing code

Response 403 · Error

The session may not do this.

Fields as in Pair a driver's device with a pairing code

Response 404 · Error

Not found, or not yours.

Fields as in Pair a driver's device with a pairing code

Response 409 · Error

It clashes with what is stored.

Fields as in Pair a driver's device with a pairing code

Response 500 · Error

Something failed on our side.

Fields as in Pair a driver's device with a pairing code