> 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/connectors/ticketing/aparte/ticket-lifecycle.md).

# Ticket lifecycle

### Why lifecycle matters

A wallet ticket is not just a static copy of a ticket. It needs to stay aligned with the latest ticket state, especially when a seat changes, an event is updated, or a pass is added to a device.

The Aparté connector covers that lifecycle from ticket matching to wallet installation tracking.

<details>

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

* **Multi-seat order**: create one wallet pass per seat from a single order line.
* **Operational update**: refresh the pass after a ticket change in Aparté.
* **Adoption tracking**: record that a ticket has been added to or removed from a wallet.

</details>

### How tickets are matched

Each pass is linked to an Aparté ticket through `id.aparte.ticketId`.

This value uses the format `<orderItemId>|<seatId>`. It helps distinguish tickets clearly when one order item contains several seats.

### Create passes from an order item

The connector can work from `aparte.orderItemId`.

When this value is provided, The Wallet Crew retrieves the tickets attached to that order line, matches existing passes, and creates the missing ones automatically. This is useful in booking and confirmation flows where one order can include several attendees.

### Refresh and update behavior

Aparté remains the source of truth for ticket data. The Wallet Crew reads the ticket data when the pass needs to be refreshed and uses that information to keep the wallet version aligned.

If the Aparté API is temporarily unavailable, the pass keeps the last successful information until a later refresh succeeds.

### Wallet installation tracking

The connector can notify Aparté when a pass is installed or removed from Apple Wallet or Google Wallet.

This makes wallet adoption measurable at ticket level. It is especially useful for reporting, operational follow-up, and rollout analysis.

### Advanced routing

Some projects need different wallet templates for different ticket types. This is possible through the `extensions.aparte.ticket.mapper` hook and its `GetPassType` method.

This part is usually only needed for advanced implementations. A standard setup can often use one default template.

### FAQ

<details>

<summary><strong>Can one order line generate several passes?</strong></summary>

Yes. If the order line contains several tickets or seats, the connector can create one pass per ticket.

</details>

<details>

<summary><strong>Does the connector update Aparté ticket data?</strong></summary>

No ticket content is written back to Aparté. The write-back behavior is limited to wallet lifecycle events such as install or uninstall.

</details>

<details>

<summary><strong>What happens if Aparté is unavailable for a moment?</strong></summary>

The connector retries the request. Until the next successful refresh, the wallet pass continues to show the last successful data.

</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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thewalletcrew.io/connectors/ticketing/aparte/ticket-lifecycle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
