> 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/developers-guides/integration-guides/wallet/batch-operations.md).

# Batch operations

Update Apple Wallet and Google Wallet passes in bulk with the push update API or SFTP flat file imports, then track and cancel batches in the admin console.

The Wallet Crew supports two mechanisms for updating passes in bulk: the push update API and SFTP flat file imports.

## Push update API

The operation below triggers a push update on all passes that match a filter condition. This is the primary batch mechanism for API-connected systems.

The endpoint accepts the same `filter` array as the passes list endpoint. See [Filter and query operators](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/filter-and-query-operators.md) for the full filter reference. As on the passes list, the filter conditions are query parameters (`filter[0].field=...`). The request body carries the change to apply and `options`.

The call needs the `tenant.pass:pushUpdate` scope. Cancelling a batch needs the same scope; reading its status needs `tenant.pass:read`.

## Update passes in bulk

> Applies one change to every pass matching the filters (same fields and operators as \`GET /passes\`; no filter selects every pass) and pushes each to its holder's devices. Each pass is queued as its own update, spread by \`options.throughput\`: a 200 means scheduled, not done. Follow progress with \`GET /passes/pushUpdate/status\` under \`options.correlationId\`, stop it with \`POST /passes/pushUpdate/{correlationId}/cancel\`. \`additionalData\` is merged and \`passType\` replaces the template when sent; \`themeId\` omitted keeps each pass's theme, an empty string removes it. Identifiers are not changed.\
> \`\`\`\
> POST /api/{tenantId}/passes/pushUpdate?filter\[0].field=passType\&filter\[0].operator=equals\&filter\[0].value=loyalty\
> { "additionalData": { "campaign": "summer2025" }, "options": { "throughput": 12, "correlationId": "campaign-summer-2025" } }\
> \`\`\`

````json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Pass"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.pass:pushUpdate"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"FilterModel":{"type":"object","properties":{"field":{"type":"string","description":"`id`, `passType`, `themeId`, `creationDate` and `lastUpdateDate` (UTC), `installationStatus` (installed wallets concatenated: `\"\"`, `\"apple\"`, `\"google\"` or `\"applegoogle\"`; test with `contains`), `identifiers.{key}`, or `metadata.{key}` (compared as the type the tenant's metadata configuration gives it)."},"operator":{"description":"Comparison operator. Required.","$ref":"#/components/schemas/FilterModelOperator"},"value":{"type":["null","array"],"items":{"type":"string"},"description":"Values to compare, as repeated `value` query parameters (several only for `in`/`notIn`). Numbers use `.` as decimal separator, booleans are `true`/`false`, dates are ISO 8601 with timezone.\nA value containing `{{`, `{%` or `{#` is first rendered as a Liquid template (`{{ 'now' | date: '%Y-%m-%d' }}`).\n<example>```\nGET /passes?filter[0].field=passType&filter[0].operator=in&filter[0].value=boarding&filter[0].value=loyalty\n```</example>"}},"additionalProperties":false,"description":"One condition on passes. Several conditions must all hold."},"FilterModelOperator":{"enum":["Contains","StartsWith","EndsWith","Equals","IsEmpty","IsNotEmpty","NotEquals","In","NotIn","GreaterThan","LessThan","GreaterThanOrEqual","LessThanOrEqual"],"type":"string","description":"How a pass filter compares the field with its value."},"MultipleUpdatePassData":{"type":"object","allOf":[{"description":"Changes to apply to an existing pass, with options.","$ref":"#/components/schemas/UpdatePassData_MultipleUpdatePassDataOptions"}],"additionalProperties":false,"description":"Changes applied to every matched pass. Omitted fields are left as they are."},"UpdatePassData_MultipleUpdatePassDataOptions":{"type":"object","properties":{"identifiers":{"type":"object","additionalProperties":{"type":"string"},"description":"Identifiers of the holder in other systems, keyed by system and field (`shopify.customerId`), matched by `findPass`, `id.{key}` lookups and filters. Avoid keys starting with `id.`."},"additionalData":{"type":["null","object"],"additionalProperties":{},"description":"Free data stored with the pass and available to its templates."},"themeId":{"type":["null","string"],"description":"Theme applied to the pass. Omit or `null` to leave it unchanged (none on create); an empty string removes it. An unknown id is refused with a 400."},"passType":{"type":["null","string"],"description":"Pass template to move the pass to. Omitted or blank keeps the current one; an unknown name is refused with a 400."},"updateMetadata":{"type":"boolean","description":"Replaced by `options.updateMetadata`.","default":false,"deprecated":true},"options":{"description":"How the update is applied. Omitted, the defaults of each option apply.","$ref":"#/components/schemas/MultipleUpdatePassDataOptions"}},"additionalProperties":false,"description":"Changes to apply to an existing pass, with options."},"MultipleUpdatePassDataOptions":{"type":"object","allOf":[{"$ref":"#/components/schemas/UpdatePassDataOptions"}],"properties":{"throughput":{"type":"number","description":"Passes updated per second, greater than 0 and at most 1000. Default 12; best effort.","format":"float"}},"additionalProperties":false,"description":"Options for a bulk update."},"UpdatePassDataOptions":{"type":"object","properties":{"updateMetadata":{"type":"boolean","description":"Recomputes the stored pass metadata read by filters and sorts. Slower; unneeded when only displayed content changes. Default `true`, except on a bulk update sent without a body."},"correlationId":{"type":["null","string"],"description":"Groups updates into one operation tracked by `GET /passes/pushUpdate/status` and stopped by `POST /passes/pushUpdate/{correlationId}/cancel`. Random when omitted; a synchronous update then records no progress."}},"additionalProperties":false,"description":"How an update is applied."},"PushUpdateResult":{"type":"object","properties":{"passCount":{"type":"integer","description":"Passes matched by the filters and queued for the update; 0 when none matched.","format":"int32"}},"additionalProperties":false,"description":"What a bulk update scheduled."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/passes/pushUpdate":{"post":{"tags":["Pass"],"summary":"Update passes in bulk","description":"Applies one change to every pass matching the filters (same fields and operators as `GET /passes`; no filter selects every pass) and pushes each to its holder's devices. Each pass is queued as its own update, spread by `options.throughput`: a 200 means scheduled, not done. Follow progress with `GET /passes/pushUpdate/status` under `options.correlationId`, stop it with `POST /passes/pushUpdate/{correlationId}/cancel`. `additionalData` is merged and `passType` replaces the template when sent; `themeId` omitted keeps each pass's theme, an empty string removes it. Identifiers are not changed.\n```\nPOST /api/{tenantId}/passes/pushUpdate?filter[0].field=passType&filter[0].operator=equals&filter[0].value=loyalty\n{ \"additionalData\": { \"campaign\": \"summer2025\" }, \"options\": { \"throughput\": 12, \"correlationId\": \"campaign-summer-2025\" } }\n```","parameters":[{"name":"filter","in":"query","description":"Query `filter[i].field`, `filter[i].operator`, `filter[i].value`: conditions a pass must all meet.","schema":{"type":"array","items":{"description":"One condition on passes. Several conditions must all hold.","$ref":"#/components/schemas/FilterModel"}}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The change applied to each pass, and options. Omitted, each pass is pushed as it is, without recomputing metadata, at the tenant's default throughput.","content":{"application/json":{"schema":{"description":"Changes applied to every matched pass. Omitted fields are left as they are.","$ref":"#/components/schemas/MultipleUpdatePassData"}},"text/json":{"schema":{"description":"Changes applied to every matched pass. Omitted fields are left as they are.","$ref":"#/components/schemas/MultipleUpdatePassData"}},"application/*+json":{"schema":{"description":"Changes applied to every matched pass. Omitted fields are left as they are.","$ref":"#/components/schemas/MultipleUpdatePassData"}}}},"responses":{"200":{"description":"The passes are scheduled; the body gives how many.","content":{"text/plain":{"schema":{"description":"What a bulk update scheduled.","$ref":"#/components/schemas/PushUpdateResult"}},"application/json":{"schema":{"description":"What a bulk update scheduled.","$ref":"#/components/schemas/PushUpdateResult"}},"text/json":{"schema":{"description":"What a bulk update scheduled.","$ref":"#/components/schemas/PushUpdateResult"}}}},"400":{"description":"`passType` or `themeId` names a template or theme the tenant does not have, a filter names an unsupported field, or a filter has no operator.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the `tenant.pass:pushUpdate` scope, or the endpoint is not enabled for the tenant.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"The tenant does not exist.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
````

Each matching pass is queued for update independently. The platform resolves all matching pass IDs in-request, then enqueues them as a single command containing N individual per-pass tasks. The `200` response means the batch was accepted and scheduled — not that it has completed.

The endpoint does not cap the number of passes a single call can match. `options.bypassQueue` is not available on this endpoint.

{% hint style="info" %}
Supply `options.correlationId` in the request body. The platform attaches it to each queued task, so processing progress can be tracked through `GET /api/{tenantId}/passes/pushUpdate/status`. Cancel a batch with `POST /api/{tenantId}/passes/pushUpdate/{correlationId}/cancel`. There is no completion webhook at the batch level.
{% endhint %}

### Partial failures

Each pass is processed independently. A failure on one pass — for example, a connector error or a pass not found — does not affect the other passes in the batch.

## SFTP flat file imports

SFTP imports allow you to update additional data, identifiers, pass templates, themes, benefit templates, and notifications across many passes by uploading a CSV file. This method is designed for legacy systems that cannot call the API directly.

{% hint style="warning" %}
SFTP imports are a last resort. Use the push update API for any system that supports HTTP calls. SFTP is an optional feature — contact The Wallet Crew to enable it on your tenant.
{% endhint %}

Each row in the CSV targets a single pass. Passes are updated asynchronously after the file is detected on the SFTP server. Like the push update API, operations are per-pass and independent.

For the full file format, column reference, SFTP credentials, and custom mapping scripts, see [Update passes with CSV files over SFTP](https://docs.thewalletcrew.io/configure/advanced-configuration/wallet/import-and-export/update-pass-using-flat-files.md) in the Configure space.

## Choosing between the two approaches

|                   | Push update API                                                                                                                                              | SFTP flat file                                                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| Best for          | Real-time or scheduled integrations with API access                                                                                                          | Legacy systems with flat file exports only                                                                                          |
| Targeting         | Filter conditions, see [Filter and query operators](https://docs.thewalletcrew.io/developers-guides/integration-guides/wallet/filter-and-query-operators.md) | Identifier per row (explicit list)                                                                                                  |
| Data updated      | The change in the request body, then a connector re-fetch via push                                                                                           | Updates `additionalData`, `identifiers`, `passType`, theme, benefit template and notification; `updateMetadata` recomputes metadata |
| Setup             | No extra configuration required                                                                                                                              | Optional feature — must be enabled per tenant                                                                                       |
| Progress tracking | `correlationId` + status endpoint, or the console                                                                                                            | Import log in **Settings → General → SFTP updates** and `Import:*` webhook events                                                   |

## Track and cancel batches in the console

Open **Settings → Monitoring → Wallet updates** to follow every batch push update operation and cancel any that is still running. Each row is one batch: a set of per-pass update tasks triggered by a single API call or system event.

| Column            | What it shows                                                                          |
| ----------------- | -------------------------------------------------------------------------------------- |
| **Start**         | When the batch was accepted by the platform.                                           |
| **Last activity** | When the most recent per-pass task in the batch was processed.                         |
| **Operation**     | The internal name of the component that created the batch.                             |
| **Correlation**   | The `correlationId` supplied in the push-update operation, or an auto-generated value. |
| **Passes**        | Total number of passes in the batch.                                                   |
| **Completed**     | Number of passes that have been processed (success or failure).                        |
| **Errors**        | Number of passes that failed during processing.                                        |
| **Apple**         | Number of pass updates pushed to Apple devices.                                        |
| **Google**        | Number of pass updates sent to Google Wallet.                                          |
| **Status**        | **Running**, **Completed** (**Completed** reached **Passes**) or **Canceled**.         |

### Find a batch with correlationId

If `options.correlationId` is supplied in the push-update operation, that value appears in the **Correlation** column. If none is supplied, the platform generates one. The API response does not return it: find it in the **Correlation** column, or as `operationData` in `GET /api/{tenantId}/passes/pushUpdate/status`. The **Operation** names reflect the platform's internal architecture: use the **Correlation** column to identify the batches you own. Poll this page or check individual pass histories if real-time confirmation is needed.

### Cancel a running operation

Use the cancel icon at the end of a **Running** row to stop further processing. It appears only for users allowed to stop bulk updates. Passes already processed before the cancellation are not rolled back.

### Status accuracy

**Status** is computed from the counters only. It stays **Running** until **Completed** reaches **Passes**. A batch whose passes never finish stays **Running**: cancel it, then check the history of individual 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/developers-guides/integration-guides/wallet/batch-operations.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.
