> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/inbound-process/purchase-order/purchase-order-endpoints.md).

# Purchase order endpoints

## The PurchaseOrder object

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"components":{"schemas":{"PurchaseOrder":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"type":"string"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/RequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"transfer":{"allOf":[{"$ref":"#/components/schemas/InboundProcessPurchaseOrderTransfer"}],"description":"Includes data about transfer between different facilities in the tenant's network."},"version":{"type":"number"}},"required":["orderDate","requestedDate","requestedItems","status","cancelled","id","created","lastModified","version","facilityRef","inboundProcessRef"],"title":"PurchaseOrder","type":"object","description":"PurchaseOrder"},"RequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type","value"],"title":"RequestedDate","type":"object","description":"RequestedDate"},"InboundLineItem":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"quantity":{"$ref":"#/components/schemas/Quantity"},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}]},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","quantity"],"title":"InboundLineItem","type":"object","description":"InboundLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"InboundProcessPurchaseOrderSupplier":{"properties":{"name":{"description":"Name of the supplier.","type":"string"}},"title":"InboundProcessPurchaseOrderSupplier","type":"object","description":"InboundProcessPurchaseOrderSupplier"},"InboundProcessPurchaseOrderTransfer":{"properties":{"id":{"type":"string"}},"required":["id"],"title":"InboundProcessPurchaseOrderTransfer","type":"object","description":"InboundProcessPurchaseOrderTransfer"}}}}
```

## POST /api/purchaseorders

> Create purchase order

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read inbound processes and receipts.","name":"Inbound"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PurchaseOrderForCreation":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"minLength":1,"type":"string"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/InputRequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"}},"required":["orderDate","requestedDate","requestedItems","facilityRef"],"title":"PurchaseOrderForCreation","type":"object","description":"PurchaseOrderForCreation"},"InputRequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type"],"title":"InputRequestedDate","type":"object","description":"InputRequestedDate"},"InboundLineItem":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"quantity":{"$ref":"#/components/schemas/Quantity"},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}]},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","quantity"],"title":"InboundLineItem","type":"object","description":"InboundLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"InboundProcessPurchaseOrderSupplier":{"properties":{"name":{"description":"Name of the supplier.","type":"string"}},"title":"InboundProcessPurchaseOrderSupplier","type":"object","description":"InboundProcessPurchaseOrderSupplier"},"PurchaseOrder":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"type":"string"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/RequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"transfer":{"allOf":[{"$ref":"#/components/schemas/InboundProcessPurchaseOrderTransfer"}],"description":"Includes data about transfer between different facilities in the tenant's network."},"version":{"type":"number"}},"required":["orderDate","requestedDate","requestedItems","status","cancelled","id","created","lastModified","version","facilityRef","inboundProcessRef"],"title":"PurchaseOrder","type":"object","description":"PurchaseOrder"},"RequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type","value"],"title":"RequestedDate","type":"object","description":"RequestedDate"},"InboundProcessPurchaseOrderTransfer":{"properties":{"id":{"type":"string"}},"required":["id"],"title":"InboundProcessPurchaseOrderTransfer","type":"object","description":"InboundProcessPurchaseOrderTransfer"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/purchaseorders":{"post":{"deprecated":false,"description":"","operationId":"createPurchaseOrder","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderForCreation"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"Created Purchase Order entity"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"}},"summary":"Create purchase order","tags":["Inbound"]}}}}
```

## GET /api/purchaseorders/{purchaseOrderId}

> Get purchase order

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read inbound processes and receipts.","name":"Inbound"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PurchaseOrder":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"type":"string"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/RequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"transfer":{"allOf":[{"$ref":"#/components/schemas/InboundProcessPurchaseOrderTransfer"}],"description":"Includes data about transfer between different facilities in the tenant's network."},"version":{"type":"number"}},"required":["orderDate","requestedDate","requestedItems","status","cancelled","id","created","lastModified","version","facilityRef","inboundProcessRef"],"title":"PurchaseOrder","type":"object","description":"PurchaseOrder"},"RequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type","value"],"title":"RequestedDate","type":"object","description":"RequestedDate"},"InboundLineItem":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"quantity":{"$ref":"#/components/schemas/Quantity"},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}]},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","quantity"],"title":"InboundLineItem","type":"object","description":"InboundLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"InboundProcessPurchaseOrderSupplier":{"properties":{"name":{"description":"Name of the supplier.","type":"string"}},"title":"InboundProcessPurchaseOrderSupplier","type":"object","description":"InboundProcessPurchaseOrderSupplier"},"InboundProcessPurchaseOrderTransfer":{"properties":{"id":{"type":"string"}},"required":["id"],"title":"InboundProcessPurchaseOrderTransfer","type":"object","description":"InboundProcessPurchaseOrderTransfer"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/purchaseorders/{purchaseOrderId}":{"get":{"deprecated":false,"description":"","operationId":"getPurchaseOrder","parameters":[{"in":"path","name":"purchaseOrderId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"Purchase Order entity"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"}},"summary":"Get purchase order","tags":["Inbound"]}}}}
```

## Updates purchase order

> Partially updates a Purchase Order using a selection of fields

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read inbound processes and receipts.","name":"Inbound"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PurchaseOrderForPartialUpdate":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"orderDate":{"format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/InputRequestedDate"}]},"requestedItems":{"items":{"$ref":"#/components/schemas/InboundLineItem"},"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"version":{"type":"number"}},"required":["version"],"title":"PurchaseOrderForPartialUpdate","type":"object","description":"PurchaseOrderForPartialUpdate"},"InputRequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type"],"title":"InputRequestedDate","type":"object","description":"InputRequestedDate"},"InboundLineItem":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"quantity":{"$ref":"#/components/schemas/Quantity"},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}]},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","quantity"],"title":"InboundLineItem","type":"object","description":"InboundLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"InboundProcessPurchaseOrderSupplier":{"properties":{"name":{"description":"Name of the supplier.","type":"string"}},"title":"InboundProcessPurchaseOrderSupplier","type":"object","description":"InboundProcessPurchaseOrderSupplier"},"PurchaseOrder":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"type":"string"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/RequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"transfer":{"allOf":[{"$ref":"#/components/schemas/InboundProcessPurchaseOrderTransfer"}],"description":"Includes data about transfer between different facilities in the tenant's network."},"version":{"type":"number"}},"required":["orderDate","requestedDate","requestedItems","status","cancelled","id","created","lastModified","version","facilityRef","inboundProcessRef"],"title":"PurchaseOrder","type":"object","description":"PurchaseOrder"},"RequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type","value"],"title":"RequestedDate","type":"object","description":"RequestedDate"},"InboundProcessPurchaseOrderTransfer":{"properties":{"id":{"type":"string"}},"required":["id"],"title":"InboundProcessPurchaseOrderTransfer","type":"object","description":"InboundProcessPurchaseOrderTransfer"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/purchaseorders/{purchaseOrderId}":{"patch":{"deprecated":false,"description":"Partially updates a Purchase Order using a selection of fields","operationId":"patchPurchaseOrder","parameters":[{"in":"path","name":"purchaseOrderId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderForPartialUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"Updated Purchase Order entity"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"}},"summary":"Updates purchase order","tags":["Inbound"]}}}}
```

## PUT /api/purchaseorders/{purchaseOrderId}

> Update purchase order

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Endpoints to create, update, and read inbound processes and receipts.","name":"Inbound"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PurchaseOrderForUpdate":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/InputRequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"version":{"type":"number"}},"required":["orderDate","requestedDate","requestedItems","version"],"title":"PurchaseOrderForUpdate","type":"object","description":"PurchaseOrderForUpdate"},"InputRequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type"],"title":"InputRequestedDate","type":"object","description":"InputRequestedDate"},"InboundLineItem":{"properties":{"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"quantity":{"$ref":"#/components/schemas/Quantity"},"stockProperties":{"additionalProperties":{"type":"string"},"allOf":[{"$ref":"#/components/schemas/StockPropertyPreset"}]},"tenantArticleId":{"type":"string"}},"required":["tenantArticleId","quantity"],"title":"InboundLineItem","type":"object","description":"InboundLineItem"},"Quantity":{"properties":{"unit":{"description":"Unit of measurement for the requested quantity. Must match the measurementUnitKey defined in the corresponding listing, if set.","type":"string"},"value":{"description":"The amount, provided in the unit of the quantity.","format":"int32","minimum":0,"type":"integer"}},"required":["value"],"title":"Quantity","type":"object","description":"Quantity"},"StockPropertyPreset":{"properties":{"expiry":{"type":"string"}},"title":"StockPropertyPreset","type":"object","description":"StockPropertyPreset"},"InboundProcessPurchaseOrderSupplier":{"properties":{"name":{"description":"Name of the supplier.","type":"string"}},"title":"InboundProcessPurchaseOrderSupplier","type":"object","description":"InboundProcessPurchaseOrderSupplier"},"PurchaseOrder":{"properties":{"cancelled":{"deprecated":true,"description":"This field is deprecated. Set the status to 'CANCELED' Set the purchaseOrder to 'cancelled'. No further deliveries will be expected. Already received goods are unaffected.","type":"boolean"},"created":{"format":"date-time","type":"string"},"customAttributes":{"description":"Attributes that can be added to this entity. These attributes **cannot** be used within fulfillment processes, but enable you to attach custom data from your systems to fulfillmenttools entities.","nullable":true,"type":"object"},"facilityRef":{"type":"string"},"id":{"type":"string"},"inboundProcessRef":{"type":"string"},"lastModified":{"format":"date-time","type":"string"},"orderDate":{"description":"Time and date at which the order was placed. Note: This does not refer to the creation date of this entity in the system.","format":"date-time","type":"string"},"requestedDate":{"allOf":[{"$ref":"#/components/schemas/RequestedDate"}],"description":"Time and date at which the order is expected to arrive. Use 'ASAP' for deliveries with unknown date, but be aware that some features will not include these orders."},"requestedItems":{"description":"Line items which are expected to be delivered.","items":{"$ref":"#/components/schemas/InboundLineItem"},"maxItems":200,"type":"array"},"status":{"enum":["OPEN","CANCELED"],"type":"string"},"supplier":{"$ref":"#/components/schemas/InboundProcessPurchaseOrderSupplier"},"transfer":{"allOf":[{"$ref":"#/components/schemas/InboundProcessPurchaseOrderTransfer"}],"description":"Includes data about transfer between different facilities in the tenant's network."},"version":{"type":"number"}},"required":["orderDate","requestedDate","requestedItems","status","cancelled","id","created","lastModified","version","facilityRef","inboundProcessRef"],"title":"PurchaseOrder","type":"object","description":"PurchaseOrder"},"RequestedDate":{"properties":{"type":{"enum":["ASAP","TIME_POINT"],"type":"string"},"value":{"format":"date-time","type":"string"}},"required":["type","value"],"title":"RequestedDate","type":"object","description":"RequestedDate"},"InboundProcessPurchaseOrderTransfer":{"properties":{"id":{"type":"string"}},"required":["id"],"title":"InboundProcessPurchaseOrderTransfer","type":"object","description":"InboundProcessPurchaseOrderTransfer"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/purchaseorders/{purchaseOrderId}":{"put":{"deprecated":false,"description":"","operationId":"upsertPurchaseOrder","parameters":[{"in":"path","name":"purchaseOrderId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderForUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"Updated/created Purchase Order entity"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"}},"summary":"Update purchase order","tags":["Inbound"]}}}}
```


---

# 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.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/inbound-process/purchase-order/purchase-order-endpoints.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.
