# Purchase

Purchase

## List purchase orders

> Lists all purchase orders.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"purchaseOrderStatusQuery":{"description":"Reference to an PurchaseOrderStatus.","explode":false,"in":"query","name":"purchaseOrderStatus","schema":{"items":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"type":"array"},"style":"form"},"purchaseOrderExternalIdQuery":{"description":"External reference to a purchaseOrderUid.","in":"query","name":"purchaseOrderExternalId","required":false,"schema":{"type":"string"}},"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"schemas":{"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"}},"responses":{"PurchaseOrderListResponse":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders":{"get":{"description":"Lists all purchase orders.","operationId":"get-tenants-stores-purchase-orders","parameters":[{"$ref":"#/components/parameters/purchaseOrderStatusQuery"},{"$ref":"#/components/parameters/purchaseOrderExternalIdQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderListResponse"}},"summary":"List purchase orders","tags":["Purchase"]}}}}
```

## Create a new purchase order

> Specify a \`currency\` when the order is not in local currency. \
> The currency must exist in your foreign currencies. \
> If you leave \`exchangeRate\` empty, the exchange rate that is on the foreign currency will be used.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"PurchaseOrderCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreateSchema"}}}}},"schemas":{"PurchaseOrderCreateSchema":{"title":"PurchaseOrderCreateSchema","type":"object","required":["supplierUid"],"properties":{"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"supplierUid":{"$ref":"#/components/schemas/UID"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"type":"string","description":"ISO 4217 code"},"exchangeRate":{"type":"integer"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemCreateSchema"}},"autoOrderProposal":{"type":"object","description":"Generate a purchase order proposal based on min/max","required":["warehouseUid"],"properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"}}}}},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PurchaseOrderItemCreateSchema":{"allOf":[{"$ref":"#/components/schemas/PurchaseOrderItemUpdateSchema"},{"properties":{"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"productUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"}},"required":["productUid","quantityOrdered"]}],"title":"PurchaseOrderItemCreateSchema","type":"object"},"PurchaseOrderItemUpdateSchema":{"title":"PurchaseOrderItemUpdateSchema","type":"object","properties":{"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"description":"External reference to purchase order line","type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase order currency"}}},"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}}},"responses":{"PurchaseOrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders":{"post":{"description":"Specify a `currency` when the order is not in local currency. \nThe currency must exist in your foreign currencies. \nIf you leave `exchangeRate` empty, the exchange rate that is on the foreign currency will be used.","operationId":"post-tenants-stores-purchase-orders","requestBody":{"$ref":"#/components/requestBodies/PurchaseOrderCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderResponse"}},"summary":"Create a new purchase order","tags":["Purchase"]}}}}
```

## Get purchase order details

> Get details for a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"PurchaseOrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}}},"description":"Example response"}},"schemas":{"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}":{"get":{"description":"Get details for a purchase order.","operationId":"get-tenants-stores-purchase-orders-details","responses":{"200":{"$ref":"#/components/responses/PurchaseOrderResponse"}},"summary":"Get purchase order details","tags":["Purchase"]}}}}
```

## Update purchase order details

> Specify a \`currency\` when the order is not in local currency. \
> The currency must exist in your foreign currencies. \
> If you leave \`exchangeRate\` empty, the exchange rate that is on the foreign currency will be used.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"PurchaseOrderUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderUpdateSchema"}}}}},"schemas":{"PurchaseOrderUpdateSchema":{"title":"PurchaseOrderUpdateSchema","type":"object","properties":{"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"supplierUid":{"$ref":"#/components/schemas/UID"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"type":"string","description":"ISO 4217 code"},"exchangeRate":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemUpdateQtyDeliveredSchema"}}}},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PurchaseOrderItemUpdateQtyDeliveredSchema":{"title":"PurchaseOrderItemUpdateQtyDeliveredSchema","type":"object","description":"Use when setting quantityDelivered on a purchaseOrderItem without any adjustment of stock","required":["purchaseOrderItemUid","quantityReceived"],"properties":{"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityReceived":{"type":"integer"}}},"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}}},"responses":{"PurchaseOrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}":{"put":{"description":"Specify a `currency` when the order is not in local currency. \nThe currency must exist in your foreign currencies. \nIf you leave `exchangeRate` empty, the exchange rate that is on the foreign currency will be used.","operationId":"put-tenants-stores-purchase-orders-details","requestBody":{"$ref":"#/components/requestBodies/PurchaseOrderUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderResponse"}},"summary":"Update purchase order details","tags":["Purchase"]}}}}
```

## Delete a purchase order

> Deletes a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}":{"delete":{"description":"Deletes a purchase order.","operationId":"delete-tenants-stores-purchase-orders-details","responses":{"204":{"description":"No Content"}},"summary":"Delete a purchase order","tags":["Purchase"]}}}}
```

## List purchase order items

> Lists all items on a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"schemas":{"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"}},"responses":{"PurchaseOrderItemListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}/purchase-order-items":{"get":{"description":"Lists all items on a purchase order.","operationId":"get-tenants-stores-purchase-orders-items","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderItemListResponse"}},"summary":"List purchase order items","tags":["Purchase"]}}}}
```

## Add a purchase order item

> Adds an item to a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"PurchaseOrderItemCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderItemCreateSchema"}}}}},"schemas":{"PurchaseOrderItemCreateSchema":{"allOf":[{"$ref":"#/components/schemas/PurchaseOrderItemUpdateSchema"},{"properties":{"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"productUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"}},"required":["productUid","quantityOrdered"]}],"title":"PurchaseOrderItemCreateSchema","type":"object"},"PurchaseOrderItemUpdateSchema":{"title":"PurchaseOrderItemUpdateSchema","type":"object","properties":{"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"description":"External reference to purchase order line","type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase order currency"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}}},"responses":{"PurchaseOrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}/purchase-order-items":{"post":{"description":"Adds an item to a purchase order.","operationId":"post-tenants-stores-purchase-orders-items","requestBody":{"$ref":"#/components/requestBodies/PurchaseOrderItemCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderResponse"}},"summary":"Add a purchase order item","tags":["Purchase"]}}}}
```

## Get purchase order item details

> Get details for an item on a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"PurchaseOrderItemResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}}},"description":"Example response"}},"schemas":{"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}/purchase-order-items/{purchaseOrderItemUid}":{"get":{"description":"Get details for an item on a purchase order.","operationId":"get-tenants-stores-purchase-orders-purchase-order-items-details","responses":{"200":{"$ref":"#/components/responses/PurchaseOrderItemResponse"}},"summary":"Get purchase order item details","tags":["Purchase"]}}}}
```

## Update purchase order item details

> Update details for an item on a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"PurchaseOrderItemUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderItemUpdateSchema"}}}}},"schemas":{"PurchaseOrderItemUpdateSchema":{"title":"PurchaseOrderItemUpdateSchema","type":"object","properties":{"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"description":"External reference to purchase order line","type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase order currency"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}}},"responses":{"PurchaseOrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}/purchase-order-items/{purchaseOrderItemUid}":{"put":{"description":"Update details for an item on a purchase order.","operationId":"put-tenants-stores-purchase-orders-purchase-order-items-details","requestBody":{"$ref":"#/components/requestBodies/PurchaseOrderItemUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderResponse"}},"summary":"Update purchase order item details","tags":["Purchase"]}}}}
```

## Remove a purchase order item

> Removes an item from a purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"PurchaseOrderResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}}},"description":"Example response"}},"schemas":{"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}/purchase-order-items/{purchaseOrderItemUid}":{"delete":{"description":"Removes an item from a purchase order.","operationId":"delete-tenants-stores-purchase-orders-purchase-order-items-details","responses":{"200":{"$ref":"#/components/responses/PurchaseOrderResponse"}},"summary":"Remove a purchase order item","tags":["Purchase"]}}}}
```

## Print or send receipt

> Send receipt as PDF, print on printer or get as PDF

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"PurchaseOrderEmailNotificationRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderEmailNotificationRequestSchema"}}}}},"schemas":{"PurchaseOrderEmailNotificationRequestSchema":{"title":"PurchaseOrderEmailNotificationRequestSchema","type":"object","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/EmailTYPE"},"recepients":{"type":"array","items":{"$ref":"#/components/schemas/EmailTYPE"}},"subject":{"type":"string"},"body":{"type":"string"},"includePDF":{"type":"boolean","default":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Base64EncodedFileContentSchema"}}}},"EmailTYPE":{"title":"Email","type":"string"},"Base64EncodedFileContentSchema":{"title":"Base64EncodedFileContentSchema","type":"object","properties":{"content":{"type":"string","description":" base64 encoded"},"contentType":{"description":"mime type","type":"string"},"filename":{"type":"string"}},"required":["content","contentType","filename"]}},"responses":{"FileResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64EncodedFileContentSchema"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/html":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"description":"Based on the Accept header the response will be base64 json encoded or a raw file.\napplication/octet-stream will return a binary file\napplication/json will return a json with the file content base64 encoded."}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/purchase-orders/{purchaseOrderUid}/receipt":{"post":{"description":"Send receipt as PDF, print on printer or get as PDF","operationId":"post-tenants-stores-purchase-orders-receipt","requestBody":{"$ref":"#/components/requestBodies/PurchaseOrderEmailNotificationRequest"},"responses":{"200":{"$ref":"#/components/responses/FileResponse"},"201":{"description":"Created"},"400":{"description":"Bad Request"}},"summary":"Print or send receipt","tags":["Purchase"]}}}}
```

## List supplier products for product

> Lists all supplier products for a productUid. If the product has been linked to a tenant productUid then additional information will be added.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"schemas":{"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"SupplierProductResponseSchema":{"title":"SupplierProductResponseSchema","type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"supplierUid":{"$ref":"#/components/schemas/UID"},"purchasePrice":{"type":"integer"},"supplierProductUid":{"$ref":"#/components/schemas/UID"},"supplierSku":{"type":"string"}},"required":["createdAt","lastModifiedAt","productUid","supplierUid","purchasePrice","supplierProductUid","supplierSku"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"}},"responses":{"SupplierProductListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SupplierProductResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/products/{productUid}/suppliers":{"get":{"description":"Lists all supplier products for a productUid. If the product has been linked to a tenant productUid then additional information will be added.","operationId":"get-tenants-products-suppliers","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/SupplierProductListResponse"}},"summary":"List supplier products for product","tags":["Purchase"]}}}}
```

## Search for purchase orders

> Search for purchase orders

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"PurchaseOrderListResponse":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}},"description":"Example response"}},"schemas":{"PurchaseOrderResponseSchema":{"title":"PurchaseOrderResponseSchema","type":"object","required":["createdAt","createdBy","deliveryAddress","deliveryCity","deliveryCountryCode","deliveryName","deliveryPostalCode","externalId","items","lastModifiedAt","lastModifiedBy","note","purchaseNumber","purchaseOrderUid","status","storeUid","storeName","supplierUid","supplierName","discountRate","freight","currency"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"deliveryAddress":{"type":"string"},"deliveryCity":{"type":"string"},"deliveryCountryCode":{"type":"string"},"deliveryName":{"type":"string"},"deliveryPostalCode":{"type":"string"},"externalId":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemResponseSchema"}},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"note":{"type":"string"},"purchaseNumber":{"description":"Reference to a customer order","type":"string"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"status":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"supplierName":{"type":"string"},"discountRate":{"type":"integer"},"freight":{"type":"integer"},"currency":{"$ref":"#/components/schemas/PurchaseOrderCurrencySchema"}}},"PurchaseOrderItemResponseSchema":{"title":"PurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","expectedDeliveryDate","externalId","lastModifiedAt","lastModifiedBy","productUid","productName","productSerialNoRequired","productSku","purchaseOrderItemUid","quantityOrdered","quantityReceived","quantityReserved","supplierSku","unitPrice","receivementItems","discountAmount","freightAmount","unitCost","totalLinePrice","localCurrency"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"expectedDeliveryDate":{"format":"date","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSerialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"},"productSku":{"type":"string"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"quantityReceived":{"type":"integer"},"quantityReserved":{"type":"integer"},"supplierSku":{"type":"string"},"unitPrice":{"type":"integer","description":"unitPrice is in purchase price in order currency before discounts"},"receivementItems":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceivementItemResponseSchema"}},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost pr unit."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."},"currency":{"$ref":"#/components/schemas/DeprecatedPurchaseOrderItemCurrencySchema"},"localCurrency":{"$ref":"#/components/schemas/PurchaseOrderItemCurrencySchema"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemReservationSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SerialNoRequiredENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NO | No Serial number required|\n| ON_SALE | Can register serial number when selling a product (Serial number is optional)|\n| ON_RECEIVE | Must register serial number when receiving and selling product (Serial number is required)|","enum":["NO","ON_SALE","ON_RECEIVE"],"title":"SerialNoRequiredENUM","type":"string"},"PurchaseReceivementItemResponseSchema":{"title":"PurchaseReceivementItemResponseSchema","description":"PurchaseReceivementItem","allOf":[{"type":"object","properties":{"receivementUid":{"$ref":"#/components/schemas/UID"}}},{"$ref":"#/components/schemas/ReceivementItemResponseSchema"}]},"ReceivementItemResponseSchema":{"title":"ReceivementItemResponseSchema","type":"object","required":["createdAt","createdBy","externalId","lastModifiedAt","lastModifiedBy","product","purchaseOrderItemUid","quantity","receivementItemUid","status","note","tenantUserUid","tenantUserDisplayName"],"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"externalId":{"description":"External reference to receivement line","type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/ReceivementItemProductResponseSchema"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"quantity":{"type":"integer"},"unitPrice":{"type":"integer","deprecated":true,"description":"Deprecated: Use unitcost instead"},"unitCost":{"type":"integer"},"receivementItemUid":{"$ref":"#/components/schemas/UID"},"serialnumber":{"type":"string"},"status":{"type":"string"},"note":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"tenantUserDisplayName":{"type":"string","description":"The display name of the user that made the receivement"}}},"ReceivementItemProductResponseSchema":{"title":"ReceivementItemProductResponseSchema","type":"object","required":["productUid","name","sku"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"sku":{"type":"string"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"DeprecatedPurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","deprecated":true,"required":["unitPrice","discountAmount","freightAmount","totalLinePrice"],"properties":{"unitPrice":{"type":"integer"},"discountAmount":{"type":"integer"},"freightAmount":{"type":"integer"},"totalLinePrice":{"type":"integer"}}},"PurchaseOrderItemCurrencySchema":{"title":"PurchaseOrderItemCurrencySchema","type":"object","description":"All prices is in the local tenant currency","required":["unitPrice","discountAmount","freightAmount","unitCost","totalLinePrice"],"properties":{"unitPrice":{"type":"integer","description":"unitPrice is in local currency before discount"},"discountAmount":{"type":"integer","description":"The discount amount pr unit"},"freightAmount":{"type":"integer","description":"The portion of the shipping cost for this purchase order line."},"unitCost":{"type":"integer","description":"The price pr unit including discount and freight. This is what will be used as cost price during receivement."},"totalLinePrice":{"type":"integer","description":"Total price for all the items including discounts and freight amount."}}},"PurchaseOrderItemReservationSchema":{"title":"PurchaseOrderItemReservationSchema","type":"object","required":["orderUid","orderItemUid","orderNumber","quantity","reservationType"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"quantity":{"type":"integer"},"reservationType":{"$ref":"#/components/schemas/SalesReservationTypeENUM"}}},"SalesReservationTypeENUM":{"title":"SalesReservationTypeENUM","type":"string","enum":["NONE","WAREHOUSE","PURCHASEORDER","REQUEST_PURCHASEORDER"],"description":""},"PurchaseOrderStatusENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Created, but not sent to supplier yet.|\n| SENT_TO_SUPPLIER | Sent to supplier.|\n| CANCELLED_BY_SUPPLIER | The purchase order have been cancelled by the supplier. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| IN_TRANSIT | The goods are in transit. This status is only applicable for suppliers who are integrated with FlowRetail.|\n| PARTIALLY_RECEIVED | Not all goods have been received yet.|\n| RECEIVED | All goods have been received.|\n| CLOSED | No longer able to process purchase order.|\n| CANCELLED_BY_SUPPLIER | Purchase was cancelled by supplier|","enum":["NEW","PARTIALLY_RECEIVED","RECEIVED","SENT_TO_SUPPLIER","IN_TRANSIT","CLOSED","CANCELLED_BY_SUPPLIER"],"title":"PurchaseOrderStatusENUM","type":"string"},"PurchaseOrderCurrencySchema":{"title":"PurchaseOrderCurrencySchema","type":"object","required":["code","exchangeRate"],"properties":{"code":{"type":"string","description":"ISO 4217"},"exchangeRate":{"type":"integer"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"TenantPurchaseOrderSearchSchema":{"description":"Search for purchase orders in all stores on tenant. \n\nAn empty string will be ignored, and handeled as if the key did not exist in the payload.\n\nFuzzy search means that it will try to find words that contains the query string that is supplied. The search is case-insensitive. \nExample: If you search for \"Ol\" you will get \"Olsen\", \"Olstad\", \"Bolset\", \"Ormebol\", kolstad@example.com, etc ..","title":"TenantPurchaseOrderSearchSchema","type":"object","properties":{"fromDateTime":{"format":"date-time","type":"string"},"toDateTime":{"format":"date-time","type":"string"},"orderStatuses":{"type":"array","description":"Reference to a list of orderStatuses.","items":{"$ref":"#/components/schemas/PurchaseOrderStatusENUM"}},"storeUids":{"type":"array","description":"Reference to a list of storeUids","items":{"$ref":"#/components/schemas/UID"}},"organizationUids":{"type":"array","description":"Reference to a list of organizationUids","items":{"$ref":"#/components/schemas/UID"}},"supplierUid":{"$ref":"#/components/schemas/UID"},"query":{"type":"string"},"productUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"requestBodies":{"TenantPurchaseOrderSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPurchaseOrderSearchSchema"}}}}}},"paths":{"/tenants/{tenantUid}/purchase-orders/search":{"post":{"summary":"Search for purchase orders","tags":["Purchase"],"responses":{"200":{"$ref":"#/components/responses/PurchaseOrderListResponse"}},"operationId":"get-tenants-purchase-orders-search","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"requestBody":{"$ref":"#/components/requestBodies/TenantPurchaseOrderSearchRequest"},"description":"Search for purchase orders"}}}}
```

## List purchase requests

> List of products from orders where order item reservation type is \`REQUEST\_PURCHASEORDER\`.  \
> Optionally filter on organisation, store, supplier, and order state.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Purchase","description":"Purchase"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"PurchaseRequestListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseRequestProductSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}}}}},"schemas":{"PurchaseRequestProductSchema":{"title":"PurchaseRequestProductSchema","type":"object","required":["productUid","sku","productName","totalQuantityOrdered","oldestOrderCreatedAt","suppliers","orders"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"sku":{"type":"string"},"productName":{"type":"string"},"totalQuantityOrdered":{"type":"integer","description":"total quantity in order lines"},"oldestOrderCreatedAt":{"type":"string","format":"date-time","description":"the oldest createdAt in order lines"},"suppliers":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseRequestSupplierSchema"}},"orders":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseRequestOrderSchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"PurchaseRequestSupplierSchema":{"title":"PurchaseRequestSupplierSchema","type":"object","required":["supplierUid","name"],"properties":{"supplierUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"}}},"PurchaseRequestOrderSchema":{"title":"PurchaseRequestOrderSchema","type":"object","required":["orderUid","orderNumber","orderState","settleState","storeUid","storeName","items","createdAt"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"orderState":{"$ref":"#/components/schemas/OrderOrderStateENUM"},"settleState":{"$ref":"#/components/schemas/OrderSettleStateENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseRequestOrderItemSchema"}},"createdAt":{"type":"string","format":"date-time"}}},"OrderOrderStateENUM":{"description":"|ENUM | Description |\n| --- | --- |\n| OPEN | Order is open and beeing edited by someone|\n| PARKED | Order is parked|\n| CANCELED | Order is canceled/deleted|\n| COMPLETE | Order is complete|\n","enum":["OPEN","PARKED","CANCELED","COMPLETE"],"title":"OrderOrderStateENUM","type":"string"},"OrderSettleStateENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NOT_STARTED | Settlement not started|\n| IN_PROGRESS | Settlement is in progress and the order cannot be changed|\n| COMPLETE | Settlement is complete|","enum":["NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"OrderSettleStateENUM","type":"string"},"PurchaseRequestOrderItemSchema":{"title":"PurchaseRequestOrderItemSchema","type":"object","required":["orderItemUid","quantityOrdered"],"properties":{"orderItemUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}}},"requestBodies":{"PurchaseRequestRequest":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderStates":{"type":"array","items":{"$ref":"#/components/schemas/OrderOrderStateENUM"}}}}}}}}},"paths":{"/tenants/{tenantUid}/purchase-orders/requests":{"post":{"summary":"List purchase requests","tags":["Purchase"],"responses":{"200":{"$ref":"#/components/responses/PurchaseRequestListResponse"}},"operationId":"post-purchase-orders-requests","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"}],"description":"List of products from orders where order item reservation type is `REQUEST_PURCHASEORDER`.  \nOptionally filter on organisation, store, supplier, and order state.","requestBody":{"$ref":"#/components/requestBodies/PurchaseRequestRequest"}}}}}
```


---

# 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.flowretail.com/docs/developers/api-documentation/purchase.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.
