# Updating passes Pass updates are an integral piece of your mobile wallet campaign strategy. # About Updating Wallet Passes > Pass updates are an integral piece of your mobile wallet campaign strategy. Once a wallet pass is installed on a user's device, send content updates that make sense for the campaign's lifecycle. ## Updating Pass Information After a user installs a pass, you can seamlessly update the pass as the user accrues loyalty points, uses some of their gift card balance, or event information changes, so that your users are always up to date. By updating an already-installed pass, you help ensure that your customers never miss their gates, and that they take advantage of the loyalty programs that bring them back to your business. When you update passes and adaptive links, you only need to provide the individual fields that you want to update. **Update pass** ```http PUT /v1/pass/12345/ HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields": { "points": { "value": "98765" } } } ``` ### Update Passes After Updating a Template If you change your template, you can "publish" an update to your template to update passes for all of your pass holders. This makes it easy to update the look and feel of your passes with a single operation. You can also update fields on your template when you publish changes, but you should take care when updating fields that might be personalized. If you update a field that has already been personalized for individual pass holders, you'll erase pass holders' personalized information when you publish changes to your template. > **Note:** If you add or remove fields from a template, Airship automatically publishes your changes to relevant passes generated from a template [Learn how to publish changes to templates](https://www.airship.com/docs/guides/wallet/user-guide/updating-passes/publish/). ### Updating Flights and Events You can manage flights and events independently of boarding passes and event tickets respectively, making it much easier to update pass holders when their flights or events change. > **Note:**

For Google Boarding Passes, Google automatically notifies holders when departureGate, departureTerminal, departureTime, or boardingTime are updated. These are independent of any notifications you send through Airship.

You can also use `passGroups` to update a group of flights or events — e.g. for a flight with multiple stops. Airship recommends using the [FlightsAPI](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/) to perform updates to individual flights. The [Update endpoint](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflight) will update the flight and trigger the bulk pass update behavior if any details for the flight have changed. If flight details change frequently, Airship recommends batching these updates into periodic calls at regular, well-spaced intervals. **Update a flight** ```http PUT /v1/flights/project// HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields": { "departureGate": { "value": "21" }, "boardingTime": { "value": "2018-07-30T09:20:00" }, "departureTime": { "value": "2018-07-30T09:45:00" }, "arrivalTime": { "value": "2018-07-30T11:45:00" }, "passGroups": [ "sfo-pdx-20180730" ] } } ``` ### Tags and Pass Organization You can assign tags to passes, to organize groups of passes and pass holders. You can target tags in the wallet API to change a group of passes. **Update passes by tag** ```http PUT /v1/tag/tag-name/passes HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields": { "secondary1": { "value": "12/31/2013" }, "primary1": { "value": "$2 Off" } } } ``` ### Recommended Use After users install your pass, update the pass with values and notifications relevant to where users are in the campaign's lifecycle. #### Pass Type: Loyalty **Scenario:** Tier Upgrade | Step | Update the pass when... | New content for the pass | | --- | --- | --- | | 1 | A user hits a new point tier. | Point balanceStrip imageNotification: New point balance and tier status | | 2 | A user hits the next point tier — go back to step 1! | #### Pass Type: Coupon **Scenario:** Sale offers | Step | Update the pass when... | New content for the pass | | --- | --- | --- | | 1 | A sale starts | Validate the pass | | 2 | Pass expiration is impending | Notification: Warning about expiration, which drives people to stores | | 3 | A sale ends | Expire the passAdd image that tells the user to watch for new offers | | 4 | You have a new offer — go back to step 1! | #### Pass Type: Event Ticket **Scenario:** Event details: session content, address, resources, contest results Airship recommends using the [Events API](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/) to perform updates to individual events. The [Update endpoint](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#updateevent) will update the event and trigger the bulk pass update behavior if any details for the event have changed. If event details change frequently, Airship recommends batching these updates into periodic calls at regular, well-spaced intervals. | Step | Update the pass when... | New content for the pass | | --- | --- | --- | | 1 | A user's next session is starting soon | Notification: Upcoming session time and location, and contest enrollment | | 2 | A user's session ended | Notification: Attendance thank you, and contest results | | 3 | Next session — go back to step 1! | | 4 | You have an announcement | Notification: Festival news, or about events related to previously attended sessions | | 5 | You have a VIP event | Invitation to VIP event | ### Use Cases **Simple** > * Loyalty: Upgraded tier > * Coupon: Sales offer > * Gift Card: Balance change > * Member Card: Renewal reminder > * Event Ticket: Seat assignment > * Boarding Pass: Gate change **Common** > * Send alerts and additional information based on tags or location changes. > * Modify values, with or without an alert. > * Add generic locations or beacons to a pass via the UI (up to ten locations or beacons). **Complex** > * Personalize with user-specific location or beacons tied to the pass (not supported by all passes). > * Add/remove segmentation properties for a pass. > * Change barcode type and/or value. ### Considerations Consider these three things for each update, and you'll know your pass holders are getting the right changes. 1. **AUDIENCE:** Make sure you are updating via the appropriate endpoint. * [Update a single pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#updatepass): `/v1/pass/{id}`. * [Update a single pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassexternalid): `/v1/pass/id/{externalId}`. * [Update a pass with external ID for a single template](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassfromtemplateexternalid): `/v1/pass/template/{templateId}/id/{passExternalId}`. * [Update passes with a specific tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#updatepassesfortags): `/v1/tag/{tag}/passes`, where `tag` is a specific tag. * [Update passes by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#updatepassesbysegment): `/v1/segments/{projectId}/{segmentId}/passes`. * [Update all passes for a template (Bulk Update)](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatepassesbytemplate): `v1/template/{templateId}/passes`, where `templateId` is the template ID for which the bulk update is being done. You may alternatively supply an external ID for the passes, `passExternalId`. Bulk update via the API is essentially the same as using [Publish](https://www.airship.com/docs/guides/wallet/user-guide/updating-passes/publish/) in the dashboard, but the API has more options. * [Update a pass with external ID that was created from an adaptive link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#updatepassesexternalid): `v1/links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId}`. * [Update a pass with external ID that was created from an adaptive link in a specific project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#updatepassesfromadaptivelinkexternalid): `v1/links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId}`. 1. **GENERIC vs. PERSONALIZED** * Are you updating a *generic pass*, where all pass holders have the same content? Go for it. * Are you updating *personalized passes*? If so, make sure you aren't replacing values for *all pass holders* that are pass holder-specific. 1. **TEST:** Use a test template and confirm the changes before updating your users' passes. Already confident with test templates? You may want to use a test tag instead. See [API: Passes: Update Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#updatepass) for the full documentation. # Setting Wallet Pass Expiration > Revoke a pass or prevent the accumulation of stale passes in your end users' wallets by controlling when it expires. ![An expired wallet pass](https://www.airship.com/docs/images/ws-expired-pass_hu_c4f6fd34fa214c6.webp) *An expired wallet pass* Pass expiration is based on the pass creation date, which is when a pass link was created based on its template. Expired passes display a greyed-out barcode and text "this pass has expired". Default expiration after pass creation: * **Boarding pass, Event ticket:** 30 days * **Coupon:** 365 days * **Loyalty, Member, Gift card, or generic:** 730 days You can set expiration periods for new and existing passes. ## Set expiration for new passes Edit a template to set expiration for new passes created from the template. Changes to template expiration do not affect existing passes. 1. Go to **Templates** and select the template you want to edit. 1. Select **UPDATE** for **Template Expiration**. 1. Set an expiration option: | Option | Description | Steps | | --- | --- | --- | | **Specify date** | New passes created using this template will expire at 11:59 PM on the specified date. | Enter a date using date picker or enter a date in MM/DD/YYYY format, and then select a time zone. | | **Specify duration** | New passes using this template will expire the specified number of days after pass creation. | Enter a number between 1 and 1,825. | | **Never** | New passes generated from this template will never expire. This option is not available for boarding passes and event tickets. | n/a | 1. Select **Save**. ## Updating expiration for existing passes You can provide a new expiration date for an existing pass or expire it immediately by rendering it void. Voided, unexpired passes can be reactivated. ### Apply a new expiration date You can change the expiration date of an existing pass by adding or editing the `value` for `expirationDate` using any of the Update Pass API functions: * [Update pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#updatepass) * [Update pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassexternalid) * [Update pass for a template with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassfromtemplateexternalid) * [Update passes by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#updatepassesfortags) * [Publish a bulk update to passes for a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatepassesbytemplate) The `expirationDate` string is formatted identically for Apple and Google in their respective `headers` objects: * Apple Wallet pass request [expirationDate](https://www.airship.com/docs/developer/rest-api/wallet/schemas/passes/#createpassapplewalletrequest) * Google Wallet pass request [expirationDate](https://www.airship.com/docs/developer/rest-api/wallet/schemas/passes/#createpassandroidpayrequest) ### Void or reactivate a pass Voiding a pass makes it immediately inactive and unusable. Since voiding does not require setting a new expiration date for the pass, it can be a useful way to manage pass control when reactivation is likely. Voided passes can be reactivated as long as they are not expired. When you reactivate the pass, it keeps its original expiration date unless you set a new one. To void a pass, set the `label` for `expirationDate` to `voided`. To reactivate a voided pass, set the `label` for `expirationDate` to `valid`. Also make sure a reactivated pass's `expirationDate` is set to a future date, since the pass is unusable if the expiration date has passed. # Wallet Segments Builder Tutorial > Segments are predefined groupings of your audience that you can construct using Tags in the Segments Builder. *Segments* are reusable audience selection criteria. They are used with the Publish feature to apply template design changes to Apple Wallet passes that have already been distributed. Create a segment instead of recreating your audience selections every time you update a pass. Segments are created within a project and can be used for any template within that project. > **Note:** Segments can also be created via the API. See: [Wallet API: Segments](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/). ## Create a New Segment Tags are selected from — not created by — the Segments Builder. Select tags that you have already created and attached to passes. See the [API: Tags](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/). documentation for more detail. To create a new segment: 1. Go to *Segments*. 1. Click **New Segment**. 1. Select whether the conditions you set will apply to *All* or *Any* passes in the project. The default statement is "Include passes where *All* of the following are true." Use the All/Any dropdown menu to change your selection.
  • ALL = all criteria must be met (boolean AND)
  • ANY = any criteria must be met (boolean OR)
1. Choose *is* or *is not* from the next dropdown menu. 1. Enter your search term, and click to select from the listed search results, if any. If you would like to set multiple conditions, click **Add a condition** and continue with your specifications. 1. Enter a descriptive name. 1. Click **Save**. Click the Segments menu link to return to your list of segments. ## Edit or Delete a Segment {#edit-delete} 1. Go to *Segments*. Three properties are displayed per segment: * **Segment Name** * **Date Created** * **Date Edited:** The date and time when the list was last edited. 1. Click the delete icon (trash) or the edit icon ( ). ## Update a Segment's Passes {#segment-passes} To update a segment's passes, use the Publish feature. When choosing which passes to update, select the radio button for *A specific segment*, then select your previously created segment. See: [Publish Tutorial](https://www.airship.com/docs/guides/wallet/user-guide/updating-passes/publish/). # Publish Template Design Changes > Apply template design changes to Apple Wallet passes that have already been distributed. Use *Publish* to apply template design changes to Apple Wallet passes that have already been distributed. Changes apply to: * Images * Logo text * Colors * Back of pass fields > **Note:** With the exception of logo text, any changes made to fields on the *front of > the pass* **will not** be applied to currently distributed passes. > **Note:** While Publish is not supported for Google Wallet, Google Wallet passes will > automatically update with any changes made to *class* fields. How it works: > > * If a class value `class.*` is changed, all passes will be changed. > * On [Update Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#updatepass), only that > pass is updated. Class values are not sent with the update object when > updating passes, so there is no effect on other passes. > > Any field preceded by `class` constitutes a class field. For a full list of > class fields, please visit the > [Google Wallet documentation](https://developers.google.com/pay/save/guides/loyalty/design). ## Update Passes 1. Go to *Templates*. 1. Click anywhere in a template's row to see its expanded view. If you have only one template in the project, the initial view is expanded. 1. Click **Publish**. 1. Choose which passes to to update. * **All passes:** The number of passes that will be updated is noted in parentheses. * **A specific segment:** Choose a previously created segment, or click the link to *create one now*, which will open the [Segment Builder](https://www.airship.com/docs/guides/wallet/user-guide/updating-passes/segments-builder/). You will need to start these Publish steps again after saving a new segment. 1. Choose when to update the passes, *Now* or *At a Specific Date and Time*. If sending *At a Specific Date and Time*, either choose a date from the calendar that appears after clicking the date field, or manually enter in YYYY-MM-DD format. Use the dropdown menus to make time selections. * The time zone is when the pass will be updated, not the pass holder's time zone. * Scheduled updates must be within 30 days of the current date. 1. Click **Confirm Publish** to apply template changes. You will be returned to the list of project templates. Click the **Publish** button again to see the status in the *Schedule Updates* or *Published History* table. You will receive an email once the syncing process has completed, and the status will update in the Published History table. **Scheduled Updates table** * **Scheduled to publish** is the date and time when the template update process is scheduled to initialize. * **Segment** is either *All Passes* or the segment chosen for the update. **Published History table** * **Start** is the date and time when the template update process was initialized. * **End** is the date and time when the template update process ended. * **Status** displays either *In Progress*, *Completed*, or *Error*. ## Cancel a Scheduled Pass Update 1. Go to *Templates*. 1. Click anywhere in a template's row to see its expanded view. If you have only one template in the project, the initial view is expanded. 1. Click **Publish**. 1. In the *Scheduled Updates* table, select the cancel icon (trash) for the update you want to cancel.