getReport

The getReport method is used to retrieve various reports, such as Z or X reports, and lists of specific transaction types.

Request

📘

JSON-RPC 2.0

All methods in TweezerComm follow a JSON-RPC 2.0 structure. See Get Startedfor more details on how the requests are structured and sent.

In the request, ensure to configure the following:

  • The method field must be set to getReport.
  • The params array must contain the service name (ashrait) followed by the desired action name.
{
    "jsonrpc":"2.0",
    "method":"getReport",
    "params":[
        "ashrait",
        "queryPreAuthTransactions"
    ],
    "id":"123454352"
}

Request Parameters

The table below describes the request parameters for this method.

NameTypeDescription
actionNamestringThe specific action or report to perform. See the table below for values.

Action Name Values

ValueDescription
xRetrieves an X report.
zRetrieves a Z report.
accmRetrieves an ACCM report.
queryTransactionsLists all pending deferred transactions on the device.
queryReportsLists acknowledgment numbers of all reports from the device.
queryPreAuthTransactionsLists all uncompleted J5 transactions on the device.
queryDeferredAuthTransactionsLists all pending deferred transactions on the device.

Response

The response varies based on the requested action. Query actions return a list of transactions, while report actions return a printable slip.

{
    "jsonrpc": "2.0",
    "result": {
        "statusCode": 0,
        "queriedTransactions": [
            "24120312004508832326548"
        ]
    },
    "id": "123454352"
}

Response Parameters

The table below describes the response parameters for this method.

NameTypeDescription
statusCodeintegerOperation status. A value of 0 indicates success. All other values are errors.
statusMessagestringThe operation message (e.g., ok).
slipstringReturned for report actions (x, z, accm). Contains the report data to be printed.
queriedTransactionsarray of stringsReturned for query actions. Contains a list of the requested transaction or report identifiers.