Developers - REST API v1

Balance

URL

GET https://api.e-guma.ch/v1/vouchers/{code}/balance.json?apikey={api-key}

Parameters

code required There are two possible inputs:
  • 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.
  • A voucher2mobile - ShortCode
api-key required

Returns

code The voucher code. If you sent a voucher2mobile - ShortCode it will return the voucher code of this ShortCode.

Use this code for further operations (e.g. for the redeem request, print on the receipt, store in the database). Don't use the code which was entered by the user.
is_redeemable Indicates if the requested voucher can be redeemed. If the voucher can't be redeemed, you find the reason in message.
Some reasons
  • it was not found
  • it's not paid
  • it's already redeemed
  • it's a proforma voucher
balance_in_cents Amount in cents. Maison (PR) vouchers can have 0 as value.
total_amount_in_cents Total-amount in cents. Maison (PR) vouchers can have 0 as value.
message If the voucher is not redeemable the message contains the reason why the requested voucher can't be redeemed. The message is returned in the client's default language.

Example

Request (GET)
https://api.e-guma.ch/v1/vouchers/JWCPP7QV25S4/balance.json?apikey=510e32c594d84816a4af9df1
Response
{
  "code":"JWCPP7QV25S4",
  "is_redeemable":true,
  "balance_in_cents":40000,
  "total_amount_in_cents":40000,
  "message":""
}

Kontakt

Idea Creation GmbH
Walchestrasse 15
8006 Zürich
Tel. +41 44 500 54 00
info@e-guma.ch

Support
support@e-guma.ch
TeamViewer herunterladen

Social Media