> 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/fr/integration-guides/wallet/pass-lifecycle.md).

# Gérer le cycle de vie de la Carte avec l’API

Créez, mettez à jour, notifiez, désactivez et suivez les Cartes Apple Wallet et Google Wallet avec l’API The Wallet Crew.

## Gérer le cycle de vie de la carte avec l'API

L’API Wallet Crew gère une Carte de sa création à sa suppression du Wallet. Elle prend en charge les mises à jour de Carte, les notifications Wallet et les événements du cycle de vie pour Apple Wallet et Google Wallet.

Utilisez ce guide pour choisir la bonne action du cycle de vie. Utilisez le [Référence de l'API](https://docs.thewalletcrew.io/api-reference/) pour les schémas, les paramètres et les réponses.

<details>

<summary><strong>Exemples concrets</strong></summary>

* Un détaillant crée une Carte de fidélité à l’aide d’un identifiant client CRM.
* Une compagnie aérienne met à jour les informations de porte d’embarquement et envoie un rafraîchissement du Wallet.
* Une plateforme d’événements enregistre la suppression du Wallet via `Carte:Uninstalled`.

</details>

### Avant de gérer une Carte

Les Cartes utilisent des identifiants pour relier chaque Carte du Wallet à des enregistrements externes. Ces identifiants permettent aux connecteurs de récupérer les dernières données source lors de l’affichage.

Consultez [Données et synchronisation de la Carte](/developers-guides/fr/pass-architecture/pass-data-and-sync.md) avant de concevoir une intégration. Utilisez [Structure](/developers-guides/fr/pass-architecture/structure.md) pour choisir des clés d’identifiant stables.

### Modèle d’état de la Carte

Wallet Crew ne dispose d’aucun champ d’état universel pour la Carte. Les données de la Carte définissent l’état. [Modèles Liquid](/developers-guides/fr/integration-guides/wallet/templating-engine.md) associent ces données aux champs natifs du Wallet.

Apple Wallet prend en charge les champs liés à l’état suivants :

* `voided` — un booléen qui marque la Carte comme invalide dans le Wallet. Réglez-le sur `false` pour annuler la modification.
* `expirationDate` — une date ISO 8601 qui définit la date d’expiration de la Carte.

Google Wallet prend en charge les champs liés à l’état suivants :

* `state` — l’un des `ACTIVE`, `COMPLETED`, `EXPIRED`, ou `INACTIVE`.
* `validTimeInterval` — la plage temporelle pendant laquelle la Carte reste valide.

Associez les champs pertinents dans les modèles Apple Wallet et Google Wallet. L’état affiché ne change qu’après un nouveau rendu de la Carte.

{% hint style="info" %}
Wallet Crew ne dispose d’aucun état de suppression réversible ni d’archivage. L’API ne supprime pas les enregistrements de Carte. Pour désactiver une Carte, mettez à jour le champ d’état pertinent de la plateforme.
{% endhint %}

### Créer une Carte

Créez une Carte via l’opération ci-dessous. Fournissez au moins un identifiant externe du système source.

Wallet Crew valide les identifiants via l’une de ces méthodes d’autorisation :

* Signature HMAC
* Secret enregistré
* Liste d’autorisation de sécurité
* `Carte.Write` scope

Une Carte nécessite des données à la création. Wallet Crew récupère les données du connecteur à la demande lors du premier affichage de la Carte. Incluez des données permettant à un connecteur de localiser l’enregistrement externe.

## Issue a pass

> Without \`tenant.pass:write\`, each identifier must be proven (see Neo.Web.Api.Controllers.PassController.PassData.Identifiers); unproven ones are dropped and the request is refused when none is left. The identifiers of an authenticated holder are added. Nothing is sent to a device until the holder downloads the pass.\
> \`\`\`\
> POST /api/{tenantId}/passes?passType=loyalty\
> { "identifiers": { "shopify.customerId": "12345", "shopify.customerId.hmac": "{hmac}" }, "additionalData": { "loyaltyTier": "silver" } }\
> \`\`\`

````json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Pass"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.pass:write"]},{"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":{"CreatePassData":{"type":"object","allOf":[{"description":"Fields a caller can set on a pass, at creation or on update.","$ref":"#/components/schemas/PassData"}],"properties":{"extensions":{"type":["null","object"],"additionalProperties":{},"description":"Initial state of the pass's extensions, keyed by name (`apple`, `google`)."}},"additionalProperties":false,"description":"Content of a new pass."},"PassData":{"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."}},"additionalProperties":false,"description":"Fields a caller can set on a pass, at creation or on update."},"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":{"post":{"tags":["Pass"],"summary":"Issue a pass","description":"Without `tenant.pass:write`, each identifier must be proven (see Neo.Web.Api.Controllers.PassController.PassData.Identifiers); unproven ones are dropped and the request is refused when none is left. The identifiers of an authenticated holder are added. Nothing is sent to a device until the holder downloads the pass.\n```\nPOST /api/{tenantId}/passes?passType=loyalty\n{ \"identifiers\": { \"shopify.customerId\": \"12345\", \"shopify.customerId.hmac\": \"{hmac}\" }, \"additionalData\": { \"loyaltyTier\": \"silver\" } }\n```","parameters":[{"name":"passType","in":"query","description":"Pass template to issue the pass from; matched exactly.","schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Identifiers, data and theme of the pass.","content":{"application/json":{"schema":{"description":"Content of a new pass.","$ref":"#/components/schemas/CreatePassData"}},"text/json":{"schema":{"description":"Content of a new pass.","$ref":"#/components/schemas/CreatePassData"}},"application/*+json":{"schema":{"description":"Content of a new pass.","$ref":"#/components/schemas/CreatePassData"}}}},"responses":{"200":{"description":"The pass was created; the body is its id.","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}},"400":{"description":"`passType` is missing, or it or `themeId` names a template or theme the tenant does not have.","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 and no identifier could be verified.","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"}]}}}},"403":{"description":"Authenticated without `tenant.pass:write` and no identifier verified, or the action is not enabled for the tenant.","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"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","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"}]}}}}}}}}}
````

{% hint style="info" %}
La création de la Carte ne récupère pas immédiatement les données du connecteur. La première installation ou le premier affichage déclenche cette récupération.
{% endhint %}

### Mise à jour des données de la Carte

Utilisez l’opération ci-dessous pour mettre à jour les données de la Carte et demander un rafraîchissement du Wallet. Les champs soumis se fusionnent avec les données de Carte existantes. Les champs omis restent inchangés. Une valeur vide ou `null` supprime le champ soumis.

## Update a pass by identifiers

> Same changes, delivery and responses as \`PATCH /passes/{passId}\`, addressing the pass by \`id\` or by external identifiers.\
> \`\`\`\
> PATCH /api/{tenantId}/passes?id.shopify.customerId=12345\
> { "additionalData": { "loyaltyTier": "gold" } }\
> \`\`\`

````json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Pass"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.pass:write"]},{"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":{"SingleUpdatePassData":{"type":"object","allOf":[{"description":"Changes to apply to an existing pass, with options.","$ref":"#/components/schemas/UpdatePassData_SingleUpdatePassDataOptions"}],"properties":{"bypassQueue":{"type":"boolean","description":"Replaced by `options.bypassQueue`.","default":false,"deprecated":true}},"additionalProperties":false,"description":"Changes to one pass. Omitted fields are left as they are."},"UpdatePassData_SingleUpdatePassDataOptions":{"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/SingleUpdatePassDataOptions"}},"additionalProperties":false,"description":"Changes to apply to an existing pass, with options."},"SingleUpdatePassDataOptions":{"type":"object","allOf":[{"description":"How an update is applied.","$ref":"#/components/schemas/UpdatePassDataOptions"}],"properties":{"bypassQueue":{"type":"boolean","description":"Applies and pushes the update within the request (200) instead of queuing it (202).","default":false}},"additionalProperties":false,"description":"Options for a single pass 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."},"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":{"patch":{"tags":["Pass"],"summary":"Update a pass by identifiers","description":"Same changes, delivery and responses as `PATCH /passes/{passId}`, addressing the pass by `id` or by external identifiers.\n```\nPATCH /api/{tenantId}/passes?id.shopify.customerId=12345\n{ \"additionalData\": { \"loyaltyTier\": \"gold\" } }\n```","parameters":[{"name":"identifiers","in":"query","description":"Either `id={passId}` alone, or external identifiers prefixed with `id.` (`id.y2.customerId=1233332`), all of which a pass must carry. When several passes match, one is updated.","schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"passType","in":"query","description":"Query: only a pass of this pass template matches. Use `passType` in the body to move the pass to another template.","schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The changes and how to apply them.","content":{"application/json":{"schema":{"description":"Changes to one pass. Omitted fields are left as they are.","$ref":"#/components/schemas/SingleUpdatePassData"}},"text/json":{"schema":{"description":"Changes to one pass. Omitted fields are left as they are.","$ref":"#/components/schemas/SingleUpdatePassData"}},"application/*+json":{"schema":{"description":"Changes to one pass. Omitted fields are left as they are.","$ref":"#/components/schemas/SingleUpdatePassData"}}}},"responses":{"200":{"description":"Applied and pushed within the request (`options.bypassQueue` true)."},"202":{"description":"Queued."},"400":{"description":"The body's `passType` or `themeId` names a template or theme the tenant does not have, or `id` is combined with other identifiers.","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 <c>tenant.pass:write</c> 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":"No pass matches the identifiers, or no `id` or `id.` parameter is given.","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"}]}}}},"409":{"description":"Synchronous update only: the pass was changed concurrently; retry the request.","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"}]}}}},"429":{"description":"Over 50000 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","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"}]}}}}}}}}}
````

#### Comportement des notifications push

**Mises à jour du backend et de l’appareil**

Les mises à jour de Carte fonctionnent à deux niveaux indépendants :

1. **Mise à jour du backend** — Wallet Crew met à jour l’enregistrement de la Carte.
2. **Notification de l’appareil** — Wallet Crew notifie les plateformes Wallet lorsqu’il existe des inscriptions actives.

La mise à jour du backend s’effectue quel que soit l’état d’installation. La livraison sur l’appareil dépend du fait que la Carte reste installée.

**Notification de l’appareil**

Après les mises à jour du backend, Wallet Crew tente de notifier Apple Wallet et Google Wallet. La notification dépend des inscriptions actives :

* Une Carte installée peut recevoir une mise à jour via sa plateforme Wallet.
* Une Carte désinstallée n’a aucune inscription active, donc aucune notification n’est envoyée à l’appareil.
* Une installation ultérieure reçoit la dernière version de la Carte de Wallet Crew.

**File d’attente et déduplication**

Wallet Crew met les mises à jour en file d’attente par défaut avec `bypassQueue: false`. La file d’attente protège le débit du système et déduplique le travail. Si une autre mise à jour atteint la même Carte avant l’exécution de la tâche mise en file, la file saute la tâche précédente.

Définissez `bypassQueue: true` pour les mises à jour synchrones urgentes. Utilisez-le pour des changements tels que les mises à jour de statut d’embarquement qui doivent atteindre le Wallet immédiatement.

**Nouveau rendu sur l’appareil**

{% hint style="info" %}
Une notification ne met pas directement à jour une propriété. Lorsqu’un appareil reçoit une notification, son Wallet demande la dernière version de la Carte. Wallet Crew récupère les données fraîches du connecteur avant de renvoyer cette version.
{% endhint %}

{% hint style="info" %}
Les mises à jour du backend persistent. Cela permet des mises à jour sûres pendant qu’une Carte est désinstallée.
{% endhint %}

Pour les correspondances de modèles et les champs de Carte, voir [Mettre à jour les données de la Carte dans les gabarits](/developers-guides/fr/integration-guides/wallet/update-pass-data-in-templates.md).

### Envoi d’une notification autonome

Envoyez une notification textuelle sans modifier les données de la Carte avec l’opération ci-dessous. La notification apparaît dans l’application Wallet indépendamment d’une mise à jour des données.

Utilisation `content` pour une chaîne simple. Utilisez `localizedContent` pour un objet indexé par des codes de langue ISO 639. Utilisez un seul format de contenu par requête.

## Notify a pass holder by pass id

> Queued by default: 202 means accepted, not yet sent. \`options.bypassQueue\` sends synchronously (200). The message appears on the pass in the wallet: Apple devices also refresh the whole pass; Google passes get the message added.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Pass"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.pass:write"]},{"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":{"NotifyRequest":{"type":"object","properties":{"content":{"type":["null","string"],"description":"Message for devices whose language has no entry in `localizedContent`. Optional when `localizedContent` has text; defaults to the tenant's default language entry, else the first language in ordinal order."},"localizedContent":{"type":["null","object"],"additionalProperties":{"type":"string"},"description":"Message per device language. Keys are a lowercase ISO 639-1 code, optionally with an uppercase\nregion (`en`, `fr-FR`). Entries with blank text are not sent.","propertyNames":{"pattern":"^[a-z]{2}(-[A-Z]{2})?$"}},"options":{"description":"Delivery options. Omitted, the notification is queued without refreshing pass data.","$ref":"#/components/schemas/NotifyRequestOptions"}},"additionalProperties":false,"description":"The message to show the holder, in one or several languages."},"NotifyRequestOptions":{"type":"object","properties":{"updateData":{"type":"boolean","description":"Also refreshes the Google Wallet pass content with the message. Apple always refreshes the whole pass.","default":false},"correlationId":{"maxLength":100,"minLength":10,"type":["null","string"],"description":"Caller-chosen id for tracing, such as a campaign or batch. 10 to 100 characters after trimming, otherwise 400."},"bypassQueue":{"type":"boolean","description":"Sends within the request (200) instead of queuing (202), for urgent low-volume messages.","default":false}},"additionalProperties":false,"description":"How the notification is delivered."},"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/{passId}/notification":{"put":{"tags":["Pass"],"summary":"Notify a pass holder by pass id","description":"Queued by default: 202 means accepted, not yet sent. `options.bypassQueue` sends synchronously (200). The message appears on the pass in the wallet: Apple devices also refresh the whole pass; Google passes get the message added.","parameters":[{"name":"passId","in":"path","description":"Pass id assigned by the platform.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The message and delivery options.","content":{"application/json":{"schema":{"description":"The message to show the holder, in one or several languages.","$ref":"#/components/schemas/NotifyRequest"}},"text/json":{"schema":{"description":"The message to show the holder, in one or several languages.","$ref":"#/components/schemas/NotifyRequest"}},"application/*+json":{"schema":{"description":"The message to show the holder, in one or several languages.","$ref":"#/components/schemas/NotifyRequest"}}}},"responses":{"200":{"description":"Notification sent synchronously (`options.bypassQueue` true)."},"202":{"description":"Notification queued for delivery."},"400":{"description":"Neither `content` nor `localizedContent` has text, or `correlationId` is outside 10 to 100 characters.","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 <c>tenant.pass:write</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No pass has this id.","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"}]}}}},"429":{"description":"Over 50000 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","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"}]}}}}}}}}}
```

### Retrait du Wallet

Lorsqu’un utilisateur final supprime une Carte, la plateforme Wallet notifie Wallet Crew. Apple envoie une requête HTTP `DELETE` vers la route d’inscriptions Apple. Google envoie un message avec `eventType = "del"`.

Wallet Crew envoie `Carte:Uninstalled` lorsque la dernière inscription active atteint zéro. Supprimer une Carte de l’un des deux iPhones n’envoie pas l’événement.

La charge utile du webhook comprend :

* `passId`, `passType`, `identifiants`, et `métadonnées`
* `device` et `deviceIdentifier` — Google définit `deviceIdentifier` à `null`
* `registrationInformation.activeRegistrationCount` et `registrationInformation.totalRegistrationCount`

Wallet Crew transmet l’événement via le point de terminaison webhook configuré. La requête comprend `X-NEOSTORE-EVENTNAME: Carte:Uninstalled`.

{% hint style="info" %}
Supprimer une Carte d’un Wallet ne supprime pas son enregistrement Wallet Crew. La Carte peut être installée de nouveau plus tard.
{% endhint %}

Configurez la livraison au point de terminaison et validez les signatures dans [Webhooks](/developers-guides/fr/integration-guides/webhooks.md).

### FAQ

<details>

<summary><strong>La mise à jour des données de Carte modifie-t-elle immédiatement une Carte installée ?</strong></summary>

Non. La mise à jour crée une nouvelle version de Carte et déclenche un rafraîchissement du Wallet. Apple Wallet ou Google Wallet demande alors cette version.

</details>

<details>

<summary><strong>Une Carte peut-elle être supprimée via l’API ?</strong></summary>

Non. L’API ne supprime pas les enregistrements de Carte. Définissez les champs d’état spécifiques à la plateforme pour désactiver une Carte.

</details>

<details>

<summary><strong>Pourquoi une mise à jour du Wallet n’a-t-elle pas été livrée ?</strong></summary>

La livraison push nécessite une inscription fournisseur active. Confirmez que la Carte a été installée sur la plateforme Wallet concernée.

</details>

<details>

<summary><strong>Puis-je utiliser les mises à jour échouées pour détecter les Cartes désinstallées ?</strong></summary>

Non. Les mises à jour n’échouent pas lorsqu’une Carte est désinstallée. Wallet Crew traite la mise à jour du backend avec succès. Aucun push vers l’appareil n’est envoyé lorsque la Carte n’a aucune inscription active.

Vérifiez l’état d’installation avec le [point de terminaison de détails de la Carte](https://docs.thewalletcrew.io/api-reference/). Sinon, écoutez les [événements Carte:Installed et Carte:Uninstalled](#wallet-removal).

</details>


---

# 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/fr/integration-guides/wallet/pass-lifecycle.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.
