contracts

Update contract metadata

Updates a contract's metadata by merging the provided top-level keys with the existing metadata.

Providing a value sets or replaces that key. Providing null removes the key. Keys omitted from the request are left unchanged.

The merge is shallow: if a value is an object, it replaces the existing value for that key rather than merging recursively. Nested null values are stored as part of the object and do not remove nested keys.

Removing a key that does not exist succeeds without changing the metadata. If all keys are removed, the metadata becomes an empty object ({}). To clear metadata entirely and set it back to null, use DELETE on this endpoint.

The resulting metadata may not exceed 16KB when serialized as UTF-8 JSON. The limit applies after the update is merged, not to the request payload by itself. Requests that would exceed the limit return 400. Requests that only remove keys are always allowed.

This endpoint only accesses contracts belonging to the authenticated merchant. Requests for contracts owned by another merchant return 404.

patch/v3/contracts/{id}/metadata

Request

  • Base URL: https://integrators.prod.api.tabsplatform.com
  • URL: https://integrators.prod.api.tabsplatform.com/v3/contracts/{id}/metadata
  • Auth: API key in header Authorization

Path parameters

idstring required

Contract Id

Request body

metadataobject required

Metadata keys to add, update, or remove. Providing a value sets or replaces the corresponding top-level key. Providing null removes the key. Keys omitted from the request are left unchanged. Objects are replaced as a whole rather than merged recursively. The resulting metadata may not exceed 16KB of UTF-8 encoded JSON; the limit is checked against the merged result, not against this payload on its own.

Response

The contract's metadata after the merge

payloadV3ContractsIdMetadataPatchResponsesContentApplicationJsonSchemaPayload required

Response payload, will be empty when success is false

successboolean required

Boolean with true=success, false=failure

messagestring required

Plain-text description of the result

Changes

No recorded changes to this operation across all 1 revision of this API.