Vouchers

Allowances and benefits issued to employees — a meal allowance, a commute budget, a one-off credit.

Two ways to work: create vouchers directly, or define a template and generate from it. Templates are the better path once you are issuing the same thing repeatedly.

Vouchers

Cursor-paginated, filterable by isActive and a free-text search. voucher(voucherId:) fetches one.

MutationEffect
Issue a voucher
Modify
Remove; returns true

Requires enterprise:vouchers:read / :write.

Templates

Cursor-paginated, filterable by isActive and voucherType. voucherTemplate(templateId:) fetches one and returns null if absent.

Note voucherType is a plain String, not an enum — valid values are not published in the schema.

MutationEffect
Define a template
Modify
Remove; returns true
Copy under a new name

duplicateVoucherTemplate is the quickest way to build a variant — copy, then adjust — rather than rebuilding an input object from scratch.

Generating from a template

Returns the created voucher. This is the operation to automate: define the policy once as a template, then generate per employee, per month, or per event.

Usage and analytics

Per-voucher redemption statistics.

Aggregate analytics across the enterprise. Both dates are optional — omit them for all time.

See also Analytics.

Reference

Generated reference — every type, field and argument, built from the live schema.

Built with