API for managing expense categories in the Boya platform
API for managing expense categories in the Boya platform
curl -i -X GET \
https://developer.boyahq.com/_mock/categories/categories \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
[ { "_id": "string", "groupid": "string", "name": "string", "description": "string", "status": "ACTIVE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "subcategories": [ … ] } ]
curl -i -X POST \
https://developer.boyahq.com/_mock/categories/categories \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"name": "PT Certs",
"description": "PT Certs"
}'
{ "_id": "string", "groupid": "string", "name": "string", "description": "string", "status": "ACTIVE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "subcategories": [ { … } ] }
curl -i -X GET \
'https://developer.boyahq.com/_mock/categories/categories/{categoryId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
{ "_id": "string", "groupid": "string", "name": "string", "description": "string", "status": "ACTIVE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "subcategories": [ { … } ] }
curl -i -X PATCH \
'https://developer.boyahq.com/_mock/categories/categories/{categoryId}' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"name": "Updated PT Certs",
"description": "Updated PT Certs description",
"status": "ACTIVE"
}'
{ "_id": "string", "groupid": "string", "name": "string", "description": "string", "status": "ACTIVE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "subcategories": [ { … } ] }
curl -i -X DELETE \
'https://developer.boyahq.com/_mock/categories/categories/{categoryId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
{ "message": "Category archived successfully", "status": "ARCHIVED" }
curl -i -X POST \
'https://developer.boyahq.com/_mock/categories/categories/{categoryId}/subcategories' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"name": "Free",
"description": "free courses",
"code": "F9034",
"groupid": "67bb3fecdc7a527982f1b790",
"category_id": "67bb3fecdc7a527982f1b790",
"teams": [
"672dd361617c24141539cd96"
]
}'
{ "_id": "string", "group_id": "string", "category": "string", "code": "string", "name": "string", "description": "string", "status": "ACTIVE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "mapping_id": "string", "teams": [ "string" ] }
curl -i -X PATCH \
'https://developer.boyahq.com/_mock/categories/categories/{categoryId}/subcategories/{subcategoryId}' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"name": "Updated Free",
"description": "Updated free courses description",
"teams": [
"672dd361617c24141539cd96"
]
}'
{ "_id": "string", "group_id": "string", "category": "string", "code": "string", "name": "string", "description": "string", "status": "ACTIVE", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "mapping_id": "string", "teams": [ "string" ] }
curl -i -X DELETE \
'https://developer.boyahq.com/_mock/categories/categories/{categoryId}/subcategories/{subcategoryId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
{ "message": "Subcategory archived successfully", "status": "INACTIVE" }