vendors
The vendors
API retrieves a list of all of the vendors in the database. For client versions up to V89, it also returns the associated vendor beverage SKUs.
Parameters
- api_key (string) Required - The API key for the account
- last_updated_at (datetime) Optional - If this parameter is supplied, only vendors 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.
Response
The vendors
API returns a JSON array of vendors. Each member of the array includes these attributes:
- id - Unique identifier.
- updated_at - The date that this vendor was last edited.
- created_at - The date that this vendor was created.
- name - The name of the vendor.
- vendor_beverage_skus - Array of objects that associate this vendor with beverage SKUs. NOTE: This attribute will not be sent to V90 and above clients.
- beverage_skus - Array of objects that associate this vendor with beverage SKUs. NOTE: This attribute will only be sent to V90 and above clients.
vendor_beverage_sku details
Each vendor_beverage_sku
object includes these attributes:
- id - Unique identifier.
- updated_at - The date that this vendor beverage SKU was last edited.
- created_at - The date that this vendor beverage SKU was created.
- note - Any note about the association between vendor and beverage SKU.
- beverage_sku_id - The unique identifier of a beverage SKU retrieved from the wine_list API, the beer_list API, or the spirit_list API.
- vendor_id - Identifier for the associated vendor.
beverage_skus details
Each beverage_sku
object includes these attributes:
*id - The unique identifier of a beverage SKU retrieved from the wine_list API, the beer_list API, the spirit_list API, or the product_list API * note - Any note about the association between vendor and beverage SKU.
Sample Request
https://dashboard.onpremisewine.com/vendors.json?api_key=ABCDEF123456
Sample Response (V90 and above)
{
"vendors": [
{
"id": 9822,
"updated_at": "2013-03-05T20:31:45-08:00",
"created_at": "2012-10-15T22:48:06-07:00",
"name": "Allied Wines",
"beverage_skus" : [
{
"id": 47079,
"note": null
}
]
},
{
"id": 10848,
"updated_at": "2013-03-21T16:59:38-07:00",
"created_at": "2013-03-05T20:28:28-08:00",
"name": "Young's Market Company",
"beverage_skus" : [
{
"id": 47389,
"note": null
},
{
"id": 47394,
"note": null
}
]
}
]
}
Sample Response (V89 and below)
{
"vendors": [
{
"id": 9822,
"updated_at": "2013-03-05T20:31:45-08:00",
"created_at": "2012-10-15T22:48:06-07:00",
"name": "Allied Wines",
"vendor_beverage_skus": [
{
"id": 47079,
"updated_at": "2013-03-05T20:31:45-08:00",
"created_at": "2013-03-05T20:31:45-08:00",
"note": null,
"beverage_sku_id": 45223,
"vendor_id": 9822
}
]
},
{
"id": 10848,
"updated_at": "2013-03-21T16:59:38-07:00",
"created_at": "2013-03-05T20:28:28-08:00",
"name": "Young's Market Company",
"vendor_beverage_skus": [
{
"id": 47389,
"updated_at": "2013-03-07T13:13:38-08:00",
"created_at": "2013-03-07T13:13:38-08:00",
"note": null,
"beverage_sku_id": 45287,
"vendor_id": 10848
},
{
"id": 47394,
"updated_at": "2013-03-07T13:44:54-08:00",
"created_at": "2013-03-07T13:44:54-08:00",
"note": null,
"beverage_sku_id": 45975,
"vendor_id": 10848
}
]
}
]
}