> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/pass-management.md).

# Pass Management

Issue passes, change what they hold, and record scans. You can address a pass by its external identifiers instead of its internal pass id.

### Pass

`PATCH /passes/{passId}` and `PATCH /passes` return `202` and apply the update from a queue. Set `options.bypassQueue` to `true` to apply it synchronously and get `200`; a synchronous update can answer `409`, so retry it. `PATCH /passes` updates one pass even when several match. To update many, use `POST /passes/pushUpdate` and follow it with `GET /passes/pushUpdate/status`.

`GET /passes` returns the total count in the `x-pagination-total` header; `pageIndex` defaults to `0` and `pageSize` to `20`.

Each pass carries a confidential `secret`. `GET /passes` and the Excel export return it to callers holding `tenant.pass:read`: store it like a credential, and do not log it or share it.

### Benefit

A **benefit** is what a pass holds: a discount tier, a reward, a limited-use coupon, an entitlement. Its value (points, balance, remaining uses) changes through **movements**. A benefit is either created directly or granted from a **benefit template**.

`POST /passes/benefits/{benefitId}/movements` applies a movement and returns its `movementId`. Send `oldValue`: the movement applies only if the balance still equals it, otherwise the call answers `409` with `concurrency-conflict`. `value` is a non-zero whole number. The other `409` problems are `benefit-not-redeemable` and `benefit-ceiling-exceeded`. `POST /passes/{passId}/benefitTemplates/{benefitTemplateId}` grants a benefit from a template.

### Scan

`POST /api/{tenantId}/scans` records that a barcode was scanned, at a point of sale, a venue gate or a redemption counter. `data` (3 to 2048 characters) must match a barcode value rendered on a pass; `type` is recorded and does not affect matching. The scan emits a `Pass:Scanned` event to webhooks and connected systems.

Call it from a backend relay rather than from scanning hardware, so API keys stay server-side and you can retry and log.

### Scopes for passes and scans

| Scope                    | Required for                              |
| ------------------------ | ----------------------------------------- |
| `tenant.pass:read`       | Reading passes                            |
| `tenant.pass:write`      | Creating and updating passes and benefits |
| `tenant.pass:pushUpdate` | Bulk updates                              |
| `tenant.scan:scan`       | Recording scans                           |

### Further reading

* [Getting started with the API](https://docs.thewalletcrew.io/developers-guides/integration-guides/getting-started-with-the-api) — first API call walkthrough
* [Manage pass lifecycle with the API](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/pass-lifecycle) — create, update, notify, disable
* [Benefit guide](https://docs.thewalletcrew.io/guides-animation/engage-and-animate/privilege-and-activation/privilege) — benefit types, sources, and movement tracking
* [Scan API guide](https://docs.thewalletcrew.io/developers-guides/integration-guides/scan-api) — integration patterns and troubleshooting
* [Import and export guide](https://docs.thewalletcrew.io/configure/advanced-configuration/wallet/import-and-export) — bulk import and export of passes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/api-reference/pass-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
