Own Stores

Required Permission

can-search-locations

See Auth* (scopes).

Request

GET /locations/ownstores?<query string>

Parameters

Parameter Example Default Type Description
correlation_id 9180b450-1e4c-4dd1-b0e5-37d0bfaaf185 - string identifier for request tracking
ret 6f3c2d96-fccb-46f5-9dd7-7e0a478dfdfd - uuid retailer id (*1)
lon -0.1274 - signed floating point longitude
lat 51.5197 - signed floating point latitude
multi_country true false boolean should include locations from multiple countries (*2)
countrycode GBR - ISO 3166-1 country code (*3) country code
radius 10000 1000 integer radius
min 10000 - integer minimum number of locations to retrieve (*4)
max 10000 100 integer maximum number of locations to retrieve
language en - string prefer location data in this language (*5)

Notes

  1. Manually generated and provided by Metapack for each retailer.
  2. Different to the one specified via the countrycode parameter.
  3. Valid 3 digit, 2 characters or 3 characters.
  4. Will search beyond radius if initial search doesn't find enough locations.
  5. Must be a valid lowercase ISO 639-1 two-letter code (see)

Syntax Diagram

The following diagram lists all of the valid combinations of parameters. Read from left to right, choosing a single path; loops represent optional parameters; forks represent alternatives; a parameter may appear more than once in which case, ignore the subsequent ocurrences if already added:

Syntax Diagram

locations.ownstores
         ::= ret lat lon multi_country? countrycode? radius? min? max? language?

Response

HTTP/1.1 200 OK
[
  {
    "storeId": "0002",
    "storeName": "MetaPack Limited",
    "city": "London",
    "postCode": "WC1X 8XZ",
    "countryCode": "GBR",
    "address": "201 Gray’s Inn Road",
    "latitude": 51.523402,
    "longitude": -0.114333,
    "telephoneNumber": "+442078436720",
    "email": "mkstore@askjeeves.com",
    "logoUrl": null,
    "photoUrls": [],
    "hasDisabledAccess": false,
    "description": null,
    "id": "ec30cb2b-9c64-46ee-a6b4-2db3238901d9",
    "tags": [
       "potato",
       "pharmacy",
       "refrigeration"
    ],
    "locationProvider": {
      "id": "ca0e1f97-dc57-4df5-9430-c93264603197",
      "name": "DoDo Test",
      "ownStores": false
    },
    "locationOpeningTimesRules": {
      "openingTimesRules": [
        {
          "rule": "every Sunday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        },
        {
          "rule": "every Monday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        },
        {
          "rule": "every Tuesday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        },
        {
          "rule": "every Wednesday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        },
        {
          "rule": "every Thursday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        },
        {
          "rule": "every Friday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        },
        {
          "rule": "every Saturday",
          "openingClosingTimes": [
            {
              "openingAt": "00:00",
              "closingAt": "23:59"
            }
          ]
        }
      ]
    },
    "links": [
      {
        "rel": "self",
        "href": "/locations/ec30cb2b-9c64-46ee-a6b4-2db3238901d9"
      },
      {
        "rel": "openingTimesRules",
        "href": "/locations/ec30cb2b-9c64-46ee-a6b4-2db3238901d9/openingTimesRules"
      },
      {
       "rel": "customData",
       "href": "/locations/ec30cb2b-9c64-46ee-a6b4-2db3238901d9/customData"
      }
    ]
  }
]

Failure

Invalid parameter combination or data types submitted:

HTTP/1.1 400 BAD REQUEST

User doesn't have the required permission:

HTTP/1.1 403 FORBIDDEN

Retailer or location provider does not exist:

HTTP/1.1 404 NOT FOUND

Other errors:

HTTP/1.1 500 INTERNAL SERVER ERROR

results matching ""

    No results matching ""