> 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/accountingreports.md).

# 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

```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":"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":{"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","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":"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":{"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

```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":"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":{"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","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"]}}}}
```


---

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