Infrações e MED

Consultar mediação MED

Exige monkeypay:mediations:read. Uma mediação fora do alcance da organização do token responde 404.

GEThttps://api.monkeypay.app/api/v2/resource/mediations/{mediationId}Bearer

Antes de chamar

  1. Chamada

    POSTEmitir token bearer

    /resource/auth/token

    Authorization: Bearer <seu-token>

  2. Chamada

    GETListar mediações

    /resource/mediations

    Obtenha o mediationId

Esta chamada

GETConsultar mediação

/resource/mediations/{mediationId}

Respostas possíveis

  • 200Mediação encontrada

    Acompanhe status e anexos

  • 401Token ausente ou expirado

    Emita outro token e repita uma única vez

  • 403Credencial sem a permissão exigida

    Não repita; leia o detail e peça o acesso

  • 404Mediação inexistente ou fora do alcance

    Confira o identificador

BearerRequer autenticação Bearer
mediationIdstringcaminhoobrigatório
<mediationId>
1{
2 "error": false,
3 "message": "<message>",
4 "data": {
5 "mediation": {
6 "id": "<id>",
7 "infractionId": "<infraction-id>",
8 "defense": "<defense>",
9 "attachments": [
10 "<attachments>"
11 ],
12 "status": "<status>",
13 "createdAt": "<created-at>",
14 "updatedAt": "<updated-at>"
15 },
16 "infraction": {
17 "id": "<id>",
18 "transactionId": "<transaction-id>",
19 "externalId": "<external-id>",
20 "walletId": "<wallet-id>",
21 "accountId": "<account-id>",
22 "organizationId": "<organization-id>",
23 "settlementAgentCode": "<settlement-agent-code>",
24 "status": "<status>",
25 "type": "<type>",
26 "amount": 1,
27 "createdAt": "<created-at>",
28 "updatedAt": "<updated-at>"
29 }
30 },
31 "pagination": null
32}

Campos da resposta

errorbooleanopcional
false
messagestringopcional
<message>
dataobjectopcional
<data>
mediationobjectopcional
<mediation>
idstring (uuid)opcional
<id>
infractionIdstring (uuid)opcional
<infractionId>
defensestringopcional
<defense>
attachmentsarrayopcional
<attachments>
statusstringopcional
<status>
createdAtstring (date-time)opcional
<createdAt>
updatedAtstring (date-time)opcional
<updatedAt>
infractionobjectopcional
<infraction>
idstring (uuid)opcional
<id>
transactionIdstring (uuid)opcional
<transactionId>
externalIdstringopcional
<externalId>
walletIdstringopcional
<walletId>
accountIdstringopcional
<accountId>
organizationIdstringopcional
<organizationId>
settlementAgentCodestringopcional
<settlementAgentCode>
statusstringopcional
<status>
typestringopcional
<type>
amountnumberopcional

Valor em reais.

<amount>
createdAtstring (date-time)opcional
<createdAt>
updatedAtstring (date-time)opcional
<updatedAt>
paginationobjectopcional
<pagination>
Credenciais

Requisição

1curl --request GET \
2 --url 'https://api.monkeypay.app/api/v2/resource/mediations/{mediationId}' \
3 --header 'Content-Type: application/json' \
4 --header 'Authorization: Bearer <seu-token>'

Resposta

1{
2 "error": false,
3 "message": "<message>",
4 "data": {
5 "mediation": {
6 "id": "<id>",
7 "infractionId": "<infraction-id>",
8 "defense": "<defense>",
9 "attachments": [
10 "<attachments>"
11 ],
12 "status": "<status>",
13 "createdAt": "<created-at>",
14 "updatedAt": "<updated-at>"
15 },
16 "infraction": {
17 "id": "<id>",
18 "transactionId": "<transaction-id>",
19 "externalId": "<external-id>",
20 "walletId": "<wallet-id>",
21 "accountId": "<account-id>",
22 "organizationId": "<organization-id>",
23 "settlementAgentCode": "<settlement-agent-code>",
24 "status": "<status>",
25 "type": "<type>",
26 "amount": 1,
27 "createdAt": "<created-at>",
28 "updatedAt": "<updated-at>"
29 }
30 },
31 "pagination": null
32}