Skip to content
William Wicks edited this page Jul 24, 2013 · 3 revisions

A Company will have 1 or more Locations.

Examples

A simple Location:

{
  "name": "Emeryville",
  "address": {
    "areas": [
      "CA",
      "Emeryville",
      "1555 40th St."
    ],
    "postal": "90210",
    "country": "US"
  },
  "phone": "3236030004",
  "hours": "M-F 9AM-10PM",
  "position": "40.99974046,-73.66086495,0"
}

A Location with departments and a holiday schedule:

{
  "name": "webster st",
  "address": {
    "areas": [
      "CA",
      "Alameda",
      "1900 Webster St."
    ],
    "postal": "94501",
    "country": "US"
  },
  "phone": "8005551212",
  "hours": "M-SA 7AM-10PM\nSu 8AM-10PM",
  "dependent": "/target/west-oakland",
  "holiday": {
    "Christmas Eve": {
      "period": "2014-01-24T00:00:00.000-0800/1D",
      "hours": "5AM-6PM"
    },
    "Christmas Day": {
      "period": "2014-01-25T00:00:00.000-0800/1D",
      "hours": "Closed"
    }
  },
  "position": "40.99974046,-73.66086495,0",
  "departments": [
    {
      "name": "Pharmacy",
      "phone": "8005551313",
    },
    {
      "name": "Pharmacy Drive Thru",
      "dependent": false,
      "hours": "M-TH 7AM-3AM\nF,S 7AM-4AM\nSu 8AM-3AM"
    }
  ]
}

Data Definition

position

A string in the form of: latitude,longitude,zoom

"40.99974046,-73.66086495,0"

name

A name (or nickname) for the Location. Do not include the Company.name.

phone

An optional 10 digit phone number.

hours

The hours of operation using the culture specific Store Hours spec.


### holiday ----------- Holidays and special events will override normal `hours` of a `Location` and should indicate the holiday/event.

holiday[name]

The property name holds the holiday/event label.

holiday[name].period

An ISO 8601 Time Interval that specifies when the special hours are in effect.

holiday[name].hours

The hours of operation using the culture specific Store Hours spec.


### address ----------- Postal address information.

address.areas

The postal address is broken down into an areas array where areas[0] is the largest (most general) area. As the array index increases, the areas are more specific. This is done for internationalization.

[
  "CA", //State, Province, ect..
  "San Francisco", //City, Town, Burough, Block, ect..
  "1000 Market St." //Street, Building, Door, ect..
]

address.postal

The 5 or 9 digit postal code.

"94607-1234"

address.country

The ISO 3166 two letter country code.

"US"

### departments --------------- An array of the `Location`'s departments. The items should be in the desired display order.

departments[n].name

Each department must have a name.

departments[n].phone

An optional 10 digit phone number.

departments[n].hours

The hours of operation using the culture specific Store Hours spec.

"M-F 9 to 5"

departments[n].dependent

Departments are often dependent on the hours of the rest of the store or building. For departments that are NOT dependent (eg: Drive Thru), this value needs to be false.

In some cases, a store is located within another store- therefor the hours are determined by another Company altogether. The relative url to the other /company/location or /company/location/department should be used to link them.

departments[n].holiday

Each department can define its own holiday hours. See Holidays.