List of Voucher Types
GET https://api.e-guma.ch/v1/voucher_types?apikey={api-key}Parameters
| Parameter | Description |
|---|---|
| api-key | required - The API key required to authenticate the request. |
Response
Voucher Type
| Parameter | Description |
|---|---|
| id | ID of the voucher type. |
| name | Name of the voucher type in all available languages. |
| description_html | Description in HTML format in all available languages. |
| published | If this value is false, it cannot be sold. |
| published_in_online_shop | Indicates whether the voucher type is marked for online sale. If you are building an online store, you should check this value. |
| hidden_in_online_shop | Indicates whether the voucher type is hidden in the online shop. A hidden voucher type is not listed in the online shop, but it can still be ordered through its url. If you present the voucher offering publicly, only show voucher types where published_in_online_shop is true and hidden_in_online_shop is false. |
| sold_out | true once the contingent of the voucher type is exhausted and no further vouchers can be ordered. Always false for voucher types without a contingent. Only offer a voucher type when published_in_online_shop is true and sold_out is false. |
| remaining_contingent | Number of vouchers of this type that can still be ordered. null for voucher types without a contingent. The value changes with every order, so request it each time you display the offer, for example as Only 73 left. |
| image_url | Image URL of the voucher type. Here is how to display this image correctly on a web page. The image is optimized for a 6:5 ratio and has a resolution of at least 600 x 500px. |
| url | URL of the voucher type's page in the online shop in all available languages. Use it to link your customers directly to the voucher type, for example with an Order now button. The value is empty for voucher types that have no page in the online shop. |
| type | See the different types here. |
| minimum_amount_in_cents | The minimum amount for a value voucher. Only applies if the type is value_voucher. |
| maximum_amount_in_cents | The maximal amount for a value voucher. Only applies if the type is value_voucher. |
| price_in_cents | The price for a voucher type for a package. Only applies if the type is package. |
| variant_name | The name for the selection of variants in all available languages. Only available if the type is variants. |
| variants | List of the different variants. Only available if the type is variants. |
| updated_at | Date of the last change of the voucher type. The API returns this value in ISO 8601 format. |
Type
| value_voucher | Indicates that this is a value voucher. minimum_amount_in_cents and maximum_amount_in_cents define the amount a voucher may have. |
| package | Indicates that this is a voucher type for a package which has a fixed amount. price_in_cents shows the price. |
| variants | Indicates that this is a voucher type with several variants. variant_name contains the name of the variant and variant_name a list of the different variants. |
| other | The type other means that the voucher type is not precisely specified. Please note that these voucher types cannot be issued via the Create Order API |
Variant
| id | The ID of the variant. |
| name | The name of the variant in all available languages. |
| price_in_cents | The price of the variant. |
| pre_selected | Specifies whether this variant should be preselected. It is possible that this value is not set for any variant. |
Example
GET https://api.e-guma.ch/v1/voucher_types?&apikey=5bb668e394f2811f3ca4a9db[
{
"id": "05f400c1-0a61-4f1b-8387-6f4150c85a2c",
"name": {
"de": "Gourmet-Abend für zwei",
"en": "Gourmet evening for two"
},
"description_html": {
"de": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
},
"published": true,
"published_in_online_shop": true,
"hidden_in_online_shop": false,
"sold_out": false,
"remaining_contingent": null,
"image_url": "https://images.e-guma.ch/4214/thumbs/95eb6cb0eae045d59bb486578f1bc98d.jpg",
"url": {
"de": "https://shop.e-guma.ch/demo-hotel/de/gutscheine/28311/gourmet-abend-fuer-zwei",
"en": "https://shop.e-guma.ch/demo-hotel/en/gift-vouchers/28311/gourmet-evening-for-two"
},
"type": "package",
"minimum_amount_in_cents": 0,
"maximum_amount_in_cents": 0,
"price_in_cents": 30000,
"variant_name": {},
"variants": [],
"updated_at": "2024-05-14T03:27:28"
},
{
"id": "25a6e7da-8efa-4565-8d32-22917fb65568",
"name": {
"de": "Sonntagsbrunch",
"en": "Sunday brunch"
},
"description_html": {
"de": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
},
"published": true,
"published_in_online_shop": true,
"hidden_in_online_shop": false,
"sold_out": false,
"remaining_contingent": null,
"image_url": "https://images.e-guma.ch/4214/thumbs/95eb6cb0eae045d59bb486578f1bc98d.jpg",
"url": {
"de": "https://shop.e-guma.ch/demo-hotel/de/gutscheine/28312/sonntagsbrunch",
"en": "https://shop.e-guma.ch/demo-hotel/en/gift-vouchers/28312/sunday-brunch"
},
"type": "variants",
"minimum_amount_in_cents": 0,
"maximum_amount_in_cents": 0,
"price_in_cents": 0,
"variant_name": {
"de": "Personen",
"en": "Persons"
},
"variants": [
{
"id": "Child",
"name": {
"de": "1 Kind (6-16 Jahre)",
"en": "1 Child (6-16 years)"
},
"price_in_cents": 2000,
"pre_selected": false
},
{
"id": "Adult",
"name": {
"de": "1 Erwachsene Person",
"en": "1 Adult"
},
"price_in_cents": 4000,
"pre_selected": true
}
],
"updated_at": "2024-05-14T06:13:05"
},
{
"id": "31b75e37-5bb1-44f1-b2bf-4d2ba2a93d4c",
"name": {
"de": "Übernachtung",
"en": "Overnight Stay"
},
"description_html": {
"de": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
},
"published": true,
"published_in_online_shop": true,
"hidden_in_online_shop": true,
"sold_out": false,
"remaining_contingent": 73,
"image_url": "https://images.e-guma.ch/4214/thumbs/95eb6cb0eae045d59bb486578f1bc98d.jpg",
"url": {
"de": "https://shop.e-guma.ch/demo-hotel/de/gutscheine/28313/uebernachtung",
"en": "https://shop.e-guma.ch/demo-hotel/en/gift-vouchers/28313/overnight-stay"
},
"type": "other",
"minimum_amount_in_cents": 0,
"maximum_amount_in_cents": 0,
"price_in_cents": 0,
"variant_name": {},
"variants": [],
"updated_at": "2024-05-14T03:40:03"
},
{
"id": "846b5014-8577-47b8-b4ff-39e76b5d08f5",
"name": {
"de": "Wertgutschein",
"en": "Value voucher"
},
"description_html": {
"de": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
},
"published": true,
"published_in_online_shop": true,
"hidden_in_online_shop": false,
"sold_out": false,
"remaining_contingent": null,
"image_url": "https://images.e-guma.ch/4214/thumbs/95eb6cb0eae045d59bb486578f1bc98d.jpg",
"url": {
"de": "https://shop.e-guma.ch/demo-hotel/de/gutscheine/28314/wertgutschein",
"en": "https://shop.e-guma.ch/demo-hotel/en/gift-vouchers/28314/value-voucher"
},
"type": "value_voucher",
"minimum_amount_in_cents": 2000,
"maximum_amount_in_cents": 300000,
"price_in_cents": 0,
"variant_name": {},
"variants": [],
"updated_at": "2024-05-14T06:18:07"
}
]Updated 8 days ago
