API-Documentation - Wines

Wines

This module delivers all wine information.

Function overview

add Create new wine.
downloadExpertise Download expertise pdf file.
edit Edit wine data.
get Access wine data of one wine by id.
getAll Get all wines.
getAll Retrieve publicly visible wines.
getByCategory Get all wines of category.
getByType Get all wines of type.
getExpertise Get expertise pdf info.
getFilters Get distinct filter values for given fields.
getPublic Access wine data of one wine by id or hash.
search Search within wines of current customer.
search Search wines.
add - Create new wine.post

Create new wine.

Url

/service/wines/add

Parameter

Field Type Description
data Array

Wine data.

[data.origin_id] int

ID of existing wine record. If a wine is translated, set this field to mark the new record as translation for given source wine. Keep in mind, that data.language must be different from source.

( Optional. )

[data.language] String

Lowercase ISO 639-1 language code.

( Optional. Default value: de )

data.countrycode String

Lowercase ISO 3166-1 Alpha-2 country code.

data.region int

Wine region the wine originates from. This field is only valid in combination with data.countrycode. For possible values please refer to https://api.vinou.de/localization/de/wineregions.

[data.vintage] int

Wine vintage.

( Optional. )

data.name String

Wine name.

[data.description] String

Wine description.

( Optional. )

data.type String

Type of wine. For possible values please refer to https://api.vinou.de/localization/de/winetypes.

[data.taste_id] int

ID reference to wines taste. For possible values please refer to https://api.vinou.de/localization/de/tastes.

( Optional. )

[data.winery_id] int

ID of existing winery record. Defaults to your own winery.

( Optional. )

[data.quality] String

Quality of wine. This field is only valid in combination with data.countrycode. For possible values please refer to https://api.vinou.de/localization/de/qualitytypes.

( Optional. )

[data.quality_note] String

Additional quality description.

( Optional. )

[data.categoryIds] int[]

ID list of existing category records.

( Optional. )

[data.grapetypeIds] int[]

ID reference list to wine grape types. For possible values please refer to https://api.vinou.de/localization/de/grapetypes.

( Optional. )

[data.allergenIds] int[]

ID reference list to allergen types. For possible values please refer to https://api.vinou.de/localization/de/allergens.

( Optional. )

[data.bio] int

Whether wine is biologically produced 1 or not 0.

( Optional. )

[data.vegan] int

Whether wine is vegan 1 or not 0.

( Optional. )

[data.cuvee] int

Whether wine shall be marked as cuvee 1 or not 0.

( Optional. )

[data.bottlesize] Decimal

Size of wine containing bottle. For possible values please refer to https://api.vinou.de/localization/de/bottleSizes.

( Optional. )

[data.weight] int

Weight of one bottle of this wine in grams.

( Optional. )

[data.cap] String

Cap type of wine. For possible values please refer to https://api.vinou.de/localization/de/wine/cap_types.

( Optional. )

[data.alcohol] Decimal

Wine alcohol strength.

( Optional. )

[data.sweetness] Decimal

Wine residual sugar.

( Optional. )

[data.acid] Decimal

Wine acidity.

( Optional. )

[data.place] String

Description of wine growing place.

( Optional. )

[data.terroir] String

Description of soil character.

( Optional. )

[data.maturation] String

Description of wine maturation process.

( Optional. )

[data.bottling_type] String

Bottling type of wine. For possible values please refer to https://api.vinou.de/localization/de/wine/bottlingTypes.

( Optional. )

[data.drinktemperature] String

Recommended drinking temperature.

( Optional. )

[data.network] int

Whether wine is visible in Vinou Network 1 or not 0.

( Optional. )

[data.internal] int

Whether wine is visible through service API 1 or not 0.

( Optional. Default value: 1 )

[data.public] int

Whether wine is publicly visible 1 or not 0.

( Optional. Default value: 1 )

[data.shop] int

Whether wine is visible in your Vinou Shop (if any) 1 or not 0.

( Optional. )

[data.winesearch] int

Whether wine is visible to wine search engine WINESEARCH.io 1 or not 0.

( Optional. )

[data.topseller] int

Whether to mark this wine as topseller 1 or not 0.

( Optional. )

[data.sorting] int

Custom sort index to allow externally defined item ordering.

( Optional. )

[data.gtin] String

GTIN or EAN code of wine. This information will be used to generate wine bar codes.

( Optional. )

[data.articlenumber] String

Wine article number or SKU.

( Optional. )

[data.net] Decimal

Net price.

( Optional. )

[data.taxrate] int

Taxrate in percent.

( Optional. )

[data.tax] Decimal

Calculated tax amount from data.net and data.taxrate.

( Optional. )

[data.gross] Decimal

Gross price as sum of data.net and data.tax.

( Optional. )

[data.prices] Object[]

Additional price range based prices.

( Optional. )

data.prices.price_range_id int

ID of existing price range record.

data.prices.net Decimal

Net price.

data.prices.taxrate int

Taxrate in percent.

data.prices.tax Decimal

Calculated tax amount from data.net and data.taxrate.

data.prices.gross Decimal

Gross price as sum of data.net and data.tax.

[data.nostock] int

Whether to mark this wine as out of stock 1 or not 0.

( Optional. )

[data.nostocktext] String

Custom text to show e.g. in shops, when wine is marked as out of stock.

( Optional. )

Request-Example including all optional parametes.

{
	"data": {
		"origin_id": null,
		"language": "de",
		"countrycode": "de",
		"region": 1004,
		"vintage": 2019,
		"name": "Bianca Cuvee 2019",
		"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
		"type": "white",
		"taste_id": 3,
		"winery_id": 463,
		"quality": "singlesite",
		"quality_note": "QXX",
		"categoryIds": [
			232,
			289
		],
		"grapetypeIds": [
			2,
			188
		],
		"allergenIds": [
			5,
			2
		],
		"bio": 1,
		"vegan": 1,
		"cuvee": 1,
		"bottlesize": "0.750",
		"weight": 1000,
		"cap": "screw",
		"alcohol": "12.0",
		"sweetness": "9.0",
		"acid": "6.1",
		"place": "Steilhang",
		"terroir": "Schieferbruch",
		"maturation": "1 Jahr im Barrique",
		"bottling_type": "producer",
		"drinktemperature": "9-11",
		"network": 1,
		"internal": 1,
		"public": 1,
		"shop": 1,
		"winesearch": 1,
		"topseller": 1,
		"sorting": "2",
		"gtin": "012345678912"
		"articlenumber": "0123456789",
		"net": "10.00",
		"taxrate": 19,
		"tax": "1.90",
		"gross": "11.90",
		"prices": [
			{
				"net": "8.00",
				"taxrate": 19,
				"tax": "1.52",
				"gross": "9.52",
				"price_range_id": 20
			},
			{
				"net": "7.00",
				"taxrate": 19,
				"tax": "1.33",
				"gross": "8.33",
				"price_range_id": 21
			}
		],
		"nostock": 1,
		"nostocktext": "Ausgetrunken"
	}
}
downloadExpertise - Download expertise pdf file.get

Download expertise pdf file.

Url

/PDF/{:wineId}/{:expertiseFileName.pdf}

Parameter

Field Type Description
wineId int

Id of Wine.

expertiseFileName String

File name of expertise as stored within wine record. Additionally this information can be fetched through /wines/getExpertise route.

edit - Edit wine data.post

Edit wine data

See /service/wines/add for available parameters.

Url

/service/wines/edit

Parameter

No parameter available for this function

get - Access wine data of one wine by id.post

Access wine data of one wine by id.

Url

/secured/wines/get

Parameter

Field Type Description
[id] int

Unique wine ID.

( Optional. )

[path_segment] String

Unique wine slug.

( Optional. )

[settings.resolverelations] Boolean

Wether to include winery record in result, or not.

( Optional. Default value: false )

HTTP/1.1 200 OK
{
	"info": "success",
	"data": {
		"id": 4065,
		"name": "Bianca Cuvee 2019",
		"articlenumber": "0123456789",
		"taste_id": 3,
		"vintage": 2019,
		"alcohol": "12.0",
		"sweetness": "9.0",
		"acid": "6.1",
		"bottlesize": "0.750",
		"drinktemperature": "9-11",
		"gross": "11.90",
		"net": "10.00",
		"tax": "1.90",
		"taxrate": 19,
		"place": "Steilhang",
		"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
		"image": null,
		"pdf": "bianca-cuvee-2019.pdf",
		"active": 1,
		"type": "white",
		"region": 1004,
		"countrycode": "de",
		"cuvee": 1,
		"nostock": 0,
		"nostocktext": null,
		"quantity": null,
		"quality": "singlesite",
		"quality_note": "QXX",
		"bottling_type": "producer",
		"path_segment": "0123456789-bianca-cuvee-2019-fhl7",
		"customers_id": 289,
		"origin_id": null,
		"language": "de",
		"cruser_id": 75,
		"crstamp": "2020-01-01 10:00:00",
		"chstamp": "2020-01-01 10:00:00",
		"winery_id": 463,
		"weight": 1000,
		"gtin": "012345678912",
		"terroir": "Schieferbruch",
		"maturation": "1 Jahr im Barrique",
		"cap": "screw",
		"bio": 1,
		"vegan": 1,
		"sorting": 2,
		"topseller": 1,
		"network": 1,
		"internal": 1,
		"public": 1,
		"shop": 1,
		"winesearch": 1,
		"expertisePdf": "/PDF/4065/bianca-cuvee-2019.pdf",
		"translations": [],
		"prices": [
			{
				"wine_id": 4065,
				"price_range_id": 21,
				"gross": "8.33",
				"taxrate": 19,
				"tax": "1.33",
				"net": "7.00",
				"priceRangeName": "Export"
			},
			{
				"wine_id": 4065,
				"price_range_id": 20,
				"gross": "9.52",
				"taxrate": 19,
				"tax": "1.52",
				"net": "8.00",
				"priceRangeName": "Gastronomie"
			}
		],
		"winery": {
			"id": 463,
			"name": "Julia Heimsch",
			"company": "Musterweingut Vinou",
			"taxid": null,
			"address": "Mombacher Str. 68",
			"zip": "55122",
			"city": "Mainz",
			"region": null,
			"countrycode": "de",
			"mail": "kontakt@vinou.de",
			"phone": "061 31 - 62 45 39 0",
			"image": "/images/289/Wineries/463/Image/1568187421-musterlogo.png",
			"freetext": null,
			"fax": null,
			"www": null,
			"vineyard": null,
			"harvest": null,
			"bestplaces": null,
			"memberof": null,
			"charindex": null,
			"sorting": 0,
			"customers_id": 289,
			"crstamp": "2020-01-01 09:00:00",
			"cruser_id": null,
			"chstamp": "2020-01-01 09:00:00",
			"active": 1,
			"network": 1,
			"internal": 1,
			"public": 1
		},
		"categoryIds": [
			232,
			289
		],
		"allergenIds": [
			2,
			5
		],
		"grapetypeIds": [
			2,
			188
		]
	}
}
getAll - Get all wines.post

Access all wines from the customer that registered the token.

Url

/service/wines/getAll

Parameter

Field Type Description
[orderBy] String

Comma separated list of wine fields to sort result. Each field may be succeeded by string "ASC", to sort in ascending order or "DESC", to sort in descending order.

( Optional. Default value: chstamp DESC, name ASC )

[page] int

Page number to fetch.

( Optional. Default value: 1 )

[pageSize] int

Number of records per result page. Maximum page size is 100.

( Optional. Default value: 16 )

[query] String|Object

Result filter query. If string given, all searchable wine fields are checked for non case sensitive containment of query phrase. If object given, you may define separate search phrases for any record field to search in. E.g. to seach for wines of vintage 2019 showing the word "Riesling" in name the request might look like: { "query": { "vintage": 2019, "name": "Riesling" } } Please note, that when using query parameter, the result may also include records of other languages.

( Optional. )

[inshop] int

Return only entries visible in shop.

( Optional. )

[inwinelist] int

Return only publicly visible entries.

( Optional. )

[qrcodes] int

Include qrcode relations within result.

( Optional. )

Request-Example

{
	"orderBy": "vintage DESC, countrycode, region",
	"page": 2,
	"pageSize": 100,
	"query": "Riesling",
	"inshop": 1,
	"inwinelist": 1,
	"qrcodes": 1
}
getAll - Retrieve publicly visible wines.post

Retrieve publicly visible wines.

Url

/wines/getAll

Parameter

Field Type Description
[page] int

Page number to fetch.

( Optional. Default value: 1 )

[pageSize] int

Number of records per result page. Maximum page size is 100.

( Optional. Default value: 16 )

[query] String|Object

Result filter query. If string given, all searchable wine fields are checked for non case sensitive containment of query phrase. If object given, you may define separate search phrases for any record field to search in. E.g. to seach for wines of vintage 2019 showing the word "Riesling" in name the request might look like: { "query": { "vintage": 2019, "name": "Riesling" } } Please note, that when using query parameter, the result may also include records of other languages.

( Optional. )

[filter] Object

Field filter. You may define values for any field to filter. E.g. to filter for wines of vintage 2019 with the name "Riesling" the request might look like: { "filter": { "vintage": 2019, "name": "Riesling" } }

( Optional. )

[winery_id] int

Filter result by winery id.

( Optional. )

getByCategory - Get all wines of category.post

Access all wines from a given category id.

DEPRECATED

Use /wines/getAll instead und set query to filter by categoryIds field.

Url

/wines/getByCategory

Parameter

Field Type Description
id Integer

Id of category.

[sortBy] String

Property to sort the entries.

( Optional. )

[sortDirectition] String

Either ASC or DESC to manage sorting.

( Optional. Default value: ASC )

Request-Example

 {
		"id": 1234,
		"sortBy": "crstamp",
		"sortDirection": "DESC"
 }
getByType - Get all wines of type.post

Access all wines from a given type key.

DEPRECATED

Use /wines/getAll instead und set query to filter by type field.

Url

/service/wines/getByType

Parameter

Field Type Description
type String

Wine type to fetch wines for.

[start] int

Start index for list.

( Optional. )

[max] int

Maximum count of entries.

( Optional. )

Request-Example

 {
	"type": "white",
	"start": 10,
	"max": 5
 }
getExpertise - Get expertise pdf info.post

Get expertise pdf info of specific wine.

Url

/wines/getExpertise

Parameter

Field Type Description
id int

Id of Wine.

HTTP/1.1 200 OK
{
 "pdf": "/PDF/185/Binary Riesling.pdf",
 "templateFile": "/var/www/CustomerData/14/Settings/Expertisetemplate/expertise-neu.vin",
 "template-date": 1501756559,
 "wine-date": 1505165324,
 "existingPDF-data": 1505172526,
 "action": "deliver existing PDF"
}
getFilters - Get distinct filter values for given fields.post

Get distinct filter values for given fields.

Url

/wines/getFilters

Parameter

Field Type Description
filter Array

Array of field names to get filter values for.

getPublic - Access wine data of one wine by id or hash.post

Access wine data of one wine by id or hash.

Url

/wines/getPublic

Parameter

Field Type Description
[id] Integer

Unique wine ID.

( Optional. )

[hash] String

Unique wine hash.

( Optional. )

search - Search within wines of current customer.post

Search within wines of current customer.

See /service/wines/getAll for available parameters.

Url

/service/wines/search

Parameter

No parameter available for this function

search - Search wines.post

Search wines.

See /wines/getAll for available parameters.

Url

/wines/search

Parameter

No parameter available for this function

© 2021 Vinou GmbH, Mombacher Straße 68, 55122 Mainz, Germany