# Vendors

## GET /vendors

> Returns vendors

```json
{"openapi":"3.0.1","info":{"title":"P4W Api Gateway","version":"v1"},"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Api key taken from 'Gateway API key' setting.","name":"ApiKey","in":"header"}},"schemas":{"VendorGetList":{"type":"object","properties":{"companyName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"contactPerson":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"address":{"$ref":"#/components/schemas/VendorAddress"},"id":{"type":"string","format":"uuid"},"client":{"$ref":"#/components/schemas/ClientGetList"},"vendorCode":{"type":"string","nullable":true}},"additionalProperties":false},"VendorAddress":{"type":"object","properties":{"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"zipPostalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"ClientGetList":{"type":"object","properties":{"description":{"type":"string","nullable":true},"ssccCompanyId":{"type":"string","nullable":true},"companyName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"contactPerson":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"zipPostalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/vendors":{"get":{"tags":["Vendors"],"summary":"Returns vendors","parameters":[{"name":"code","in":"query","schema":{"type":"string"}},{"name":"clientId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorGetList"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorGetList"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VendorGetList"}}}}}}}}}}
```

## POST /vendors

> Create new vendor

```json
{"openapi":"3.0.1","info":{"title":"P4W Api Gateway","version":"v1"},"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Api key taken from 'Gateway API key' setting.","name":"ApiKey","in":"header"}},"schemas":{"VendorCreate":{"type":"object","properties":{"companyName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"contactPerson":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"address":{"$ref":"#/components/schemas/VendorAddress"},"clientId":{"type":"string","format":"uuid","nullable":true},"vendorCode":{"type":"string","nullable":true}},"additionalProperties":false},"VendorAddress":{"type":"object","properties":{"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"zipPostalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"IdDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/vendors":{"post":{"tags":["Vendors"],"summary":"Create new vendor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}},"text/json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/VendorCreate"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IdDocument"}},"application/json":{"schema":{"$ref":"#/components/schemas/IdDocument"}},"text/json":{"schema":{"$ref":"#/components/schemas/IdDocument"}}}},"406":{"description":"Not Acceptable","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

## PUT /vendors

> Update an existing vendor

```json
{"openapi":"3.0.1","info":{"title":"P4W Api Gateway","version":"v1"},"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Api key taken from 'Gateway API key' setting.","name":"ApiKey","in":"header"}},"schemas":{"VendorUpdate":{"type":"object","properties":{"companyName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"contactPerson":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"address":{"$ref":"#/components/schemas/VendorAddress"},"id":{"type":"string","format":"uuid"}},"additionalProperties":false},"VendorAddress":{"type":"object","properties":{"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"zipPostalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"IdDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/vendors":{"put":{"tags":["Vendors"],"summary":"Update an existing vendor","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorUpdate"}},"text/json":{"schema":{"$ref":"#/components/schemas/VendorUpdate"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/VendorUpdate"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IdDocument"}},"application/json":{"schema":{"$ref":"#/components/schemas/IdDocument"}},"text/json":{"schema":{"$ref":"#/components/schemas/IdDocument"}}}},"406":{"description":"Not Acceptable","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

## GET /vendors/{id}

> Returns a single vendor by id

```json
{"openapi":"3.0.1","info":{"title":"P4W Api Gateway","version":"v1"},"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Api key taken from 'Gateway API key' setting.","name":"ApiKey","in":"header"}},"schemas":{"VendorDetails":{"type":"object","properties":{"companyName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"contactPerson":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"address":{"$ref":"#/components/schemas/VendorAddress"},"id":{"type":"string","format":"uuid"},"client":{"$ref":"#/components/schemas/ClientGetList"},"vendorCode":{"type":"string","nullable":true}},"additionalProperties":false},"VendorAddress":{"type":"object","properties":{"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"zipPostalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"ClientGetList":{"type":"object","properties":{"description":{"type":"string","nullable":true},"ssccCompanyId":{"type":"string","nullable":true},"companyName":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"contactPerson":{"type":"string","nullable":true},"taxId":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"zipPostalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/vendors/{id}":{"get":{"tags":["Vendors"],"summary":"Returns a single vendor by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/VendorDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/VendorDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/VendorDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"406":{"description":"Not Acceptable","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

## DELETE /vendors/{id}

> Delete vendor by Id

```json
{"openapi":"3.0.1","info":{"title":"P4W Api Gateway","version":"v1"},"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"Api key taken from 'Gateway API key' setting.","name":"ApiKey","in":"header"}}},"paths":{"/vendors/{id}":{"delete":{"tags":["Vendors"],"summary":"Delete vendor by Id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"406":{"description":"Not Acceptable","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```


---

# 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.p4.software/english-1/vendors.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.
