Schemas and identifiers
Use the correct public identifiers and interpret API field values.
Keep public Unidy identifiers, provider identifiers, and display values in separate fields. A value named id is not guaranteed to mean the same thing on every API or webhook payload.
Resource identifiers
| Resource or field | Value to store and send | Guidance |
|---|---|---|
REST user id, user paths, and resource user_id | Public Unidy user UUID | Use the UUID returned by the REST API, not an internal database row number or email address. Email can change. |
REST ticket, subscription, transaction id | That resource's public Unidy UUID | IDs identify different resource types; never substitute the user's UUID for a resource ID. |
| Ticket, subscription, and transaction category | Public category UUID | Resolve the category for the same resource type before writing. Display names are not identifiers. |
| Newsletter in newsletter routes | Newsletter's internal name | This is distinct from its display title and the numeric newsletter_id returned on subscriptions. URL-encode path values. |
| Newsletter subscription | Numeric id; additionally unidy_id when UUID support is enabled | UUID member paths are available only with that rollout enabled on the tenant. Retain the returned identifiers and confirm supported lookup before switching existing integrations. |
| Transaction upsert business key | external_id, source_platform, and source_channel_id together | Preserve all three consistently, including null/empty conventions. These identify an external business record, not its Unidy UUID. |
| Transaction line item | Existing item id or stable external_id, as supported by the operation | An unkeyed item in an update is a new item. Repeating it can create duplicates. |
| Custom attribute | Definition's internal name | Use the name as the values-object key. Respect the definition's type and API visibility. |
| Newsletter preference | plugin_identifier / API preference_identifiers | Use the provider-linked identifier required by the newsletter configuration, not a translated label. |
Use the REST reference or SDK HTTP reference for the specific operation. Do not assume that a webhook's nested id uses the REST representation: follow the webhook event reference.
Missing, null, and empty values
- Missing field: the response did not supply it. It may be excluded by permissions, options, feature configuration, or the endpoint's response format. Do not silently convert omission into a deletion in your destination.
null: the response explicitly supplied no value. It can also be a redaction: for example, a transferred-away ticket can exposemetadata: nulland no wallet export to its original owner.- Empty string or array: a supplied value, not interchangeable with null. Apply the field's documented validation and clearing rules.
- Omitted request field: on a partial update, leave it out when you do not intend to change it. Whether null or an empty value clears a field depends on the operation; do not apply a universal clearing convention.
Newsletter subscription user_id can be null; do not assume every subscription is linked to a user account. A ticket's user_id is its owner, while holder_id can identify a different customer after transfer.
Types and dates
Preserve the documented JSON type. Parse timestamp values as instants with their timezone offset; compare parsed instants rather than arbitrary timestamp strings. Treat date-only fields such as date_of_birth as dates without converting them through a local-time midnight. Some money fields are JSON numbers: follow the endpoint's currency and amount convention and use an appropriate decimal representation in accounting code.
Request filters can use different precision from response fields. In particular, REST user-list changed_since is date-based even though users have timestamp-valued updated_at. See Pagination and filtering before implementing synchronization.
Validate in layers
A payload matching an OpenAPI schema can still fail resource ownership, scope, feature, category, uniqueness, or other business validation. Validate input locally for quick feedback, handle server validation responses, and read back meaningful business state after an uncertain write. For retry and duplicate handling, see Errors, idempotency, and retries.