CAFv3

Quick Start

Searching addresses

You can search for addresses using an HTTP GET call:

You need to specify some fields in the include parameter, otherwise you will receive back only a list of identifiers without any text or other address details.

Try it out

Note that, generally, you should also add a term of {index:'active',value:'true'} unless you want to receive inactive addresses in your results. E.g.:

Full documentation

The full list of term types and includable fields are documented at /v3/search/addresses. In addition, the full documentation shows how to sort results, limit the number of results and skip a number of results for windowed searching (e.g. for paginated display).

Searching roads

The same style of API can be used for searching the road list:

Testing using cURL

cURL is a widely available command line tool which is useful for testing web service calls.

To test a simple GET request, simply specify the URL:

> curl https://cafv3.digimap.je/v3/lastRef
132811

This request works without authentication (the /v3/lastRef call does not require authentication).

All other calls require authentication and will return a 401 HTTP status code response without it:

> curl https://cafv3.digimap.je/v3/addresses/69107269/current?include=business,subElementDesc
{
  "message": "No authentication details provided. Please use HTTP Basic authentication, supplying your API key as your username."
}

To specify your API key, use curl's -u <user:password> switch, specifying your API key and a blank password:

> curl https://cafv3.digimap.je/v3/addresses/69107269/current?include=business,subElementDesc -u {apiKey}:
{
  "journal": "Addresses",
  "doc": 69107269,
  "rev": 2,
  "ref": 202588,
  "attributes": {
    "business": "",
    "subElementDesc": "Digimap(Jersey) Ltd"
  },
  "from": "2017-06-28T03:36:36",
  "predecessorRef": 58768
}

Doc, Rev and Ref

Every object returned by the CAF v3 API contains properties 'Doc', 'Rev' and 'Ref':