> 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-suppliers.md).

# Material Suppliers

## Get all material suppliers

> The API gives the ability to get all existing suppliers in the company.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material suppliers"}],"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"]},"PublicMaterialSupplierDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the material supplier"},"company_name":{"type":"string","description":"Company name of the material supplier"},"country":{"type":"string","nullable":true,"description":"Country where the supplier is located"},"first_name":{"type":"string","nullable":true,"description":"First name of the supplier contact person"},"last_name":{"type":"string","nullable":true,"description":"Last name of the supplier contact person"},"phone":{"type":"string","nullable":true,"description":"Phone number of the supplier"},"email":{"type":"string","nullable":true,"description":"Email address of the supplier"},"created_at":{"type":"string","description":"Timestamp when the supplier was created","format":"date-time"},"updated_at":{"type":"string","nullable":true,"description":"Timestamp when the supplier was last updated","format":"date-time"}},"required":["id","company_name","created_at"]}}},"paths":{"/api/v1/public/material-suppliers":{"get":{"description":"The API gives the ability to get all existing suppliers in the company.","operationId":"PublicMaterialSuppliersController_publicGetAll_v1","parameters":[{"name":"company_name","required":false,"in":"query","description":"The name of the company that supplies materials.","schema":{"type":"string"}},{"name":"email","required":false,"in":"query","description":"The supplier’s e-mail address.","schema":{"type":"string"}},{"name":"phone","required":false,"in":"query","description":"The supplier’s phone number.","schema":{"type":"string"}},{"name":"skip","required":false,"in":"query","description":"","schema":{"type":"number"}},{"name":"take","required":false,"in":"query","description":"","schema":{"type":"number"}},{"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/PublicMaterialSupplierDto"}}}}]}}}},"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 all material suppliers","tags":["Material suppliers"]}}}}
```

## Create material supplier

> The API gives the ability to create a new supplier.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material suppliers"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialSupplierCreateDto":{"type":"object","properties":{"company_name":{"type":"string","description":"Company name of the material supplier"},"country":{"type":"string","description":"Country where the supplier is located"},"first_name":{"type":"string","description":"First name of the supplier contact person"},"last_name":{"type":"string","description":"Last name of the supplier contact person"},"phone":{"type":"string","description":"Phone number of the supplier"},"email":{"type":"string","description":"Email address of the supplier"}},"required":["company_name"]},"PublicMaterialSupplierDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the material supplier"},"company_name":{"type":"string","description":"Company name of the material supplier"},"country":{"type":"string","nullable":true,"description":"Country where the supplier is located"},"first_name":{"type":"string","nullable":true,"description":"First name of the supplier contact person"},"last_name":{"type":"string","nullable":true,"description":"Last name of the supplier contact person"},"phone":{"type":"string","nullable":true,"description":"Phone number of the supplier"},"email":{"type":"string","nullable":true,"description":"Email address of the supplier"},"created_at":{"type":"string","description":"Timestamp when the supplier was created","format":"date-time"},"updated_at":{"type":"string","nullable":true,"description":"Timestamp when the supplier was last updated","format":"date-time"}},"required":["id","company_name","created_at"]}}},"paths":{"/api/v1/public/material-suppliers":{"post":{"description":"The API gives the ability to create a new supplier.","operationId":"PublicMaterialSuppliersController_publicCreate_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/PublicMaterialSupplierCreateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialSupplierDto"}}}},"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 supplier","tags":["Material suppliers"]}}}}
```

## Update material supplier

> The API gives the ability to update an existing supplier's information.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"Material suppliers"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialSupplierUpdateDto":{"type":"object","properties":{"company_name":{"type":"string","description":"Company name of the material supplier"},"country":{"type":"string","description":"Country where the supplier is located"},"first_name":{"type":"string","description":"First name of the supplier contact person"},"last_name":{"type":"string","description":"Last name of the supplier contact person"},"phone":{"type":"string","description":"Phone number of the supplier"},"email":{"type":"string","description":"Email address of the supplier"}}},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/material-suppliers/{id}":{"patch":{"description":"The API gives the ability to update an existing supplier's information.","operationId":"PublicMaterialSuppliersController_publicUpdate_v1","parameters":[{"name":"id","required":true,"in":"path","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/PublicMaterialSupplierUpdateDto"}}}},"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 supplier","tags":["Material suppliers"]}}}}
```


---

# 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-suppliers.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.
