Voucher Information
Use this endpoint only to display the information of a voucher in your app.
GET https://api.e-guma.ch/v1/vouchers/{code}/info.json?apikey={api-key}
Parameters
coderequired | The alphanumeric code of the voucher. The code has 12 characters. You can pass the code with (e.g. ABCD-ABCD-ABCD) or without (e.g. ABCDABCDABCD) dashes. Please use url_encode for the code as it might contain special characters. |
api-keyrequired |
Return
code | The same voucher code as you provided as parameter |
name | The name of the voucher |
description | The description of the voucher |
is_redeemed | Indicates if the voucher is already redeemed |
balance_in_cents | Amount in cents. Maison (PR) vouchers can have 0 as value. |
valid_until | The date the voucher expires (ISO 8601 format) |
Example
GET https://api.e-guma.ch/v1/vouchers/QH5MR5565577/info.json?apikey=510e32c594d84816a4af9df1
{
"code": "QH5MR5565577",
"name": "Value voucher CHF 12.–",
"description": "Feel free to redeem this voucher all according to your preferences.",
"balance_in_cents": 1200,
"is_redeemed": false,
"valid_until": "2022-12-31T00:00:00"
}
Updated 2 months ago