Unidy Docs

Customer tickets, subscriptions, and transactions

Access customer-owned business data.

Customer tickets, subscriptions, and transactions

Use these endpoints to show a signed-in customer's tickets, subscriptions and orders, download a pass, or manage a ticket transfer. Record creation and editing belong to the REST API.

Send the SDK application key in Authorization: Bearer … and the customer's current ID token in X-ID-Token. Paths below are relative to /api/sdk/v1 on the customer's brand host. See credentials and token lifecycle for authentication and refresh.

The ticket-list response adds meta.transfers_enabled, a boolean describing transfer availability for the current request context. Use it to decide whether to offer the transfer interface, then handle each action's eligibility and authorization errors. It is not permission to transfer every returned ticket.

Read operations and scope

ResourceListRead oneRecords returned
TicketsGET /ticketsGET /tickets/{id}Tickets the customer owns or holds. An owner viewing a ticket held by someone else receives redacted pass data.
SubscriptionsGET /subscriptionsGET /subscriptions/{id}Subscriptions belonging to the customer.
TransactionsGET /transactionsGET /transactions/{id}Transactions belonging to the customer, including line items and addresses.

Swagger UI showing the SDK Subscriptions and SDK Ticket Transfers operation groups of the SDK API V1 specification

SWAGGER UI at /swagger/sdk/html with SDK API V1 chosen in the definition picker — twelve of this page's twenty operations in one frame. Choosing the definition is a step: the page opens on the REST spec, as SDK HTTP API overview shows.

Use the returned record's id (its UNIDY ID) in resource paths, rather than a database ID, order reference or transfer token. A single-resource request returns the object directly; collection requests use results and meta.

Confirm the data boundary before launch

The SDK client's brand assignment controls which brand hosts accept its key. It does not add a brand filter to every collection: the current subscription and transaction queries are customer-scoped, without an additional current-brand restriction. Do not treat a client-side filter or hidden navigation item as data isolation. If customers must only receive one brand's data, confirm the server's isolation behavior with the integration owner before enabling the view.

Lists, pagination and filtering

http
GET /api/sdk/v1/tickets?state=active&order_by=starts_at&order_direction=desc&page=1&limit=50
Authorization: Bearer YOUR_SDK_API_KEY
X-ID-Token: CUSTOMER_ID_TOKEN
json
{
  "meta": { "count": 0, "page": 1, "limit": 50, "last": 1, "prev": null, "next": null },
  "results": []
}

limit defaults to 50 and is capped at 250. Follow meta.next until it is null; do not rely on an empty page to stop. Render loading, failure and empty states separately. Page-based results can change while records are updated, so this is not a snapshot or a guaranteed lossless export protocol.

Pass filters directly as query parameters. Equality is the default. For another comparison, add _ops[field] with not_eq, gt, gte, lt, lte or like. The like comparison is case-insensitive and surrounds the value with % unless it already contains %.

http
GET /api/sdk/v1/subscriptions?next_payment_at=2026-12-01T00%3A00%3A00Z&_ops[next_payment_at]=lt
ResourceFilter fieldsAdditional sort fields
Ticketsservice_id, state, payment_state, venue, text, title, reference, starts_at, ends_at, ticket_category_idstarts_at, ends_at, reference
SubscriptionsThe same shared fields, with subscription_category_id in place of ticket_category_id, plus next_payment_atstarts_at, ends_at, title
Transactionsstate, financial_status, order_type, source_platform, placed_at, external_idplaced_at, total

All three support order_by=created_at, which is the default, and order_direction=asc or desc (default). An unsupported sort falls back to created_at desc. Each field takes one filter value and operator; there is no two-ended range object. The category parameters accept the category's UNIDY ID and use equality; an unknown category produces an empty list.

Read the response fields

Tickets and subscriptions

Field groupHow to use it
id, reference, category IDid identifies the Unidy record; reference is its external reference. Ticket and subscription category IDs identify different catalogues.
user_id, holder_idThe ticket's owner and current holder. A transfer changes the holder while retaining the owner. Subscriptions do not have a holder.
title, text, button_cta_urlCustomer-facing content. Treat text as data, and validate destinations before using them in application navigation.
state, payment_stateTicketable state is active, passive or inactive. Payment values include the literal spellings payed and not_payed; payment state may be null.
price, currencyDisplay the amount with its currency and preserve null as unknown. Avoid floating-point arithmetic for money.
starts_at, ends_at, created_at, updated_atEvent or entitlement dates are distinct from the record's creation/update dates. Tickets also expose entered_at.
wallet_export, exportable_to_walletPass data and export availability. Use the availability flag for presentation and still handle an export refusal.
metadataIntegration-provided JSON. Do not assume a fixed set of keys or that it is always an object.

Tickets also have fields such as venue, seating and info_banner. Subscriptions instead add payment_frequency and next_payment_at; their start date can be absent. Use the API reference for the complete response schema.

Transactions

Field groupHow to use it
id, external_id, reference, invoice_numberDistinguish the Unidy ID from source-system and invoice references.
source_platform, source_channel_id, platform_metadataSource identifiers and integration-provided JSON.
stateopen, partially_paid, paid, partially_refunded, refunded or cancelled. These values do not guarantee a particular transition sequence.
financial_status, fulfillment_status, order_typeSource-provided strings; do not assume the values match the state enum.
currency, total, subtotal, discount/tax/shipping/paid/refunded totalsAmounts may be null. Use an appropriate decimal representation for calculations.
placed_at, completed_at, cancelled_atBusiness timestamps. placed_at is when the source order was placed; created_at is when its Unidy record was created.
line_itemsAn embedded array with product names, quantities, amounts and metadata.
billing_address, shipping_addressAddress objects or null.

Staff notes are not confidential on this surface

The current transaction and line-item responses include staff_note. Hiding that field in a component does not prevent the customer from receiving it. Do not store confidential material in these notes when exposing the SDK transaction API. Ask the integration owner to address server-side serialization before relying on staff-only confidentiality.

Download a PDF or wallet pass

Tickets and subscriptions support the same export operations. Replace {resource} with tickets or subscriptions and {id} with its UNIDY ID.

OperationResponse
GET /{resource}/{id}/exports/pdfPDF bytes; requires both headers.
GET /{resource}/{id}/exports/pkpassApple Wallet pass bytes; requires both headers.
POST /{resource}/{id}/export_link201 with url and expires_in; requires both headers.
GET /ticketables/{token}Downloads the linked export without either header.
  1. Read the record and check exportable_to_wallet before offering a download.
  2. When the customer clicks, request a link with the chosen format. Do not append a format suffix to the export_link request.
  3. Open the returned URL immediately. Handle a refusal by refreshing the record and showing an appropriate message.
http
POST /api/sdk/v1/tickets/TICKET_UNIDY_ID/export_link
Authorization: Bearer YOUR_SDK_API_KEY
X-ID-Token: CUSTOMER_ID_TOKEN
Content-Type: application/json

{ "format": "pkpass" }
json
{
  "url": "https://YOUR_BRAND_HOST/api/sdk/v1/ticketables/EXPORT_TOKEN.pkpass",
  "expires_in": 300
}

The category must enable wallet export and the record must contain wallet data with a QR code. This requirement also applies to PDF export. A missing capability yields 403 not_exportable; an unsupported requested format yields 422 invalid_format.

A ticket category record in the Unidy dashboard, Info tab, with the Wallet Pass section showing Enable wallet export set to No

TICKET CATEGORY — the seeded CONCACAF Gold Cup category, at Settings → Ticket Categories · highlight on Enable wallet export. With this No, every ticket in the category serialises exportable_to_wallet: false and all three export routes refuse.

The returned link is a bearer capability valid for five minutes. Avoid logging it, embedding it in analytics, or storing it for later use. Treat its token as opaque. Invalid or expired signed record identifiers return 401 invalid_or_expired_token; do not assume every possible URL alteration produces that response.

Transferred-ticket exports need deployment verification

The dedicated ticket list applies holder-aware redaction, but the current export lookup uses ticket ownership. A holder can therefore receive a ticket in the list and still get 404 when exporting it; the original owner's export access can also differ from the redacted list. Confirm a server-side resolution before offering transferred-ticket pass downloads. Changing button visibility alone does not enforce access.

Transfer a ticket

Transfers require the brand's ticket-transfer capability. They are separate from creating or editing a ticket, and subscriptions cannot be transferred through these operations. The current React package provides useTicketTransfers; see React SDK if you use the library.

The Ticket Settings screen in the Unidy dashboard for the unidy brand, with the Ticket transfers checkbox unchecked

TICKET SETTINGS — Customization → Ticket Settings, scoped to one brand by the picker at the top left · highlight on Ticket transfers, off in the seeded brand. This is the only switch on either surface that produces feature_disabled.

OperationTask
GET /ticket_transfersRead incoming and outgoing transfer arrays.
POST /tickets/{ticket_id}/transferOffer an active, owned ticket; send { "recipient_email": "recipient@example.com" }.
POST /ticket_transfers/{token}/acceptAccept an offer as the intended recipient.
POST /ticket_transfers/{token}/declineDecline an incoming offer.
POST /ticket_transfers/{token}/cancelCancel a pending outgoing offer as its sender.
POST /tickets/{ticket_id}/transfer/revokeReclaim a transferred ticket as its owner.
POST /tickets/{ticket_id}/transfer/returnReturn a ticket as its current holder.

Offers progress from pending to accepted, declined, canceled or expired. An accepted transfer can become reverted through return or revocation. Pending offers expire after fourteen days. Do not infer that a cached pending response is still actionable: handle the operation's current response and refresh the list afterward.

Ticket and transfer lookups in this workflow are brand-scoped. Use the brand host associated with the ticket; a valid token on the wrong brand can return 404. Only one pending offer is permitted per ticket. Creating an offer sends email and may invite a new customer; prevent duplicate submissions and reconcile after an uncertain network result instead of blindly retrying.

Handle failures

ResponseClient action
401 missing_api_key / invalid_api_keyCorrect the SDK application configuration.
401 missing_id_token / invalid_id_tokenObtain a current customer token; use the session recovery rules rather than an unlimited retry loop.
403 origin_not_allowed on these resource operationsCheck that the SDK client is assigned to the brand host. Browser CORS failures are diagnosed separately.
403 feature_disabled on transfersShow transfer as unavailable. Recheck when needed; an administrator can change the setting during a session.
403 real_email_requiredOpen the hosted real-email recovery flow described in Profile and user operations. PATCH /profile cannot set email.
404 not_foundThe resource is absent or unavailable to this customer/operation; do not reveal another customer's details.
429 rate_limit_exceededApply bounded backoff. Use Retry-After when your client can read it; otherwise use a capped delay with jitter.

General SDK rate limits apply, with an additional creation limit of five ticket-transfer offers per five minutes per sender. See SDK troubleshooting for recovery details.

The ticket, subscription and transaction feature switches used by the dashboard and REST API do not currently protect these SDK collection routes. Treat transfer gating, collection access and export eligibility as separate contracts.

The Feature Flags screen in the Unidy dashboard showing Enable subscriptions, Enable tickets and Enable transactions, all checked

FEATURE FLAGS — Settings → Feature Flags, all three product areas on in the seeded account · highlight on Enable tickets, whose description promises to gate "the tickets API endpoints". It gates the REST API and the dashboard; the SDK HTTP API ignores it.

Was this page helpful?