Skip to content

Voucher API (Gutscheine)

The Voucher API is the programmatic interface to APRO’s central voucher ledger — the same system that powers in-store gift cards, online voucher shops, and loyalty credit. Balances are authoritative server-side; every operation returns the updated voucher so the caller never has to track state locally.

Amounts

All monetary fields are integer minor units (cents) — 5000 means € 50.00. balance is the currently-available amount; amount is the original face value; maxAmount (optional) caps the ceiling for top-ups.

Voucher shape

The voucher object appears in every response. Fields:

FieldTypeDescription
idGUIDInternal APRO voucher ID. Use this in URL paths.
voucherCodestringHuman-readable code printed on the card/receipt.
gift.amountintegerOriginal face value (minor units).
gift.balanceintegerAvailable balance (minor units).
gift.maxAmountinteger | nullCeiling for top-ups; null = uncapped.
codeIdstring | nullOptional secondary identifier.
startDateISO 8601 | nullNot valid before.
expirationDateISO 8601 | nullNot valid after.
enabledboolfalse = manually disabled/blocked.
commentstring | nullFree-form staff note.
categoryIdintegerVoucher category (issuing channel).
categoryNamestringCategory display name.
categoryNrOfTimesRedeemablePerUnitinteger | nullCategory-level redemption-count cap.
categoryExternalPaymentProviderIdstring | nullUpstream payment-provider reference.
createdAtISO 8601When the voucher was issued.
discriminatorstring"GiftVoucherDto" for gift cards.

1. List vouchers

GET https://cloudgateway.apro.at/voucherservice/api/v1/vouchers

Returns every voucher visible to the API key. Use the validity endpoint instead when you just need to look up one code — it’s indexed for that path.

2. Check validity

GET https://cloudgateway.apro.at/voucherservice/api/v1/vouchers/validity
?voucherCode=560620085

Query parameters

NameTypeRequiredDescription
voucherCodestringThe code printed on the voucher.

Example response

200 OK
{
"voucher": {
"gift": { "amount": 5000, "balance": 3880, "maxAmount": null },
"id": "f5f4d577-3764-4c25-12f8-08db73dad741",
"voucherCode": "560620085",
"codeId": null,
"startDate": null,
"expirationDate": null,
"enabled": true,
"comment": null,
"categoryId": 4,
"categoryName": "OnlineGutschein",
"categoryNrOfTimesRedeemablePerUnit": null,
"categoryExternalPaymentProviderId": null,
"createdAt": "2023-06-23T11:13:15.6386753",
"discriminator": "GiftVoucherDto"
},
"errors": [],
"isValid": true
}

Download: voucher-validity-response.json

isValid: false + a populated errors array indicates why the voucher cannot be redeemed right now (expired, disabled, wrong date window, redemption cap reached). Common error codes:

ErrorMeaning
NotFoundvoucherCode does not exist.
ExpiredPast expirationDate.
NotYetStartedBefore startDate.
Disabledenabled = false.
NoBalancebalance == 0.
CategoryCapReachedcategoryNrOfTimesRedeemablePerUnit exhausted.

3. Issue a voucher

POST https://cloudgateway.apro.at/voucherservice/api/v1/vouchers/gifts

Creates a new gift voucher. On success the HTTP status is 201 Created and the response Location header points at the new resource.

Request body

FieldTypeRequiredDescription
categoryIdintegerWhich voucher category to issue under.
voucherCodestringCode to print on the voucher. Must be unique.
commentstringStaff note.
gift.amountintegerFace value in minor units.
gift.maxAmountintegerTop-up ceiling.
clientTypestringIdentifier of the calling system. Provided by APRO for your integration — see clientType.
clientContextstring (JSON)Serialised JSON for side-channel context (outlet etc.).
startDateISO 8601Not valid before.
expirationDateISO 8601Not valid after.

Example request

POST /voucherservice/api/v1/vouchers/gifts
{
"categoryId": 1,
"voucherCode": "2131231",
"comment": "Gift card — reprint for a lost original",
"gift": { "amount": 50, "maxAmount": 10000 },
"clientType": "<provided-by-apro>",
"clientContext": "{\"outletId\":\"231231\"}",
"startDate": "2026-01-01T00:00:00",
"expirationDate": "2028-12-31T23:59:59"
}

Download: voucher-issue-request.json

Example response

201 Created
{
"data": {
"gift": { "amount": 50, "balance": 50, "maxAmount": 10000 },
"id": "e961c17d-d037-4d27-734d-08ddda944e39",
"voucherCode": "2131231",
"categoryId": 1,
"categoryName": "Standard",
"enabled": true,
"comment": "Gift card — reprint for a lost original",
"startDate": "2026-01-01T00:00:00",
"expirationDate": "2028-12-31T23:59:59",
"createdAt": "2026-04-20T21:33:00.000+02:00",
"discriminator": "GiftVoucherDto"
}
}

Download: voucher-issue-response.json

4. Redeem a voucher

POST https://cloudgateway.apro.at/voucherservice/api/v1/vouchers/{voucherId}/redemption

Burns amount minor units off the balance. Path parameter is the voucher’s internal id (not the voucherCode) — you get it from /validity.

Request body

FieldTypeRequiredDescription
redemption.amountintegerAmount to debit in minor units.
clientReferencestringOpaque trace string (e.g. "{ \"waiterId\": 10 }"). Stored and returned on the transaction.
clientContextstring (JSON)Side-channel context.
commentstringStaff note.
clientTypestringIdentifier of the calling system. Provided by APRO — see clientType.

Example request

POST /voucherservice/api/v1/vouchers/{id}/redemption
{
"redemption": { "amount": 50 },
"clientReference": "{ \"waiterId\": 10 }",
"clientContext": "{\"outletId\":\"231231\"}",
"comment": "Redeemed at Bar 2 against receipt 5906",
"clientType": "<provided-by-apro>"
}

Download: voucher-redeem-request.json

Example response

200 OK
{
"data": {
"redemption": { "amount": 50, "items": [] },
"success": true,
"errors": [],
"transactionId": 21142,
"voucher": {
"gift": { "amount": 5000, "balance": 3830, "maxAmount": null },
"id": "f5f4d577-3764-4c25-12f8-08db73dad741",
"voucherCode": "560620085",
"categoryId": 4,
"categoryName": "OnlineGutschein",
"enabled": true,
"discriminator": "GiftVoucherDto"
}
}
}

Download: voucher-redeem-response.json

The transactionId (integer) is the authoritative ID for this redemption — persist it for reconciliation and refunds.

5. Top up a voucher

POST https://cloudgateway.apro.at/voucherservice/api/v1/vouchers/{voucherId}/booking

Adds amount minor units back onto the voucher, e.g. when a customer re-charges a multi-use card or a refund flows back.

Request body

FieldTypeRequiredDescription
amountintegerAmount to credit in minor units. Must respect gift.maxAmount if set.
clientReferencestringOpaque trace string.
clientTypestringIdentifier of the calling system. Provided by APRO — see clientType.
clientContextstring (JSON)Side-channel context.
commentstringStaff note.

Example request

POST /voucherservice/api/v1/vouchers/{id}/booking
{
"amount": 1000,
"clientReference": "{ \"waiterId\": 10 }",
"clientType": "<provided-by-apro>",
"clientContext": "{\"outletId\":\"231231\"}",
"comment": "Top-up after customer added credit"
}

Download: voucher-booking-request.json

Example response

200 OK
{
"data": {
"newAmount": 4830,
"success": true,
"errors": [],
"transactionId": 21143,
"voucher": {
"gift": { "amount": 5000, "balance": 4830, "maxAmount": null },
"id": "f5f4d577-3764-4c25-12f8-08db73dad741",
"voucherCode": "560620085",
"categoryName": "OnlineGutschein",
"enabled": true,
"discriminator": "GiftVoucherDto"
}
}
}

Download: voucher-booking-response.json

clientType

clientType identifies the calling system so the voucher ledger knows which integration created a transaction. APRO assigns a clientType value to every integration at onboarding time — the exact string is not self-selectable and is shared with you together with the API key. Always use the value provided by APRO; never hard-code a guess.

Error handling

  • HTTP 4xx on validation failures (bad voucherId, malformed body, missing auth). See Authentication → Error responses.
  • HTTP 200 with success: false on business rule failures (insufficient balance, expired, etc.). Inspect the errors array.
  • Never replay a redemption on the client side. If a response times out, query /validity to confirm the balance before retrying — the operation may already be applied server-side.