# AccountingReports

AccountingReports

## Get X/Z-Report for a till on a specific date. Returns a ZReport object

> Get a X/Z report for a specific date for the selected till. Returns a ZReport json object\
> \
> Required permissions: TILL\_OPERATION

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"AccountingReports","description":"AccountingReports"}],"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":{"XZReportPDFRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XZReportPDFRequestSchema"}}}}},"schemas":{"XZReportPDFRequestSchema":{"title":"XZReportPDFRequestSchema","properties":{"date":{"format":"date","type":"string"}},"required":["date"],"type":"object"},"ZReportResponseSchema":{"title":"ZReportResponseSchema","type":"object","properties":{"cashAtStart":{"type":"integer"},"cashDrawerOpening":{"$ref":"#/components/schemas/ZReportCountSchema"},"discountSale":{"$ref":"#/components/schemas/ZReportCountAmountSchema"},"header":{"$ref":"#/components/schemas/ZReportHeaderSchema"},"lineCorrections":{"$ref":"#/components/schemas/ZReportCountSchema"},"productLookups":{"type":"array","items":{"$ref":"#/components/schemas/ZReportCountAmountNameSchema"}},"receiptCopies":{"$ref":"#/components/schemas/ZReportCountSchema"},"saleByMainGroup":{"type":"array","items":{"$ref":"#/components/schemas/ZReportCountAmountNameSchema"}},"saleBySettlementId":{"type":"array","items":{"$ref":"#/components/schemas/ZReportCountAmountNameSchema"}},"saleByVATCode":{"type":"array","items":{"$ref":"#/components/schemas/ZReportCountAmountNameSchema"}},"orderTotals":{"$ref":"#/components/schemas/ZReportTotalsSchema"}},"required":["cashAtStart","cashDrawerOpening","discountSale","header","lineCorrections","productLookups","receiptCopies","saleByMainGroup","saleBySettlementId","saleByVATCode","orderTotals"]},"ZReportCountSchema":{"properties":{"count":{"type":"integer"}},"required":["count"],"title":"ZReportCountSchema","type":"object"},"ZReportCountAmountSchema":{"properties":{"amount":{"type":"integer"},"count":{"type":"integer"}},"required":["count","amount"],"title":"ZReportCountAmountSchema","type":"object"},"ZReportHeaderSchema":{"properties":{"companyName":{"type":"string"},"date":{"format":"date","type":"string"},"shopName":{"type":"string"},"tillUid":{"$ref":"#/components/schemas/UID"},"userName":{"type":"string"},"vatNumber":{"type":"string"},"xz":{"type":"string"},"zreportId":{"type":"string"}},"required":["xz","zreportId","companyName","vatNumber","shopName","tillUid","userName","date"],"title":"ZReportHeaderSchema","type":"object"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"ZReportCountAmountNameSchema":{"properties":{"amount":{"type":"integer"},"count":{"type":"integer"},"name":{"type":"string"}},"required":["name","count","amount"],"title":"ZReportCountAmountNameSchema","type":"object"},"ZReportTotalsSchema":{"title":"ZReportTotalsSchema","type":"object","properties":{"sales":{"$ref":"#/components/schemas/ZReportCountAmountSchema"},"returns":{"$ref":"#/components/schemas/ZReportCountAmountSchema"},"grandTotal":{"$ref":"#/components/schemas/ZReportCountAmountSchema"}},"required":["sales","returns","grandTotal"]}},"responses":{"ZReportResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZReportResponseSchema"}}},"description":"Example response"},"GenericErrorResponse":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"message":{"type":"string","description":"Error message in the locale you specify in the Accept-Language header or specified on the user"},"logId":{"type":"string","description":"Log identification. Can be used when reporting errors to Flow Solutions"}},"type":"object"}}},"description":"Linking failed. Ther error message will have information about what failed."}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/tills/{tillUid}/xzreport":{"post":{"description":"Get a X/Z report for a specific date for the selected till. Returns a ZReport json object\n\nRequired permissions: TILL_OPERATION","operationId":"post-tenants-stores-tills-xzreport","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/XZReportPDFRequest"},"responses":{"200":{"$ref":"#/components/responses/ZReportResponse"},"400":{"$ref":"#/components/responses/GenericErrorResponse"},"404":{"$ref":"#/components/responses/GenericErrorResponse"}},"summary":"Get X/Z-Report for a till on a specific date. Returns a ZReport object","tags":["AccountingReports"]}}}}
```

## Get X/Z-Report for a till on a specific date

> Get a X/Z report for a specific date for the selected till.

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"AccountingReports","description":"AccountingReports"}],"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":{"XZReportPDFRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XZReportPDFRequestSchema"}}}}},"schemas":{"XZReportPDFRequestSchema":{"title":"XZReportPDFRequestSchema","properties":{"date":{"format":"date","type":"string"}},"required":["date"],"type":"object"},"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."},"GenericErrorResponse":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"message":{"type":"string","description":"Error message in the locale you specify in the Accept-Language header or specified on the user"},"logId":{"type":"string","description":"Log identification. Can be used when reporting errors to Flow Solutions"}},"type":"object"}}},"description":"Linking failed. Ther error message will have information about what failed."}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/tills/{tillUid}/xzreport/download":{"post":{"description":"Get a X/Z report for a specific date for the selected till.","operationId":"post-tenants-stores-tills-xzreport-download","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/XZReportPDFRequest"},"responses":{"200":{"$ref":"#/components/responses/FileResponse"},"400":{"$ref":"#/components/responses/GenericErrorResponse"},"404":{"$ref":"#/components/responses/GenericErrorResponse"}},"summary":"Get X/Z-Report for a till on a specific date","tags":["AccountingReports"]}}}}
```

## Cash control per till and paymentmethod

> Cash control per till and paymentmethod\
> \
> Required permissions: TILL\_OPERATION

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"AccountingReports","description":"AccountingReports"}],"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":{"CashControlReportPDFRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashControlReportPDFRequestSchema"}}}}},"schemas":{"CashControlReportPDFRequestSchema":{"title":"CashControlReportPDFRequestSchema","properties":{"date":{"format":"date","type":"string"}},"required":["date"],"type":"object"},"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."},"GenericErrorResponse":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"message":{"type":"string","description":"Error message in the locale you specify in the Accept-Language header or specified on the user"},"logId":{"type":"string","description":"Log identification. Can be used when reporting errors to Flow Solutions"}},"type":"object"}}},"description":"Linking failed. Ther error message will have information about what failed."}}},"paths":{"/tenants/{tenantUid}/reports/cashcontrolreport/stores/{storeUid}":{"post":{"description":"Cash control per till and paymentmethod\n\nRequired permissions: TILL_OPERATION","operationId":"post-tenant-reports-cashcontrolreport-store","parameters":[],"requestBody":{"$ref":"#/components/requestBodies/CashControlReportPDFRequest"},"responses":{"200":{"$ref":"#/components/responses/FileResponse"},"400":{"$ref":"#/components/responses/GenericErrorResponse"},"404":{"$ref":"#/components/responses/GenericErrorResponse"}},"summary":"Cash control per till and paymentmethod","tags":["AccountingReports"]}}}}
```
