Retrieve a Voucher Type
GET https://api.e-guma.ch/v1/voucher_types/{id}?apikey={api-key}Retrieves a single voucher type. Supply the ID of a voucher type from the List of Voucher Types and the API returns the corresponding voucher type object.
Parameters
| Parameter | Description |
|---|---|
| id | required - ID of the voucher type, see List of Voucher Types. |
| api-key | required - The API key required to authenticate the request. |
Response
A voucher type object with the same fields as an entry of the list.
Status codes
| Code | Description |
|---|---|
| 200 | The voucher type. |
| 401 | The API key is missing or invalid. |
| 404 | No voucher type with this ID exists for the account of the API key. |
Example
GET https://api.e-guma.ch/v1/voucher_types/31b75e37-5bb1-44f1-b2bf-4d2ba2a93d4c?apikey=5bb668e394f2811f3ca4a9db{
"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"
}Updated about 20 hours ago
