Skip to main content
PATCH
/
v1
/
categories
/
{id}
Update a Category
curl --request PATCH \
  --url https://api.bookeeping.ai/public-api/v1/categories/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "emoji": "<string>",
  "group": "<string>",
  "parentCategory": "INCOME",
  "number": ""
}
'
{
  "message": "<string>",
  "metaData": {
    "warnings": [
      "<string>"
    ]
  },
  "data": {
    "_id": "<string>",
    "name": "<string>",
    "projectId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "emoji": "<string>",
    "parentCategory": "INCOME",
    "isArchived": true,
    "number": "<string>",
    "group": "<string>",
    "createdBy": "USER"
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Get your key from the Dashboard > Settings > API Access.

Path Parameters

id
string
required

The id of the category. Expected to be a valid object id like 666666666666666666666666

Body

application/json
name
string

The name of the category

emoji
string | null
group
string | null
parentCategory
enum<string>

The parent category of the category

Available options:
INCOME,
OTHER_INCOME,
SALES,
EXPENSE,
DEPRECIATION,
COST_OF_GOODS_SOLD,
OTHER_EXPENSE,
OVERHEAD,
CURRENT_ASSET,
FIXED_ASSET,
INVENTORY,
NON_CURRENT_ASSET,
PREPAYMENT,
LIABILITY,
CURRENT_LIABILITY,
NON_CURRENT_LIABILITY,
TAX_PAYABLE,
TAX,
EQUITY,
OTHER
number
string
default:""

The number of the category

Response

Update a Category executed successfully

message
string

Success message

metaData
object
data
object