List MEDs
Use this endpoint to list MEDs with filters.
Available Environments
- Production
https://api.gateway.com.br/core
Endpoint
- Method:
GET - Endpoint:
/med - Authentication: Bearer token
Query Params
The startDate and endDate fields must be sent as an ISO date string with time.
Example:
2026-03-24T12:00:00.000Z
The status field accepts multiple values.
Example:
status=PENDING&status=APPEALED
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.
| Name | Type | Required | Description | Validations |
|---|---|---|---|---|
snapshot | string | No | Identifier of the pagination session (received in the snapshot field of the first response); resend it unchanged along with page on the following pages | Must match the same filters and the same perPage of the original request |
startDate | string | No | Start date of the filter | Must be an ISO date string with time |
endDate | string | No | End date of the filter | Must be an ISO date string with time |
status | string[] (enum) - PENDING, APPEALED, APPROVED, REJECTED | No | List of statuses to filter by | Must be a non-empty, unique array with no duplicates |
id | string (UUID v4) | No | MED identifier | Must be a valid UUID v4 |
transactionId | string (UUID v4) | No | Transaction identifier | Must be a valid UUID v4 |
endToEnd | string | No | End-to-end identifier | Must be between 8 and 255 characters |
amount | number | No | MED amount (integer, in cents) | Integer between 1 and 10000000 |
paymentMethod | string (enum) - PIX | No | Payment method | Must be a valid payment method value |
Request Example (with every field)
- cURL
- JavaScript
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'
const params = new URLSearchParams({
startDate: '2026-03-01T00:00:00.000Z',
endDate: '2026-03-24T23:59:59.999Z',
id: '553e8400-e29b-41d4-a716-436251480000',
transactionId: '553e8400-e29b-41d4-a716-446655440000',
endToEnd: 'E2E12345678',
amount: '1000',
paymentMethod: 'PIX'
});
params.append('status', 'PENDING');
params.append('status', 'APPEALED');
const response = await fetch(`https://api.gateway.com.br/core/med?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer your-jwt-token'
}
});
const data = await response.json();
Success Response
| Field | Type | Required | Description |
|---|---|---|---|
totalPages | number | Yes | Total pages |
currentPage | number | Yes | Current page |
perPage | number | Yes | Items per page |
snapshot | string | No | Identifier of the pagination session; resend it unchanged on the following pages |
data | array | Yes | List of MEDs |
Fields of the item in data
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | MED identifier |
acquirer | string | Yes | Acquirer of the MED |
transactionId | string | Yes | Transaction identifier |
endToEnd | string | Yes | End-to-end identifier |
notificationId | string | No | Identifier of the associated notification |
status | string (enum) - PENDING, APPEALED, APPROVED, REJECTED | Yes | MED status |
origin | string (enum) - ACQUIRER, ADMIN | Yes | Origin of the MED |
reason | string (enum) - SCAM, FRAUDULENT_ACCESS, OPERATIONAL_ERROR, OTHER | Yes | Reason of the MED |
amount | number | Yes | MED amount (integer, in cents) |
paymentMethod | string (enum) - PIX | Yes | Payment method |
payer | object | No | Payer data (see Sub-Object AccountHolder) |
customerMessage | string | No | Customer message |
user | object | Yes | User data (UserVo) |
decisionMessage | string | No | Decision message |
refundStatus | string (enum) - FULL_REFUND, PARTIAL_REFUND, INSUFFICIENT_FUNDS | No | Refund status |
appealContent | object | No | Content of the defense (AppealContent) |
refundAmount | number | No | Refund amount (integer, in cents) |
statusHistory | array | Yes | Status history (see Sub-Object StatusHistory) |
medDate | string (ISO) | Yes | Date of the MED |
createdAt | string (ISO) | Yes | Creation date |
updatedAt | string (ISO) | Yes | Last update date |
Sub-Objects
UserVo
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | User name |
email | string | Yes | User e-mail |
createdAt | string (ISO) | Yes | Creation date of the user |
AccountHolder
| Field | Type | Required | Description |
|---|---|---|---|
type | string (enum) - PF, PJ | Yes | Holder type |
name | string | Yes | Holder name |
document | string | Yes | Holder document |
bankAccount | object | Yes | Bank data (see Sub-Object BankAccount) |
pix | object | Yes | PIX key of the holder (see Sub-Object PixKeyVo) |
BankAccount
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Account type |
digit | string | Yes | Account check digit |
ispb | string | Yes | ISPB of the bank |
PixKeyVo
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | PIX key |
type | string (enum) - CPF, CNPJ, EMAIL, PHONE, EVP | Yes | PIX key type |
StatusHistory (item)
| Field | Type | Required | Description |
|---|---|---|---|
status | string (enum) - PENDING, APPEALED, APPROVED, REJECTED | Yes | MED status in the history |
date | string (ISO) | Yes | Date and time of the status change |
durationInMilliseconds | number | No | Duration of the status in milliseconds |
AppealContent
| Field | Type | Required | Description |
|---|---|---|---|
message | string | No | Defense message |
evidences | array | No | Evidence of the defense (see Sub-Object FileVo) |
FileVo (item of evidences)
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | File key |
isPrivate | boolean | Yes | Whether the file is private |
expirationDate | string (ISO) | No | File expiration date |
url | string | No | Signed 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
| Code | Description | Solution |
|---|---|---|
| 401 | Invalid credentials | Check your credentials |
| 403 | No permission/authorization | Contact support |
| 422 | Invalid or missing data | Check the format of the data |
| 500 | Internal error | Contact support |