WalletPassAPI Docs

API reference · Templates

Save a template's changes

PUT/v1/templates/{slug}Free; 1 operation a pass it updatesSafe to retry with Idempotency-Key

Replaces its design and rules. Passes made from it keep their design until you update them, now ("updatePasses": "all") or later.

Path

slugstringrequired

The template's slug. org:<slug> for one your organization shares with this workspace (those can only be read).

Body

The template, whole, as it should now be. Beside it:

updatePassesall · none

all gives every pass made from it the new design, in the background; installed passes refresh. Default none.

fillobject

With all: a value for each required placeholder the new design adds, for the passes made before it.

Answer

200Saved

changed is false when the design and rules are the same, so the version stays. update is the update of its passes that started, or null.

Errors

Every error has the same shape: see Errors.

StatusCodeWhen
400validation_errorA field is wrong or unknown, a {{…}} isn't a placeholder, or a rule names one the design doesn't use. field says where, such as design.primaryFields.0.value.
422unknown_issuerNo issuer with that slug here.
403organization_templateIt's your organization's: change it in the dashboard, or duplicate it to make your own.
404not_foundNo template with that slug here.
409template_update_in_progressIts passes are still being updated: save when that's finished.
409template_changedSomeone saved it at the same moment. Get it again and retry.
409idempotency_conflictThe Idempotency-Key was already used for a different request.
422slug_immutableThe body's slug isn't this template's.
422placeholder_fill_requiredThe new design adds a required placeholder with no default: give it a value in fill. missing lists them.
429template_update_over_allowanceUpdating its passes would go past this month's operations. Nothing is saved; preview says what's left.