Skip to the content

DoRoutes API · version 1

Addresses

GET/v1/addresses/suggest

Addresses that match what someone has typed

Asks HERE after 3 characters; send the chosen suggestion's position and match_level with the address. Each call counts against the business's monthly address suggestions; when they are used up, available is false and no suggestions are given. Limited to 60 calls a minute from one address.

Parameters

  • qstring, in the query, required

Response 200 · object

Done.

  • suggestionsarray of Suggestion, required
    • labelstring, 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.

    • positionPosition, required
      • latitudenumber, required
      • longitudenumber, required
    • match_levelstring, required

      One of: house street postcode

  • availableboolean, required
Example response 200
{
  "suggestions": [
    {
      "label": "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
      },
      "position": {
        "latitude": 0,
        "longitude": 0
      },
      "match_level": "house"
    }
  ],
  "available": true
}

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 429 · Error

Too many attempts; see Retry-After.

Fields as in Addresses that match what someone has typed

Response 500 · Error

Something failed on our side.

Fields as in Addresses that match what someone has typed