Contracts

Patches contract metadata

Changed on

Partial update. Keys omitted from the request body are left unchanged; send a key with a null, empty, or whitespace-only value to clear it. Prefer this over update-contract-metadata when setting or clearing individual keys, as it cannot disturb keys you did not name. Archived keys may only be cleared, never changed. Every key must name a definition assigned to contracts: an unknown key, or one assigned only to another entity type, fails the request with a 400. Keys are never silently ignored. The write is atomic: if any key fails validation, nothing is written. A matching contract "Edit or amend" approval rule holds the change: the request answers 202 with the approval request, and the contract keeps its values until the request is approved. While another change to the contract waits for approval, the request is refused.

patch/contracts/{contract_id}/metadata

Request

Path parameters

contract_idstring required

UUID of the contract to patch metadata for.

Request body

metadataobject required

Values keyed by definition key. A partial update: keys omitted here are left unchanged, and null, empty, or whitespace-only values clear one key. Values are trimmed; TEXT values allow at most 256 characters and no line breaks.

Example request

{
  "metadata": {
    "metadata.source_invoice_id": "NS-INV-004821"
  }
}

Response

OK

OR

Example response

{
  "metadata": {
    "metadata.source_invoice_id": "NS-INV-004821"
  }
}

Changes