Skip to content

Update a subcategory

Request

Security
oauth2ClientCredentials(Required scopes: categories:write)
Path
categoryIdstringrequired

Category ID

subcategoryIdstringrequired

Subcategory ID

Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
namestring

Subcategory name

Example:"Water Bill"
descriptionstring

Subcategory description

Example:"Water bill expenses"
codestring

Subcategory code

Example:"405034"
statusstring

Subcategory status

Enum:"ACTIVE""ARCHIVED"
Example:"ACTIVE"
curl -i -X PUT \
  'https://developer.boyahq.com/_mock/v2/openapi/categories/{categoryId}/subcategories/{subcategoryId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "name": "Water Bill",
    "description": "Water bill expenses",
    "code": "405034",
    "status": "ACTIVE"
  }'

Responses

Subcategory updated successfully

Bodyapplication/json
_idstring

Subcategory MongoDB ID

group_idstring

Group ID

categorystring

Parent category ID

codestring

Subcategory code

namestring

Subcategory name

descriptionstring

Subcategory description

statusstring

Subcategory status

Enum:"ACTIVE""ARCHIVED"
teamsArray of arrays

Team IDs array

createdAtstring

Created timestamp

updatedAtstring

Updated timestamp

mapping_idstring

Mapping ID

iconstring

Icon

__vnumber

Version key

Response
{ "_id": "string", "group_id": "string", "category": "string", "code": "string", "name": "string", "description": "string", "status": "ACTIVE", "teams": [ [] ], "createdAt": "string", "updatedAt": "string", "mapping_id": "string", "icon": "string", "__v": 0 }