Skip to main content

List MEDs

Use this endpoint to list MEDs with filters.

Available Environments​

https://api.gateway.com.br/core

Endpoint​

  • Method: GET
  • Endpoint: /med
  • Authentication: Bearer token

Query Params​

ℹ️ Dates in ISO

The startDate and endDate fields must be sent as an ISO date string with time.

Example:

  • 2026-03-24T12:00:00.000Z
ℹ️ Arrays in the query string

The status field accepts multiple values.

Example:

  • status=PENDING&status=APPEALED
ℹ️ Snapshot pagination

The snapshot is not a pointer to the "next page": it is a fixed identifier of the pagination session, used together with page (which is still sent and incremented normally) to keep the results consistent even if new records are created while you navigate.

Take the snapshot value from the first response (sent without a snapshot on the first request) and resend that same value, unchanged, on the requests for the following pages, along with the same filters and the same perPage used originally. If any of those values changes while an old snapshot is resent, the API returns an error.

NameTypeRequiredDescriptionValidations
snapshotstringNoIdentifier of the pagination session (received in the snapshot field of the first response); resend it unchanged along with page on the following pagesMust match the same filters and the same perPage of the original request
startDatestringNoStart date of the filterMust be an ISO date string with time
endDatestringNoEnd date of the filterMust be an ISO date string with time
statusstring[] (enum) - PENDING, APPEALED, APPROVED, REJECTEDNoList of statuses to filter byMust be a non-empty, unique array with no duplicates
idstring (UUID v4)NoMED identifierMust be a valid UUID v4
transactionIdstring (UUID v4)NoTransaction identifierMust be a valid UUID v4
endToEndstringNoEnd-to-end identifierMust be between 8 and 255 characters
amountnumberNoMED amount (integer, in cents)Integer between 1 and 10000000
paymentMethodstring (enum) - PIXNoPayment methodMust be a valid payment method value

Request Example (with every field)​

curl --request GET \
--url "https://api.gateway.com.br/core/med?startDate=2026-03-01T00:00:00.000Z&endDate=2026-03-24T23:59:59.999Z&status=PENDING&status=APPEALED&id=553e8400-e29b-41d4-a716-436251480000&transactionId=553e8400-e29b-41d4-a716-446655440000&endToEnd=E2E12345678&amount=1000&paymentMethod=PIX" \
--header 'Authorization: Bearer your-jwt-token'

Success Response​

FieldTypeRequiredDescription
totalPagesnumberYesTotal pages
currentPagenumberYesCurrent page
perPagenumberYesItems per page
snapshotstringNoIdentifier of the pagination session; resend it unchanged on the following pages
dataarrayYesList of MEDs

Fields of the item in data​

FieldTypeRequiredDescription
idstringYesMED identifier
acquirerstringYesAcquirer of the MED
transactionIdstringYesTransaction identifier
endToEndstringYesEnd-to-end identifier
notificationIdstringNoIdentifier of the associated notification
statusstring (enum) - PENDING, APPEALED, APPROVED, REJECTEDYesMED status
originstring (enum) - ACQUIRER, ADMINYesOrigin of the MED
reasonstring (enum) - SCAM, FRAUDULENT_ACCESS, OPERATIONAL_ERROR, OTHERYesReason of the MED
amountnumberYesMED amount (integer, in cents)
paymentMethodstring (enum) - PIXYesPayment method
payerobjectNoPayer data (see Sub-Object AccountHolder)
customerMessagestringNoCustomer message
userobjectYesUser data (UserVo)
decisionMessagestringNoDecision message
refundStatusstring (enum) - FULL_REFUND, PARTIAL_REFUND, INSUFFICIENT_FUNDSNoRefund status
appealContentobjectNoContent of the defense (AppealContent)
refundAmountnumberNoRefund amount (integer, in cents)
statusHistoryarrayYesStatus history (see Sub-Object StatusHistory)
medDatestring (ISO)YesDate of the MED
createdAtstring (ISO)YesCreation date
updatedAtstring (ISO)YesLast update date

Sub-Objects​

UserVo​

FieldTypeRequiredDescription
namestringYesUser name
emailstringYesUser e-mail
createdAtstring (ISO)YesCreation date of the user

AccountHolder​

FieldTypeRequiredDescription
typestring (enum) - PF, PJYesHolder type
namestringYesHolder name
documentstringYesHolder document
bankAccountobjectYesBank data (see Sub-Object BankAccount)
pixobjectYesPIX key of the holder (see Sub-Object PixKeyVo)

BankAccount​

FieldTypeRequiredDescription
typestringYesAccount type
digitstringYesAccount check digit
ispbstringYesISPB of the bank

PixKeyVo​

FieldTypeRequiredDescription
keystringYesPIX key
typestring (enum) - CPF, CNPJ, EMAIL, PHONE, EVPYesPIX key type

StatusHistory (item)​

FieldTypeRequiredDescription
statusstring (enum) - PENDING, APPEALED, APPROVED, REJECTEDYesMED status in the history
datestring (ISO)YesDate and time of the status change
durationInMillisecondsnumberNoDuration of the status in milliseconds

AppealContent​

FieldTypeRequiredDescription
messagestringNoDefense message
evidencesarrayNoEvidence of the defense (see Sub-Object FileVo)

FileVo (item of evidences)​

FieldTypeRequiredDescription
keystringYesFile key
isPrivatebooleanYesWhether the file is private
expirationDatestring (ISO)NoFile expiration date
urlstringNoSigned URL of the file

Response Example​

{
"totalPages": 1,
"currentPage": 1,
"perPage": 15,
"snapshot": "b3BhcXVlLXNuYXBzaG90LXRva2Vu",
"data": [
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"acquirer": "ACQUIRER_EXEMPLO",
"transactionId": "553e8400-e29b-41d4-a716-446655440000",
"endToEnd": "E2E12345678",
"notificationId": null,
"status": "PENDING",
"origin": "ACQUIRER",
"reason": "SCAM",
"amount": 1000,
"paymentMethod": "PIX",
"payer": {
"type": "PF",
"name": "Fulano de Tal",
"document": "***456789**",
"bankAccount": {
"type": "CHECKING",
"digit": "7",
"ispb": "12345678"
},
"pix": {
"key": "12345678910",
"type": "CPF"
}
},
"customerMessage": "Cliente informou não reconhecer a cobrança.",
"user": {
"name": "Loja Exemplo",
"email": "contato@lojaexemplo.com",
"createdAt": "2026-03-01T09:00:00.000Z"
},
"decisionMessage": "Decisão administrativa em análise.",
"refundStatus": "PARTIAL_REFUND",
"appealContent": {
"message": "Enviamos comprovante da entrega e da autenticação do pedido.",
"evidences": [
{
"key": "med/evidence-1.pdf",
"isPrivate": true,
"expirationDate": "2026-03-25T10:00:00.000Z",
"url": null
}
]
},
"refundAmount": 500,
"statusHistory": [
{
"status": "PENDING",
"date": "2026-03-24T10:00:00.000Z",
"durationInMilliseconds": 3600000
},
{
"status": "APPEALED",
"date": "2026-03-24T11:00:00.000Z",
"durationInMilliseconds": null
}
],
"medDate": "2026-03-24T10:00:00.000Z",
"createdAt": "2026-03-24T10:00:00.000Z",
"updatedAt": "2026-03-24T11:00:00.000Z"
}
]
}

Possible Errors​

CodeDescriptionSolution
401Invalid credentialsCheck your credentials
403No permission/authorizationContact support
422Invalid or missing dataCheck the format of the data
500Internal errorContact support