Updates an existing category. Accepted fields depend on the category type:
- Custom categories (
custom: true):nameandaccounting_code_idare mutable;enabledreturns 400. - System categories (
custom: false):enabledandaccounting_code_idare mutable;namereturns 400.
Security
BearerAuth
New display name. Only accepted for custom categories (custom: true). Returns 400 for system categories.
Example:"Updated Category Name"
Whether this category is available for use. Only accepted for system categories (custom: false). Returns 400 for custom categories.
Example:false
PATCH
curl -i -X PATCH \
https://public.letsweel.com/v1/businesses/123/categories/7cb19e45-1234-5678-abcd-ef9876543210 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated Category Name",
"enabled": false,
"accounting_code_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'OK
The unique identifier for this category.
Example:"7cb19e45-1234-5678-abcd-ef9876543210"
Whether this is a custom category created by the business. System-defined categories have custom: false.
Example:false
The ID of the GL code mapped to this category, or null if no mapping exists.
Example:"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Response
{ "id": "7cb19e45-1234-5678-abcd-ef9876543210", "name": "Travel", "custom": false, "enabled": true, "accounting_code_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "created": "2025-01-01T00:00:00Z", "updated": "2025-01-01T00:00:00Z" }