Vouchers

List vouchers

GET/vouchersneedsvouchers:read

Newest first, paged by cursor.

Needs the vouchers:read permission.

Query parameters

limitinteger, 1 to 50, default 25

Results per page, 1 to 50

Example:25

cursorstring

The nextCursor from the previous page

Example:"1761818400000_vch_Zx81kQ0pLm"

statusone of active, expired, failed, superseded

Only vouchers in this state

Example:"active"

fromstring

Created on or after: an ISO 8601 date or time, inclusive

Example:"2026-10-01"

tostring

Created on or before: an ISO 8601 date or time, inclusive

Example:"2026-10-01"

Response

data: List of Voucher, with nextCursor

idstring

Example:"vch_Zx81kQ0pLm"

statusone of active, expired, failed, superseded

Example:"active"

usernamestring

The login name. The password is never available

Example:"ada-4821"

sourceone of purchase, generated

How it was issued: "purchase" for a sale through the platform, "generated" for a code the business printed and sold itself

Example:"purchase"

customerUidstringnullable

Null when source is "generated"

Example:"u_9fK2mP7qR1"

customerEmailstringnullable

Null when source is "generated"

Example:"ada@example.com"

planIdstring

Example:"pln_8Hq2LmZ0aB3c"

planNamestring

Example:"Daily 5GB"

locationIdstring

Example:"loc_3cD4eF5gH6"

durationstring

Example:"1 day"

dataLimitstringnullable

Example:"5GB"

renewalOfstringnullable

The voucher this renewal took over from

Example:null

paymentReferencestringnullable

Null when source is "generated"

Example:"hs_1761818400000_0123456789abcdef"

createdAtstringnullable

ISO 8601 time, UTC. When it was sold, or for a generated code, when it was first used

Example:"2026-10-30T10:00:00.000Z"

expiresAtstringnullable

Null until the customer first logs in

Example:"2026-10-31T10:05:00.000Z"

GET/vouchers
1curl "https://ogawifi.online/api/v1/vouchers?limit=25" \2  -H "Authorization: Bearer $OGAWIFI_API_KEY"
200Successful response
1{2  "data": [3    {4      "id": "vch_Zx81kQ0pLm",5      "status": "active",6      "username": "ada-4821",7      "source": "purchase",8      "customerUid": "u_9fK2mP7qR1",9      "customerEmail": "ada@example.com",10      "planId": "pln_8Hq2LmZ0aB3c",11      "planName": "Daily 5GB",12      "locationId": "loc_3cD4eF5gH6",13      "duration": "1 day",14      "dataLimit": "5GB",15      "renewalOf": null,16      "paymentReference": "hs_1761818400000_0123456789abcdef",17      "createdAt": "2026-10-30T10:00:00.000Z",18      "expiresAt": "2026-10-31T10:05:00.000Z"19    }20  ],21  "nextCursor": "1761818400000_vch_Zx81kQ0pLm"22}