Avistadocs

List MEDs

GET /api/med

GET https://api.avista.global/api/med

Returns the list of MEDs associated with the authenticated account, with pagination and filters.

Authentication

Requires a Bearer token in the Authorization header.

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status: OPEN, RECEIVED, CANCELLED, ANALYZED
isReconciledbooleanNoFilter by reconciliation status (true/false)
startDatestringNoStart date (ISO 8601). Ex: 2026-01-01T00:00:00.000Z
endDatestringNoEnd date (ISO 8601). Ex: 2026-01-31T23:59:59.999Z
pagenumberNoPage number (starts at 1). Default: 1
pageSizenumberNoItems 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)

FieldTypeDescription
dataarrayList of MED objects
data[].idnumberUnique MED identifier
data[].endToEndstringEnd-to-end ID of the original PIX transaction
data[].statusstringStatus: OPEN, RECEIVED, CANCELLED, ANALYZED
data[].reasonstringReason: REFUND_REQUEST or REFUND_CANCELLATION
data[].causestring | nullCause code (UNAUTHORIZED_TRANSACTION, SOCIAL_ENGINEERING, etc.) or null
data[].descriptionstring | nullAdditional details about the request
data[].analysisResultstring | nullAnalysis result: APPROVED, REJECTED (null if still under analysis)
data[].analysisDetailsstring | nullRationale of the analysis result
data[].requestingBankobjectBank that opened the MED
data[].requestingBank.ispbstringBank ISPB code
data[].requestingBank.namestringBank name
data[].contestedBankobjectContested bank (your institution)
data[].contestedBank.ispbstringBank ISPB code
data[].contestedBank.namestringBank name
data[].originalTransactionobject | nullData about the original PIX transaction
data[].originalTransaction.amountnumberAmount in BRL
data[].originalTransaction.typestringType (e.g., "PIX")
data[].originalTransaction.transactionTypestringTransaction type (e.g., "CASH_IN")
data[].originalTransaction.namestringCounterparty name
data[].originalTransaction.documentstringCounterparty document (masked)
data[].originalTransaction.dateTimestringOriginal transaction date/time (ISO 8601)
data[].isReconciledbooleanWhether the MED was linked to a local transaction
data[].originalTransactionIdnumber | nullLocal transaction ID (if reconciled)
data[].createdAtstringMED creation date (ISO 8601)
data[].updatedAtstringLast update date (ISO 8601)
metadataobjectPagination info
metadata.totalnumberTotal records
metadata.pagenumberCurrent page
metadata.pageSizenumberItems per page
metadata.totalPagesnumberTotal 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

StatusDescription
400Invalid parameters (status outside the enum, malformed dates, page < 1, pageSize outside the 1–100 range)
401Token missing or invalid
429Too many requests — wait a few seconds before retrying
500Internal 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.

On this page