Statistics
This endpoint returns aggregated voucher sales statistics for a given date range: the total revenue, the breakdown by voucher type and the breakdown by point of sale (online shop vs. on-site).
The numbers are identical to the statistics dashboard in the e-guma Backoffice. Vouchers are counted by their order date. Complimentary (maison) payments and deleted vouchers are excluded. Note that this can differ from payment-based reports, which count by payment date.
GET https://api.e-guma.ch/v1/vouchers/statistics.json?apikey={api-key}&from={from}&to={to}Parameters
api-key required | API key of a user that is approved for third-party integrations. |
from required | Start of the range (inclusive), in ISO 8601 format (e.g. 2026-01-01T00:00:00). |
to required | End of the range (exclusive), in ISO 8601 format. Must not be before from. Because to is exclusive, consecutive periods can share boundaries without counting a voucher twice: e.g. January is |
Return
| from / to | The requested range, echoed back in ISO 8601 format. |
| count_vouchers | Number of vouchers sold in the range. An order can contain several vouchers. |
| amount_total_in_cents | Total voucher revenue in the range, in cents of the merchant's currency. |
| by_voucher_type | Voucher sales grouped by voucher type, ordered by revenue (highest first). See voucher type object below for details. |
| by_point_of_sale | Voucher sales grouped by point of sale. See point of sale object below for details. |
Voucher type object
| id | ID of the voucher type. |
| name | Name of the voucher type in the default language of the merchant. Deleted voucher types are included so historical sales keep their name. |
| count | Number of vouchers of this type sold in the range. |
| amount_in_cents | Revenue of this voucher type in the range, in cents. |
Point of sale object
| point_of_sale | Where the vouchers were sold: web (online shop), local (on-site) or import (imported into e-guma). |
| count_orders | Number of distinct orders for this point of sale in the range. |
| amount_in_cents | Revenue of this point of sale in the range, in cents. |
Example
GET https://api.e-guma.ch/v1/vouchers/statistics.json?apikey=5c5d4b20bfede11db8aae54d&from=2026-01-01T00:00:00&to=2027-01-01T00:00:00{
"from": "2026-01-01T00:00:00",
"to": "2027-01-01T00:00:00",
"count_vouchers": 15,
"amount_total_in_cents": 180000,
"by_voucher_type": [
{
"id": "54736134-1d5d-4177-9be3-3628300f51c4",
"name": "Candle light dinner voucher",
"count": 5,
"amount_in_cents": 105000
},
{
"id": "145a44a7-37f0-44c4-b56d-797f38c1ba34",
"name": "Value voucher",
"count": 5,
"amount_in_cents": 50000
},
{
"id": "57a8131f-4dd2-47f1-9269-661c00293669",
"name": "Wellness voucher",
"count": 5,
"amount_in_cents": 25000
}
],
"by_point_of_sale": [
{
"point_of_sale": "web",
"count_orders": 7,
"amount_in_cents": 149000
},
{
"point_of_sale": "local",
"count_orders": 1,
"amount_in_cents": 31000
}
]
}Updated about 14 hours ago
