# Query Operations

This guide walks you through retrieving transaction history using the Get Mini App2App integration. You'll learn how to query operations within a specific date range for reporting and reconciliation purposes.

## Requirements

Before following the steps, ensure you have:

* **Get Mini application** installed on the Android device
* **Compatible PIN pad device** paired and connected
* **ActivityResultLauncher** properly registered in your Activity or Fragment

<Callout type="tip">

Query operations are useful for end-of-day reports, shift reconciliation, and transaction lookups.

</Callout>

## Query Process

This section guides you through creating a query Intent with a date range. The Get Mini app will retrieve all transactions processed within the specified period and return them as a formatted report.

### Step 1: Create the Query Intent

Create an Intent with the action `es.redsys.paysys.mPOSRedsys_QUERY_REQUEST` and specify the date range for your query. Both dates must be provided in YYYYMMDD format.

The table below lists the required fields:

| Parameter | Type | Required | Description |
| :---- | :---- | :---- | :---- |
| `dateFrom` | String | Yes | Start date for the query range (YYYYMMDD format). |
| `dateUntil` | String | Yes | End date for the query range (YYYYMMDD format). |

<Callout type="note">

Ensure both dates use consistent YYYYMMDD formatting (e.g., 20240101 for January 1, 2024).

</Callout>

The following code shows how to create and launch the query Intent:

```java
// Create the Intent
Intent intent = new Intent("es.redsys.paysys.mPOSRedsys_QUERY_REQUEST");

// Add date range parameters
intent.putExtra("dateFrom", "20240101");
intent.putExtra("dateUntil", "20240131");

// Launch the Get Mini app
queryLauncher.launch(intent);
```

### Step 2: Handle the Query Result

After retrieving the transaction data, the Get Mini app returns control to your application with the result. The response includes a receipt document containing the transaction history for the specified period.

For complete details on handling responses, see [Handle Transaction Results](/en/get-mini/get-mini-app2app/transaction-guides/response-handling/handle-transaction-results).

### Next Steps

Now that you've retrieved transaction history, you can explore related features:

* [Process a Payment](https://docs.globalgetnet.com/en/products/local-processor-spain/get-mini?doc=getmini-app2app-processing-a-payment) - Learn how to process payment transactions
* [Refund a Payment](https://docs.globalgetnet.com/en/products/local-processor-spain/get-mini?doc=getmini-app2app-processing-a-refund) - Learn how to refund transactions
* [Certified Ticket Management](/en/get-mini/get-mini-app2app/core-concepts/receipt-management) - Display and share query reports