Skip to main content

PATCH /ledger/v1/:ownerId/:ledgerId - update a ledger

Partially updates a ledger and returns it as a Ledger resource. Only the fields present in the body are changed; today name is the only updatable field, and any other fields are ignored. A ledger's ledgerId, owner, and creation time can never change.

Path parameters

Name

Type

Notes

ownerId

UUID string

The ledger's owner. Must be the owner the token belongs to.

ledgerId

UUID string

The ledger to update.

Authentication

  • Send a bearer token: Authorization: Bearer <token>.

  • The token must belong to the ledger's owner. A token of another owner, or a ledgerId that does not exist, is rejected with 403 Forbidden; the two cases are deliberately indistinguishable.

  • The token must carry the ledger:create scope. A token without it is rejected with 403 Forbidden, whose detail names the missing scope.

Request body - required. A JSON object (UpdateLedgerRequestBody); {} changes nothing and returns the ledger as it currently is:

Field

Type

Notes

name

string, optional

New name for the ledger; "" clears it. When omitted the name is left unchanged.

Responses

Status

Body

Meaning

200 OK

Ledger

The ledger as it is after the update.

400 Bad Request

application/problem+json

The body is invalid or a path parameter is not valid, for instance not a valid UUID

401 Unauthorized

application/problem+json

Bearer token is missing, malformed, expired, or revoked

403 Forbidden

application/problem+json

The token belongs to another owner, the ledger does not exist, or the token lacks the ledger:create scope. The first two are deliberately indistinguishable so the response does not reveal which ledgers exist.

413 Content Too Large

application/problem+json

Body size is > 64KiB.

415 Unsupported Media Type

application/problem+json

Declared charset is unknown

4xx

application/problem+json

Other client errors (see "Errors").

Example (illustrative values)

PATCH https://ledger.enzuzo.com/ledger/v1/5d2e8c71-9a4b-4f3e-b6d0-1c7a2e9f4b83/5ae66dc4-2a1a-4c84-b559-c7959100bb24
Authorization: Bearer <token>
{ "name": "Marketing site (EU)" }
HTTP/1.1 200 OK
{
  "apiVersion": "v1",
  "kind": "Ledger",
  "metadata": {
    "name": "Marketing site (EU)",
    "id": "5ae66dc4-2a1a-4c84-b559-c7959100bb24",
    "ownerId": "5d2e8c71-9a4b-4f3e-b6d0-1c7a2e9f4b83",
    "createdAt": "2026-10-15T17:22:05.123Z"
  }
}
Did this answer your question?