Breaking changes and migrations
Update affected consumers and verify compatibility before switching.
Use these recipes only for the affected contract on your instance. Confirm the server update and configuration with your Unidy contact; the recipes do not announce a deployment date or an unconfirmed retirement deadline. Record the current configuration and keep a recovery plan before changing a production consumer.
Moving an integration to API v2
V1 remains a separate interface. Enabling v2 does not convert a v1 client or its credentials.
- Confirm API v2 and the required product features are enabled on the target instance.
- Provision a v2 API key with explicit roles and allowed brands, or a qualifying user OAuth application configured for
api_v2with S256 PKCE. - Download that instance's
/swagger/v2/json. Map public IDs, requestpayload.data, responserecord/records, and error details explicitly. - Replace v1 collection assumptions: use
meta.pagination,previous, and the selected page/cursor strategy. V1's past-the-end clamping does not apply to v2. - Exercise representative reads, validation failures and reconciled writes before moving traffic. Preserve the previous client's checkpoint and avoid running competing writers.
See the v2 guides for features and operation-specific restrictions.
Earlier loyalty paths
Replace /api/v2/loyalty/programs/{program_id} with /api/v2/data/loyalty_programs/{program_id}. The compatibility route provides Deprecation and a successor Link; no removal deadline is announced. Use program/season UUIDs and the supported current season alias, rather than removed codes or slugs. See Loyalty.
Webhook signing
Affected: receivers that verify legacy v1 signatures. Existing registrations retain v1; new registrations default to v2.
| Scheme | Version header | Verification input |
|---|---|---|
| Legacy v1 | UNIDY-WEBHOOK-VERSION: v1 | SHA-256 of secret + raw_body |
| v2 | UNIDY-WEBHOOK-VERSION: v2 | HMAC-SHA256 with the secret as key, over timestamp + "." + raw_body |
For v2, the timestamp comes from UNIDY-WEBHOOK-TIMESTAMP; compare the result with UNIDY-WEBHOOK-SIGNATURE.
- Preserve the exact raw request bytes before JSON parsing. Do not verify against reserialized JSON.
- Add v2 verification and reject unknown signature versions. Check a bounded timestamp tolerance and use a constant-time digest comparison.
- Test valid deliveries, altered bodies, altered timestamps, expired timestamps, and duplicate delivery IDs. Use
UNIDY-WEBHOOK-DELIVERY-IDfor durable duplicate handling; retries may have fresh signing timestamps. - Deploy the receiver before switching the registration out of legacy mode. During a staged transition, accept only the explicitly configured schemes for that endpoint; never fall back to v1 after v2 verification fails.
- Switch the registration and verify a new real event end to end. Inspect delivery status and your receiver's processing result.
- Once migration is complete, require v2 for that endpoint. Keep legacy verification only for registrations that are still deliberately configured for v1.
The signing change does not itself rotate the secret or convert event payloads. Handle those as separate changes. See Configure and secure a webhook for the receiver implementation.
Transaction identifiers
Affected: REST clients storing integer line-item IDs or transaction category internal names as route identifiers.
| Before | Current contract | Migration |
|---|---|---|
Integer line_items[].id | UUID string | List the transaction's line items and store the returned IDs. Use the UUID in nested line-item routes. |
Category internal_name in the member URL | Category unidy_id UUID | List transaction categories and explicitly map each existing external category to its UUID. Do not rely on display-name uniqueness. |
| Repeated unkeyed nested line-item writes | Items matched by id or external_id; otherwise newly created | Supply stable keys or use deliberate full replacement. |
- Export your existing mapping before changing it. Retain external platform keys alongside the new UUIDs.
- Fetch categories with
GET /api/v1/transaction_categoriesand line items withGET /api/v1/transactions/{transaction_id}/line_items. - Confirm ambiguous category mappings with an administrator. Avoid selecting the first matching display name.
- Update stored IDs and request paths. Preserve IDs as strings throughout storage, serialization, and validation.
- Test reads, updates, and retries on known records. Confirm that a repeated update does not add duplicate line items.
replace_line_items=true intentionally replaces the existing set with the supplied array. Use it only when your application owns the complete set and can provide all items. It is not a general workaround for an uncertain retry.
Transaction webhook payloads
Affected: consumers of transaction.created and transaction.updated using the older payload structure.
| Field | Older payload | Current payload |
|---|---|---|
| Transaction, user, and category IDs | Integer identifiers | UUID strings |
| Money fields | Decimal strings | JSON numbers |
| Line-item collection | transaction_line_items | line_items |
| Transaction UUID | Separate unidy_id | id |
| Timestamps | Earlier timestamp formatting | ISO 8601 with milliseconds |
| Billing and shipping addresses | Not included | Objects or null |
| Line-item parent/timestamp fields | Included in each nested item | Omitted from the nested representation |
Update your schema and fixtures before processing the changed payload. Keep external reconciliation keys separate from Unidy UUIDs. Convert money values to your application's decimal representation deliberately; do not assume binary floating-point arithmetic is suitable for financial totals.
Test create and update events, null addresses, empty and populated line-item sets, and duplicate delivery handling. Compare stored results with the REST transaction record, while remembering that a later REST read can reflect changes after the original event.
Email and link ticket-transfer offers
New email-addressed offers are token-based. Their recipient_id can be null until acceptance, and a signed-in user other than the ticket owner can accept using the token. The address controls delivery. Link offers can also have a null recipient_email.
Keep recipient_id and recipient_email nullable in consumers, protect claim links, and test forwarded-link handling. Offers created for an explicit user ID and older pending offers with a linked recipient stay account-bound. Accepting your own offer now reports recipient_is_owner.
V1 ticket and subscription permission rollout
Before enabling role-based v1 scoping on an instance, compare the OAuth application's effective roles and service/category/brand restrictions with its legacy service access. Exercise allowed and denied requests with the real integration credential. Keep OAuth scopes and user/ownership checks in the migration; a role assignment alone does not replace them. See V1 scoping.
Per-application token settings
OAuth ID-token lifetime is configurable per application. Validate exp instead of hardcoding 120 seconds. An application can opt into JWT-form user access tokens while client-credentials tokens remain opaque. Preserve the distinction between access-token and ID-token audiences, and continue handling expiry and revocation. See Token formats.
Newsletter confirmation IP
Newsletter confirmation IP is no longer stored or serialized. Remove confirm_ip from required response schemas and avoid relying on it as a consent-evidence field. Incoming values are ignored for compatibility; a successful write does not establish that an IP was retained. Preserve any independently required evidence in the agreed evidence system and continue checking the actual confirmation state.
Webhook owner permission rollout
Before enabling webhook RBAC scoping, assign and inspect each integration registration's owner, roles and constraints. Test both allowed and denied record events; a matching subscription alone no longer guarantees a delivery for a record the owner cannot read. Unowned registrations keep their existing matching behavior. See owner rollout details.
SDK service-connections endpoint
Affected: clients calling GET /api/sdk/v1/services.
Call GET /api/sdk/v1/service_connections directly. The older GET route currently redirects to the replacement; remove dependence on redirect handling in your HTTP client. Verify the returned service connections and any follow-up disconnect action with the SDK API key and current user's ID token.
No retirement date for the compatibility redirect is announced here. See the deprecation register.
SDK sign-in and token checks
Affected: clients that reuse another sign-in's refresh token, send an OAuth application's ID token to SDK endpoints, or submit required fields before authenticating the sign-in.
- Keep the refresh token with the SDK sign-in and user that produced it. An invalid association returns
401 invalid_refresh_token. - Send an SDK-issued ID token for SDK user requests. A token issued to a different OAuth client is not interchangeable.
- Continue required fields only after the sign-in enters that state. If it has expired, restart authentication; do not loop the same completion request.
- Treat invalid or expired authentication as a new sign-in requirement. Do not bypass the checks by changing a user's identifier in the request.
Verify password, social, brand-connection, required-fields, refresh, and sign-out paths used by your application. The SDK HTTP reference provides the endpoint-level contract.