Skip to main content
PATCH
Update a category

Authorizations

Authorization
string
header
required

A group API key, sent as Authorization: Bearer sw_live_…. Keys from staging and the demo start sw_test_ instead. A group admin creates keys in Settings → Integrations → API keys.

Scopes

accounting:write

Headers

If-Match
string

The ETag you last read for this record. If the record has changed since, the change is refused with 412 stale_write, which carries its current ETag. Optional, and recommended: without it the last write wins.

Path Parameters

categoryId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json

Send only the fields to change. A field not listed here is refused with a 400.

name
string
Required string length: 1 - 100
code
string | null

An account code, unique in the group, like 5110. null clears it.

Required string length: 1 - 10
Pattern: ^[A-Za-z0-9][A-Za-z0-9.-]*$
parentId
string<uuid> | null

The parent category, of the same type. null makes it top level.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
isGiftAidEligible
boolean
sortOrder
integer
Required range: -9007199254740991 <= x <= 9007199254740991
isHidden
boolean

Hide it from new entries in the app, or show it again. Lines that already use it keep it. A category cannot be deleted.

{key}
any

Response

OK

data
object
required
{key}
any