Vouchers
Voucher API
Endpoints, scopes, and constraints for independent application tokens.
Authentication
Runtime endpoints use an sop_ token. Do not send an account JWT or Bot Token to these endpoints.
Authorization: Bearer sop_xxxxxxxxxxxxxxxxx
Content-Type: application/jsonScopes
vouchers:readRead templates and redemption resultsvouchers:templates:writeCreate and submit templatesvouchers:issueIssue vouchersvouchers:verifyVerify voucher statevouchers:redeemRedeem vouchersvouchers:reverseReverse redemptionsTemplate endpoints
GET /api/v1/open-platform/vouchers/templates
POST /api/v1/open-platform/vouchers/templates
POST /api/v1/open-platform/vouchers/templates/:templateId/submitNew templates start as draft, become reviewing after submission, and become active after platform approval.
Issuance and redemption endpoints
POST /api/v1/open-platform/vouchers/issue
POST /api/v1/open-platform/vouchers/verify
POST /api/v1/open-platform/vouchers/redeem
GET /api/v1/open-platform/vouchers/redemptions/:redemptionId
POST /api/v1/open-platform/vouchers/redemptions/:redemptionId/reverseVoucher credential
{
"credential": {
"type": "qr_token",
"value": "SCANNED_VALUE"
}
}type accepts qr_token or redeem_code. Verification does not change voucher state.
Console management endpoints
These endpoints use the signed-in account JWT and only access applications owned by that account.
GET /api/v1/open-platform/applications
POST /api/v1/open-platform/applications
GET /api/v1/open-platform/applications/:id
PATCH /api/v1/open-platform/applications/:id
GET /api/v1/open-platform/applications/:id/tokens
POST /api/v1/open-platform/applications/:id/tokens
DELETE /api/v1/open-platform/applications/:id/tokens/:tokenId
PUT /api/v1/open-platform/applications/:id/bots/:botId
DELETE /api/v1/open-platform/applications/:id/bots/:botIdCommon status codes
401The token is invalid, expired, or revoked.403The application is disabled, the feature is unavailable, or the token lacks scope.404The template, voucher, or redemption does not belong to the application.409State conflict, quota exhausted, or an idempotency key reused with a different request.429The request exceeded the endpoint rate limit.
