point_of_sale_skus (CREATION)
a POST request to the point_of_sale_skus
API creates a new POS SKU in the database
Parameters
- api_key (string) Required - The API key for the account
Body
The body of the request should be a JSON representation of the POS SKU to be created:
{"point_of_sale_sku":
{
"name":"Great Old Wines",
"pos_id":"1234",
"sku":"1400031",
"price":"7",
"metadata":"Major: 4 WINE; Family: 4001 GLASS WINE; Menu Group: 1 All Menu Items",
"category":"6"}
}
These attributes should be supplied in the JSON:
- name - POS SKU name. This can be a string up to 100 characters long.
- pos_id - POS SKU id. This should be the internal ID used by the POS system, not necessarily a human-readable ID. This can be a string up to 100 characters long.
- sku - POS SKU sku number. This should be the human-readable identifier for the SKU that will be displayed on the Tastevin UI. This can be a string up to 100 characters long.
- price - POS SKU price.
- category - POS SKU category sent by the POS Manager. This must be an integer.
- metadata - POS SKU metadata sent by the POS Manager. This can be a string up to 255 characters long.
Sample Request
https://dashboard.onpremisewine.com/point_of_sale_skus.json?api_key=ABCDEF123456
With the body of the request as shown above.
Response
The point_of_sale_skus
API returns a JSON representation of the created SKU. The SKU includes these attributes:
- id - Unique identifier.
- updated_at - The date that this POS SKU was last edited.
- created_at - The date that this POS SKU was added to the system.
- beverage_sku_ids - Identifier of the beverage SKU matched to this POS SKU, or nil. These identifiers may refer to a SKU retrieved by the wine_list API, the beer_list API, or the spirit_list API
- status - The current status of the POS SKU. A value of
0
indicates a SKU that has never been mapped, a value of1
indicates a SKU that is currently mapped, and a value of2
indicates a SKU whose mapping was deleted. - name - POS SKU name sent by the POS Manager.
- *pos_id - POS SKU id sent by the POS Manager.
- *sku - POS SKU sku value sent by the POS Manager.
- category - POS SKU category sent by the POS Manager.
- metadata - POS SKU metadata sent by the POS Manager.
Sample Response
{
"point_of_sale_sku":
{
"id":678365,
"updated_at":"2016-05-27T10:53:14.000-07:00",
"created_at":"2016-05-27T10:53:14.000-07:00",
"beverage_sku_id":null,
"status":0,
"name":"Great Old Wines",
"pos_id":"1234",
"sku":"1400031",
"category":6,
"metadata":"Major: 4 WINE; Family: 4001 GLASS WINE; Menu Group: 1 All Menu Items"
}
}
NOTE: The caller is responsible for storing the returned id and using it in subsequent calls to update the SKU.