Reading Location Data

Required Permission

can-retrieve-locations

See Auth* (scopes).

Request

GET /locations/<id>

(As for all other GET requests, there is no need to specify the "Accepts" header as we only support JSON at the moment)

Response

If the structuredAddress fields are populated, the top level address, city, postCode, countryCode ones are as well, for backward compatibility reasons. In this scenario, address is a space separated concatenation of structuredAddress.houseNumber, structuredAddress.street, structuredAddress.district and structuredAddress.province.

HTTP/1.1 200 OK
{
  "storeId": "001MKC",
  "storeName": "Milton Keynes",
  "supplementaryName": "Nice Store 1",
  "city": "Milton Keynes",
  "postCode": "MK9 1GW",
  "countryCode": "GBR",
  "address": "202 Elder Gate Greater London Hogwarts",
  "structuredAddress": {
    "street": "Elder Gate",
    "buildingName": "DODO Estate",
    "houseNumber": "202",
    "city": "Milton Keynes",
    "district": "Greater London",
    "province": "Hogwarts",
    "postCode": "MK9 1GW",
    "countryCode": "GBR"
  },
  "latitude": 52.035538,
  "longitude": -0.774214,
  "telephoneNumber": "+441908237494",
  "email": "mkstore@askjeeves.com",
  "logoUrl": "http://logo.metapack.com/testlogo.gif",
  "photoUrls": [
    "http://logo.metapack.com/testlogo.gif",
    "http://logo.metapack.com/testlogo.gif"
  ],
  "hasDisabledAccess": true,
  "description": null,
  "id": "863086bf-0771-44aa-bb2a-14686a1211fa",
  "tags": ["a", "b", "c"],
  "locationProvider": {
    "id": "2a2b72ca-980b-4c24-8e33-a26b2820a3db",
    "name": "DoDo Test"
  },
  "links": [{
      "rel": "self",
      "href": "/locations/863086bf-0771-44aa-bb2a-14686a1211fa"
    },
    {
      "rel": "openingTimesRules",
      "href": "/locations/863086bf-0771-44aa-bb2a-14686a1211fa/openingTimesRules"
    },
    {
      "rel": "customData",
      "href": "/locations/863086bf-0771-44aa-bb2a-14686a1211fa/customData"
    }
  ]
}

The response contains a link to the entity itself and to its opening times rules.

Fields (apart from the ones already detailed):

  • id - string - UUID for the location in DDO
  • links (HATEOAS)
    • self
      • href - link for same resource
    • openingTimesRules
      • href - link for the location opening times rules
    • customData
      • href - link for the location custom data

Failure

Request error; e.g. invalid UUID string (id):

HTTP/1.1 400 BAD REQUEST

User doesn't have the required permission:

HTTP/1.1 403 FORBIDDEN

Other errors:

HTTP/1.1 500 INTERNAL SERVER ERROR

results matching ""

    No results matching ""