# 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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"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"},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseUid"]},"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","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION"],"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":"Accesstoken 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"},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseUid"]},"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","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION"],"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

```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":"Accesstoken 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"},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseUid"]},"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","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION"],"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","responses":{"200":{"$ref":"#/components/responses/ReportResponse"}},"description":"Abort report generation","requestBody":{"$ref":"#/components/requestBodies/ReportAbortRequest"},"tags":["Reports"]}}}}
```

## Delete a generated report

> Deletes a generated report

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/reports/{reportUid}":{"delete":{"summary":"Delete a generated report","operationId":"delete-tenants-organizations-reports","responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"description":"Deletes a generated report","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":"Accesstoken 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<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"},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseUid"]},"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","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION"],"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","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.

```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"},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseUid"]},"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","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION"],"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.","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"]}}}}
```

## Accounting report for stores, json format

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

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"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","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"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"],"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.","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"ProductReportRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductReportRequestSchema"}}},"description":"Product Turnover Request Body"}},"schemas":{"ProductReportRequestSchema":{"title":"ProductReportRequestSchema","type":"object","properties":{"brandUids":{"description":"Array of brandUids","items":{"$ref":"#/components/schemas/UID"},"type":"array"},"fromDateTime":{"format":"date-time","minLength":10,"type":"string"},"productGroupUids":{"description":"Array of productGroup ids","items":{"$ref":"#/components/schemas/UID"},"type":"array"},"storeUids":{"description":"Array of storeUids","items":{"$ref":"#/components/schemas/UID"},"type":"array"},"toDateTime":{"format":"date-time","minLength":10,"type":"string"}},"required":["fromDateTime","toDateTime","storeUids"]},"UID":{"title":"UID","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.","operationId":"post-tenants-reports-products","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/ProductReportRequest"},"responses":{"200":{"$ref":"#/components/responses/ProductReportResponse"}},"summary":"Turnover report for products","tags":["Reports"]}}}}
```

## 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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDateTime","toDateTime"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"StoreReportTurnoverDateSchema":{"description":"","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"date":{"type":"string"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"revenuePercent":{"type":"integer"},"turnoverAmount":{"type":"integer"}},"required":["date","turnoverAmount","revenueAmount","revenuePercent","discountAmount","costAmount","count"],"title":"StoreReportTurnoverDateSchema","type":"object"},"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","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}},"required":["costAmount","count","discountAmount","revenueAmount","turnoverAmount","orderCount"]}},"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.","operationId":"post-tenants-reports-turnover-stores","requestBody":{"$ref":"#/components/requestBodies/TurnoverRequest"},"responses":{"200":{"$ref":"#/components/responses/StoreTurnoverResponse"}},"summary":"Turnover 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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDateTime","toDateTime"]},"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","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}},"required":["costAmount","count","discountAmount","revenueAmount","turnoverAmount","orderCount"]}},"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.","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.<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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"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"}},"required":["fromDateTime","toDateTime"]},"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","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDateTime","toDateTime"]},"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","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}},"required":["costAmount","count","discountAmount","revenueAmount","turnoverAmount","orderCount"]}},"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.","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDateTime","toDateTime"]},"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","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}},"required":["costAmount","count","discountAmount","revenueAmount","turnoverAmount","orderCount"]}},"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.","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"TurnoverRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnoverRequestSchema"}}}}},"schemas":{"TurnoverRequestSchema":{"title":"TurnoverRequestSchema","type":"object","description":"Turnover Request Body","properties":{"fromDateTime":{"format":"date-time","minLength":20,"type":"string"},"toDateTime":{"format":"date-time","minLength":20,"type":"string"},"tenantUserUid":{"$ref":"#/components/schemas/UID"}},"required":["fromDateTime","toDateTime"]},"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","properties":{"costAmount":{"type":"integer"},"count":{"type":"integer"},"discountAmount":{"type":"integer"},"revenueAmount":{"type":"integer"},"turnoverAmount":{"type":"integer"},"orderCount":{"type":"integer"}},"required":["costAmount","count","discountAmount","revenueAmount","turnoverAmount","orderCount"]}},"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.","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"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"},"brandUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"productGroupUids":{"type":"array","items":{"$ref":"#/components/schemas/UID"}},"reportUid":{"$ref":"#/components/schemas/UID"}},"required":["warehouseUid"]},"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","enum":["SAFT","StoreWarehouseDetails","SalesPrStore","WarehouseStockDetails","ART_FEE","ART_PROVISION"],"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.","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"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.","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.

```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":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"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"],"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"}}},"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"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}},"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.","requestBody":{"$ref":"#/components/requestBodies/SupplierPayoutListRequest"}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

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

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

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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