# Categories ## Category API: `/api/bw/v2/category` API BW version 2 (Beta) Allows you to add, update or delete Category terms that are used to categorize or filter the Resources and Maps of a Boldest platform account. ## Methods ### POST: Create/Update Category - POST `json` Data to import in JSON format according to Schema /api/bw/v2/category/schema.json Consult the [**`Schema documentation`**](#category-schema-documentation) for the structure of the JSON data. **RESULT**: `HTTP 201` Created. The Category did not exist, so it was created ```json { "done": "Create Category TEST111", "id": "TEST111", "new": true, "update": true } ``` `HTTP 202` Accepted. The Category existed, so it was updated ```json { "done": "Update Category TEST111", "id": "TEST111", "new": false, "update": true } ``` `HTTP 400` Wrong request ```json { "fail": "Wrong request" } ``` `HTTP 401` Unauthorized ```json { "fail": "Unauthorized" } ``` `HTTP 409` Conflict. The submitted contents are not valid ```json { "fail": "Explanation of the problems encountered" } ``` ### GET: Get Category/s - `/{ids}` Id or Ids CSV format (Optional) - `/excludeFiles` Ignore file fields (Optional) (Default:No) ### DELETE: Delete Category/s - `/{ids}` Id or Ids CSV format **RESULT**: `HTTP 202` Deleted ```json { "done": "Deletion of 5 Categories done", "count": 5 // Number of Categories deleted } ``` Partial deletion ```json { "done": "Deletion of 3 Categories done", "count": 3, // Number of Categories deleted "fail": "Deletion of 2 Categories not done", "failed": ["TEST114", "TEST115"] } ``` `HTTP 400` Wrong request ```json { "fail": "Wrong request" } ``` `HTTP 401` Unauthorized ```json { "fail": "Unauthorized" } ``` `HTTP 404` Not found ```json { "fail": "No Categories to delete" } ``` `HTTP 409` Conflict. The submitted contents are not valid ```json { "fail": "Deletion of 5 Categories not done" } ``` ### GET: Get Schema JSON from the data structure of a Category - `/full` Schema and data (Optinal) - `/schema.json` JSON schema for import **RESULT**: `HTTP 200` Success JSON schema document ### GET: Get Schema JSON schema of a group of Categories in a batch process - `/full` Schema and data (Optinal) - `/schema.multiple.json` Schema for batch import JSON **RESULT**: `HTTP 200` Success JSON schema document (category-schema-documentation)= ```{include} category.schema.json.md.merge :parser: myst_parser.sphinx_