查询 MED
使用此端点按 id 查询指定 MED 的详细信息。
可用环境
- 生产环境
https://api.gateway.com.br/core
端点
- 方法:
GET - 端点:
/med/{id} - 认证方式:Bearer token
路径参数
| 名称 | 类型 | 必填 | 说明 | 校验规则 |
|---|---|---|---|---|
id | string (UUID v4) | 是 | MED 的标识 | 必须为有效的 UUID v4 |
请求示例
- cURL
- JavaScript
curl --request GET \
--url https://api.gateway.com.br/core/med/553e8400-e29b-41d4-a716-436251480000 \
--header 'Authorization: Bearer your-jwt-token'
const response = await fetch('https://api.gateway.com.br/core/med/553e8400-e29b-41d4-a716-436251480000', {
method: 'GET',
headers: {
'Authorization': 'Bearer your-jwt-token'
}
});
const data = await response.json();
成功响应
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | MED 的标识 |
acquirer | string | 是 | MED 所属的收单机构 |
transactionId | string | 是 | 交易的标识 |
endToEnd | string | 是 | end-to-end 标识 |
notificationId | string | 否 | 关联通知的标识 |
status | string (enum) - PENDING, APPEALED, APPROVED, REJECTED | 是 | MED 的状态 |
origin | string (enum) - ACQUIRER, ADMIN | 是 | MED 的来源 |
reason | string (enum) - SCAM, FRAUDULENT_ACCESS, OPERATIONAL_ERROR, OTHER | 是 | MED 的原因 |
amount | number | 是 | MED 金额(整数,以分为单位) |
paymentMethod | string (enum) - PIX | 是 | 支付方式 |
payer | object | 否 | 付款方信息(参见子对象 AccountHolder) |
customerMessage | string | 否 | 客户留言 |
user | object | 是 | 用户信息(UserVo) |
decisionMessage | string | 否 | 处理结论说明 |
refundStatus | string (enum) - FULL_REFUND, PARTIAL_REFUND, INSUFFICIENT_FUNDS | 否 | 退款状态 |
appealContent | object | 否 | 申诉内容(AppealContent) |
refundAmount | number | 否 | 退款金额(整数,以分为单位) |
statusHistory | array | 是 | 状态历史(参见子对象 StatusHistory) |
medDate | string (ISO) | 是 | MED 的日期 |
createdAt | string (ISO) | 是 | 创建时间 |
updatedAt | string (ISO) | 是 | 最后更新时间 |
子对象
UserVo
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 是 | 用户名称 |
email | string | 是 | 用户邮箱 |
createdAt | string (ISO) | 是 | 用户的创建时间 |
AccountHolder
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string (enum) - PF, PJ | 是 | 持有人类型 |
name | string | 是 | 持有人姓名 |
document | string | 是 | 持有人证件号码 |
bankAccount | object | 是 | 银行信息(参见子对象 BankAccount) |
pix | object | 是 | 持有人的 PIX 密钥(参见子对象 PixKeyVo) |
BankAccount
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 是 | 账户类型 |
digit | string | 是 | 账户校验位 |
ispb | string | 是 | 银行的 ISPB |
PixKeyVo
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 是 | PIX 密钥 |
type | string (enum) - CPF, CNPJ, EMAIL, PHONE, EVP | 是 | PIX 密钥的类型 |
StatusHistory(列表项)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
status | string (enum) - PENDING, APPEALED, APPROVED, REJECTED | 是 | 历史中记录的 MED 状态 |
date | string (ISO) | 是 | 状态变更的时间 |
durationInMilliseconds | number | 否 | 该状态的持续时长,单位为毫秒 |
AppealContent
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
message | string | 否 | 申诉说明 |
evidences | array | 否 | 申诉证据(参见子对象 FileVo) |
FileVo(evidences 的列表项)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 是 | 文件的键 |
isPrivate | boolean | 是 | 标识文件是否为私有 |
expirationDate | string (ISO) | 否 | 文件的过期时间 |
url | string | 否 | 文件的签名地址 |
响应示例
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"acquirer": "ACQUIRER_EXEMPLO",
"transactionId": "553e8400-e29b-41d4-a716-446655440000",
"endToEnd": "E2E12345678",
"notificationId": null,
"status": "APPEALED",
"origin": "ACQUIRER",
"reason": "FRAUDULENT_ACCESS",
"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": "Defesa recebida e em análise.",
"refundStatus": "FULL_REFUND",
"appealContent": {
"message": "Anexamos comprovante de entrega.",
"evidences": [
{
"key": "med/evidence-1.pdf",
"isPrivate": true,
"expirationDate": "2026-03-25T10:00:00.000Z",
"url": null
}
]
},
"refundAmount": 1000,
"statusHistory": [
{
"status": "PENDING",
"date": "2026-03-24T10:00:00.000Z",
"durationInMilliseconds": 3600000
},
{
"status": "APPEALED",
"date": "2026-03-24T11:00:00.000Z",
"durationInMilliseconds": 1800000
},
{
"status": "APPROVED",
"date": "2026-03-24T11:30:00.000Z",
"durationInMilliseconds": null
}
],
"medDate": "2026-03-24T10:00:00.000Z",
"createdAt": "2026-03-24T10:00:00.000Z",
"updatedAt": "2026-03-24T11:30:00.000Z"
}
可能的错误
| 状态码 | 说明 | 处理方式 |
|---|---|---|
| 401 | 凭据无效 | 请检查您的凭据 |
| 403 | 无权限或未授权 | 请联系技术支持 |
| 404 | 未找到 MED | 请检查传入的 id |
| 500 | 内部错误 | 请联系技术支持 |