Return to documentation index

inventory_locations

The inventory_locations API retrieves a list of inventory locations for the current account. This list will be empty if the account does not use inventory locations..

Parameters

  • api_key (string) Required - The API key for the account
  • last_updated_at (datetime) Optional - If this parameter is supplied, only locations whose last edited date is after the supplied date and time will be returned. The parameter should be formatted as "YYYY-MM-DD HH:MM:SS" and will be interpreted as a UTC date and time value. Sections with an updated_at value of null will not be included if this parameter is supplied.

Response

The inventory_locations API returns a JSON array of inventory_locations. Each member of the array includes these attributes:

  • id - Unique identifier.
  • name - Human-readable name of the location.
  • updated_at - The date that this unit was last edited. May be null.

Sample Request

https://dashboard.onpremisewine.com/inventory_locations.json?api_key=ABCDEF123456

Sample Response

{
  "inventory_locations": [
    {
      "id": 1,
      "name": "cellar",
      "updated_at": "2011-09-10T12:43:04-07:00",
    },
    {
      "id": 2,
      "name": "Bar fridge",
      "updated_at": "2011-09-10T12:43:04-07:00",
    }
  ]
}