> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/reports.md).

# Reports

Reports

## List all reports

> List all reports for an organization

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ReportListResponse":{"description":"List of available reports","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReportResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"]}}}}},"schemas":{"ReportResponseSchema":{"title":"ReportResponseSchema","type":"object","required":["reportUid","request","state","type","createdAt","createdBy","lastModifiedAt","lastModifiedBy","sendNotificationTo","progress","filename","filesize"],"properties":{"reportUid":{"$ref":"#/components/schemas/UID"},"request":{"anyOf":[{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"},{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"},{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"},{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}],"description":"The request response depends on the what type of report it is"},"state":{"$ref":"#/components/schemas/ReportStateENUM"},"type":{"$ref":"#/components/schemas/ReportTypeENUM"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"sendNotificationTo":{"type":"string"},"notificationSentAt":{"type":"string","format":"date-time"},"progress":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"integer"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SAFTReportCreateRequestSchema":{"title":"SAFTReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"WarehouseStockDetailsReportCreateRequestSchema":{"title":"WarehouseStockDetailsReportCreateRequestSchema","type":"object","properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}}},"GeneralReportCreateRequestSchema":{"title":"GeneralReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"ReportStateENUM":{"enum":["ABORTED","NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReportStateENUM","type":"string"},"ReportTypeENUM":{"description":"Available reports are:\n\n|ENUM | Description |\n| --- | --- |\n| SAFT | SAFT reports|\n| SalesPrStore | Sales per store|\n| StoreWarehouseDetails | Monthly warehouse details|\n| WarehouseStockDetails | Details list of all stock on the current warehouse|\n| ART_FEE | Art fee report|\n| ART_PROVISION | Artists' provision report|\n| OPEN_ITEMS | List of outstanding receivables |  \n| SOLD_NOT_DELIVERED | Products sold not delivered |\n","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION","OPEN_ITEMS","SOLD_NOT_DELIVERED"],"title":"ReportTypeENUM","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"},"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"}},"reportType":{"name":"reportType","description":"Filter by report type","in":"query","required":false,"schema":{"items":{"$ref":"#/components/schemas/ReportTypeENUM"},"type":"array"},"style":"form"},"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}/reports":{"get":{"summary":"List all reports","operationId":"get-tenant-organization-reports-list","responses":{"200":{"$ref":"#/components/responses/ReportListResponse"}},"description":"List all reports for an organization","tags":["Reports"],"parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/reportType"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}]}}}}
```

## Get report details

> Get report details

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ReportResponse":{"description":"Report details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponseSchema"}}}}},"schemas":{"ReportResponseSchema":{"title":"ReportResponseSchema","type":"object","required":["reportUid","request","state","type","createdAt","createdBy","lastModifiedAt","lastModifiedBy","sendNotificationTo","progress","filename","filesize"],"properties":{"reportUid":{"$ref":"#/components/schemas/UID"},"request":{"anyOf":[{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"},{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"},{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"},{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}],"description":"The request response depends on the what type of report it is"},"state":{"$ref":"#/components/schemas/ReportStateENUM"},"type":{"$ref":"#/components/schemas/ReportTypeENUM"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"sendNotificationTo":{"type":"string"},"notificationSentAt":{"type":"string","format":"date-time"},"progress":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"integer"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SAFTReportCreateRequestSchema":{"title":"SAFTReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"WarehouseStockDetailsReportCreateRequestSchema":{"title":"WarehouseStockDetailsReportCreateRequestSchema","type":"object","properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}}},"GeneralReportCreateRequestSchema":{"title":"GeneralReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"ReportStateENUM":{"enum":["ABORTED","NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReportStateENUM","type":"string"},"ReportTypeENUM":{"description":"Available reports are:\n\n|ENUM | Description |\n| --- | --- |\n| SAFT | SAFT reports|\n| SalesPrStore | Sales per store|\n| StoreWarehouseDetails | Monthly warehouse details|\n| WarehouseStockDetails | Details list of all stock on the current warehouse|\n| ART_FEE | Art fee report|\n| ART_PROVISION | Artists' provision report|\n| OPEN_ITEMS | List of outstanding receivables |  \n| SOLD_NOT_DELIVERED | Products sold not delivered |\n","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION","OPEN_ITEMS","SOLD_NOT_DELIVERED"],"title":"ReportTypeENUM","type":"string"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/{reportUid}":{"get":{"summary":"Get report details","operationId":"get-tenant-organization-reports-details","responses":{"200":{"$ref":"#/components/responses/ReportResponse"}},"description":"Get report details","tags":["Reports"]}}}}
```

## Abort report generation

> Abort report generation\
> \
> Required permissions: REPORT\_ADMIN

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ReportResponse":{"description":"Report details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponseSchema"}}}}},"schemas":{"ReportResponseSchema":{"title":"ReportResponseSchema","type":"object","required":["reportUid","request","state","type","createdAt","createdBy","lastModifiedAt","lastModifiedBy","sendNotificationTo","progress","filename","filesize"],"properties":{"reportUid":{"$ref":"#/components/schemas/UID"},"request":{"anyOf":[{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"},{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"},{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"},{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}],"description":"The request response depends on the what type of report it is"},"state":{"$ref":"#/components/schemas/ReportStateENUM"},"type":{"$ref":"#/components/schemas/ReportTypeENUM"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"sendNotificationTo":{"type":"string"},"notificationSentAt":{"type":"string","format":"date-time"},"progress":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"integer"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SAFTReportCreateRequestSchema":{"title":"SAFTReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"WarehouseStockDetailsReportCreateRequestSchema":{"title":"WarehouseStockDetailsReportCreateRequestSchema","type":"object","properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}}},"GeneralReportCreateRequestSchema":{"title":"GeneralReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"ReportStateENUM":{"enum":["ABORTED","NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReportStateENUM","type":"string"},"ReportTypeENUM":{"description":"Available reports are:\n\n|ENUM | Description |\n| --- | --- |\n| SAFT | SAFT reports|\n| SalesPrStore | Sales per store|\n| StoreWarehouseDetails | Monthly warehouse details|\n| WarehouseStockDetails | Details list of all stock on the current warehouse|\n| ART_FEE | Art fee report|\n| ART_PROVISION | Artists' provision report|\n| OPEN_ITEMS | List of outstanding receivables |  \n| SOLD_NOT_DELIVERED | Products sold not delivered |\n","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION","OPEN_ITEMS","SOLD_NOT_DELIVERED"],"title":"ReportTypeENUM","type":"string"},"ReportAbortRequestSchema":{"title":"ReportAbortRequestSchema","type":"object","properties":{"action":{"$ref":"#/components/schemas/ReportActionENUM"}},"required":["action"]},"ReportActionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ABORT | Abort running job |\n","title":"ReportActionENUM","type":"string","enum":["ABORT"]}},"requestBodies":{"ReportAbortRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportAbortRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/{reportUid}":{"post":{"summary":"Abort report generation","operationId":"post-tenants-organizations-reports","description":"Abort report generation\n\nRequired permissions: REPORT_ADMIN","responses":{"200":{"$ref":"#/components/responses/ReportResponse"}},"requestBody":{"$ref":"#/components/requestBodies/ReportAbortRequest"},"tags":["Reports"]}}}}
```

## Delete a generated report

> Deletes a generated report\
> \
> Required permissions: REPORT\_ADMIN

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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}/reports/{reportUid}":{"delete":{"summary":"Delete a generated report","operationId":"delete-tenants-organizations-reports","description":"Deletes a generated report\n\nRequired permissions: REPORT_ADMIN","responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"tags":["Reports"]}}}}
```

## Download report content

> Download report content

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"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}/reports/{reportUid}/download":{"get":{"summary":"Download report content","operationId":"get-tenant-organization-reports-download","responses":{"200":{"$ref":"#/components/responses/FileResponse"},"404":{"description":"Not Found"},"409":{"description":"Conflict"}},"description":"Download report content","tags":["Reports"]}}}}
```

## Start WarehouseStockDetails report

> Start report generation of WarehouseStockDetails\
> \
> Required permissions: REPORT\_ADMIN<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"WarehouseStockDetailsReportCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"}}}}},"schemas":{"WarehouseStockDetailsReportCreateRequestSchema":{"title":"WarehouseStockDetailsReportCreateRequestSchema","type":"object","properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportResponseSchema":{"title":"ReportResponseSchema","type":"object","required":["reportUid","request","state","type","createdAt","createdBy","lastModifiedAt","lastModifiedBy","sendNotificationTo","progress","filename","filesize"],"properties":{"reportUid":{"$ref":"#/components/schemas/UID"},"request":{"anyOf":[{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"},{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"},{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"},{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}],"description":"The request response depends on the what type of report it is"},"state":{"$ref":"#/components/schemas/ReportStateENUM"},"type":{"$ref":"#/components/schemas/ReportTypeENUM"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"sendNotificationTo":{"type":"string"},"notificationSentAt":{"type":"string","format":"date-time"},"progress":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"integer"}}},"SAFTReportCreateRequestSchema":{"title":"SAFTReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"GeneralReportCreateRequestSchema":{"title":"GeneralReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"ReportStateENUM":{"enum":["ABORTED","NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReportStateENUM","type":"string"},"ReportTypeENUM":{"description":"Available reports are:\n\n|ENUM | Description |\n| --- | --- |\n| SAFT | SAFT reports|\n| SalesPrStore | Sales per store|\n| StoreWarehouseDetails | Monthly warehouse details|\n| WarehouseStockDetails | Details list of all stock on the current warehouse|\n| ART_FEE | Art fee report|\n| ART_PROVISION | Artists' provision report|\n| OPEN_ITEMS | List of outstanding receivables |  \n| SOLD_NOT_DELIVERED | Products sold not delivered |\n","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION","OPEN_ITEMS","SOLD_NOT_DELIVERED"],"title":"ReportTypeENUM","type":"string"}},"responses":{"ReportResponse":{"description":"Report details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponseSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/warehouse-stock-details":{"post":{"description":"Start report generation of WarehouseStockDetails\n\nRequired permissions: REPORT_ADMIN\n","operationId":"post-tenant-organization-warehousestockdetails-run","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/WarehouseStockDetailsReportCreateRequest"},"responses":{"201":{"$ref":"#/components/responses/ReportResponse"}},"summary":"Start WarehouseStockDetails report","tags":["Reports"]}}}}
```

## Start SAF-T report generation

> Start SAF-T report generation for a set period.\
> It is also possible to only run it for a specific set of stores.\
> \
> Required permissions: REPORT\_ADMIN

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"SAFTReportCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"}}}}},"schemas":{"SAFTReportCreateRequestSchema":{"title":"SAFTReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportResponseSchema":{"title":"ReportResponseSchema","type":"object","required":["reportUid","request","state","type","createdAt","createdBy","lastModifiedAt","lastModifiedBy","sendNotificationTo","progress","filename","filesize"],"properties":{"reportUid":{"$ref":"#/components/schemas/UID"},"request":{"anyOf":[{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"},{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"},{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"},{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}],"description":"The request response depends on the what type of report it is"},"state":{"$ref":"#/components/schemas/ReportStateENUM"},"type":{"$ref":"#/components/schemas/ReportTypeENUM"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"sendNotificationTo":{"type":"string"},"notificationSentAt":{"type":"string","format":"date-time"},"progress":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"integer"}}},"WarehouseStockDetailsReportCreateRequestSchema":{"title":"WarehouseStockDetailsReportCreateRequestSchema","type":"object","properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}}},"GeneralReportCreateRequestSchema":{"title":"GeneralReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"ReportStateENUM":{"enum":["ABORTED","NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReportStateENUM","type":"string"},"ReportTypeENUM":{"description":"Available reports are:\n\n|ENUM | Description |\n| --- | --- |\n| SAFT | SAFT reports|\n| SalesPrStore | Sales per store|\n| StoreWarehouseDetails | Monthly warehouse details|\n| WarehouseStockDetails | Details list of all stock on the current warehouse|\n| ART_FEE | Art fee report|\n| ART_PROVISION | Artists' provision report|\n| OPEN_ITEMS | List of outstanding receivables |  \n| SOLD_NOT_DELIVERED | Products sold not delivered |\n","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION","OPEN_ITEMS","SOLD_NOT_DELIVERED"],"title":"ReportTypeENUM","type":"string"}},"responses":{"ReportResponse":{"description":"Report details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponseSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/saf-t":{"post":{"description":"Start SAF-T report generation for a set period.\nIt is also possible to only run it for a specific set of stores.\n\nRequired permissions: REPORT_ADMIN","operationId":"post-tenant-organization-saft-run","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/SAFTReportCreateRequest"},"responses":{"201":{"$ref":"#/components/responses/ReportResponse"}},"summary":"Start SAF-T report generation","tags":["Reports"]}}}}
```

## Get Open Items report

> Make an \*ad hoc\* Open Items report (this is not stored).  \
> Optionally filter on stores. \
> The report is in XLSX spreadsheet format.\
> \
> Required permissions: REPORT\_ADMIN

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"OpenItemsReportRequest":{"content":{"application/json":{"schema":{"type":"object","properties":{"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}}}}},"schemas":{"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OpenItemsReportResponseSchema":{"title":"OpenItemsReportResponseSchema","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpenItemsSchema"}}}},"OpenItemsSchema":{"title":"OpenItemsSchema","type":"object","required":["store","customer","orderUid","orderNumber","voucherNumber","settlementUid","settlementCode","settledAt","amount","dueDate","dueAmount"],"properties":{"store":{"$ref":"#/components/schemas/OpenItemsStoreSchema"},"customer":{"$ref":"#/components/schemas/OpenItemsCustomerSchema"},"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"voucherNumber":{"type":"string"},"settlementUid":{"$ref":"#/components/schemas/UID"},"settlementCode":{"type":"string"},"settledAt":{"type":"string","format":"date-time"},"amount":{"type":"integer"},"dueDate":{"type":"string","format":"date"},"dueAmount":{"type":"integer"}}},"OpenItemsStoreSchema":{"title":"OpenItemsStoreSchema","type":"object","required":["storeUid","name","vatNumber"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"vatNumber":{"type":"string"}}},"OpenItemsCustomerSchema":{"title":"OpenItemsCustomerSchema","type":"object","required":["customerUid","displayName","ledgerNumber"],"properties":{"customerUid":{"$ref":"#/components/schemas/UID"},"displayName":{"type":"string"},"ledgerNumber":{"type":"string"}}}},"responses":{"OpenItemsReportResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenItemsReportResponseSchema"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/open-items":{"post":{"description":"Make an *ad hoc* Open Items report (this is not stored).  \nOptionally filter on stores. \nThe report is in XLSX spreadsheet format.\n\nRequired permissions: REPORT_ADMIN","operationId":"post-report-open-items-run","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/OpenItemsReportRequest"},"responses":{"201":{"$ref":"#/components/responses/OpenItemsReportResponse"}},"summary":"Get Open Items report","tags":["Reports"]}}}}
```

## Accounting report for stores, json format

> Get accounting report for a storeUid and a period.\
> Response is a json structured data of accounting\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"AccountingRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRequestSchema"}}},"description":"Accounting Request Body"}},"schemas":{"AccountingRequestSchema":{"title":"AccountingRequestSchema","type":"object","properties":{"fromDate":{"format":"date","minLength":10,"type":"string"},"toDate":{"format":"date","minLength":10,"type":"string"},"organizationUid":{"$ref":"#/components/schemas/OptionalUID"},"storeUids":{"type":"array","description":"List of storeUids to include in report.","items":{"$ref":"#/components/schemas/UID"}}},"required":["fromDate","toDate","organizationUid"]},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"AccountingReportResponseSchema":{"title":"AccountingReportResponseSchema","type":"object","properties":{"asset":{"type":"array","items":{"$ref":"#/components/schemas/AccountingPostSchema"}},"credit":{"type":"array","items":{"$ref":"#/components/schemas/AccountingPostSchema"}},"debet":{"type":"array","items":{"$ref":"#/components/schemas/AccountingPostSchema"}},"header":{"$ref":"#/components/schemas/AccountingHeaderSchema"},"ledger":{"type":"array","items":{"$ref":"#/components/schemas/AccountingPostSchema"}},"printDate":{"type":"string"},"tenantName":{"type":"string"},"organizationName":{"type":"string"},"storeNames":{"type":"array","items":{"type":"string"}},"totals":{"$ref":"#/components/schemas/AccountingTotalsSchema"}},"required":["asset","credit","debet","header","ledger","printDate","tenantName","organizationName","storeNames","totals"]},"AccountingPostSchema":{"properties":{"account":{"type":"string"},"creditAmount":{"type":"integer"},"date":{"type":"string"},"debetAmount":{"type":"integer"},"text":{"type":"string"},"vatCode":{"type":"string"}},"required":["date","account","vatCode","text","debetAmount","creditAmount"],"title":"AccountingPostSchema","type":"object"},"AccountingHeaderSchema":{"properties":{"fromDate":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"},"toDate":{"type":"string"}},"required":["storeUid","fromDate","toDate"],"title":"AccountingHeaderSchema","type":"object"},"AccountingTotalsSchema":{"properties":{"totalAsset":{"type":"integer"},"totalCredit":{"type":"integer"},"totalCreditAndAsset":{"type":"integer"},"totalDebet":{"type":"integer"},"totalLedger":{"type":"integer"}},"required":["totalDebet","totalAsset","totalCredit","totalLedger","totalCreditAndAsset"],"title":"AccountingTotalsSchema","type":"object"}},"responses":{"AccountingReportResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportResponseSchema"}}},"description":"Response for Accounting report."}}},"paths":{"/tenants/{tenantUid}/reports/accounting":{"post":{"description":"Get accounting report for a storeUid and a period.\nResponse is a json structured data of accounting\n\nRequired permissions: REPORTING","operationId":"post-tenants-reports-accounting","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/AccountingRequest"},"responses":{"200":{"$ref":"#/components/responses/AccountingReportResponse"}},"summary":"Accounting report for stores, json format","tags":["Reports"]}}}}
```

## Accounting report file for stores

> Get an accounting report for a store UID and a time period.\
> Depending on the header you set, the response is either a json containing a base 64 encoded pdf or a direct download. The file is base64 encoded. You can set choose among the supported file types, default is PDF.\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"AccountingFileRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingFileRequestSchema"}}}}},"schemas":{"AccountingFileRequestSchema":{"title":"AccountingFileRequestSchema","allOf":[{"$ref":"#/components/schemas/AccountingRequestSchema"},{"type":"object","properties":{"reportFormat":{"$ref":"#/components/schemas/ReportFormatENUM"}}}]},"AccountingRequestSchema":{"title":"AccountingRequestSchema","type":"object","properties":{"fromDate":{"format":"date","minLength":10,"type":"string"},"toDate":{"format":"date","minLength":10,"type":"string"},"organizationUid":{"$ref":"#/components/schemas/OptionalUID"},"storeUids":{"type":"array","description":"List of storeUids to include in report.","items":{"$ref":"#/components/schemas/UID"}}},"required":["fromDate","toDate","organizationUid"]},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportFormatENUM":{"title":"ReportFormatENUM","type":"string","enum":["PDF","VISMANET","VISMABUSINESS","UNI","24SEVEN","XLEDGER","NAVISION"],"description":"Supported report formats"},"Base64EncodedFileContentSchema":{"title":"Base64EncodedFileContentSchema","type":"object","properties":{"content":{"type":"string","description":" base64 encoded"},"contentType":{"description":"mime type","type":"string"},"filename":{"type":"string"}},"required":["content","contentType","filename"]}},"responses":{"FileResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64EncodedFileContentSchema"}},"application/pdf":{"schema":{"format":"binary","type":"string"}},"text/html":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"description":"Based on the Accept header the response will be base64 json encoded or a raw file.\napplication/octet-stream will return a binary file\napplication/json will return a json with the file content base64 encoded."}}},"paths":{"/tenants/{tenantUid}/reports/accounting/download":{"post":{"description":"Get an accounting report for a store UID and a time period.\nDepending on the header you set, the response is either a json containing a base 64 encoded pdf or a direct download. The file is base64 encoded. You can set choose among the supported file types, default is PDF.\n\nRequired permissions: REPORTING","operationId":"post-tenants-reports-accounting-download","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/AccountingFileRequest"},"responses":{"200":{"$ref":"#/components/responses/FileResponse"}},"summary":"Accounting report file for stores","tags":["Reports"]}}}}
```

## Turnover report for products

> Get products turnover report for a time period,  \
> optionally filtered on a list of product group and UIDs.\
> The report generates sums of sold products and total values.\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ProductReportRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReportRequestSchema"}}},"description":"Product Turnover Request Body"}},"schemas":{"ProductReportRequestSchema":{"title":"ProductReportRequestSchema","type":"object","required":["fromDateTime","storeUids","toDateTime"],"properties":{"brandUids":{"description":"Array of brandUids","type":"array","items":{"$ref":"#/components/schemas/UID"}},"fromDateTime":{"format":"date-time","minLength":10,"type":"string"},"productGroupUids":{"description":"Array of productGroup ids","type":"array","items":{"$ref":"#/components/schemas/UID"}},"storeUids":{"description":"Array of storeUids","type":"array","items":{"$ref":"#/components/schemas/UID"}},"toDateTime":{"format":"date-time","minLength":10,"type":"string"},"groupByUserCode":{"type":"boolean","description":"if true, the excel report returns a response with order items grouped by userCode"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"},"tenantUserUid":{"$ref":"#/components/schemas/OptionalUID"},"includeDeliveryCostAdjustments":{"type":"boolean","description":"When true, the spreadsheet includes extra cost-only rows for items delivered on a later date than the sale, where the delivery cost differs from the sale cost price. Used to verify R9 report cost figures.\n"},"includeProductGroupLevels":{"type":"boolean","description":"When true, the spreadsheet appends one column pair per level in the product group hierarchy at the end of each row, one column for the uid and one for the name. The number of column pairs follows the deepest product group path in the report.\n"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"ProductReportResponseSchema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductReportResponseItemSchema"},"type":"array"}},"required":["items"],"title":"ProductReportResponseSchema","type":"object"},"ProductReportResponseItemSchema":{"allOf":[{"$ref":"#/components/schemas/StoreReportTurnoverItemSchema"},{"type":"object","required":["brandUid","brandName","productGroupUid","productGroupName","productUid","sku","lastSettledAt"],"properties":{"brandUid":{"$ref":"#/components/schemas/UID"},"brandName":{"type":"string"},"productGroupUid":{"$ref":"#/components/schemas/UID"},"productGroupName":{"type":"string"},"productUid":{"$ref":"#/components/schemas/UID"},"sku":{"type":"string"},"lastSettledAt":{"type":"string","format":"date-time"}}}],"title":"ProductReportResponseItemSchema"},"StoreReportTurnoverItemSchema":{"description":"","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"name":{"type":"string"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"storeUid":{"$ref":"#/components/schemas/UID"},"turnoverAmount":{"type":"integer"}},"required":["storeUid","name","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count"],"title":"StoreTurnoverReportItem","type":"object"}},"responses":{"ProductReportResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReportResponseSchema"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"description":"Response for Product turnover report."}}},"paths":{"/tenants/{tenantUid}/reports/products":{"post":{"description":"Get products turnover report for a time period,  \noptionally filtered on a list of product group and UIDs.\nThe report generates sums of sold products and total values.\n\nRequired permissions: REPORTING","operationId":"post-tenants-reports-products","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/ProductReportRequest"},"responses":{"200":{"$ref":"#/components/responses/ProductReportResponse"}},"summary":"Turnover report for products","tags":["Reports"]}}}}
```

## Shelf warmers search

> Get products whose stock stands still — so-called shelf warmers or dead\
> stock. The condition is judged per warehouse: a warehouse qualifies when\
> it holds stock of the product and that stock has had no movement since\
> \`noActivitySince\`. A product is listed when at least one of the matching\
> warehouses qualifies, so stock standing still in one store is reported\
> there even if another store sold the same product yesterday. Quantity in\
> stock, stock value, last received and last stock change count only the\
> warehouses that qualify.\
> \
> Each JSON row is one product aggregated across the qualifying warehouses,\
> with a per-warehouse breakdown, last sold/received/stock-change dates and\
> supplier info.\
> \
> Optionally filtered on organization, store, warehouse, supplier, product\
> group (incl. descendants), category (incl. descendants), brand and a\
> free-text search on SKU/name.\
> \
> Sortable by: stockValue (default, DESC), qtyStock, lastSoldAt,\
> lastReceivedAt, lastStockChangeAt, sku, name.\
> \
> Set accept header to application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\
> to get the response as an excel file. The export is not paginated and has\
> one row per warehouse and stock-in day rather than one summed row per\
> product, so you can see how long each batch of stock has been standing:\
> stock on hand is traced back to the days it came in, assuming the oldest\
> units are sold first, and a product's rows read oldest stock first. Stock\
> that cannot be traced to a logged movement gets a row without a date,\
> placed last. Columns: SKU, product name, brand, product group,\
> properties, GTINs, suppliers, store, warehouse, stock in, days since\
> stock in, last sold, last stock change, quantity in stock, unit cost,\
> stock value. A report that would exceed 100 000 rows is rejected with a\
> 400 — narrow it with a filter.\
> \
> "Stock in" is the day the units last entered the warehouse by any\
> movement that added stock — a receive, but also a customer return, a\
> stock count correction, an import, an RMA, a manual adjustment or a\
> transfer in from another store. It is therefore not a goods-receipt date\
> and not the age of the goods: returning or moving a single unit starts\
> the count over for that unit, while the rest of the batch keeps its older\
> day. Use \`lastReceivedAt\` for the strict goods-receipt date.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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"},"ShelfWarmerResponseSchema":{"type":"object","required":["product","qtyStock","stockValue","lastSoldAt","lastReceivedAt","lastStockChangeAt","warehouses","suppliers"],"properties":{"product":{"$ref":"#/components/schemas/ShelfWarmerProductSchema"},"qtyStock":{"type":"integer","description":"Total stock across the matching warehouses, in hundredths (100 = 1.00)."},"stockValue":{"type":"integer","description":"Total stock value across the matching warehouses, in the tenant currency's minor unit."},"lastSoldAt":{"type":"string","format":"date-time","nullable":true,"description":"Most recent completed sale, scoped to the selected stores. Null if never sold."},"lastReceivedAt":{"type":"string","format":"date-time","nullable":true,"description":"Most recent goods receipt in the matching warehouses. Null if never received."},"lastStockChangeAt":{"type":"string","format":"date-time","nullable":true,"description":"Most recent warehouse stock movement in the matching warehouses, including stock imports. Null if no logged stock transaction."},"warehouses":{"type":"array","description":"Per-warehouse stock breakdown. Empty if none match.","items":{"$ref":"#/components/schemas/ShelfWarmerWarehouseSchema"}},"suppliers":{"type":"array","description":"Suppliers for the product. Empty if none.","items":{"$ref":"#/components/schemas/ShelfWarmerSupplierSchema"}}}},"ShelfWarmerProductSchema":{"type":"object","required":["productUid","sku","name","brandUid","brandName","gtins","productGroupUid","productGroupName","productGroupPath","categories","properties"],"properties":{"productUid":{"$ref":"#/components/schemas/UID"},"sku":{"type":"string"},"name":{"type":"string"},"brandUid":{"$ref":"#/components/schemas/UID"},"brandName":{"type":"string"},"gtins":{"type":"array","description":"Empty if the product has no GTINs.","items":{"type":"string"}},"productGroupUid":{"$ref":"#/components/schemas/UID"},"productGroupName":{"type":"string"},"productGroupPath":{"type":"array","description":"The product group's full path, root first, ending with the group the product sits in. Always present. Every product belongs to a product group, so this normally has at least one entry; it is empty only when the group could not be resolved, for instance because it was deleted while the report was running. Do not index the last element without checking the length.\n","items":{"$ref":"#/components/schemas/ShelfWarmerProductGroupRefSchema"}},"categories":{"type":"array","description":"Empty if the product has no categories.","items":{"$ref":"#/components/schemas/ShelfWarmerCategoryRefSchema"}},"properties":{"type":"array","description":"Empty if the product has no properties.","items":{"$ref":"#/components/schemas/ShelfWarmerPropertySchema"}}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ShelfWarmerProductGroupRefSchema":{"type":"object","required":["productGroupUid","name"],"properties":{"productGroupUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"}}},"ShelfWarmerCategoryRefSchema":{"type":"object","required":["categoryUid","name"],"properties":{"categoryUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"}}},"ShelfWarmerPropertySchema":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string","description":"Empty string if the property has no value."}}},"ShelfWarmerWarehouseSchema":{"type":"object","required":["warehouseUid","name","store","qtyStock","averageCost","stockLayers","lastSoldAt","lastStockChangeAt"],"properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"store":{"$ref":"#/components/schemas/ShelfWarmerStoreRefSchema"},"qtyStock":{"type":"integer","description":"Stock in this warehouse, in hundredths."},"averageCost":{"type":"integer","description":"Average unit cost in the tenant currency's minor unit."},"stockLayers":{"type":"array","description":"This warehouse's stock split over the days it last came in on, oldest first, with an undated layer last. Always present, and empty when the request did not ask for it with includeStockLayers — an empty breakdown therefore does not mean the warehouse holds no stock. Read qtyStock for that.\n","items":{"$ref":"#/components/schemas/ShelfWarmerStockLayerSchema"}},"lastSoldAt":{"type":"string","format":"date-time","nullable":true,"description":"Most recent completed sale of the product in this warehouse's store. Null if never sold there, if the warehouse has no store, or if the request did not ask for it with includeStockLayers. A store is the finest scope a sale can be attributed to, since order lines do not reliably carry a warehouse.\n"},"lastStockChangeAt":{"type":"string","format":"date-time","nullable":true,"description":"Most recent logged stock movement on this warehouse's stock, including imports. Null if there is no logged transaction, or if the request did not ask for it with includeStockLayers.\n"}}},"ShelfWarmerStoreRefSchema":{"type":"object","nullable":true,"description":"The store this warehouse belongs to. Null if the warehouse is not tied to a store.","required":["storeUid","name","organizationUid","organizationName"],"properties":{"storeUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"},"organizationName":{"type":"string"}}},"ShelfWarmerStockLayerSchema":{"type":"object","description":"One FIFO layer of the stock still on hand in a warehouse: the day it last came in, and how much of it is left.\n","required":["stockInOn","qtyStock"],"properties":{"stockInOn":{"type":"string","format":"date","nullable":true,"description":"The day the units last came into the warehouse, by any positive stock movement — a goods receipt, but also a customer return, a stock count correction, an import, an RMA or a transfer in from another store. Not a goods-receipt date, and so not the age of the goods either: returning or moving a single unit resets this day for that unit while the rest of the batch keeps its older one. Null when the stock cannot be traced to a logged movement at all, for instance older imported stock.\n"},"qtyStock":{"type":"integer","description":"The part of the warehouse stock that came in on that day, in hundredths."}}},"ShelfWarmerSupplierSchema":{"type":"object","required":["supplierUid","name","supplierSku","purchasePrice"],"properties":{"supplierUid":{"$ref":"#/components/schemas/UID"},"name":{"type":"string"},"supplierSku":{"type":"string","description":"Empty string if not set."},"purchasePrice":{"type":"integer","description":"Supplier purchase price in the tenant currency's minor unit."}}},"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":{"ShelfWarmersListResponse":{"description":"Shelf warmer search results","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ShelfWarmerResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}}},"requestBodies":{"ShelfWarmerSearchRequest":{"content":{"application/json":{"schema":{"type":"object","required":["noActivitySince"],"properties":{"noActivitySince":{"type":"string","format":"date-time","description":"Products with no stock movement after this time are considered shelf warmers."},"organizationUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","description":"Includes descendant product groups.","items":{"$ref":"#/components/schemas/UID"}},"categoryUids":{"type":"array","description":"Includes descendant categories.","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"query":{"type":"string","description":"Free-text search across product SKU and name."},"includeStockLayers":{"type":"boolean","description":"When true, every warehouse in the response carries its stock split over the days it last came in on (oldest first), plus that warehouse's own last sale and last stock movement. Costs two extra queries, so leave it out unless the caller shows the breakdown. Defaults to false.\n"}}}}}}}},"paths":{"/tenants/{tenantUid}/reports/shelf-warmers":{"post":{"summary":"Shelf warmers search","tags":["Reports"],"operationId":"shelf-warmers-search","description":"Get products whose stock stands still — so-called shelf warmers or dead\nstock. The condition is judged per warehouse: a warehouse qualifies when\nit holds stock of the product and that stock has had no movement since\n`noActivitySince`. A product is listed when at least one of the matching\nwarehouses qualifies, so stock standing still in one store is reported\nthere even if another store sold the same product yesterday. Quantity in\nstock, stock value, last received and last stock change count only the\nwarehouses that qualify.\n\nEach JSON row is one product aggregated across the qualifying warehouses,\nwith a per-warehouse breakdown, last sold/received/stock-change dates and\nsupplier info.\n\nOptionally filtered on organization, store, warehouse, supplier, product\ngroup (incl. descendants), category (incl. descendants), brand and a\nfree-text search on SKU/name.\n\nSortable by: stockValue (default, DESC), qtyStock, lastSoldAt,\nlastReceivedAt, lastStockChangeAt, sku, name.\n\nSet accept header to application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\nto get the response as an excel file. The export is not paginated and has\none row per warehouse and stock-in day rather than one summed row per\nproduct, so you can see how long each batch of stock has been standing:\nstock on hand is traced back to the days it came in, assuming the oldest\nunits are sold first, and a product's rows read oldest stock first. Stock\nthat cannot be traced to a logged movement gets a row without a date,\nplaced last. Columns: SKU, product name, brand, product group,\nproperties, GTINs, suppliers, store, warehouse, stock in, days since\nstock in, last sold, last stock change, quantity in stock, unit cost,\nstock value. A report that would exceed 100 000 rows is rejected with a\n400 — narrow it with a filter.\n\n\"Stock in\" is the day the units last entered the warehouse by any\nmovement that added stock — a receive, but also a customer return, a\nstock count correction, an import, an RMA, a manual adjustment or a\ntransfer in from another store. It is therefore not a goods-receipt date\nand not the age of the goods: returning or moving a single unit starts\nthe count over for that unit, while the rest of the batch keeps its older\nday. Use `lastReceivedAt` for the strict goods-receipt date.","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/ShelfWarmersListResponse"}},"requestBody":{"$ref":"#/components/requestBodies/ShelfWarmerSearchRequest"}}}}}
```

## Turnover report for stores

> Get turnover data grouped by store.\
> \
> If \`tenant user UID\` is specified, \
> the turnover data will only contain the numbers for that \
> specific user.\
> \
> Required permissions: 'REPORTING, SALES\_ORDER, RETURN\_ORDER'

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","required":["fromDateTime","toDateTime"],"properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreReportTurnoverDateSchema":{"title":"StoreReportTurnoverDateSchema","type":"object","required":["costAmount","count","date","discountAmount","revenueAmount","revenuePercent","turnoverAmount"],"properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"date":{"type":"string"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"}}},"StoreReportTurnoverItemSchema":{"description":"","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"name":{"type":"string"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"storeUid":{"$ref":"#/components/schemas/UID"},"turnoverAmount":{"type":"integer"}},"required":["storeUid","name","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count"],"title":"StoreTurnoverReportItem","type":"object"},"ReportTurnoverTotalSchema":{"description":"Turnover Report Total","title":"ReportTurnoverTotalSchema","type":"object","required":["costAmount","count","discountAmount","revenueAmount","revenuePercent","turnoverAmount","orderCount"],"properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}}}},"responses":{"StoreTurnoverResponse":{"content":{"application/json":{"schema":{"properties":{"dates":{"description":"Turnover response grouped by date","items":{"$ref":"#/components/schemas/StoreReportTurnoverDateSchema"},"type":"array"},"stores":{"description":"Turnover response grouped by store","items":{"$ref":"#/components/schemas/StoreReportTurnoverItemSchema"},"type":"array"},"total":{"$ref":"#/components/schemas/ReportTurnoverTotalSchema"}},"required":["items","total"],"type":"object"}}},"description":"Turnover response"}}},"paths":{"/tenants/{tenantUid}/reports/turnover/stores":{"post":{"description":"Get turnover data grouped by store.\n\nIf `tenant user UID` is specified, \nthe turnover data will only contain the numbers for that \nspecific user.\n\nRequired permissions: 'REPORTING, SALES_ORDER, RETURN_ORDER'","operationId":"post-tenants-reports-turnover-stores","requestBody":{"$ref":"#/components/requestBodies/TurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/StoreTurnoverResponse"}},"summary":"Turnover report for stores","tags":["Reports"]}}}}
```

## Receipts report for stores

> Generate a report of all receipts in a given period.\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ReceiptsReportRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptReportSchema"}}}}},"schemas":{"ReceiptReportSchema":{"title":"ReceiptReportSchema","type":"object","required":["settledAt"],"properties":{"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"settledAt":{"$ref":"#/components/schemas/DateTimeRangeSchema"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"DateTimeRangeSchema":{"title":"DateTimeRangeSchema","type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"DownloadableFile":{"title":"DownloadableFile","type":"string","format":"binary"}},"responses":{"ReceiptReportResponse":{"description":"The response will be a Excel file.","content":{"application/octet-stream":{"schema":{"$ref":"#/components/schemas/DownloadableFile"}}}}}},"paths":{"/tenants/{tenantUid}/reports/receipts":{"post":{"description":"Generate a report of all receipts in a given period.\n\nRequired permissions: REPORTING","operationId":"post-tenants-reports-receipts","requestBody":{"$ref":"#/components/requestBodies/ReceiptsReportRequest"},"responses":{"200":{"$ref":"#/components/responses/ReceiptReportResponse"}},"summary":"Receipts report for stores","tags":["Reports"]}}}}
```

## Turnover report for root product groups

> Get turnover data for a store grouped by product-group.\
> \
> If \`tenant user UID\` is specified, \
> the turnover data will only contain the numbers for that \
> specific user.\
> \
> Required permissions: REPORTING,SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","required":["fromDateTime","toDateTime"],"properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportTurnoverProductGroupResponseSchema":{"description":"Turnover Report Item For ProductGroups","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"hasChildren":{"type":"boolean"},"productGroupUid":{"$ref":"#/components/schemas/UID"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"text":{"type":"string"},"turnoverAmount":{"type":"integer"}},"required":["productGroupUid","text","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count","hasChildren"],"title":"ReportTurnoverProductGroupResponseSchema","type":"object"},"ReportTurnoverTotalSchema":{"description":"Turnover Report Total","title":"ReportTurnoverTotalSchema","type":"object","required":["costAmount","count","discountAmount","revenueAmount","revenuePercent","turnoverAmount","orderCount"],"properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}}}},"responses":{"TurnoverResponseProductGroup":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportTurnoverProductGroupResponseSchema"},"type":"array"},"total":{"$ref":"#/components/schemas/ReportTurnoverTotalSchema"}},"required":["items","total"],"type":"object"}}},"description":"Turnover response for ProductGroup"}}},"paths":{"/tenants/{tenantUid}/reports/turnover/stores/{storeUid}/product-groups":{"post":{"description":"Get turnover data for a store grouped by product-group.\n\nIf `tenant user UID` is specified, \nthe turnover data will only contain the numbers for that \nspecific user.\n\nRequired permissions: REPORTING,SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-reports-turnover-stores-productGroups","requestBody":{"$ref":"#/components/requestBodies/TurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/TurnoverResponseProductGroup"}},"summary":"Turnover report for root product groups","tags":["Reports"]}}}}
```

## Turnover report for sellers on a store

> Get turnover data for all sellers in a store.\
> \
> Ordered by turnover descending.\
> \
> Required permissions: REPORTING,SALES\_ORDER,RETURN\_ORDER<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"TenantUserTurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUserTurnoverRequestSchema"}}}}},"schemas":{"TenantUserTurnoverRequestSchema":{"title":"TenantUserTurnoverRequestSchema","type":"object","description":"Turnover Request Body","properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"}},"required":["fromDateTime","toDateTime"]},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"TenantUserReportTurnoverSchema":{"title":"TenantUserReportTurnoverSchema","type":"object","properties":{"position":{"type":"integer"},"costAmount":{"type":"integer"},"orderCount":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"},"vatAmount":{"type":"integer"},"firstName":{"type":"string"},"lastName":{"type":"string"},"displayName":{"type":"string"},"tenantUserUid":{"type":"string"}},"required":["position","costAmount","orderCount","discountAmount","revenueAmount","revenuePercent","turnoverAmount","vatAmount","firstName","lastName","displayName","tenantUserUid"]}},"responses":{"TenantUserReportTurnoverResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TenantUserReportTurnoverSchema"}}},"required":["items"]}}}}}},"paths":{"/tenants/{tenantUid}/reports/turnover/stores/{storeUid}/users":{"post":{"description":"Get turnover data for all sellers in a store.\n\nOrdered by turnover descending.\n\nRequired permissions: REPORTING,SALES_ORDER,RETURN_ORDER\n","operationId":"post-tenants-reports-turnover-stores-tenantUsers","requestBody":{"$ref":"#/components/requestBodies/TenantUserTurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/TenantUserReportTurnoverResponse"}},"summary":"Turnover report for sellers on a store","tags":["Reports"]}}}}
```

## Turnover report for one product group

> Get turnover data for a store and product group.\
> \
> If \`tenant user UID\` is specified, \
> the turnover data will only contain the numbers for that \
> specific user.\
> \
> Required permissions: REPORTING,SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","required":["fromDateTime","toDateTime"],"properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportTurnoverProductGroupResponseSchema":{"description":"Turnover Report Item For ProductGroups","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"hasChildren":{"type":"boolean"},"productGroupUid":{"$ref":"#/components/schemas/UID"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"text":{"type":"string"},"turnoverAmount":{"type":"integer"}},"required":["productGroupUid","text","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count","hasChildren"],"title":"ReportTurnoverProductGroupResponseSchema","type":"object"},"ReportTurnoverTotalSchema":{"description":"Turnover Report Total","title":"ReportTurnoverTotalSchema","type":"object","required":["costAmount","count","discountAmount","revenueAmount","revenuePercent","turnoverAmount","orderCount"],"properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}}}},"responses":{"TurnoverResponseProductGroup":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportTurnoverProductGroupResponseSchema"},"type":"array"},"total":{"$ref":"#/components/schemas/ReportTurnoverTotalSchema"}},"required":["items","total"],"type":"object"}}},"description":"Turnover response for ProductGroup"}}},"paths":{"/tenants/{tenantUid}/reports/turnover/stores/{storeUid}/product-groups/{productGroupUid}":{"post":{"description":"Get turnover data for a store and product group.\n\nIf `tenant user UID` is specified, \nthe turnover data will only contain the numbers for that \nspecific user.\n\nRequired permissions: REPORTING,SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-reports-turnover-stores-productGroups-productGroup","requestBody":{"$ref":"#/components/requestBodies/TurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/TurnoverResponseProductGroup"}},"summary":"Turnover report for one product group","tags":["Reports"]}}}}
```

## Turnover report for products

> Get turnover data for a product group grouped by product\
> \
> If \`tenant user UID\` is specified, \
> the turnover data will only contain the numbers for that \
> specific user.\
> \
> Required permissions: REPORTING,SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","required":["fromDateTime","toDateTime"],"properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportTurnoverItemSchema":{"description":"","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"id":{"type":"string"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"text":{"type":"string"},"turnoverAmount":{"type":"integer"}},"required":["id","text","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count"],"title":"ReportTurnoverItemSchema","type":"object"},"ReportTurnoverTotalSchema":{"description":"Turnover Report Total","title":"ReportTurnoverTotalSchema","type":"object","required":["costAmount","count","discountAmount","revenueAmount","revenuePercent","turnoverAmount","orderCount"],"properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}}}},"responses":{"TurnoverResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportTurnoverItemSchema"},"type":"array"},"total":{"$ref":"#/components/schemas/ReportTurnoverTotalSchema"}},"required":["items","total"],"type":"object"}}},"description":"Turnover response"}}},"paths":{"/tenants/{tenantUid}/reports/turnover/stores/{storeUid}/product-groups/{productGroupUid}/products":{"post":{"description":"Get turnover data for a product group grouped by product\n\nIf `tenant user UID` is specified, \nthe turnover data will only contain the numbers for that \nspecific user.\n\nRequired permissions: REPORTING,SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-reports-turnover-stores-productGroups-products","requestBody":{"$ref":"#/components/requestBodies/TurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/TurnoverResponse"}},"summary":"Turnover report for products","tags":["Reports"]}}}}
```

## Turnover report for orders

> Get turnover data for a product grouped by orders.\
> \
> \
> If \`tenant user UID\` is specified, \
> the turnover data will only contain the numbers for that \
> specific user.\
> \
> Required permissions: REPORTING,SALES\_ORDER,RETURN\_ORDER

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","required":["fromDateTime","toDateTime"],"properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"reportBasis":{"$ref":"#/components/schemas/TurnoverReportBasisENUM"},"tenantUserUid":{"$ref":"#/components/schemas/UID"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}},"TurnoverReportBasisENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| settled | Report on settled orders using settled_at. Includes only orders with status COMPLETE and settleState COMPLETE. |\n| ordered | Report on orders using order_date. Includes orders with status COMPLETE or CONFIRMED. |","enum":["settled","ordered"],"default":"settled","title":"TurnoverReportBasisENUM","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ReportTurnoverItemSchema":{"description":"","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"id":{"type":"string"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"text":{"type":"string"},"turnoverAmount":{"type":"integer"}},"required":["id","text","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count"],"title":"ReportTurnoverItemSchema","type":"object"},"ReportTurnoverTotalSchema":{"description":"Turnover Report Total","title":"ReportTurnoverTotalSchema","type":"object","required":["costAmount","count","discountAmount","revenueAmount","revenuePercent","turnoverAmount","orderCount"],"properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}}}},"responses":{"TurnoverResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportTurnoverItemSchema"},"type":"array"},"total":{"$ref":"#/components/schemas/ReportTurnoverTotalSchema"}},"required":["items","total"],"type":"object"}}},"description":"Turnover response"}}},"paths":{"/tenants/{tenantUid}/reports/turnover/stores/{storeUid}/product-groups/{productGroupUid}/products/{productUid}/orders":{"post":{"description":"Get turnover data for a product grouped by orders.\n\n\nIf `tenant user UID` is specified, \nthe turnover data will only contain the numbers for that \nspecific user.\n\nRequired permissions: REPORTING,SALES_ORDER,RETURN_ORDER","operationId":"post-tenants-reports-turnover-stores-productGroups-products-orders","requestBody":{"$ref":"#/components/requestBodies/TurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/TurnoverResponse"}},"summary":"Turnover report for orders","tags":["Reports"]}}}}
```

## Start Art Fee report

> Start Art Fee report generation for a set time period and optionally for\
> given stores.\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ReportResponse":{"description":"Report details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponseSchema"}}}}},"schemas":{"ReportResponseSchema":{"title":"ReportResponseSchema","type":"object","required":["reportUid","request","state","type","createdAt","createdBy","lastModifiedAt","lastModifiedBy","sendNotificationTo","progress","filename","filesize"],"properties":{"reportUid":{"$ref":"#/components/schemas/UID"},"request":{"anyOf":[{"$ref":"#/components/schemas/SAFTReportCreateRequestSchema"},{"$ref":"#/components/schemas/WarehouseStockDetailsReportCreateRequestSchema"},{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"},{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}],"description":"The request response depends on the what type of report it is"},"state":{"$ref":"#/components/schemas/ReportStateENUM"},"type":{"$ref":"#/components/schemas/ReportTypeENUM"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":"string"},"sendNotificationTo":{"type":"string"},"notificationSentAt":{"type":"string","format":"date-time"},"progress":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"integer"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"SAFTReportCreateRequestSchema":{"title":"SAFTReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"WarehouseStockDetailsReportCreateRequestSchema":{"title":"WarehouseStockDetailsReportCreateRequestSchema","type":"object","properties":{"warehouseUid":{"$ref":"#/components/schemas/UID"},"warehouseUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}}},"GeneralReportCreateRequestSchema":{"title":"GeneralReportCreateRequestSchema","type":"object","properties":{"fromDate":{"format":"date","type":"string"},"toDate":{"format":"date","type":"string"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDate","toDate"]},"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"ReportStateENUM":{"enum":["ABORTED","NOT_STARTED","IN_PROGRESS","COMPLETE"],"title":"ReportStateENUM","type":"string"},"ReportTypeENUM":{"description":"Available reports are:\n\n|ENUM | Description |\n| --- | --- |\n| SAFT | SAFT reports|\n| SalesPrStore | Sales per store|\n| StoreWarehouseDetails | Monthly warehouse details|\n| WarehouseStockDetails | Details list of all stock on the current warehouse|\n| ART_FEE | Art fee report|\n| ART_PROVISION | Artists' provision report|\n| OPEN_ITEMS | List of outstanding receivables |  \n| SOLD_NOT_DELIVERED | Products sold not delivered |\n","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION","OPEN_ITEMS","SOLD_NOT_DELIVERED"],"title":"ReportTypeENUM","type":"string"}},"requestBodies":{"GeneralReportCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneralReportCreateRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/art-fee":{"post":{"summary":"Start Art Fee report","tags":["Reports"],"responses":{"201":{"$ref":"#/components/responses/ReportResponse"}},"operationId":"post-tenants-organizations-reports-artfee-run","description":"Start Art Fee report generation for a set time period and optionally for\ngiven stores.\n\nRequired permissions: REPORTING","requestBody":{"$ref":"#/components/requestBodies/GeneralReportCreateRequest"}}}}}
```

## Start Art Provision report

> The Art Provision  report gives overview over each artist's sales and stock \
> for the requested time period. \
> Optionally filter on artist.\
> \
> Artists with no sales and no stock are included.\
> \
> sendEmailToSupplier = true will send email to each artist.\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"ZipFileResponse":{"description":"ZipFileResponse","content":{"application/zip":{"schema":{"format":"binary","type":"string"}}}}},"requestBodies":{"ArtSupplierReportRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtSupplierReportRequestSchema"}}}}},"schemas":{"ArtSupplierReportRequestSchema":{"title":"ArtSupplierReportRequestSchema","type":"object","required":["fromDate","toDate","supplierUids","sendEmailToSupplier","productGroupUids"],"properties":{"fromDate":{"type":"string","format":"date"},"toDate":{"type":"string","format":"date"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"sendEmailToSupplier":{"type":"boolean"},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"showDiff":{"type":"boolean"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/reports/art-supplier":{"post":{"summary":"Start Art Provision report","responses":{"200":{"$ref":"#/components/responses/ZipFileResponse"},"204":{"description":"No Content"}},"operationId":"post-tenants-reports-artsupplier-run","description":"The Art Provision  report gives overview over each artist's sales and stock \nfor the requested time period. \nOptionally filter on artist.\n\nArtists with no sales and no stock are included.\n\nsendEmailToSupplier = true will send email to each artist.\n\nRequired permissions: REPORTING","tags":["Reports"],"requestBody":{"$ref":"#/components/requestBodies/ArtSupplierReportRequest"}}}}}
```

## List suppliers' commission sales payouts

> List suppliers' payouts for commission sales in a time period. \
> Optionally filter on commission sales that are paid/not paid.\
> \
> Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"SupplierPayoutListResponse":{"description":"Example response","content":{"application/json":{"schema":{"type":"object","required":["items","paging"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SupplierPayoutResponseSchema"}}}}}}}},"schemas":{"SupplierPayoutResponseSchema":{"title":"SupplierPayoutResponseSchema","type":"object","required":["supplier","commissionSales","payoutsTotal","payoutsCount"],"properties":{"supplier":{"$ref":"#/components/schemas/SupplierResponseSchema"},"commissionSales":{"type":"array","items":{"$ref":"#/components/schemas/CommissionSaleResponseSchema"}},"payoutsTotal":{"type":"integer"},"payoutsCount":{"type":"integer"}}},"SupplierResponseSchema":{"title":"SupplierResponseSchema","type":"object","required":["address","city","contactEmail","contactName","countryCode","createdAt","email","externalId","lastModifiedAt","name","phone","postalCode","supplierUid","vatNumber","active","bankInfo","fixedDiscountRate","currency","freightPercentage"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"contactEmail":{"$ref":"#/components/schemas/EmailTYPE"},"contactName":{"type":"string"},"countryCode":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"postalCode":{"type":"string"},"supplierUid":{"$ref":"#/components/schemas/UID"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"active":{"type":"boolean"},"bankInfo":{"$ref":"#/components/schemas/BankInfoResponseSchema"},"fixedDiscountRate":{"type":"integer"},"currency":{"type":"string","description":"ISO 4217 code"},"freightPercentage":{"type":"integer"},"representedStoreUid":{"allOf":[{"$ref":"#/components/schemas/UID"}],"description":"Inter-store trade: the store this supplier represents (the seller). Only set when the INTER_STORE_TRADE extension is active."}}},"EmailTYPE":{"title":"Email","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"VatNumberTYPE":{"description":"VAT identification number for value added tax reporting purposes.","title":"VatNumber","type":"string"},"BankInfoResponseSchema":{"title":"BankInfoResponseSchema","type":"object","required":["accountNumber","bankName","iban","swift","giroAccountNumber"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"},"giroAccountNumber":{"type":"string","description":"National giro/payment-slip creditor account tied to the bank account, e.g. the Danish FIK creditor number (8 digits). Used to emit a giro payment block (FIK) on electronic invoices."}}},"CommissionSaleResponseSchema":{"title":"CommissionSaleResponseSchema","type":"object","required":["payoutAmount","paidAt","paid","commissionPercentage","commissionAmount","salesPrice","productSku","productName","orderNumber","orderSettledAt","commissionUid","orderProductLineUid","orderUid"],"properties":{"payoutAmount":{"type":"integer"},"paidAt":{"type":"string","format":"date-time"},"paid":{"type":"boolean"},"commissionPercentage":{"type":"integer"},"commissionAmount":{"type":"integer"},"salesPrice":{"type":"integer","description":"copy of LineTotal from OrderProductLine"},"productSku":{"type":"string"},"productName":{"type":"string"},"orderNumber":{"type":"string","description":"reference to the sales order"},"orderSettledAt":{"type":"string","format":"date-time"},"commissionUid":{"$ref":"#/components/schemas/UID"},"orderProductLineUid":{"$ref":"#/components/schemas/UID"},"orderUid":{"$ref":"#/components/schemas/UID"}}},"SupplierPayoutListRequestSchema":{"title":"SupplierPayoutListRequestSchema","type":"object","required":["fromDate","toDate"],"properties":{"fromDate":{"type":"string","format":"date","description":"GTE"},"toDate":{"type":"string","format":"date","description":"LTE"},"paid":{"type":"boolean","description":"filter on paid/not paid"},"supplierUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"scope":{"$ref":"#/components/schemas/SupplierPayoutScopeENUM"}}},"SupplierPayoutScopeENUM":{"title":"SupplierPayoutFilterENUM","type":"string","enum":["STOCK_ONLY","PROVISION_ONLY"]}},"requestBodies":{"SupplierPayoutListRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierPayoutListRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/reports/suppliers/payouts":{"post":{"summary":"List suppliers' commission sales payouts","tags":["Reports"],"responses":{"200":{"$ref":"#/components/responses/SupplierPayoutListResponse"}},"operationId":"post-reports-suppliers-payouts","description":"List suppliers' payouts for commission sales in a time period. \nOptionally filter on commission sales that are paid/not paid.\n\nRequired permissions: REPORTING","requestBody":{"$ref":"#/components/requestBodies/SupplierPayoutListRequest"}}}}}
```

## Download Products sold and not delivered excel report

> Generate a report of all sold but not yet delivered products

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"authToken":[]},{"accessToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"parameters":{"tenantUid":{"description":"Reference to a tenant.","in":"path","name":"tenantUid","required":true,"schema":{"$ref":"#/components/schemas/UID"}}},"schemas":{"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ProductsSoldNotDeliveredSchema":{"title":"ProductsSoldNotDeliveredSchema","type":"object","properties":{"organisationUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}}}}},"responses":{"SpreadSheetResponse":{"description":"SpreadSheet Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}}},"requestBodies":{"ProductsSoldNotDeliveredRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsSoldNotDeliveredSchema"}}}}}},"paths":{"/tenants/{tenantUid}/reports/products-sold-not-delivered":{"post":{"tags":["Reports"],"summary":"Download Products sold and not delivered excel report","description":"Generate a report of all sold but not yet delivered products","operationId":"PostTenantProductsSoldNotDelivered","parameters":[{"$ref":"#/components/parameters/tenantUid"}],"responses":{"200":{"$ref":"#/components/responses/SpreadSheetResponse"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"404":{"description":"Tenant not found"}},"requestBody":{"$ref":"#/components/requestBodies/ProductsSoldNotDeliveredRequest"}}}}}
```

## Order Intake report

> List orders with order date that matches request data.\
> \
> Based on the Accept header the response will be base64 json encoded or a raw file.\
> \- application/octet-stream will return a binary file\
> \- application/json will return a json with the file content base64 encoded.\
> \
> Required permissions: REPORTING<br>

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reports","description":"Reports"}],"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":{"OrderIntakeResponse":{"description":"Example response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIntakeResponseSchema"}},"application/octet-stream":{"schema":{"$ref":"#/components/schemas/DownloadableFile"}}}}},"schemas":{"OrderIntakeResponseSchema":{"title":"OrderIntakeResponseSchema","type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderIntakeItemResponseSchema"}}}},"OrderIntakeItemResponseSchema":{"title":"OrderIntakeItemResponseSchema","type":"object","required":["orderUid","orderNumber","orderDate","orderState","customerName","store","createdBy","orderTotal"],"properties":{"orderUid":{"$ref":"#/components/schemas/UID"},"orderNumber":{"type":"string"},"orderDate":{"type":"string","format":"date-time"},"orderState":{"$ref":"#/components/schemas/OrderOrderStateENUM"},"customerName":{"type":"string"},"store":{"$ref":"#/components/schemas/OrderIntakeStoreResponseSchema"},"createdBy":{"type":"string"},"orderTotal":{"type":"integer"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrderOrderStateENUM":{"description":"|ENUM | Description |\n| --- | --- |\n| OPEN | Order is open and beeing edited by someone|\n| PARKED | Order is parked|\n| CANCELED | Order is canceled/deleted|\n| COMPLETE | Order is complete|\n| CONFIRMED | Order is confirmed|\n","enum":["OPEN","PARKED","CANCELED","COMPLETE","CONFIRMED"],"title":"OrderOrderStateENUM","type":"string"},"OrderIntakeStoreResponseSchema":{"title":"OrderIntakeStoreResponseSchema","type":"object","required":["name","storeUid"],"properties":{"name":{"type":"string"},"storeUid":{"$ref":"#/components/schemas/UID"}}},"DownloadableFile":{"title":"DownloadableFile","type":"string","format":"binary"},"OrderIntakeRequestSchema":{"title":"OrderIntakeRequestSchema","type":"object","required":["orderDate"],"properties":{"orderDate":{"$ref":"#/components/schemas/DateTimeRangeSchema"},"storeUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"orderStates":{"type":"array","items":{"$ref":"#/components/schemas/OrderOrderStateENUM"}}}},"DateTimeRangeSchema":{"title":"DateTimeRangeSchema","type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}},"requestBodies":{"OrderIntakeRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIntakeRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/reports/orders":{"post":{"summary":"Order Intake report","tags":["Reports"],"responses":{"200":{"$ref":"#/components/responses/OrderIntakeResponse"}},"operationId":"post-tenants-reports-orders","requestBody":{"$ref":"#/components/requestBodies/OrderIntakeRequest"},"description":"List orders with order date that matches request data.\n\nBased on the Accept header the response will be base64 json encoded or a raw file.\n- application/octet-stream will return a binary file\n- application/json will return a json with the file content base64 encoded.\n\nRequired permissions: REPORTING\n"}}}}
```

## Reasons usage report

> Get a report of reason usage across orders for a specified time period.\
> &#x20;     \
> &#x20;     This report provides analytics on how reasons are being used including:\
> &#x20;     \- Discount reasons on order items\
> &#x20;     \- Return reasons on order items  \
> &#x20;     \
> &#x20;     The report includes usage counts and associated monetary amounts.\
> &#x20;     \
> &#x20;     Required permissions: REPORTING

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Reasons","description":"Reasons"},{"name":"Reports","description":"Reports"}],"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":{"ReasonsReportResponse":{"description":"Reasons report response with aggregated discount and return reason data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonsReportResponseSchema"}}}}},"schemas":{"ReasonsReportResponseSchema":{"title":"ReasonsReportResponseSchema","type":"object","description":"Response schema for reasons usage report with aggregated discount and return reason data","required":["discountReasons","returnReasons"],"properties":{"discountReasons":{"type":"array","description":"Aggregated statistics for discount reasons used during the report period","items":{"$ref":"#/components/schemas/DiscountReasonStatisticSchema"}},"returnReasons":{"type":"array","description":"Aggregated statistics for return reasons used during the report period","items":{"$ref":"#/components/schemas/ReturnReasonStatisticSchema"}}}},"DiscountReasonStatisticSchema":{"title":"DiscountReasonStatisticSchema","type":"object","description":"Aggregated statistics for a discount reason code","required":["reasonCode","reasonDescription","totalAmount","percentageOfTotal","totalOccurrences"],"properties":{"reasonCode":{"type":"string","description":"The unique code identifying the discount reason"},"reasonDescription":{"type":"string","description":"The description of the discount reason"},"totalAmount":{"type":"integer","description":"Total discount amount (in minor units, e.g. cents) for this reason","minimum":0},"percentageOfTotal":{"type":"number","format":"double","description":"Percentage of total discount amount represented by this reason","minimum":0,"maximum":100},"totalOccurrences":{"type":"integer","description":"Number of times this discount reason was used","minimum":0}}},"ReturnReasonStatisticSchema":{"title":"ReturnReasonStatisticSchema","type":"object","description":"Aggregated statistics for a return reason code","required":["reasonCode","reasonDescription","totalAmount","percentageOfTotal","totalOccurrences"],"properties":{"reasonCode":{"type":"string","description":"The unique code identifying the return reason"},"reasonDescription":{"type":"string","description":"The description of the return reason"},"totalAmount":{"type":"integer","description":"Total return amount (in minor units, e.g. cents) for this reason","minimum":0},"percentageOfTotal":{"type":"number","format":"double","description":"Percentage of total return amount represented by this reason","minimum":0,"maximum":100},"totalOccurrences":{"type":"integer","description":"Number of times this return reason was used","minimum":0}}},"ReasonsReportRequestSchema":{"title":"ReasonsReportRequestSchema","type":"object","description":"Request schema for reasons usage report","required":["fromDateTime","toDateTime"],"properties":{"fromDateTime":{"type":"string","format":"date-time","description":"Start date and time for the report period"},"toDateTime":{"type":"string","format":"date-time","description":"End date and time for the report period"},"storeUid":{"$ref":"#/components/schemas/OptionalUID"}}},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"requestBodies":{"ReasonsReportRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonsReportRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/reports/reasons":{"post":{"summary":"Reasons usage report","tags":["Reports","Reasons"],"responses":{"200":{"$ref":"#/components/responses/ReasonsReportResponse"}},"operationId":"post-tenants-reports-reasons","description":"Get a report of reason usage across orders for a specified time period.\n      \n      This report provides analytics on how reasons are being used including:\n      - Discount reasons on order items\n      - Return reasons on order items  \n      \n      The report includes usage counts and associated monetary amounts.\n      \n      Required permissions: REPORTING","requestBody":{"$ref":"#/components/requestBodies/ReasonsReportRequest"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/reports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
