# Leveraging Updated Pass Data with The Wallet Crew API

## Leverage updated pass data in templates

Passes are most valuable when they stay accurate over time. The usual pattern is simple: you update a pass through The Wallet Crew API, then your pass templates render the latest values using Liquid.

<details>

<summary><strong>Real-world examples</strong></summary>

* A loyalty pass shows `points` and `tier` and updates after each purchase.
* An event ticket shows the latest `gate` and `seat` after a schedule change.
* A membership card shows `status` and `expiryDate` after a renewal.

</details>

### What “updated pass data” means

In The Wallet Crew, a pass can hold multiple data blocks (identifiers, metadata, additional data). These blocks are what you can update through the API, and what you can later render in templates.

If you are unsure where to store a field, start with [Pass structure on The Wallet Crew](https://docs.thewalletcrew.io/develop/architecture/structure).

### Step-by-step: update data, then display it

{% stepper %}
{% step %}

#### 1) Update the pass data through the API

Update the pass using the Pass API. This is the same API you use for push updates and data refresh.

Use the endpoint described in the [Pass API reference](https://docs.thewalletcrew.io/develop/guides/wallet/broken-reference) (look for **Update a pass**).

If you are not creating passes yet, start with [How to Create Passes via API in The Wallet Crew](https://docs.thewalletcrew.io/develop/guides/wallet/how-to-create-passes-via-api-in-the-wallet-crew).
{% endstep %}

{% step %}

#### 2) Inspect the updated data on a real pass

Open a pass and look at the JSON payload. This is your source of truth when you later reference fields in Liquid.

In the admin console, go to `Wallet > Passes`, pick a pass, then open the menu (`...`) and click **View data**.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-e2b5fc2d9233944f127265eaad1bbfab4c87e188%2Fleveraging_updated_pass_data_with_the_wallet_crew_api_1.png?alt=media" alt="Pass details screen showing the “View data” action in the pass menu."><figcaption><p>Use “View data” to confirm the keys and values that exist on this pass.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### 3) Use Liquid in your pass template

Go to `Wallet > Templates` and edit the template used by your pass.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-ef2ce83e685e2d34dcf1c20be4fc59848769422e%2Fleveraging_updated_pass_data_with_the_wallet_crew_api_2.png?alt=media" alt="Template list showing where to edit a pass template."><figcaption><p>Edit the template that matches your pass type.</p></figcaption></figure></div>

Then select the section you want to change. Sections are grouped so you can expand only what you need.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-f053ab077f87e06625968203cd0a8fb887268601%2Fleveraging_updated_pass_data_with_the_wallet_crew_api_3.png?alt=media" alt="Template editor showing expandable sections for Apple and Google fields."><figcaption><p>Pick the field where the updated value should appear.</p></figcaption></figure></div>

When you need dynamic content (conditions, formatting, or computed strings), open the code editor (`<>`) and use Liquid.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-40c7dbe1883c7ccf445c46f7ac8f66d518418997%2Fleveraging_updated_pass_data_with_the_wallet_crew_api_4.png?alt=media" alt="Template editor code view where Liquid can be written."><figcaption><p>Use Liquid when plain text fields are not enough.</p></figcaption></figure></div>

Liquid syntax reference: [Shopify Liquid documentation](https://shopify.github.io/liquid/).

{% hint style="info" %}
Avoid guessing variable paths. Use **View data** to confirm what exists on the pass, then reference those exact keys in your template.
{% endhint %}
{% endstep %}

{% step %}

#### 4) Save and validate on a device

Save your template changes, then validate with a pass you can install on a phone.

If you distribute passes through a web page (including QR code flows), start with [On your website](https://docs.thewalletcrew.io/enroll/on-your-website). If you distribute from a native app, use [On your mobile app](https://docs.thewalletcrew.io/enroll/on-your-mobile-app).
{% endstep %}
{% endstepper %}

### Troubleshooting tips

If you don’t see the new value in Apple Wallet or Google Wallet, start by checking the pass payload in **View data**. If the value is missing there, the issue is in your update call. If it exists in **View data** but not on the rendered pass, the issue is in your template mapping or Liquid logic.

### FAQ

<details>

<summary><strong>What should I use: identifiers, metadata, or additional data?</strong></summary>

Use identifiers to link the pass to external systems (CRM, ticketing, e-commerce). Use metadata to segment passes for operations (targeting, filters). Use additional data for extra values you want to persist and display (points, tier, store code, campaign flags).

If you want a quick overview, read [Pass structure on The Wallet Crew](https://docs.thewalletcrew.io/develop/architecture/structure).

</details>

<details>

<summary><strong>Why does Liquid render empty values?</strong></summary>

In most cases, the key does not exist on that specific pass. Confirm the field exists in **View data**, then make sure your template references the exact same key name.

</details>

<details>

<summary><strong>Do I need to update the template after every data change?</strong></summary>

No. Templates define how to display data. You typically update a template only when you change layout or add new fields. Day-to-day changes should be done by updating pass data through the API.

</details>
