Skip to the content

DoRoutes API · version 1

Customers

GET/v1/admin/customers

The customers

Needs the customers.read permission.

Response 200 · object

Done.

  • customersarray of Customer, required
    • customer_idinteger (int64)
    • titlestring
    • first_namestring
    • last_namestring
    • emailstring (email)
    • email_confirmed_atstring

      When the customer first signed in by a link sent to the email; cleared when the email changes. Ignored when sent.

    • phonestring

      The latest number given.

    • phonesarray of string

      Every number the customer has given, oldest first, each once however spaced. Ignored when sent.

Example response 200
{
  "customers": [
    {
      "customer_id": 0,
      "title": "string",
      "first_name": "string",
      "last_name": "string",
      "email": "email",
      "email_confirmed_at": "string",
      "phone": "string",
      "phones": [
        "string"
      ]
    }
  ]
}

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 The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers

GET/v1/admin/customer/{id}

A customer

Needs the customers.read permission.

Parameters

  • idstring, in the path, required

Response 200 · object

Done.

  • customerCustomer, required
    • customer_idinteger (int64)
    • titlestring
    • first_namestring
    • last_namestring
    • emailstring (email)
    • email_confirmed_atstring

      When the customer first signed in by a link sent to the email; cleared when the email changes. Ignored when sent.

    • phonestring

      The latest number given.

    • phonesarray of string

      Every number the customer has given, oldest first, each once however spaced. Ignored when sent.

Example response 200
{
  "customer": {
    "customer_id": 0,
    "title": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "email",
    "email_confirmed_at": "string",
    "phone": "string",
    "phones": [
      "string"
    ]
  }
}

Response 400 · Error

The request is not valid.

Fields as in The customers

Response 401 · Error

No tenant key, or no valid session.

Fields as in The customers

Response 403 · Error

The session may not do this.

Fields as in The customers

Response 404 · Error

Not found, or not yours.

Fields as in The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers

POST/v1/admin/customer

Add a customer, or update the one with the email

Needs the customers.write permission.

Request body · Customer

  • customer_idinteger (int64)
  • titlestring
  • first_namestring
  • last_namestring
  • emailstring (email)
  • email_confirmed_atstring

    When the customer first signed in by a link sent to the email; cleared when the email changes. Ignored when sent.

  • phonestring

    The latest number given.

  • phonesarray of string

    Every number the customer has given, oldest first, each once however spaced. Ignored when sent.

Example request
{
  "customer_id": 0,
  "title": "string",
  "first_name": "string",
  "last_name": "string",
  "email": "email",
  "email_confirmed_at": "string",
  "phone": "string",
  "phones": [
    "string"
  ]
}

Response 200 · object

Done.

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

Response 400 · Error

The request is not valid.

Fields as in The customers

Response 401 · Error

No tenant key, or no valid session.

Fields as in The customers

Response 403 · Error

The session may not do this.

Fields as in The customers

Response 404 · Error

Not found, or not yours.

Fields as in The customers

Response 409 · Error

It clashes with what is stored.

Fields as in The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers

POST/v1/admin/address

Add an address for a customer

Needs the customers.write permission.

Request body · Address

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

Example request
{
  "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
}

Response 200 · object

Done.

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

Response 400 · Error

The request is not valid.

Fields as in The customers

Response 401 · Error

No tenant key, or no valid session.

Fields as in The customers

Response 403 · Error

The session may not do this.

Fields as in The customers

Response 404 · Error

Not found, or not yours.

Fields as in The customers

Response 409 · Error

It clashes with what is stored.

Fields as in The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers

GET/v1/admin/accounts

Customer accounts

Needs the customers.read permission.

Response 200 · object

Done.

  • accountsarray of Account, required
    • account_idinteger (int64)
    • customerCustomer
      • customer_idinteger (int64)
      • titlestring
      • first_namestring
      • last_namestring
      • emailstring (email)
      • email_confirmed_atstring

        When the customer first signed in by a link sent to the email; cleared when the email changes. Ignored when sent.

      • phonestring

        The latest number given.

      • phonesarray of string

        Every number the customer has given, oldest first, each once however spaced. Ignored when sent.

    • account_typestring

      One of: personal business

    • vat_numberstring
    • statusstring

      One of: active inactive banned

    • total_spendnumber

      Pence.

    • created_atstring

      UTC, as 2026-10-05 12:00:00.

    • updated_atstring
Example response 200
{
  "accounts": [
    {
      "account_id": 0,
      "customer": {
        "customer_id": 0,
        "title": "string",
        "first_name": "string",
        "last_name": "string",
        "email": "email",
        "email_confirmed_at": "string",
        "phone": "string",
        "phones": [
          "string"
        ]
      },
      "account_type": "personal",
      "vat_number": "string",
      "status": "active",
      "total_spend": 0,
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}

Response 401 · Error

No tenant key, or no valid session.

Fields as in The customers

Response 403 · Error

The session may not do this.

Fields as in The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers

GET/v1/admin/customers/{customer_id}/addresses

A customer's addresses

Needs the customers.read permission. Oldest first, with where each is and whether staff should check it.

Parameters

  • customer_idstring, in the path, required

Response 200 · object

Done.

  • addressesarray of Address, 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.

Example response 200
{
  "addresses": [
    {
      "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
    }
  ]
}

Response 400 · Error

The request is not valid.

Fields as in The customers

Response 401 · Error

No tenant key, or no valid session.

Fields as in The customers

Response 403 · Error

The session may not do this.

Fields as in The customers

Response 404 · Error

Not found, or not yours.

Fields as in The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers

PUT/v1/admin/customers/{customer_id}/addresses/{id}/position

Place a customer's address by hand

Needs the customers.write permission. Moves the address's pin; its match_level becomes manual and it no longer needs checking.

Parameters

  • customer_idstring, in the path, required
  • idstring, in the path, required

Request body · Position

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

Response 200 · object

Done.

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

Example response 200
{
  "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
  }
}

Response 400 · Error

The request is not valid.

Fields as in The customers

Response 401 · Error

No tenant key, or no valid session.

Fields as in The customers

Response 403 · Error

The session may not do this.

Fields as in The customers

Response 404 · Error

Not found, or not yours.

Fields as in The customers

Response 500 · Error

Something failed on our side.

Fields as in The customers