A pact between GDS API Adapters and Locations API

Requests from GDS API Adapters to Locations API

Interactions

Given a postcode, upon receiving the request to get details about a postcode from GDS API Adapters, with

{
  "method": "get",
  "path": "/v1/locations",
  "query": "postcode=SW1A1AA",
  "headers": {
    "Accept": "application/json",
    "User-Agent": "gds-api-adapters/82.0.0 ()"
  }
}

Locations API will respond with:

{
  "status": 200,
  "headers": {
    "Content-Type": "application/json; charset=utf-8"
  },
  "body": {
    "average_latitude": 51.50100965,
    "average_longitude": -0.14158705,
    "results": [
      {
        "local_custodian_code": 5900
      },
      {
        "local_custodian_code": 5901
      }
    ]
  }
}