# Warehouse

Warehouse

## List warehouses

> List all warehouses.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"parameters":{"warehouseExternalIdQuery":{"description":"External reference to a warehouse.","in":"query","name":"warehouseExternalId","required":false,"schema":{"type":"string"}},"warehouseNameQuery":{"description":"Reference to the name of a warehouse.","in":"query","name":"warehouseName","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":{"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"},"WarehouseResponseSchema":{"title":"WarehouseResponseSchema","type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"accessList":{"type":"array","items":{"$ref":"#/components/schemas/MyWarehouseAccessResponseSchema"}}},"required":["createdAt","externalId","lastModifiedAt","name","warehouseUid","accessList"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"MyWarehouseAccessResponseSchema":{"title":"MyWarehouseAccessResponseSchema","type":"object","properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["role","storeUid","storeName","warehouseUid","warehouseName","warehouseAccessUid"]},"WarehouseAccessRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER | Can deliver products using stock from this warehouse. |\n| MOVE | Can move stock to and from this warehouse. |\n| RECEIVE | Can receive purchase orders to this warehouse. |\n| RESERVE | Can make stock reservations from this warehouse. |\n| RETURN | Can return stock to this warehouse. |\n| VIEW | Only able to view quantity.|","enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"title":"WarehouseAccessRoleENUM","type":"string"},"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":{"WarehouseListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WarehouseResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses":{"get":{"description":"List all warehouses.","operationId":"get-tenants-stores-warehouses","parameters":[{"$ref":"#/components/parameters/warehouseExternalIdQuery"},{"$ref":"#/components/parameters/warehouseNameQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/WarehouseListResponse"}},"summary":"List warehouses","tags":["Warehouse"]}}}}
```

## Create a new warehouse

> Create a new warehouse.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"requestBodies":{"WarehouseCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseCreateRequestSchema"}}}}},"schemas":{"WarehouseCreateRequestSchema":{"allOf":[{"$ref":"#/components/schemas/WarehouseUpdateRequestSchema"},{"properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"}}}],"type":"object","title":"WarehouseCreateRequestSchema"},"WarehouseUpdateRequestSchema":{"title":"WarehouseUpdateRequestSchema","type":"object","properties":{"externalId":{"type":"string"},"name":{"type":"string"}},"required":["name"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"WarehouseResponseSchema":{"title":"WarehouseResponseSchema","type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"accessList":{"type":"array","items":{"$ref":"#/components/schemas/MyWarehouseAccessResponseSchema"}}},"required":["createdAt","externalId","lastModifiedAt","name","warehouseUid","accessList"]},"MyWarehouseAccessResponseSchema":{"title":"MyWarehouseAccessResponseSchema","type":"object","properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["role","storeUid","storeName","warehouseUid","warehouseName","warehouseAccessUid"]},"WarehouseAccessRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER | Can deliver products using stock from this warehouse. |\n| MOVE | Can move stock to and from this warehouse. |\n| RECEIVE | Can receive purchase orders to this warehouse. |\n| RESERVE | Can make stock reservations from this warehouse. |\n| RETURN | Can return stock to this warehouse. |\n| VIEW | Only able to view quantity.|","enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"title":"WarehouseAccessRoleENUM","type":"string"}},"responses":{"WarehouseResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses":{"post":{"description":"Create a new warehouse.\n\nRequired permissions: WAREHOUSE","operationId":"post-tenants-stores-warehouses","requestBody":{"$ref":"#/components/requestBodies/WarehouseCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/WarehouseResponse"}},"summary":"Create a new warehouse","tags":["Warehouse"]}}}}
```

## List warehouse access

> Lists all warehouses this store has access to.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"parameters":{"warehouseRoleQuery":{"description":"Reference to a warehouse role\n|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER||\n| MOVE||\n| RECEIVE||\n| RESERVE||\n| RETURN||\n| VIEW||","in":"query","name":"warehouseRole","required":false,"schema":{"enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"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":{"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"},"MyWarehouseAccessResponseSchema":{"title":"MyWarehouseAccessResponseSchema","type":"object","properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["role","storeUid","storeName","warehouseUid","warehouseName","warehouseAccessUid"]},"WarehouseAccessRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER | Can deliver products using stock from this warehouse. |\n| MOVE | Can move stock to and from this warehouse. |\n| RECEIVE | Can receive purchase orders to this warehouse. |\n| RESERVE | Can make stock reservations from this warehouse. |\n| RETURN | Can return stock to this warehouse. |\n| VIEW | Only able to view quantity.|","enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"title":"WarehouseAccessRoleENUM","type":"string"},"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":{"MyWarehouseAccessListResponse":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MyWarehouseAccessResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/access":{"get":{"description":"Lists all warehouses this store has access to.","operationId":"get-tenants-stores-warehouses-access","parameters":[{"$ref":"#/components/parameters/warehouseRoleQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/MyWarehouseAccessListResponse"}},"summary":"List warehouse access","tags":["Warehouse"]}}}}
```

## Get warehouse details

> Get details a warehouse.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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":{"WarehouseResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseResponseSchema"}}},"description":"Example response"}},"schemas":{"WarehouseResponseSchema":{"title":"WarehouseResponseSchema","type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"accessList":{"type":"array","items":{"$ref":"#/components/schemas/MyWarehouseAccessResponseSchema"}}},"required":["createdAt","externalId","lastModifiedAt","name","warehouseUid","accessList"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"MyWarehouseAccessResponseSchema":{"title":"MyWarehouseAccessResponseSchema","type":"object","properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["role","storeUid","storeName","warehouseUid","warehouseName","warehouseAccessUid"]},"WarehouseAccessRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER | Can deliver products using stock from this warehouse. |\n| MOVE | Can move stock to and from this warehouse. |\n| RECEIVE | Can receive purchase orders to this warehouse. |\n| RESERVE | Can make stock reservations from this warehouse. |\n| RETURN | Can return stock to this warehouse. |\n| VIEW | Only able to view quantity.|","enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"title":"WarehouseAccessRoleENUM","type":"string"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}":{"get":{"description":"Get details a warehouse.","operationId":"get-tenants-stores-warehouses-details","responses":{"200":{"$ref":"#/components/responses/WarehouseResponse"}},"summary":"Get warehouse details","tags":["Warehouse"]}}}}
```

## Update warehouse details

> Update details for a warehouse. Partial updates are allowed.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"requestBodies":{"WarehouseUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseUpdateRequestSchema"}}}}},"schemas":{"WarehouseUpdateRequestSchema":{"title":"WarehouseUpdateRequestSchema","type":"object","properties":{"externalId":{"type":"string"},"name":{"type":"string"}},"required":["name"]},"WarehouseResponseSchema":{"title":"WarehouseResponseSchema","type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"accessList":{"type":"array","items":{"$ref":"#/components/schemas/MyWarehouseAccessResponseSchema"}}},"required":["createdAt","externalId","lastModifiedAt","name","warehouseUid","accessList"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"MyWarehouseAccessResponseSchema":{"title":"MyWarehouseAccessResponseSchema","type":"object","properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["role","storeUid","storeName","warehouseUid","warehouseName","warehouseAccessUid"]},"WarehouseAccessRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER | Can deliver products using stock from this warehouse. |\n| MOVE | Can move stock to and from this warehouse. |\n| RECEIVE | Can receive purchase orders to this warehouse. |\n| RESERVE | Can make stock reservations from this warehouse. |\n| RETURN | Can return stock to this warehouse. |\n| VIEW | Only able to view quantity.|","enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"title":"WarehouseAccessRoleENUM","type":"string"}},"responses":{"WarehouseResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}":{"put":{"description":"Update details for a warehouse. Partial updates are allowed.\n\nRequired permissions: WAREHOUSE","operationId":"put-tenants-stores-warehouses-details","requestBody":{"$ref":"#/components/requestBodies/WarehouseUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/WarehouseResponse"}},"summary":"Update warehouse details","tags":["Warehouse"]}}}}
```

## Delete a warehouse

> Deletes a warehouse.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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}/stores/{storeUid}/warehouses/{warehouseUid}":{"delete":{"description":"Deletes a warehouse.\n\nRequired permissions: WAREHOUSE","operationId":"delete-tenants-stores-warehouses-details","responses":{"204":{"description":"No Content"}},"summary":"Delete a warehouse","tags":["Warehouse"]}}}}
```

## Grant warehouse access

> Grants access for a store to a warehouse.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"requestBodies":{"WarehouseAccessGrantRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseAccessGrantSchema"}}}}},"schemas":{"WarehouseAccessGrantSchema":{"properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"}},"required":["storeUid","role"],"title":"WarehouseAccessGrantSchema","type":"object"},"WarehouseAccessRoleENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| DELIVER | Can deliver products using stock from this warehouse. |\n| MOVE | Can move stock to and from this warehouse. |\n| RECEIVE | Can receive purchase orders to this warehouse. |\n| RESERVE | Can make stock reservations from this warehouse. |\n| RETURN | Can return stock to this warehouse. |\n| VIEW | Only able to view quantity.|","enum":["DELIVER","MOVE","RECEIVE","RESERVE","RETURN","VIEW"],"title":"WarehouseAccessRoleENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"WarehouseAccessResponseSchema":{"properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"warehouse":{"$ref":"#/components/schemas/WarehouseResponseSchema"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseAccessUid","role"],"title":"WarehouseAccessResponseSchema","type":"object"},"WarehouseResponseSchema":{"title":"WarehouseResponseSchema","type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"accessList":{"type":"array","items":{"$ref":"#/components/schemas/MyWarehouseAccessResponseSchema"}}},"required":["createdAt","externalId","lastModifiedAt","name","warehouseUid","accessList"]},"MyWarehouseAccessResponseSchema":{"title":"MyWarehouseAccessResponseSchema","type":"object","properties":{"role":{"$ref":"#/components/schemas/WarehouseAccessRoleENUM"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"warehouseAccessUid":{"$ref":"#/components/schemas/UID"}},"required":["role","storeUid","storeName","warehouseUid","warehouseName","warehouseAccessUid"]}},"responses":{"WarehouseAccessResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseAccessResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/access":{"post":{"description":"Grants access for a store to a warehouse.\n\nRequired permissions: WAREHOUSE","operationId":"post-tenants-stores-warehouses-access","requestBody":{"$ref":"#/components/requestBodies/WarehouseAccessGrantRequest"},"responses":{"200":{"$ref":"#/components/responses/WarehouseAccessResponse"}},"summary":"Grant warehouse access","tags":["Warehouse"]}}}}
```

## Revoke warehouse access

> Revokes access for a store to a warehouse.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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}/stores/{storeUid}/warehouses/{warehouseUid}/access/{warehouseAccessUid}":{"delete":{"description":"Revokes access for a store to a warehouse.\n\nRequired permissions: WAREHOUSE","operationId":"delete-tenants-stores-warehouses-access-details","responses":{"204":{"description":"No Content"}},"summary":"Revoke warehouse access","tags":["Warehouse"]}}}}
```

## BATCH Set stock for a list of products in a warehouse

> Change stock for a list of products in a warehouse (max 1000 entries). \
> \
> The request contains two quantity fields \`quantity\` and \`changeQuantity\`. \
> Both may not be set in the same entry.  \
> Use \`quantity\` to set a new total stock for the product.  \
> Use \`changeQuantity\` to adjust the product's stock by a positive or negative number to \
> increase or decrease stock.  \
> Use \`averageCost\` to perform new calculation of stock average cost.  \
> At least one of these three fields must be set on each entry.\
> \
> If an error is returned, no changes have been made, all changes are rolled back.\
> The error is a description of the first error met.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"requestBodies":{"BatchAdjustStockRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAdjustStockRequestSchema"}}},"description":"BATCH Adjust stock Request Body"}},"schemas":{"BatchAdjustStockRequestSchema":{"title":"BatchAdjustStockRequestSchema","type":"object","properties":{"upsert":{"items":{"$ref":"#/components/schemas/BatchAdjustStockSchema"},"maxItems":1000,"type":"array"}},"required":["upsert"]},"BatchAdjustStockSchema":{"title":"BatchAdjustStockSchema","type":"object","required":["productUid","reason"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"averageCost":{"description":"set new average cost","type":"integer"},"quantity":{"description":"set new stock quantity","type":"integer","minimum":0},"changeQuantity":{"type":"integer","description":"make stock adjustment"},"reason":{"type":"string"},"serialnumbers":{"description":"the number of serialnumbers must match the quantity/changeQuantity","type":"array","items":{"type":"string"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"BatchAdjustStockResponseSchema":{"title":"BatchAdjustStockResponseSchema","type":"object","properties":{"upsert":{"items":{"$ref":"#/components/schemas/BatchResponseItemProductSchema"},"maxItems":1000,"type":"array"}},"required":["upsert"]},"BatchResponseItemProductSchema":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/BatchErrorProductSchema"},"type":"array"},"success":{"type":"integer"}},"required":["success","errors"],"title":"BatchResponseItemProductSchema","type":"object"},"BatchErrorProductSchema":{"properties":{"errorCode":{"type":"string"},"message":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"}},"required":["productUid","errorCode","message"],"title":"BatchErrorProductSchema","type":"object"}},"responses":{"AdjustStockBatchResponse":{"description":"The success field indicate how many of the products that where successfully updated. \nThe errors field will contain the products that failed to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAdjustStockResponseSchema"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/batch":{"put":{"description":"Change stock for a list of products in a warehouse (max 1000 entries). \n\nThe request contains two quantity fields `quantity` and `changeQuantity`. \nBoth may not be set in the same entry.  \nUse `quantity` to set a new total stock for the product.  \nUse `changeQuantity` to adjust the product's stock by a positive or negative number to \nincrease or decrease stock.  \nUse `averageCost` to perform new calculation of stock average cost.  \nAt least one of these three fields must be set on each entry.\n\nIf an error is returned, no changes have been made, all changes are rolled back.\nThe error is a description of the first error met.\n\nRequired permissions: WAREHOUSE","operationId":"put-tenants-stores-warehouses-stock-adjust-batch","requestBody":{"$ref":"#/components/requestBodies/BatchAdjustStockRequest"},"responses":{"200":{"$ref":"#/components/responses/AdjustStockBatchResponse"},"207":{"$ref":"#/components/responses/AdjustStockBatchResponse"}},"summary":"BATCH Set stock for a list of products in a warehouse","tags":["Warehouse"]}}}}
```

## Set stock for product in specified warehouse

> The request contains two quantity fields \`quantity\` and \`changeQuantity\`. \
> Both may not be set in the same entry.  \
> Use \`quantity\` to set a new total stock for the product.  \
> Use \`changeQuantity\` to adjust the product's stock by a positive or negative number to \
> increase or decrease stock.  \
> Use \`averageCost\` to perform new calculation of stock average cost.  \
> At least one of these three fields must be set on each entry.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"requestBodies":{"AdjustStockRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustStockRequestSchema"}}},"description":"Adjust stock Request Body"}},"schemas":{"AdjustStockRequestSchema":{"title":"AdjustStockRequestSchema","type":"object","required":["reason"],"properties":{"averageCost":{"description":"set new average cost","type":"integer"},"quantity":{"description":"set new stock quantity","type":"integer"},"changeQuantity":{"description":"make stock adjustment","type":"integer"},"reason":{"type":"string"},"serialnumbers":{"description":"Array of strings to identify serial numbers for the quantity in stock. Length of array must match the quantity value.\nThis field is required when product has serialNoRequired = \"ON_RECEIVE\"\n","type":"array","items":{"type":"string"}}}},"NullableStockResponseSchema":{"title":"NullableStockResponseSchema","type":"object","nullable":true,"properties":{"averageCost":{"type":"integer"},"locationLabel":{"type":"string"},"maxStockLevel":{"type":"integer"},"minStockLevel":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productSku":{"type":"string"},"quantityReserved":{"type":"integer"},"quantityStock":{"type":"integer"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"}},"required":["averageCost","locationLabel","maxStockLevel","minStockLevel","productUid","productSku","quantityReserved","quantityStock","warehouseUid","warehouseName","storeUid","storeName"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}},"responses":{"NullableStockResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NullableStockResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}":{"put":{"description":"The request contains two quantity fields `quantity` and `changeQuantity`. \nBoth may not be set in the same entry.  \nUse `quantity` to set a new total stock for the product.  \nUse `changeQuantity` to adjust the product's stock by a positive or negative number to \nincrease or decrease stock.  \nUse `averageCost` to perform new calculation of stock average cost.  \nAt least one of these three fields must be set on each entry.\n\nRequired permissions: WAREHOUSE","operationId":"put-tenants-stores-warehouses-stock-adjust","requestBody":{"$ref":"#/components/requestBodies/AdjustStockRequest"},"responses":{"200":{"$ref":"#/components/responses/NullableStockResponse"}},"summary":"Set stock for product in specified warehouse","tags":["Warehouse"]}}}}
```

## Update details for a product on a warehouse

> Update details for a product on a warehouse\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"StockInfo","description":"StockInfo"},{"name":"Warehouse","description":"Warehouse"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"authToken":[]},{"integrationToken":[]},{"accessToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"},"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"}},"responses":{"StockResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockResponseSchema"}}},"description":"Example response"}},"schemas":{"StockResponseSchema":{"title":"StockResponseSchema","type":"object","properties":{"averageCost":{"type":"integer"},"locationLabel":{"type":"string"},"maxStockLevel":{"type":"integer"},"minStockLevel":{"type":"integer"},"price":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"quantityReserved":{"type":"integer"},"quantityStock":{"type":"integer"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"}},"required":["averageCost","locationLabel","maxStockLevel","minStockLevel","price","productUid","productName","productSku","quantityReserved","quantityStock","warehouseUid","warehouseName","storeUid","storeName"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"UpdateWarehouseProductDetailRequestSchema":{"title":"UpdateWarehouseProductDetailRequestSchema","type":"object","properties":{"locationLabel":{"type":"string"},"maxStockLevel":{"type":"integer"},"minStockLevel":{"type":"integer"}}}},"requestBodies":{"UpdateWarehouseProductDetailRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWarehouseProductDetailRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}/details":{"put":{"summary":"Update details for a product on a warehouse","operationId":"put-tenants-stores-warehouses-stock-product-details","responses":{"200":{"$ref":"#/components/responses/StockResponse"}},"description":"Update details for a product on a warehouse\n\nRequired permissions: WAREHOUSE","requestBody":{"$ref":"#/components/requestBodies/UpdateWarehouseProductDetailRequest"},"tags":["Warehouse","StockInfo"]}}}}
```

## Search in stock logs for product in specified warehouse

> Returns stock logs for a particular product in the specified warehouse.\
> \
> Required permissions: WAREHOUSE\_HISTORY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"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":{"StockLogSearchRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLogSearchRequestSchema"}}}}},"schemas":{"StockLogSearchRequestSchema":{"properties":{"fromDateTime":{"format":"date-time","type":"string"},"serialnumber":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"toDateTime":{"format":"date-time","type":"string"}},"title":"StockLogSearchRequestSchema","type":"object"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StockLogResponseSchema":{"description":"Log data for a product's stock movements. Sorted by timestamp, descending","title":"StockLogResponseSchema","type":"object","required":["costDelta","costNew","costOrigin","costTransaction","createdAt","quantityDelta","quantityNew","quantityNotAvailable","quantityOrigin","reference","serialnumber","tenantUserUid","tenantUserName","transactionType","saleCostPrice","referenceDetails"],"properties":{"costDelta":{"type":"integer","description":"Average cost price delta"},"costNew":{"type":"integer","description":"Average cost price after the transaction"},"costOrigin":{"type":"integer","description":"Average cost price before the transaction"},"costTransaction":{"type":"integer","description":"The cost of the current transaction"},"createdAt":{"format":"date-time","type":"string"},"quantityDelta":{"type":"integer"},"quantityNew":{"type":"integer"},"quantityNotAvailable":{"type":"integer"},"quantityOrigin":{"type":"integer"},"reference":{"type":"integer"},"referenceDetails":{"$ref":"#/components/schemas/StockLogReferenceSchema"},"serialnumber":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"tenantUserName":{"type":"string"},"transactionType":{"$ref":"#/components/schemas/TransactionTypeENUM"},"saleCostPrice":{"type":"integer"}}},"StockLogReferenceSchema":{"title":"StockLogReferenceSchema","type":"object","required":["salesOrder","rmaOrder","stocktaking","internalPurchaseOrder","serviceOrder","receivement","responseType"],"properties":{"salesOrder":{"$ref":"#/components/schemas/StockLogSalesOrderReferenceSchema"},"rmaOrder":{"$ref":"#/components/schemas/StockLogRmaOrderReferenceSchema"},"stocktaking":{"$ref":"#/components/schemas/StockLogStocktakingReferenceSchema"},"internalPurchaseOrder":{"$ref":"#/components/schemas/StockLogInternalPurchaseOrderReferenceSchema"},"serviceOrder":{"$ref":"#/components/schemas/StockLogServiceOrderReferenceSchema"},"receivement":{"$ref":"#/components/schemas/StockLogReceivementReferenceSchema"},"responseType":{"type":"string","enum":["salesOrder","rmaOrder","stocktaking","internalPurchaseOrder","serviceOrder","receivement","noReference"]}}},"StockLogSalesOrderReferenceSchema":{"title":"StockLogSalesOrderReferenceSchema","type":"object","nullable":true,"required":["orderNumber","orderUid","storeUid","orderItemUid"],"properties":{"orderNumber":{"type":"string"},"orderUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogRmaOrderReferenceSchema":{"title":"StockLogRmaOrderReferenceSchema","type":"object","nullable":true,"required":["rmaNumber","storeUid","rmaOrderUid","rmaOrderItemUid"],"properties":{"rmaNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"rmaOrderUid":{"$ref":"#/components/schemas/UID"},"rmaOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogStocktakingReferenceSchema":{"title":"StockLogStocktakingReferenceSchema","type":"object","nullable":true,"required":["name","storeUid","stocktakingUid","stocktakingItemUid"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"stocktakingUid":{"$ref":"#/components/schemas/UID"},"stocktakingItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogInternalPurchaseOrderReferenceSchema":{"title":"StockLogInternalPurchaseOrderReferenceSchema","type":"object","nullable":true,"required":["internalPurchaseNumber","storeUid","internalPurchaseOrderUid","internalPurchaseOrderItemUid"],"properties":{"internalPurchaseNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogServiceOrderReferenceSchema":{"title":"StockLogServiceOrderReferenceSchema","type":"object","nullable":true,"required":["serviceOrderNumber","storeUid","serviceOrderUid","serviceOrderItemUid"],"properties":{"serviceOrderNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"serviceOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogReceivementReferenceSchema":{"title":"StockLogReceivementReferenceSchema","type":"object","nullable":true,"required":["purchaseNumber","storeUid","purchaseOrderUid","purchaseOrderItemUid","receivementUid","receivementItemUid"],"properties":{"purchaseNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"}}},"TransactionTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIVE | Receive (Purchase)|\n| DELIVERY | Deliver ( Sales)|\n| MOVE | Move between depts|\n| RETURN | Return of items|\n| INVENTORY_CONTROL | Inventory Control|\n| INTERNAL | Theft / Internal use|\n| SET_STOCK | Set stock|\n| ADJUST_STOCK | Adjust stock|\n| ADJUST_COST | Adjust cost|\n| RMA_ORDER | RMA Order|\n","enum":["RECEIVE","DELIVERY","MOVE","RETURN","INVENTORY_CONTROL","INTERNAL","SET_STOCK","ADJUST_STOCK","ADJUST_COST","RMA_ORDER"],"title":"TransactionTypeENUM","type":"string"},"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":{"StockLogListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StockLogResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}/logs/search":{"post":{"description":"Returns stock logs for a particular product in the specified warehouse.\n\nRequired permissions: WAREHOUSE_HISTORY","operationId":"post-tenants-stores-warehouses-stock-search-logs","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"}],"requestBody":{"$ref":"#/components/requestBodies/StockLogSearchRequest"},"responses":{"200":{"$ref":"#/components/responses/StockLogListResponse"}},"summary":"Search in stock logs for product in specified warehouse","tags":["Warehouse"]}}}}
```

## Move stock for a product from one warehouse to another

> Move stock for a product to another warehouse.\
> \
> The response will show the stock details for the warehouse you are moving from\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"requestBodies":{"MoveStockRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveStockRequestSchema"}}},"description":"Move stock to warehouse specified in request body"}},"schemas":{"MoveStockRequestSchema":{"title":"MoveStockRequestSchema","type":"object","properties":{"quantity":{"type":"integer"},"serialnumbers":{"items":{"type":"string"},"type":"array"},"warehouseUid":{"$ref":"#/components/schemas/UID"}},"required":["quantity","warehouseUid"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StockResponseSchema":{"title":"StockResponseSchema","type":"object","properties":{"averageCost":{"type":"integer"},"locationLabel":{"type":"string"},"maxStockLevel":{"type":"integer"},"minStockLevel":{"type":"integer"},"price":{"type":"integer"},"productUid":{"$ref":"#/components/schemas/UID"},"productName":{"type":"string"},"productSku":{"type":"string"},"quantityReserved":{"type":"integer"},"quantityStock":{"type":"integer"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"}},"required":["averageCost","locationLabel","maxStockLevel","minStockLevel","price","productUid","productName","productSku","quantityReserved","quantityStock","warehouseUid","warehouseName","storeUid","storeName"]}},"responses":{"StockResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}/move":{"post":{"description":"Move stock for a product to another warehouse.\n\nThe response will show the stock details for the warehouse you are moving from\n\nRequired permissions: WAREHOUSE","operationId":"post-tenants-stores-warehouses-stock-move","requestBody":{"$ref":"#/components/requestBodies/MoveStockRequest"},"responses":{"200":{"$ref":"#/components/responses/StockResponse"}},"summary":"Move stock for a product from one warehouse to another","tags":["Warehouse"]}}}}
```

## List all serial number information for a product in a warehouse

> List all serial number information for a product in a warehouse

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"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"},"StockDetailResponseSchema":{"title":"StockDetails","type":"object","properties":{"costPrice":{"type":"integer","nullable":true},"createdAt":{"format":"date-time","type":"string"},"deliveredAt":{"type":"string","format":"date-time","nullable":true},"lastModifiedAt":{"format":"date-time","type":"string"},"origin":{"$ref":"#/components/schemas/TransactionTypeENUM"},"receivedAt":{"type":"string","format":"date-time"},"serialnumber":{"type":"string"}},"required":["costPrice","createdAt","deliveredAt","lastModifiedAt","origin","receivedAt","serialnumber"]},"TransactionTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIVE | Receive (Purchase)|\n| DELIVERY | Deliver ( Sales)|\n| MOVE | Move between depts|\n| RETURN | Return of items|\n| INVENTORY_CONTROL | Inventory Control|\n| INTERNAL | Theft / Internal use|\n| SET_STOCK | Set stock|\n| ADJUST_STOCK | Adjust stock|\n| ADJUST_COST | Adjust cost|\n| RMA_ORDER | RMA Order|\n","enum":["RECEIVE","DELIVERY","MOVE","RETURN","INVENTORY_CONTROL","INTERNAL","SET_STOCK","ADJUST_STOCK","ADJUST_COST","RMA_ORDER"],"title":"TransactionTypeENUM","type":"string"},"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":{"StockDetailListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StockDetailResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}/serialnumbers":{"get":{"description":"List all serial number information for a product in a warehouse","operationId":"get-tenant-store-warehouse-stock-product-serialnumbers","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/StockDetailListResponse"}},"summary":"List all serial number information for a product in a warehouse","tags":["Warehouse"]}}}}
```

## Check availability on a serial number for warehouse and product.

> For products with SerialNoRequired = ON\_RECEIVE. \
> when availabilityType is not set, or DELIVER:\
> &#x20; Check if a serialnumber is in stock for a productUid and warehouseUid. Returns 200 if in stock, else 404. \
> &#x20; 200 is returned for all other products.\
> when availabilityType = RECEIVE:\
> &#x20; Check if a serialnumber is NOT in stock for a productUid and warehouseUid. Returns 200 if not in stock, else 400. \
> &#x20; 200 is returned for all other products.<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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"}},"parameters":{"availabilityTypeQuery":{"description":"Reference to an availabilityType.","explode":false,"in":"query","name":"availabilityType","schema":{"$ref":"#/components/schemas/AvailabilityTypeENUM"},"style":"form"}},"schemas":{"AvailabilityTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIVE  - Check for receive serial number|\n| DELIVER  - Check for deliver serial number|\n","enum":["RECEIVE","DELIVER"],"title":"AvailabilityTypeENUM","type":"string"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/{warehouseUid}/stock/{productUid}/serialnumbers/{serialnumber}":{"get":{"description":"For products with SerialNoRequired = ON_RECEIVE. \nwhen availabilityType is not set, or DELIVER:\n  Check if a serialnumber is in stock for a productUid and warehouseUid. Returns 200 if in stock, else 404. \n  200 is returned for all other products.\nwhen availabilityType = RECEIVE:\n  Check if a serialnumber is NOT in stock for a productUid and warehouseUid. Returns 200 if not in stock, else 400. \n  200 is returned for all other products.\n","operationId":"get-tenants-stores-warehouses-stock-product-serialnumber-check","parameters":[{"$ref":"#/components/parameters/availabilityTypeQuery"}],"responses":{"200":{"description":"OK"}},"summary":"Check availability on a serial number for warehouse and product.","tags":["Warehouse"]}}}}
```

## Warehouse stock history

> Get stock logs filtered by warehouse and transaction types in a defined time period for your store. When no warehouse or transaction type is set you will get logs for all transaction types for all your warehouses.\
> \
> Required permissions: WAREHOUSE\_HISTORY

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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":{"WarehouseStockLogListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseStockLogResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"WarehouseStockLogResponseSchema":{"title":"WarehouseStockLogResponseSchema","allOf":[{"type":"object","properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"storeName":{"type":"string"},"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseName":{"type":"string"},"productUId":{"$ref":"#/components/schemas/UID"},"productSku":{"type":"string"},"productName":{"type":"string"}},"required":["storeUid","storeName","warehouseUid","warehouseName","productUId","productSku","productName"]},{"$ref":"#/components/schemas/StockLogResponseSchema"}]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StockLogResponseSchema":{"description":"Log data for a product's stock movements. Sorted by timestamp, descending","title":"StockLogResponseSchema","type":"object","required":["costDelta","costNew","costOrigin","costTransaction","createdAt","quantityDelta","quantityNew","quantityNotAvailable","quantityOrigin","reference","serialnumber","tenantUserUid","tenantUserName","transactionType","saleCostPrice","referenceDetails"],"properties":{"costDelta":{"type":"integer","description":"Average cost price delta"},"costNew":{"type":"integer","description":"Average cost price after the transaction"},"costOrigin":{"type":"integer","description":"Average cost price before the transaction"},"costTransaction":{"type":"integer","description":"The cost of the current transaction"},"createdAt":{"format":"date-time","type":"string"},"quantityDelta":{"type":"integer"},"quantityNew":{"type":"integer"},"quantityNotAvailable":{"type":"integer"},"quantityOrigin":{"type":"integer"},"reference":{"type":"integer"},"referenceDetails":{"$ref":"#/components/schemas/StockLogReferenceSchema"},"serialnumber":{"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"tenantUserName":{"type":"string"},"transactionType":{"$ref":"#/components/schemas/TransactionTypeENUM"},"saleCostPrice":{"type":"integer"}}},"StockLogReferenceSchema":{"title":"StockLogReferenceSchema","type":"object","required":["salesOrder","rmaOrder","stocktaking","internalPurchaseOrder","serviceOrder","receivement","responseType"],"properties":{"salesOrder":{"$ref":"#/components/schemas/StockLogSalesOrderReferenceSchema"},"rmaOrder":{"$ref":"#/components/schemas/StockLogRmaOrderReferenceSchema"},"stocktaking":{"$ref":"#/components/schemas/StockLogStocktakingReferenceSchema"},"internalPurchaseOrder":{"$ref":"#/components/schemas/StockLogInternalPurchaseOrderReferenceSchema"},"serviceOrder":{"$ref":"#/components/schemas/StockLogServiceOrderReferenceSchema"},"receivement":{"$ref":"#/components/schemas/StockLogReceivementReferenceSchema"},"responseType":{"type":"string","enum":["salesOrder","rmaOrder","stocktaking","internalPurchaseOrder","serviceOrder","receivement","noReference"]}}},"StockLogSalesOrderReferenceSchema":{"title":"StockLogSalesOrderReferenceSchema","type":"object","nullable":true,"required":["orderNumber","orderUid","storeUid","orderItemUid"],"properties":{"orderNumber":{"type":"string"},"orderUid":{"$ref":"#/components/schemas/UID"},"storeUid":{"$ref":"#/components/schemas/UID"},"orderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogRmaOrderReferenceSchema":{"title":"StockLogRmaOrderReferenceSchema","type":"object","nullable":true,"required":["rmaNumber","storeUid","rmaOrderUid","rmaOrderItemUid"],"properties":{"rmaNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"rmaOrderUid":{"$ref":"#/components/schemas/UID"},"rmaOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogStocktakingReferenceSchema":{"title":"StockLogStocktakingReferenceSchema","type":"object","nullable":true,"required":["name","storeUid","stocktakingUid","stocktakingItemUid"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"stocktakingUid":{"$ref":"#/components/schemas/UID"},"stocktakingItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogInternalPurchaseOrderReferenceSchema":{"title":"StockLogInternalPurchaseOrderReferenceSchema","type":"object","nullable":true,"required":["internalPurchaseNumber","storeUid","internalPurchaseOrderUid","internalPurchaseOrderItemUid"],"properties":{"internalPurchaseNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"internalPurchaseOrderUid":{"$ref":"#/components/schemas/UID"},"internalPurchaseOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogServiceOrderReferenceSchema":{"title":"StockLogServiceOrderReferenceSchema","type":"object","nullable":true,"required":["serviceOrderNumber","storeUid","serviceOrderUid","serviceOrderItemUid"],"properties":{"serviceOrderNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"serviceOrderUid":{"$ref":"#/components/schemas/UID"},"serviceOrderItemUid":{"$ref":"#/components/schemas/UID"}}},"StockLogReceivementReferenceSchema":{"title":"StockLogReceivementReferenceSchema","type":"object","nullable":true,"required":["purchaseNumber","storeUid","purchaseOrderUid","purchaseOrderItemUid","receivementUid","receivementItemUid"],"properties":{"purchaseNumber":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderUid":{"$ref":"#/components/schemas/UID"},"purchaseOrderItemUid":{"$ref":"#/components/schemas/UID"},"receivementUid":{"$ref":"#/components/schemas/UID"},"receivementItemUid":{"$ref":"#/components/schemas/UID"}}},"TransactionTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIVE | Receive (Purchase)|\n| DELIVERY | Deliver ( Sales)|\n| MOVE | Move between depts|\n| RETURN | Return of items|\n| INVENTORY_CONTROL | Inventory Control|\n| INTERNAL | Theft / Internal use|\n| SET_STOCK | Set stock|\n| ADJUST_STOCK | Adjust stock|\n| ADJUST_COST | Adjust cost|\n| RMA_ORDER | RMA Order|\n","enum":["RECEIVE","DELIVERY","MOVE","RETURN","INVENTORY_CONTROL","INTERNAL","SET_STOCK","ADJUST_STOCK","ADJUST_COST","RMA_ORDER"],"title":"TransactionTypeENUM","type":"string"},"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"},"WarehouseStockLogRequestSchema":{"title":"WarehouseStockLogRequestSchema","allOf":[{"properties":{"fromDateTime":{"type":"string","format":"date-time","description":"GTE [>=]"},"toDateTime":{"type":"string","format":"date-time","description":"LTE [=<]"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/OptionalUID"}},"transactionTypes":{"type":"array","items":{"$ref":"#/components/schemas/TransactionTypeENUM"}}},"required":["fromDateTime","toDateTime"]}],"type":"object"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"requestBodies":{"WarehouseStockLogRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseStockLogRequestSchema"}}}}},"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"}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/logs/search":{"post":{"summary":"Warehouse stock history","operationId":"post-store-warehouses-logs-search","responses":{"200":{"$ref":"#/components/responses/WarehouseStockLogListResponse"}},"tags":["Warehouse"],"description":"Get stock logs filtered by warehouse and transaction types in a defined time period for your store. When no warehouse or transaction type is set you will get logs for all transaction types for all your warehouses.\n\nRequired permissions: WAREHOUSE_HISTORY","requestBody":{"$ref":"#/components/requestBodies/WarehouseStockLogRequest"},"parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"}]}}}}
```

## Export Warehouse stock history

> Download spreadsheet of stock logs filtered by warehouse and transaction types in a defined time period for your store. When no warehouse or transaction type is set you will get logs for all transaction types for all your warehouses.\
> \
> Required permissions: WAREHOUSE

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Warehouse","description":"Warehouse"}],"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":{"SpreadSheetResponse":{"description":"SpreadSheet Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}}},"requestBodies":{"WarehouseStockLogRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseStockLogRequestSchema"}}}}},"schemas":{"WarehouseStockLogRequestSchema":{"title":"WarehouseStockLogRequestSchema","allOf":[{"properties":{"fromDateTime":{"type":"string","format":"date-time","description":"GTE [>=]"},"toDateTime":{"type":"string","format":"date-time","description":"LTE [=<]"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/OptionalUID"}},"transactionTypes":{"type":"array","items":{"$ref":"#/components/schemas/TransactionTypeENUM"}}},"required":["fromDateTime","toDateTime"]}],"type":"object"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"TransactionTypeENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| RECEIVE | Receive (Purchase)|\n| DELIVERY | Deliver ( Sales)|\n| MOVE | Move between depts|\n| RETURN | Return of items|\n| INVENTORY_CONTROL | Inventory Control|\n| INTERNAL | Theft / Internal use|\n| SET_STOCK | Set stock|\n| ADJUST_STOCK | Adjust stock|\n| ADJUST_COST | Adjust cost|\n| RMA_ORDER | RMA Order|\n","enum":["RECEIVE","DELIVERY","MOVE","RETURN","INVENTORY_CONTROL","INTERNAL","SET_STOCK","ADJUST_STOCK","ADJUST_COST","RMA_ORDER"],"title":"TransactionTypeENUM","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"}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/warehouses/logs/export":{"post":{"summary":"Export Warehouse stock history","operationId":"post-store-warehouses-logs-export","responses":{"200":{"$ref":"#/components/responses/SpreadSheetResponse"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"404":{"description":"Tenant not found"}},"tags":["Warehouse"],"description":"Download spreadsheet of stock logs filtered by warehouse and transaction types in a defined time period for your store. When no warehouse or transaction type is set you will get logs for all transaction types for all your warehouses.\n\nRequired permissions: WAREHOUSE","requestBody":{"$ref":"#/components/requestBodies/WarehouseStockLogRequest"},"parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"}]}}}}
```
