# Material categories

## Get material categories

> The API gives the ability to get all material categories.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialCategoryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the category"},"name":{"type":"string","description":"Category name"},"created_at":{"format":"date-time","type":"string","description":"Time when the category was created"},"updated_at":{"type":"object","nullable":true,"description":"Time when the category was last updated, null if never updated"}},"required":["id","name","created_at","updated_at"]}}},"paths":{"/api/v1/public/material-categories":{"get":{"description":"The API gives the ability to get all material categories.","operationId":"PublicMaterialCategoryController_getAll_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicMaterialCategoryDto"}}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Get material categories","tags":["Material categories"]}}}}
```

## Create material category

> The API gives the ability to create new category.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicCMaterialCategoryCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Category name"}},"required":["name"]},"PublicMaterialCategoryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the category"},"name":{"type":"string","description":"Category name"},"created_at":{"format":"date-time","type":"string","description":"Time when the category was created"},"updated_at":{"type":"object","nullable":true,"description":"Time when the category was last updated, null if never updated"}},"required":["id","name","created_at","updated_at"]}}},"paths":{"/api/v1/public/material-categories":{"post":{"description":"The API gives the ability to create new category.","operationId":"PublicMaterialCategoryController_create_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCMaterialCategoryCreateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialCategoryDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Create material category","tags":["Material categories"]}}}}
```

## Delete material category

> The API gives the ability to delete category.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/material-categories/{id}":{"delete":{"description":"The API gives the ability to delete category.","operationId":"PublicMaterialCategoryController_delete_v1","parameters":[{"name":"id","required":true,"in":"path","description":"Material category id","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Delete material category","tags":["Material categories"]}}}}
```

## Update material category

> The API gives the ability to update an existing category’s name.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialCategoryUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Category name"}},"required":["name"]},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/material-categories/{id}":{"patch":{"description":"The API gives the ability to update an existing category’s name.","operationId":"PublicMaterialCategoryController_update_v1","parameters":[{"name":"id","required":true,"in":"path","description":"Material category id","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialCategoryUpdateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Update material category","tags":["Material categories"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hesh.app/manuals/public-api/material-categories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
