# 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"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PaginatedResult":{"type":"object","properties":{"data":{"description":"Array of data items","type":"array","items":{"type":"array"}},"meta":{"description":"Pagination metadata","allOf":[{"$ref":"#/components/schemas/PaginationMetadata"}]}},"required":["data","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":"object","nullable":true,"description":"Country where the supplier is located"},"first_name":{"type":"object","nullable":true,"description":"First name of the supplier contact person"},"last_name":{"type":"object","nullable":true,"description":"Last name of the supplier contact person"},"phone":{"type":"object","nullable":true,"description":"Phone number of the supplier"},"email":{"type":"object","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_getAll_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"},{"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"},"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":"object","nullable":true,"description":"Country where the supplier is located"},"first_name":{"type":"object","nullable":true,"description":"First name of the supplier contact person"},"last_name":{"type":"object","nullable":true,"description":"Last name of the supplier contact person"},"phone":{"type":"object","nullable":true,"description":"Phone number of the supplier"},"email":{"type":"object","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_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/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"},"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_update_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: 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-suppliers.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.
