Request
Before proceeding, ensure that you have the ID of the store location for which data is to be retrieved,
Perform a GET
request to:
https://dmo.metapack.com/locations/<Location ID>
of content type:
application/json
with the following authorisation (the token is copied from the access_token
field that is returned from Generating a Bearer Token):
Bearer <Bearer Token>
Note
The token must be within its TTL and associated with a can-retrieve-locations permission.
Response
The response from Delivery Options is in JSON format, and will be in the form of an HTTP 200 OK
response if the request is successful. For other possible responses, refer to What are the possible Server Responses?.
A successful response will return the store location and all associated information, for example:
{ "storeId": "001MKC", "storeName": "Milton Keynes", "supplementaryName": "Nice Store 1", "city": "Milton Keynes", "postCode": "MK9 1GW", "countryCode": "GBR", "address": "202 Elder Gate Central Bletchley Buckinghamshire", "structuredAddress": { "street": "Elder Gate", "buildingName": "DODO Estate", "houseNumber": "202", "city": "Milton Keynes", "district": "Central Bletchley", "province": "Buckinghamshire", "postCode": "MK9 1GW", "countryCode": "GBR" }, "latitude": 52.043200, "longitude": -0.761790, "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": "Our Bletchley Store",, "id": "<Location ID>", "tags":[ "a", "b", "c" ], "locationProvider": { "id": "<Location Provider ID>", "name": "DoDo Test" }, "links": [{ "rel": "self", "href": "/locations/<Location ID>" }, { "rel": "openingTimesRules", "href": "/locations/<Location ID>/openingTimesRules" }, { "rel": "customData", "href": "/locations/<Location ID>/customData" } ] }
Note
If the structuredAddress
fields are populated, then the top level address
, city
, postCode
, countryCode
fields are also automatically populated, for reasons of backwards compatibility with File Import.
In this scenario, address
is a space separated concatenation of structuredAddress.houseNumber
, structuredAddress.street
, structuredAddress.district
and structuredAddress.province
.