# ProductionOrder

## GET /production-orders

> Returns production order list

```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":{"ProductionOrderGetList":{"type":"object","properties":{"referenceNumber":{"type":"string","nullable":true},"comments":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"productionOrderNumber":{"type":"string","nullable":true},"warehouse":{"$ref":"#/components/schemas/Warehouse"}},"additionalProperties":false},"Warehouse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"warehouseCode":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"referenceNumber":{"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}},"additionalProperties":false}}},"paths":{"/production-orders":{"get":{"tags":["ProductionOrder"],"summary":"Returns production order list","parameters":[{"name":"warehouseId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderGetList"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderGetList"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderGetList"}}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

## POST /production-orders

> Create new production-order

```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":{"ProductionOrderCreate":{"type":"object","properties":{"referenceNumber":{"type":"string","nullable":true},"comments":{"type":"string","nullable":true},"clientId":{"type":"string","format":"uuid","nullable":true},"warehouseId":{"type":"string","format":"uuid"},"productionOrderNumber":{"type":"string","nullable":true},"inLines":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderInLineCreateUpdate"},"nullable":true},"outLines":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderOutLineCreateUpdate"},"nullable":true}},"additionalProperties":false},"ProductionOrderInLineCreateUpdate":{"type":"object","properties":{"lineNumber":{"type":"integer","format":"int32","nullable":true},"productId":{"type":"string","format":"uuid"},"quantity":{"type":"number","format":"double","nullable":true},"referenceNumber":{"type":"string","nullable":true},"reference1":{"type":"string","nullable":true},"reference2":{"type":"string","nullable":true},"reference3":{"type":"string","nullable":true}},"additionalProperties":false},"ProductionOrderOutLineCreateUpdate":{"type":"object","properties":{"lineNumber":{"type":"integer","format":"int32","nullable":true},"productId":{"type":"string","format":"uuid"},"quantity":{"type":"number","format":"double","nullable":true},"referenceNumber":{"type":"string","nullable":true},"reference1":{"type":"string","nullable":true},"reference2":{"type":"string","nullable":true},"reference3":{"type":"string","nullable":true},"lotNumber":{"type":"string","nullable":true}},"additionalProperties":false},"IdDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/production-orders":{"post":{"tags":["ProductionOrder"],"summary":"Create new production-order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderCreate"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderCreate"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ProductionOrderCreate"}}}},"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 /production-orders

> Update an existing production-order

```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":{"ProductionOrderUpdate":{"type":"object","properties":{"referenceNumber":{"type":"string","nullable":true},"comments":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"inLines":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderInLineCreateUpdate"},"nullable":true},"outLines":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderOutLineCreateUpdate"},"nullable":true}},"additionalProperties":false},"ProductionOrderInLineCreateUpdate":{"type":"object","properties":{"lineNumber":{"type":"integer","format":"int32","nullable":true},"productId":{"type":"string","format":"uuid"},"quantity":{"type":"number","format":"double","nullable":true},"referenceNumber":{"type":"string","nullable":true},"reference1":{"type":"string","nullable":true},"reference2":{"type":"string","nullable":true},"reference3":{"type":"string","nullable":true}},"additionalProperties":false},"ProductionOrderOutLineCreateUpdate":{"type":"object","properties":{"lineNumber":{"type":"integer","format":"int32","nullable":true},"productId":{"type":"string","format":"uuid"},"quantity":{"type":"number","format":"double","nullable":true},"referenceNumber":{"type":"string","nullable":true},"reference1":{"type":"string","nullable":true},"reference2":{"type":"string","nullable":true},"reference3":{"type":"string","nullable":true},"lotNumber":{"type":"string","nullable":true}},"additionalProperties":false},"IdDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/production-orders":{"put":{"tags":["ProductionOrder"],"summary":"Update an existing production-order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderUpdate"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderUpdate"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ProductionOrderUpdate"}}}},"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 /production-orders/{id}

> Returns a single production order 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":{"ProductionOrderGetDetail":{"type":"object","properties":{"referenceNumber":{"type":"string","nullable":true},"comments":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"productionOrderNumber":{"type":"string","nullable":true},"warehouse":{"$ref":"#/components/schemas/Warehouse"},"inLines":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderInLineGet"},"nullable":true},"outLines":{"type":"array","items":{"$ref":"#/components/schemas/ProductionOrderOutLineGet"},"nullable":true}},"additionalProperties":false},"Warehouse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"warehouseCode":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"referenceNumber":{"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}},"additionalProperties":false},"ProductionOrderInLineGet":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"product":{"$ref":"#/components/schemas/ProductGetList"},"quantity":{"type":"number","format":"double"},"producedQuantity":{"type":"number","format":"double","nullable":true},"referenceNumber":{"type":"string","nullable":true},"reference1":{"type":"string","nullable":true},"reference2":{"type":"string","nullable":true},"reference3":{"type":"string","nullable":true}},"additionalProperties":false},"ProductGetList":{"type":"object","properties":{"description":{"type":"string","nullable":true},"upc":{"type":"string","nullable":true},"barcodeType":{"$ref":"#/components/schemas/BarcodeType"},"barcodeValue":{"type":"string","nullable":true},"referenceNumber":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"client":{"$ref":"#/components/schemas/ClientGetList"},"sku":{"type":"string","nullable":true}},"additionalProperties":false},"BarcodeType":{"enum":["Code128","ITF14","EAN13","UPCA"],"type":"string"},"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},"ProductionOrderOutLineGet":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"product":{"$ref":"#/components/schemas/ProductGetList"},"quantity":{"type":"number","format":"double"},"consumedQuantity":{"type":"number","format":"double","nullable":true},"referenceNumber":{"type":"string","nullable":true},"reference1":{"type":"string","nullable":true},"reference2":{"type":"string","nullable":true},"reference3":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/production-orders/{id}":{"get":{"tags":["ProductionOrder"],"summary":"Returns a single production order 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/ProductionOrderGetDetail"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderGetDetail"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProductionOrderGetDetail"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}}}}}}}
```

## DELETE /production-orders/{id}

> Delete production-order 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":{"/production-orders/{id}":{"delete":{"tags":["ProductionOrder"],"summary":"Delete production-order 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"}}}}}}}}}
```

## POST /production-orders/upload

> Upload an existing pending production order

```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":{"UploadRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"uploadedSuceeded":{"type":"boolean","nullable":true},"uploadMessage":{"type":"string","nullable":true},"resetUploadCount":{"type":"boolean","nullable":true}},"additionalProperties":false}}},"paths":{"/production-orders/upload":{"post":{"tags":["ProductionOrder"],"summary":"Upload an existing pending production order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"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/productionorder-1.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.
