Locations Feed Specifications
The Locations Feed provides structured information about store locations, including identification, address details, geo-coordinates, opening hours, and optional metadata such as location name and target groups. The feed follows a strict JSON schema for validation and consistency.
Feed Structure
Each feed entry represents a single location object.
-
Type: object
Required fields
-
id
-
street_address
-
postal_code
-
city
Optional fields
-
name
-
country_code
-
latitude
-
longitude
-
opening_hours
-
target_groups
Properties
id
-
Type: string
-
Required: Yes
-
Description: Unique identifier for the location (store ID).
name
-
Type: string or null
-
Required: No (optional)
-
Description: The name of the location.
-
Examples: "Supermart Roskilde", null
street_address
-
Type: string
-
MinLength: 1
-
Required: Yes
-
Description: The street address of the location.
-
Example: "Algade 21"
postal_code
-
Type: string
-
MinLength: 1
-
Required: Yes
-
Description: Postal code for the location.
-
Example: "4000"
city
-
Type: string
-
MinLength: 1
-
Required: Yes
-
Description: City of the location.
-
Example: "Roskilde"
country_code
-
Type: string
-
Length: Exactly 2 characters
-
Required: No (optional)
-
Description: ISO2 country code.
-
Example: "DK"
latitude
-
Type: number
-
Range: -90 to 90
-
Required: No (optional)
-
Description: Geographical latitude of the location.
-
Example: 55.6419
longitude
-
Type: number
-
Range: -180 to 180
-
Required: No (optional)
-
Description: Geographical longitude of the location.
-
Example: 12.0803
opening_hours
-
Type: array of objects
-
Required: No (optional)
-
Description: Opening hours per day.
Each object inside the array:
Required field:
-
day_of_week
-
Properties:
-
day_of_week (string, enum: monday–sunday)
-
opens (string, time format HH:MM:SS, optional)
-
closes (string, time format HH:MM:SS, optional)
-
valid_from (string, optional) – start of validity period
-
valid_until (string, optional) – end of validity period
Example:
-
"opening_hours": [
{"day_of_week": "monday", "opens": "08:00:00", "closes": "20:00:00"},
{"day_of_week": "sunday"}
]
target_groups
- Type: array of string
- Required: No (optional)
- Description: List of target group names for the location (e.g., geographic region or segment).
- Example: ["Sjælland", "Nord"]
Full Example
{
"id": "store-123",
"name": "Supermart Roskilde",
"street_address": "Algade 21",
"postal_code": "4000",
"city": "Roskilde",
"country_code": "DK",
"latitude": 55.6419,
"longitude": 12.0803,
"opening_hours": [
{"day_of_week": "monday", "opens": "08:00:00", "closes": "20:00:00"},
{"day_of_week": "tuesday", "opens": "08:00:00", "closes": "20:00:00"},
{"day_of_week": "sunday"}
],
"target_groups": ["students", "families"]
}
Validation Rules
-
Every object must include: id, street_address, postal_code, city.
-
name, country_code, latitude, longitude, opening_hours, and target_groups are optional.
-
country_code must be a valid ISO2 code (e.g., DK, SE, DE).
-
latitude and longitude must be within valid Earth coordinate ranges.
-
Opening hours follow 24h format (HH:MM:SS).