Wine Prices
Get all Wine Prices
This endpoint retrieves all wine prices associated to current user.
HTTP Request
GET /v1/wine-prices
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/wine-prices' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
[
{
"id": 10227,
"price": "5.53",
"created_at": "2019-06-11T18:12:58+02:00",
"updated_at": "2019-06-11T18:12:58+02:00",
"format": "0.75",
"wine": "Chateau Cantenac Brown",
"wine-id": 123
},
{
"id": 10228,
"price": "8",
"created_at": "2018-12-05T22:51:47+01:00",
"updated_at": "2018-12-05T22:51:47+01:00",
"format": "0.33",
"wine": "Chateau Cantenac Brown",
"wine-id": 123
},
...
]
Get a specific Wine Price
This endpoint lets you get a specific wine price.
HTTP Request
GET /v1/wine-prices/single
Wine Price parameters
Name | Required | Type | Details |
---|---|---|---|
format | required | string | ex: 0.75 |
wine_id | required | int |
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/wine-prices/single?format=0.75&wine_id=15777' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
{
"id": 10227,
"price": "5.53",
"created_at": "2019-06-11T18:12:58+02:00",
"updated_at": "2019-06-11T18:12:58+02:00",
"format": "0.75",
"wine": "Chateau Cantenac Brown",
"wine-id": 123
}
Create a Wine Price
This endpoint lets you create a wine price.
HTTP Request
POST /v1/wine-prices
Wine Price parameters
Name | Required | Type | Details |
---|---|---|---|
format | required | string | ex: 0.75 |
wine_id | required | int | |
price | required | string |
Example
- Request
- Response
$ curl --request POST --url 'https://app.winesitting.com/v1/wine-prices' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"price": "5.53",
"format": "0.75",
"wine_id": 15777
},
'
{
"id": 10227,
"price": "5.53",
"created_at": "2019-06-11T18:12:58+02:00",
"updated_at": "2019-06-11T18:12:58+02:00",
"format": "0.75",
"wine": "Chateau Cantenac Brown",
"wine-id": 123
}
Edit a Wine Price
This endpoint lets you edit a wine price.
HTTP Request
PUT /v1/wine-prices
Example
- Request
- Response
$ curl --request PUT --url 'https://app.winesitting.com/v1/wine-prices' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"price": "8",
"format": "0.75",
"wine_id": 15777
},
'
{
"id": 10227,
"price": "8",
"created_at": "2019-06-11T18:12:58+02:00",
"updated_at": "2019-06-11T18:12:58+02:00",
"format": "0.75",
"wine": "Chateau Cantenac Brown",
"wine-id": 123
}
Wine Price parameters
Name | Required | Type | Details |
---|---|---|---|
format | required | string | ex: 0.75 |
wine_id | required | int | |
price | required | string |
Delete a Wine Price
This endpoint lets you delete a wine price.
HTTP Request
DELETE /v1/wine-prices
Parameters
Name | Required | Type | Details |
---|---|---|---|
format | required | string | ex: 0.75 |
wine_id | required | int |
Example
- Request
- Response
$ curl --request DELETE --url 'https://app.winesitting.com/v1/wine-prices' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"format": "0.75",
"wine_id": 15777
},
'
{
"result": "success",
"message": "Price is successfully deleted"
}