> For the complete documentation index, see [llms.txt](https://cardknox.gitbook.io/sola-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardknox.gitbook.io/sola-dev-docs/api-reference/reporting-api/batch-reports.md). Agents can also search and read this documentation through its [MCP server](https://cardknox.gitbook.io/sola-dev-docs/~gitbook/mcp).

# Batch Reports

## Report Batch

> \*\*Path\*\*: \`/reportjson\` \*\*xCommand\*\*: \`report:batch\` POST to \*\*\`/reportjson\`\*\* with \*\*\`xCommand\`\*\* = \`report:batch\` to run \*\*Report Batch\*\*. Use this endpoint to retrieve batch summaries for a date range. The response returns closed batch summary data that can be used for reconciliation, settlement reporting, and back-office operational analysis.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Batch Reports APIs","version":"5.0.0"},"tags":[{"name":"Batch Reports"}],"servers":[{"url":"https://x1.cardknox.com","description":"Default API host"}],"paths":{"/reportjson":{"post":{"summary":"Report Batch","description":"**Path**: `/reportjson` **xCommand**: `report:batch` POST to **`/reportjson`** with **`xCommand`** = `report:batch` to run **Report Batch**. Use this endpoint to retrieve batch summaries for a date range. The response returns closed batch summary data that can be used for reconciliation, settlement reporting, and back-office operational analysis.\n","operationId":"API_069_reportbatch","tags":["Batch Reports"],"deprecated":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"xKey":{"type":"string","description":"Your Sola API key."},"xVersion":{"type":"string","description":"Gateway API version (e.g. 5.0.0)."},"xSoftwareName":{"type":"string","description":"Name of your software."},"xSoftwareVersion":{"type":"string","description":"Version number of your software."},"xCommand":{"type":"string","description":"Sola report type. Use report:batch."},"xBeginDate":{"type":"string","description":"Begin date for batch report range.","format":"YYYY-MM-DD or YYYY-MM-DD HH:MM:SS"},"xEndDate":{"type":"string","description":"End date for batch report range.","format":"YYYY-MM-DD or YYYY-MM-DD HH:MM:SS"},"xResponseBatch":{"type":"string","description":"Optional. Filter to a specific batch (e.g. ai0000000123)."},"xFields":{"type":"string","description":"Optional. Comma-separated field names to return in xReportData (e.g. xBatch, xRefNum, xAmount)."},"xgetnewest":{"type":"string","description":"Optional. True/False – return most recent transactions first in date range."},"xmaxrecords":{"type":"string","description":"Optional. Max records to return (1–1000, or up to 5000 if date range within 24 hours)."},"xReturnDownloadURL":{"type":"string","description":"Optional. Boolean – if true, response includes xReportURL for downloading results (recommended for >5MB)."}},"required":["xKey","xVersion","xSoftwareName","xSoftwareVersion","xCommand","xBeginDate","xEndDate"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"xResult":{"type":"string","description":"Result code (e.g. A = Approved)."},"xStatus":{"type":"string","description":"Status (e.g. Approved)."},"xError":{"type":"string","description":"Error message if any."},"xRefNum":{"type":"string","description":"Reference for the report request."},"xRecordsReturned":{"type":"string","description":"Number of records (batches) returned."},"xReportData":{"type":"string","description":"Report payload (batch summary and/or transaction rows; columns depend on xFields)."},"xReportURL":{"type":"string","description":"Download URL for report results when xReturnDownloadURL is true (valid ~5 minutes)."},"xBatch":{"type":"string","description":"Batch number (column in xReportData when batch summary returned)."},"xBatchDate":{"type":"string","description":"Batch date (column in xReportData)."},"xBatchTime":{"type":"string","description":"Batch time (column in xReportData)."},"xTotalAmount":{"type":"string","description":"Batch total amount (column in xReportData)."},"xSaleAmount":{"type":"string","description":"Batch sale total (column in xReportData)."},"xRefundAmount":{"type":"string","description":"Batch refund total (column in xReportData)."},"xErrorCode":{"type":"string","description":"Gateway error code (00000 = success)."},"xAvsResultCode":{"type":"string","description":"Raw AVS result code."},"xAvsResult":{"type":"string","description":"AVS result description."},"xCvvResultCode":{"type":"string","description":"Raw CVV result code."},"xCvvResult":{"type":"string","description":"CVV result description."},"xAdditionalData":{"type":"string","description":"Additional report data when returned."},"xDate":{"type":"string","description":"Report request date/time as returned by gateway."},"xTotalCount":{"type":"string","description":"Total transaction count in batch (column in xReportData)."},"xCardNotPresentSaleAmount":{"type":"string","description":"Card-not-present sale amount in batch (column in xReportData)."},"xSaleCount":{"type":"string","description":"Sale count in batch (column in xReportData)."},"xVisaSaleCount":{"type":"string","description":"Visa sale count in batch (column in xReportData)."},"xVisaSaleAmount":{"type":"string","description":"Visa sale amount in batch (column in xReportData)."}}}}}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cardknox.gitbook.io/sola-dev-docs/api-reference/reporting-api/batch-reports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
