# 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/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"},"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"},"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"},"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 (Inventory)"}],"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/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"},"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"},"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"}},"summary":"Create purchase order","tags":["Inbound (Inventory)"]}}}}
```

## 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 (Inventory)"}],"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/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"},"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"},"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"},"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"}},"summary":"Get purchase order","tags":["Inbound (Inventory)"]}}}}
```

## 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 (Inventory)"}],"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":{"$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/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"},"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"},"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"}},"summary":"Updates purchase order","tags":["Inbound (Inventory)"]}}}}
```

## 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 (Inventory)"}],"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/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"},"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"},"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"}},"summary":"Update purchase order","tags":["Inbound (Inventory)"]}}}}
```
