List of voucher types
Retrieves all possible voucher types.
GET https://api.e-guma.ch/v1/esurprise/voucher_types?apikey={api-key}
Parameters
api-keyrequired |
Response
id | The ID of the voucher type. Used to create an order. |
name | Name of the voucher type in all available languages. The name doesn't contain HTML. |
description_html | Description of the voucher type in all available languages. The content is HTML. |
is_value_voucher | Indicates whether the voucher is a value voucher |
list_price_in_cents | Price without discount. It is null if the voucher is a value voucher. Use price_in_cents for discounted price. |
discount | Information if there is a discount. Equals null if there is no discount. See discount object below for more information. |
price_in_cents | Price of the voucher in cents. It is null if the voucher is a value voucher. Discounts are included in this price. |
images | List of all image sources. The first one is the primary image. The images have a minimum resolution of 600 x 500px. We use the imgix service to deliver the images. The images can be resized using the following url parameters: fit=crop&w=X&h=Y. The full list of parameters can be found here. |
provider | Information for the provider of the voucher type. See provider object below for more information. |
Provider
name | Company name of the provider |
city | City of the provider |
canton_short | Canton of the provider ie. ZH |
description | Description of the provider in all available languages |
Discount
discount_percentage | Percentage off list price |
Example
GET https://api.e-guma.ch/v1/voucher_types?&apikey=5bb668e394f2811f3ca4a9db
[
{
"id": "c8d3d305-9655-4d19-9ecb-f2993c288481",
"name": {
"fr": "Frühstücksbuffet",
"en": "Frühstücksbuffet",
"de": "Frühstücksbuffet"
},
"description_html": {
"fr": "aaaa<br><br>Schenken Sie mit einem Gutschein für ein köstliches und ausgiebiges Frühstück einen guten Start in den Tag.\n<br>\n<br>\nDas Frühstücksbuffet ist täglich von 7.00 Uhr bis 10.30 Uhr geöffnet.",
"en": "aaaa<br><br>Schenken Sie mit einem Gutschein für ein köstliches und ausgiebiges Frühstück einen guten Start in den Tag.\n<br>\n<br>\nDas Frühstücksbuffet ist täglich von 7.00 Uhr bis 10.30 Uhr geöffnet.",
"de": "aaaa<br><br>Schenken Sie mit einem Gutschein für ein köstliches und ausgiebiges Frühstück einen guten Start in den Tag.\n<br>\n<br>\nDas Frühstücksbuffet ist täglich von 7.00 Uhr bis 10.30 Uhr geöffnet."
},
"is_value_voucher": false,
"list_price_in_cents":5000
"discount": {
"discount_percentage": 10.0
},
"price_in_cents": 4500,
"images": [
{
"src": "//eguma-dev.imgix.net/6213/thumbs/d04e1ac52e12407893dba2f27595c4b3.jpg"
},
{
"src": "//eguma-dev.imgix.net/6213/thumbs/ed247662f73b4a37b3953d01635c2b6c.jpeg"
},
{
"src": "//eguma-dev.imgix.net/6213/thumbs/587553419b4845f18ce64853b5e0dd94.jpeg"
},
{
"src": "//eguma-dev.imgix.net/6213/thumbs/4eb6f411f18245aebcc22daf069ab63d.jpeg"
},
{
"src": "//eguma-dev.imgix.net/6213/thumbs/ab0d1a28f3384a1da29568beffe9a9e9.jpeg"
},
{
"src": "//eguma-dev.imgix.net/6213/thumbs/6bc0e0f9b06f459d8118799c48278e45.jpeg"
}
],
"provider": {
"name": "Beethoven Palace",
"city": "Zürich",
"canton_short": "ZH",
"description": {
"de": "Das ist die Beschreibung des Betriebs",
"en": "Description",
"fr": "Déscription"
}
}
}
]
Updated over 1 year ago