Unidy Docs

Uploads and data workflows

Use v2 image uploads, nested records, newsletter operations and ticket transfers.

Use these patterns with the v2 envelope and authorization contract. Read each operation's deployed schema before writing; v1 payloads and internal numeric identifiers cannot generally be reused.

Upload a category image

  1. Send raw file bytes to POST /api/v2/uploads?purpose=TicketCategory&field=logo&filename=logo.png, with your bearer token and the file's content type.
  2. Read the opaque image ID from the upload receipt.
  3. Include "logo": { "image_id": "UPLOAD_ID" } inside the category's payload.data.
  4. Read the saved category and verify its image.

Subscription categories support the same staged-image pattern. Follow the schema for each supported purpose and field. Staged image IDs expire after one hour and are bound to their model and field; they are not reusable attachment identifiers for arbitrary resources.

PATCH /api/v2/uploads/{purpose}/{id}/{field} uploads raw bytes directly to an existing supported record. A failed image validation preserves the existing image. Do not JSON-encode binary bytes.

On JSON updates, an omitted image preserves it. An optional background can be removed with { "delete": true }; the required logo cannot be removed. Translated fields such as title_t use language-keyed maps; a null translation removes that language where the operation supports it.

Use public IDs in /data/users/{user_id} and its supported nested resources. A user's plugin data is a separate integration link: creating or reviving it can return 201, while replacing an existing link returns 200. Read the result rather than branching only on one successful status.

Use the dedicated disable-login operation when that is your task; do not confuse disabling login with deleting the customer or disconnecting one provider.

Transaction line items can be matched by stable IDs or external IDs. Use full replacement only when you own the entire set. Unkeyed repeated writes can append items; a timeout does not make a repeated create safe.

Newsletters and confirmation

V2 supports newsletter administration and user-nested subscriptions, alongside the customer-owned /me flow. Use the appropriate resource and its public IDs.

An existing subscription's email is immutable through the subscription update operation. Do not interpret an ignored field warning as a successful email change. A duplicated subscription can return 422 when validation finds it or 409 conflict when a concurrent request wins.

Where supported, use request_confirmation to send the confirmation email. Inspect subscription state afterwards; a successful send request is not consent confirmation.

Ticket transfer offers

Administrative transfer routes live under /api/v2/data/tickets:

OperationRoute
List transfersGET /transfers or GET /{ticket_id}/transfers
Open one offer or an atomic batchPOST /transfers
Accept for an eligible userPOST /transfers/{id}/accept
Cancel a pending offerDELETE /transfers/{id}

Paths above follow /api/v2/data/tickets. A single create uses payload.data; a batch uses payload.batch, up to 100 entries. A failed entry prevents the batch being created, and error details identify entry indexes.

Use the operation's mode and recipient fields: a link offer is distributed by your application; an email offer asks Unidy to send the link. The offer token is the credential for link/email acceptance, so protect claim URLs. A dashboard direct assignment has mode: direct in history; it is not a create-offer mode.

Transfers depend on feature availability and ticket eligibility, and delegated OAuth cannot perform several ticket-moving actions. Keep owner and holder separate, and use Ticket transfers for the lifecycle.

Deletion and retry checks

Deleting a newsletter or category can affect dependent records. Where the operation requires confirmation for a cascade of 100 or more records, inspect the impact before deliberately adding confirm_delete=true. An in-use category can still reject deletion.

After an uncertain write, use a read or scoped unique lookup to reconcile. A 409 indicates a conflict to investigate, not a blanket successful-retry response.

Was this page helpful?