Templates
Templates define the look-and-feel of a pass — colors, fields, barcode behaviour. They are authored in the WalletPlatform Web UI and consumed read-only by this API.
List Templates
/api/v1/templates?template_type=LoyaltyCard&page=1&page_size=20
Returns templates the tenant owns plus all system templates (tenant_id: null).
{
"data": [
{
"id": "3f2a1b4c-...",
"tenant_id": "your-tenant-id",
"name": "Frequent Shopper",
"template_type": "LoyaltyCard",
"intent": "loyalty_card",
"status": "active",
"latest_version": 3,
"is_system_template": false,
"created_at": "2026-04-15T08:00:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 20
}
Get a Template
/api/v1/templates/{id}
Get latest version
/api/v1/templates/{id}/versions/latest
Returns the version snapshot used to render passes. Includes the editor's fields/header/body/barcode JSON for replication in your own UI.
Update template-fixed values
/api/v1/templates/{id}/fixed-values
Changes the values that are the same for every pass of an active template — the fields whose value source is “Template – same for all passes” (e.g. gate / boarding time on a boarding pass, venue / start time on an event). Change them once on the template instead of on every issued pass. Per-pass fields, layout, design and unknown fields are rejected.
PATCH /api/v1/templates/3f2a1b4c-.../fixed-values
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json
{
"values": {
"gate": "B12",
"boarding_time": "18:40"
}
}
{
"template_id": "3f2a1b4c-...",
"new_version": 7,
"updated_fields": ["gate", "boarding_time"],
"billing": {
"model": "prepaid",
"per_pass_cost": 1,
"real_pass_count": 240,
"total_cost": 240
}
}
Effect: a new template version is created and becomes the active one immediately, the Google class is published once, and every issued pass is then updated (Apple push, Google objects) keeping its own per-pass values. No email is sent.
402 insufficient_credits and nothing is changed. Contract
tenants are allowed and the usage is invoiced afterwards. A draft template returns
409 template_being_edited (“activate first”), an archived one
409 template_archived — in both cases nothing is booked.
System templates
Templates with is_system_template: true and
tenant_id: null are shared across all tenants — useful as
starting points. You can clone them in the Web UI to create tenant-owned
versions you can edit.