List of Voucher Types

GET https://api.e-guma.ch/v1/voucher_types?apikey={api-key}

Parameters

ParameterDescription
api-keyrequired - The API key required to authenticate the request.

Response

Voucher Type

ParameterDescription
idID of the voucher type.
nameName of the voucher type in all available languages.
description_htmlDescription in HTML format in all available languages.
publishedIf this value is false, it cannot be sold.
published_in_online_shopIndicates whether the voucher type is marked for online sale. If you are building an online store, you should check this value.
hidden_in_online_shopIndicates 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_outtrue 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_contingentNumber 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_urlImage 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.
urlURL 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.
typeSee the different types here.
minimum_amount_in_centsThe minimum amount for a value voucher. Only applies if the type is value_voucher.
maximum_amount_in_centsThe maximal amount for a value voucher. Only applies if the type is value_voucher.
price_in_centsThe price for a voucher type for a package. Only applies if the type is package.
variant_nameThe name for the selection of variants in all available languages. Only available if the type is variants.
variantsList of the different variants. Only available if the type is variants.
updated_atDate of the last change of the voucher type. The API returns this value in ISO 8601 format.

Type

value_voucherIndicates that this is a value voucher. minimum_amount_in_cents and maximum_amount_in_cents define the amount a voucher may have.
packageIndicates that this is a voucher type for a package which has a fixed amount. price_in_cents shows the price.
variantsIndicates 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.
otherThe 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

idThe ID of the variant.
nameThe name of the variant in all available languages.
price_in_centsThe price of the variant.
pre_selectedSpecifies 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"
  }
]