List MEDs
GET /api/med
GET https://api.avista.global/api/medReturns the list of MEDs associated with the authenticated account, with pagination and filters.
Authentication
Requires a Bearer token in the Authorization header.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter by status: OPEN, RECEIVED, CANCELLED, ANALYZED |
isReconciled | boolean | No | Filter by reconciliation status (true/false) |
startDate | string | No | Start date (ISO 8601). Ex: 2026-01-01T00:00:00.000Z |
endDate | string | No | End date (ISO 8601). Ex: 2026-01-31T23:59:59.999Z |
page | number | No | Page number (starts at 1). Default: 1 |
pageSize | number | No | Items per page (1–100). Default: 20 |
Request Examples
curl -X GET "https://api.avista.global/api/med" \
-H "Authorization: Bearer $AVISTA_TOKEN"List only MEDs with status RECEIVED (under analysis):
curl -X GET "https://api.avista.global/api/med?status=RECEIVED" \
-H "Authorization: Bearer $AVISTA_TOKEN"List MEDs created in January 2026, page 1 with 50 items:
curl -X GET "https://api.avista.global/api/med?startDate=2026-01-01T00:00:00.000Z&endDate=2026-01-31T23:59:59.999Z&page=1&pageSize=50" \
-H "Authorization: Bearer $AVISTA_TOKEN"List MEDs not automatically linked to a local transaction:
curl -X GET "https://api.avista.global/api/med?isReconciled=false" \
-H "Authorization: Bearer $AVISTA_TOKEN"Response (200)
| Field | Type | Description |
|---|---|---|
data | array | List of MED objects |
data[].id | number | Unique MED identifier |
data[].endToEnd | string | End-to-end ID of the original PIX transaction |
data[].status | string | Status: OPEN, RECEIVED, CANCELLED, ANALYZED |
data[].reason | string | Reason: REFUND_REQUEST or REFUND_CANCELLATION |
data[].cause | string | null | Cause code (UNAUTHORIZED_TRANSACTION, SOCIAL_ENGINEERING, etc.) or null |
data[].description | string | null | Additional details about the request |
data[].analysisResult | string | null | Analysis result: APPROVED, REJECTED (null if still under analysis) |
data[].analysisDetails | string | null | Rationale of the analysis result |
data[].requestingBank | object | Bank that opened the MED |
data[].requestingBank.ispb | string | Bank ISPB code |
data[].requestingBank.name | string | Bank name |
data[].contestedBank | object | Contested bank (your institution) |
data[].contestedBank.ispb | string | Bank ISPB code |
data[].contestedBank.name | string | Bank name |
data[].originalTransaction | object | null | Data about the original PIX transaction |
data[].originalTransaction.amount | number | Amount in BRL |
data[].originalTransaction.type | string | Type (e.g., "PIX") |
data[].originalTransaction.transactionType | string | Transaction type (e.g., "CASH_IN") |
data[].originalTransaction.name | string | Counterparty name |
data[].originalTransaction.document | string | Counterparty document (masked) |
data[].originalTransaction.dateTime | string | Original transaction date/time (ISO 8601) |
data[].isReconciled | boolean | Whether the MED was linked to a local transaction |
data[].originalTransactionId | number | null | Local transaction ID (if reconciled) |
data[].createdAt | string | MED creation date (ISO 8601) |
data[].updatedAt | string | Last update date (ISO 8601) |
metadata | object | Pagination info |
metadata.total | number | Total records |
metadata.page | number | Current page |
metadata.pageSize | number | Items per page |
metadata.totalPages | number | Total pages |
{
"data": [
{
"id": 42,
"endToEnd": "E12345678202604101030abcdef123456",
"status": "ANALYZED",
"reason": "REFUND_REQUEST",
"cause": "UNAUTHORIZED_TRANSACTION",
"description": "Customer claims not to have performed the transaction",
"analysisResult": "APPROVED",
"analysisDetails": "Refund approved by operator - amount refunded",
"requestingBank": {
"ispb": "00000000",
"name": "BCO DO BRASIL S.A."
},
"contestedBank": {
"ispb": "13140088",
"name": "ACESSO SOLUÇÕES DE PAGAMENTO"
},
"originalTransaction": {
"amount": 1500.00,
"type": "PIX",
"transactionType": "CASH_IN",
"name": "João da Silva",
"document": "***456789**",
"dateTime": "2026-04-05T14:30:00.000Z"
},
"isReconciled": true,
"originalTransactionId": 78432,
"createdAt": "2026-04-10T10:00:00.000Z",
"updatedAt": "2026-04-12T15:30:00.000Z"
}
],
"metadata": {
"total": 1,
"page": 1,
"pageSize": 20,
"totalPages": 1
}
}Errors
| Status | Description |
|---|---|
| 400 | Invalid parameters (status outside the enum, malformed dates, page < 1, pageSize outside the 1–100 range) |
| 401 | Token missing or invalid |
| 429 | Too many requests — wait a few seconds before retrying |
| 500 | Internal error while querying MEDs |
Example 400 error:
{
"statusCode": 400,
"message": "status must be one of: OPEN, RECEIVED, CANCELLED, ANALYZED",
"error": "Bad Request"
}Example 401 error:
{
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}To understand the lifecycle of statuses and causes, see the MED overview.