> For the complete documentation index, see [llms.txt](https://docs.hesh.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hesh.app/manuals/public-api/material-subcategories.md).

# Material Subcategories

## Get material subcategories

> The API gives the ability to get all subcategories of material category.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material subcategories"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PaginatedResult":{"type":"object","properties":{"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMetadata"}]}},"required":["meta"]},"PaginationMetadata":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"lastPage":{"type":"number","description":"Last page number"},"currentPage":{"type":"number","description":"Current page number"},"perPage":{"type":"number","description":"Items per page"},"prev":{"type":"number","description":"Previous page number","nullable":true},"next":{"type":"number","description":"Next page number","nullable":true}},"required":["total","lastPage","currentPage","perPage","prev","next"]},"PublicMaterialSubcategoryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the subcategory"},"name":{"type":"string","description":"Subcategory name"},"created_at":{"format":"date-time","type":"string","description":"Time when the subcategory was created"},"updated_at":{"type":"string","nullable":true,"format":"date-time","description":"Time when the subcategory was last updated, null if never updated"},"material_category_id":{"type":"string","format":"uuid","description":"Identifier of the parent material category this subcategory belongs to"}},"required":["id","name","created_at","material_category_id"]}}},"paths":{"/api/v1/public/material-categories/{id}/subcategories":{"get":{"description":"The API gives the ability to get all subcategories of material category.","operationId":"PublicMaterialSubcategoryController_publicSearchSubcategories_v1","parameters":[{"name":"id","required":true,"in":"path","description":"Material category id","schema":{"type":"string"}},{"name":"skip","required":false,"in":"query","description":"","schema":{"type":"number"}},{"name":"take","required":false,"in":"query","description":"","schema":{"type":"number"}},{"name":"name","required":false,"in":"query","description":"","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":{"allOf":[{"$ref":"#/components/schemas/PaginatedResult"},{"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicMaterialSubcategoryDto"}}}}]}}}},"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 subcategories","tags":["Material subcategories"]}}}}
```

## Create material subcategory

> The API gives the ability to create new subcategory within a category.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material subcategories"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicCreateMaterialSubcategoryDto":{"type":"object","properties":{"name":{"type":"string","description":"Subcategory name"}},"required":["name"]},"PublicMaterialSubcategoryDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the subcategory"},"name":{"type":"string","description":"Subcategory name"},"created_at":{"format":"date-time","type":"string","description":"Time when the subcategory was created"},"updated_at":{"type":"string","nullable":true,"format":"date-time","description":"Time when the subcategory was last updated, null if never updated"},"material_category_id":{"type":"string","format":"uuid","description":"Identifier of the parent material category this subcategory belongs to"}},"required":["id","name","created_at","material_category_id"]}}},"paths":{"/api/v1/public/material-categories/{id}/subcategories":{"post":{"description":"The API gives the ability to create new subcategory within a category.","operationId":"PublicMaterialSubcategoryController_publicCreate_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/PublicCreateMaterialSubcategoryDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialSubcategoryDto"}}}},"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 subcategory","tags":["Material subcategories"]}}}}
```

## Delete material subcategory

> The API gives the ability to delete subcategory.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material subcategories"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"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}/subcategories/{subcategory_id}":{"delete":{"description":"The API gives the ability to delete subcategory.","operationId":"PublicMaterialSubcategoryController_publicDelete_v1","parameters":[{"name":"subcategory_id","required":true,"in":"path","description":"Material subcategory id","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Material category id","schema":{}},{"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 subcategory","tags":["Material subcategories"]}}}}
```

## Update material subcategory

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

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material subcategories"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicUpdateMaterialSubcategoryDto":{"type":"object","properties":{"name":{"type":"string","description":"Subcategory 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}/subcategories/{subcategory_id}":{"patch":{"description":"The API gives the ability to update an existing subcategory’s name.","operationId":"PublicMaterialSubcategoryController_publicUpdate_v1","parameters":[{"name":"subcategory_id","required":true,"in":"path","description":"Material subcategory id","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Material category id","schema":{}},{"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/PublicUpdateMaterialSubcategoryDto"}}}},"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 subcategory","tags":["Material subcategories"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
