batchGeneratePasses
Batch generate wallet passes
Generate up to 100 wallet passes in one synchronous request.
Each accepted row is one POST /generate-pass (same free-100 and
card-on-file gates as a single generate). Optional
POST /share-pass/create per successful row when create_share_links
is true (default).
Host: https://passfa.st/api/passes/batch (site / Vercel preview).
This is not an api.passfa.st Edge Function. MCP tool:
batchGeneratePasses (secret key sk_live_ only) — same path and
body as this operation.
Auth: Authorization: Bearer sk_live_… or pk_live_… (scope
passes:create). A Supabase user JWT is also accepted (dashboard
session). Send X-App-Id for multi-app orgs and X-Org-Id as
elsewhere.
Body: mapped rows (same shape the dashboard posts) or raw
csv plus optional column_map. Do not send both.
Limits: more than 100 rows → 400 row_limit_exceeded before
any generate. Empty body / empty CSV → 400 empty_batch or
invalid_csv. Bad template → 400 invalid_template. Missing or
invalid Bearer → 401 unauthorized.
Billing: a row that hits the free-100 / card gate returns the same
402 codes as generate-pass (free_limit_reached,
subscription_canceled, payment_past_due). Remaining rows stop.
Already-created rows stay. HTTP 402 is returned only when zero
rows succeeded; a later-row 402 after some successes is HTTP 200
with stopped_reason and per-row results.
Partial failures: other per-row errors (validation, duplicate serial, share-link warning) continue. The response lists every processed row.
Scope: passes:create
Maps to OpenAPI operationId batchGeneratePasses — POST /passes/batch.
Same PassFast HTTP API, billing, and rate limits. Do not invent other paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | Raw CSV text with a header row. Do not send together with rows. | |
| rows | No | Mapped rows (dashboard / scripts). Do not send together with csv. | |
| x_app_id | No | Override X-App-Id for this call. Omit the connection header by default; set it only for multi-app orgs. | |
| column_map | No | Optional CSV header map when `csv` is sent. | |
| template_id | Yes | ID of a published template. | |
| wallet_type | No | apple | |
| create_share_links | No | When true, call POST /share-pass/create after each successful generate. |