# InternalPurchaseOrder

InternalPurchaseOrder

## List internal purchase orders for an organization

> List internal purchase orders for an organization

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"InternalPurchaseOrderResponseSchema":{"title":"InternalPurchaseOrderResponseSchema","type":"object","description":"- sendingStoreUid: The store that creates/sends the internal purchase order. \n- receivingStoreUid: The store that receives the internal purchase order\n- creatingStoreUid: The store that creates the internal purchase order. May be different than sendingStoreUid","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","shippedAt","shippedBy","receivedAt","receivedBy","sendingStoreUid","receivingStoreUid","note","status","trackingNumber","items","internalPurchaseOrderUid","allowedStatuses","internalPurchaseOrderNumber","creatingStoreUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"shippedAt":{"type":"string","format":"date-time","nullable":true},"shippedBy":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"receivedBy":{"type":"string","nullable":true},"sendingStoreUid":{"$ref":"#/components/schemas/UID"},"receivingStoreUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"allowedStatuses":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"}},"internalPurchaseOrderNumber":{"type":"string"},"creatingStoreUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"InternalPurchaseOrderStatusENUM":{"title":"InternalPurchaseOrderStatusENUM","type":"string","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Draft/work in progress|\n| READY_FOR_CONFIRMATION | The order is ready for confirmation by receiving store|\n| PREPARING_FOR_SHIPMENT | Internal purchase order is ready to be shipped from the sending store|\n| IN_TRANSIT | All quantity sent is registered and products are sent from sending store (and removed from warehouse)|\n| ARRIVED | Purchase order has arrived to requesting store and is ready for registering and controlling quantity|\n| COMPLETE | Purchase order is complete (and stock is added to the receiving stores warehouse)|\n| CANCELLED | Purchase order is cancelled.|\n","enum":["NEW","READY_FOR_CONFIRMATION","PREPARING_FOR_SHIPMENT","IN_TRANSIT","ARRIVED","COMPLETE","CANCELLED"]},"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","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"},"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"}},"parameters":{"InternalPurchaseOrderSendingStoreUidQuery":{"description":"Reference to a store uid","in":"query","name":"sendingStoreUid","required":false,"schema":{"$ref":"#/components/schemas/UID"}},"InternalPurchaseOrderReceivingStoreUidQuery":{"description":"Reference to a store uid","in":"query","name":"receivingStoreUid","required":false,"schema":{"$ref":"#/components/schemas/UID"}},"InternalPurchasingOrderStatusesQuery":{"description":"Reference to a internal purchase order status","in":"query","name":"internalPurchasingOrderStatuses","required":false,"explode":false,"schema":{"items":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"type":"array"},"style":"form"},"internalPurchaseOrderFromDateQuery":{"description":"Reference to a to-date-time","name":"internalPurchaseOrderFromDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},"internalPurchaseOrderToDateQuery":{"description":"Reference to a from-date-time","name":"internalPurchaseOrderToDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},"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"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders":{"get":{"summary":"List internal purchase orders for an organization","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderListResponse"}},"operationId":"get-internal-purchase-orders","description":"List internal purchase orders for an organization","parameters":[{"$ref":"#/components/parameters/InternalPurchaseOrderSendingStoreUidQuery"},{"$ref":"#/components/parameters/InternalPurchaseOrderReceivingStoreUidQuery"},{"$ref":"#/components/parameters/InternalPurchasingOrderStatusesQuery"},{"$ref":"#/components/parameters/internalPurchaseOrderFromDateQuery"},{"$ref":"#/components/parameters/internalPurchaseOrderToDateQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```

## Create an internal purchase order

> \`sendingStoreUid\` is the sender of the internal purchase order.  \
> \`receivingStoreUid\` is the receiver of the internal purchase order.  \
> \`creatingStoreUid\` is the store that creates the internal purchase order, which can be any of the above or another store.\
> \
> If the creating store is not the sender, \
> then the sender must confirm the request before the products on the order can be sent.\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderResponseSchema":{"title":"InternalPurchaseOrderResponseSchema","type":"object","description":"- sendingStoreUid: The store that creates/sends the internal purchase order. \n- receivingStoreUid: The store that receives the internal purchase order\n- creatingStoreUid: The store that creates the internal purchase order. May be different than sendingStoreUid","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","shippedAt","shippedBy","receivedAt","receivedBy","sendingStoreUid","receivingStoreUid","note","status","trackingNumber","items","internalPurchaseOrderUid","allowedStatuses","internalPurchaseOrderNumber","creatingStoreUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"shippedAt":{"type":"string","format":"date-time","nullable":true},"shippedBy":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"receivedBy":{"type":"string","nullable":true},"sendingStoreUid":{"$ref":"#/components/schemas/UID"},"receivingStoreUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"allowedStatuses":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"}},"internalPurchaseOrderNumber":{"type":"string"},"creatingStoreUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"InternalPurchaseOrderStatusENUM":{"title":"InternalPurchaseOrderStatusENUM","type":"string","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Draft/work in progress|\n| READY_FOR_CONFIRMATION | The order is ready for confirmation by receiving store|\n| PREPARING_FOR_SHIPMENT | Internal purchase order is ready to be shipped from the sending store|\n| IN_TRANSIT | All quantity sent is registered and products are sent from sending store (and removed from warehouse)|\n| ARRIVED | Purchase order has arrived to requesting store and is ready for registering and controlling quantity|\n| COMPLETE | Purchase order is complete (and stock is added to the receiving stores warehouse)|\n| CANCELLED | Purchase order is cancelled.|\n","enum":["NEW","READY_FOR_CONFIRMATION","PREPARING_FOR_SHIPMENT","IN_TRANSIT","ARRIVED","COMPLETE","CANCELLED"]},"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"InternalPurchaseOrderCreateSchema":{"title":"InternalPurchaseOrderCreateSchema","description":"","type":"object","required":["sendingStoreUid","receivingStoreUid","creatingStoreUid"],"properties":{"sendingStoreUid":{"$ref":"#/components/schemas/UID"},"receivingStoreUid":{"$ref":"#/components/schemas/UID"},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemCreateSchema"}},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"creatingStoreUid":{"$ref":"#/components/schemas/UID"},"autoOrderProposal":{"type":"object","description":"Generate a internal purchase order proposal based on min/max","required":["sendingWarehouseUid","receivingWarehouseUid"],"properties":{"sendingWarehouseUid":{"$ref":"#/components/schemas/UID"},"receivingWarehouseUid":{"$ref":"#/components/schemas/UID"}}}}},"InternalPurchaseOrderItemCreateSchema":{"title":"InternalPurchaseOrderItemCreateSchema","type":"object","required":["quantityOrdered"],"properties":{"quantityOrdered":{"type":"integer"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"productUid":{"$ref":"#/components/schemas/UID"}}}},"requestBodies":{"InternalPurchaseOrderCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderCreateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders":{"post":{"tags":["InternalPurchaseOrder"],"summary":"Create an internal purchase order","operationId":"post-internal-purchase-order","responses":{"201":{"$ref":"#/components/responses/InternalPurchaseOrderResponse"}},"requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderCreateRequest"},"description":"`sendingStoreUid` is the sender of the internal purchase order.  \n`receivingStoreUid` is the receiver of the internal purchase order.  \n`creatingStoreUid` is the store that creates the internal purchase order, which can be any of the above or another store.\n\nIf the creating store is not the sender, \nthen the sender must confirm the request before the products on the order can be sent.\n\nRequired permissions: INTERNAL_PURCHASE_ORDER"}}}}
```

## Get internal purchase order details

> Get internal purchase order details\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderResponseSchema":{"title":"InternalPurchaseOrderResponseSchema","type":"object","description":"- sendingStoreUid: The store that creates/sends the internal purchase order. \n- receivingStoreUid: The store that receives the internal purchase order\n- creatingStoreUid: The store that creates the internal purchase order. May be different than sendingStoreUid","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","shippedAt","shippedBy","receivedAt","receivedBy","sendingStoreUid","receivingStoreUid","note","status","trackingNumber","items","internalPurchaseOrderUid","allowedStatuses","internalPurchaseOrderNumber","creatingStoreUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"shippedAt":{"type":"string","format":"date-time","nullable":true},"shippedBy":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"receivedBy":{"type":"string","nullable":true},"sendingStoreUid":{"$ref":"#/components/schemas/UID"},"receivingStoreUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"allowedStatuses":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"}},"internalPurchaseOrderNumber":{"type":"string"},"creatingStoreUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"InternalPurchaseOrderStatusENUM":{"title":"InternalPurchaseOrderStatusENUM","type":"string","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Draft/work in progress|\n| READY_FOR_CONFIRMATION | The order is ready for confirmation by receiving store|\n| PREPARING_FOR_SHIPMENT | Internal purchase order is ready to be shipped from the sending store|\n| IN_TRANSIT | All quantity sent is registered and products are sent from sending store (and removed from warehouse)|\n| ARRIVED | Purchase order has arrived to requesting store and is ready for registering and controlling quantity|\n| COMPLETE | Purchase order is complete (and stock is added to the receiving stores warehouse)|\n| CANCELLED | Purchase order is cancelled.|\n","enum":["NEW","READY_FOR_CONFIRMATION","PREPARING_FOR_SHIPMENT","IN_TRANSIT","ARRIVED","COMPLETE","CANCELLED"]},"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}":{"get":{"summary":"Get internal purchase order details","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderResponse"}},"operationId":"get-internal-purchase-order-details","description":"Get internal purchase order details\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","parameters":[]}}}}
```

## Update an internal purchase order

> Update an internal purchase order\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderResponseSchema":{"title":"InternalPurchaseOrderResponseSchema","type":"object","description":"- sendingStoreUid: The store that creates/sends the internal purchase order. \n- receivingStoreUid: The store that receives the internal purchase order\n- creatingStoreUid: The store that creates the internal purchase order. May be different than sendingStoreUid","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","shippedAt","shippedBy","receivedAt","receivedBy","sendingStoreUid","receivingStoreUid","note","status","trackingNumber","items","internalPurchaseOrderUid","allowedStatuses","internalPurchaseOrderNumber","creatingStoreUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"shippedAt":{"type":"string","format":"date-time","nullable":true},"shippedBy":{"type":"string","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"receivedBy":{"type":"string","nullable":true},"sendingStoreUid":{"$ref":"#/components/schemas/UID"},"receivingStoreUid":{"$ref":"#/components/schemas/UID"},"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"allowedStatuses":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"}},"internalPurchaseOrderNumber":{"type":"string"},"creatingStoreUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"InternalPurchaseOrderStatusENUM":{"title":"InternalPurchaseOrderStatusENUM","type":"string","description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| NEW | Draft/work in progress|\n| READY_FOR_CONFIRMATION | The order is ready for confirmation by receiving store|\n| PREPARING_FOR_SHIPMENT | Internal purchase order is ready to be shipped from the sending store|\n| IN_TRANSIT | All quantity sent is registered and products are sent from sending store (and removed from warehouse)|\n| ARRIVED | Purchase order has arrived to requesting store and is ready for registering and controlling quantity|\n| COMPLETE | Purchase order is complete (and stock is added to the receiving stores warehouse)|\n| CANCELLED | Purchase order is cancelled.|\n","enum":["NEW","READY_FOR_CONFIRMATION","PREPARING_FOR_SHIPMENT","IN_TRANSIT","ARRIVED","COMPLETE","CANCELLED"]},"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"InternalPurchaseOrderUpdateSchema":{"title":"InternalPurchaseOrderUpdateSchema","type":"object","properties":{"note":{"type":"string"},"status":{"$ref":"#/components/schemas/InternalPurchaseOrderStatusENUM"},"trackingNumber":{"type":"string"}}}},"requestBodies":{"InternalPurchaseOrderUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderUpdateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}":{"put":{"tags":["InternalPurchaseOrder"],"summary":"Update an internal purchase order","operationId":"put-internal-purchase-order-details","description":"Update an internal purchase order\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","responses":{"201":{"$ref":"#/components/responses/InternalPurchaseOrderResponse"}},"requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderUpdateRequest"}}}}}
```

## Delete an internal purchase order

> Delete an internal purchase order\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}":{"delete":{"tags":["InternalPurchaseOrder"],"summary":"Delete an internal purchase order","operationId":"delete-internal-purchase-order-details","responses":{"204":{"description":"No Content"}},"description":"Delete an internal purchase order\n\nRequired permissions: INTERNAL_PURCHASE_ORDER"}}}}
```

## List all items on an internal purchase order

> List all items on an internal purchase order\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderItemListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}}}}},"schemas":{"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","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"},"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"}},"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"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items":{"get":{"summary":"List all items on an internal purchase order","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderItemListResponse"}},"operationId":"get-internal-purchase-order-items","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"description":"List all items on an internal purchase order\n\nRequired permissions: INTERNAL_PURCHASE_ORDER"}}}}
```

## Create an order item on an internal purchase order

> Create an order item on an internal purchase order\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderItemResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"InternalPurchaseOrderItemCreateSchema":{"title":"InternalPurchaseOrderItemCreateSchema","type":"object","required":["quantityOrdered"],"properties":{"quantityOrdered":{"type":"integer"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"productUid":{"$ref":"#/components/schemas/UID"}}}},"requestBodies":{"InternalPurchaseOrderItemCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemCreateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items":{"post":{"tags":["InternalPurchaseOrder"],"summary":"Create an order item on an internal purchase order","operationId":"post-internal-purchase-order-item","responses":{"201":{"$ref":"#/components/responses/InternalPurchaseOrderItemResponse"}},"description":"Create an order item on an internal purchase order\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderItemCreateRequest"}}}}}
```

## Get internal purchase order item details

> Get internal purchase order item details\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderItemResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items/{internalPurchaseOrderItemUid}":{"get":{"summary":"Get internal purchase order item details","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderItemResponse"}},"operationId":"get-internal-purchase-order-item-details","description":"Get internal purchase order item details\n\nRequired permissions: INTERNAL_PURCHASE_ORDER"}}}}
```

## Update internal purchase order item details

> Update internal purchase order item details\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderItemResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"InternalPurchaseOrderItemUpdateSchema":{"title":"InternalPurchaseOrderItemUpdateSchema","type":"object","properties":{"productUid":{"$ref":"#/components/schemas/UID"},"quantityOrdered":{"type":"integer"},"serialnumbers":{"type":"array","items":{"type":"string"}},"costPrice":{"type":"integer"}}}},"requestBodies":{"InternalPurchaseOrderItemUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemUpdateSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items/{internalPurchaseOrderItemUid}":{"put":{"tags":["InternalPurchaseOrder"],"summary":"Update internal purchase order item details","operationId":"put-internal-purchase-order-item-details","responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderItemResponse"}},"description":"Update internal purchase order item details\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderItemUpdateRequest"}}}}}
```

## Delete an internal purchase order item

> Delete an internal purchase order item\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items/{internalPurchaseOrderItemUid}":{"delete":{"tags":["InternalPurchaseOrder"],"summary":"Delete an internal purchase order item","operationId":"delete-internal-purchase-order-item-details","responses":{"204":{"description":"No Content"}},"description":"Delete an internal purchase order item\n\nRequired permissions: INTERNAL_PURCHASE_ORDER"}}}}
```

## Update an internal purchase order item with a send-quantity

> Update an internal purchase order item with a send-quantity\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderItemResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"InternalPurchaseOrderItemSendSchema":{"title":"InternalPurchaseOrderItemSendSchema","type":"object","description":"- quantitySent: Quantity to send from wrehouse\n- warehouseUid: warehouse to send stock from","required":["quantitySent","shipFromWarehouseUid"],"properties":{"quantitySent":{"type":"integer","description":"quantity to send from warehouse"},"serialnumbers":{"type":"array","items":{"type":"string"}},"shipFromWarehouseUid":{"$ref":"#/components/schemas/UID"}}}},"requestBodies":{"InternalPurchaseOrderItemSendRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemSendSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items/{internalPurchaseOrderItemUid}/send":{"put":{"summary":"Update an internal purchase order item with a send-quantity","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderItemResponse"}},"operationId":"put-internal-purchase-order-item-details-send","description":"Update an internal purchase order item with a send-quantity\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderItemSendRequest"}}}}}
```

## Update an internal purchase order item with a receive-quantity

> Update an internal purchase order item with a receive-quantity\
> \
> Required permissions: INTERNAL\_PURCHASE\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"InternalPurchaseOrderItemResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemResponseSchema"}}}}},"schemas":{"InternalPurchaseOrderItemResponseSchema":{"title":"InternalPurchaseOrderItemResponseSchema","type":"object","required":["createdAt","createdBy","lastModifiedAt","lastModifiedBy","product","serialnumbers","quantityOrdered","shipFromWarehouseUid","quantitySent","quantityReceived","receiveToWarehouseUid","costPrice","internalPurchaseOrderItemUid"],"properties":{"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"lastModifiedBy":{"type":"string"},"product":{"$ref":"#/components/schemas/InternalPurchaseOrderItemProductResponseSchema"},"serialnumbers":{"type":"array","items":{"type":"string"}},"quantityOrdered":{"type":"integer"},"shipFromWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"quantitySent":{"type":"integer"},"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"$ref":"#/components/schemas/OptionalUID"},"costPrice":{"type":"integer"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"InternalPurchaseOrderItemProductResponseSchema":{"title":"InternalPurchaseOrderItemProductResponseSchema","type":"object","required":["productUid","productName","productSku","coverImage","serialNoRequired"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"coverImage":{"$ref":"#/components/schemas/CoverImageSchema"},"serialNoRequired":{"$ref":"#/components/schemas/SerialNoRequiredENUM"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"CoverImageSchema":{"title":"CoverImageSchema","type":"object","properties":{"productMediaUid":{"$ref":"#/components/schemas/UID"},"mainUrl":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["productMediaUid","mainUrl","thumbnailUrl"]},"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"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"InternalPurchaseOrderItemReceiveSchema":{"title":"InternalPurchaseOrderItemReceiveSchema","type":"object","description":"- quantityReceived: Quantity to receive to wrehouse\n- warehouseUid: warehouse to receive stock","properties":{"quantityReceived":{"type":"integer"},"receiveToWarehouseUid":{"type":"string"}},"required":["quantityReceived","receiveToWarehouseUid"]}},"requestBodies":{"InternalPurchaseOrderItemReceiveRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPurchaseOrderItemReceiveSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/items/{internalPurchaseOrderItemUid}/receive":{"put":{"summary":"Update an internal purchase order item with a receive-quantity","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/InternalPurchaseOrderItemResponse"}},"operationId":"put-internal-purchase-order-item-details-receive","description":"Update an internal purchase order item with a receive-quantity\n\nRequired permissions: INTERNAL_PURCHASE_ORDER","requestBody":{"$ref":"#/components/requestBodies/InternalPurchaseOrderItemReceiveRequest"}}}}}
```

## Download internal purchase order

> Download internal purchase order.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"InternalPurchaseOrder","description":"InternalPurchaseOrder"}],"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":"Access token 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":{"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."}},"schemas":{"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"]}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/internal-purchase-orders/{internalPurchaseOrderUid}/download":{"get":{"summary":"Download internal purchase order","tags":["InternalPurchaseOrder"],"responses":{"200":{"$ref":"#/components/responses/FileResponse"}},"operationId":"get-internal-purchase-order-download","description":"Download internal purchase order."}}}}
```
