Infrações e MED

Listar infrações MED

Lista infrações da organização do token e das suborganizações vinculadas. Exige monkeypay:infractions:read; mediations=true também exige monkeypay:mediations:read. O filtro organizationId só aceita uma organização dentro desse alcance.

GEThttps://api.monkeypay.app/api/v2/resource/infractionsBearer

Antes de chamar

  1. Chamada

    POSTEmitir token bearer

    /resource/auth/token

    Authorization: Bearer <seu-token>

  2. Você

    Tenha permissão de leitura de infrações

    monkeypay:infractions:read

Esta chamada

GETListar infrações

/resource/infractions

Respostas possíveis

Depois do sucesso

  1. Chamada

    GETConsultar infração

    /resource/infractions/{infractionId}

    Consulte os dados de um caso

BearerRequer autenticação Bearer
pageintegerqueryopcional
Intervalo1 ≤ valor
1
limitintegerqueryopcional
Intervalo1 ≤ valor ≤ 100
10
organizationIdstringqueryopcional

Organização dentro do alcance do token.

<organizationId>
walletIdstringqueryopcional
<walletId>
mediationsbooleanqueryopcional

Inclui as mediações vinculadas às infrações. Exige monkeypay:mediations:read.

false
1{
2 "error": false,
3 "message": "<message>",
4 "data": [
5 {
6 "id": "<id>",
7 "status": "<status>",
8 "type": "<type>",
9 "amount": 1,
10 "reason": "<reason>",
11 "reportedBy": "<reported-by>",
12 "analysisResult": "<analysis-result>",
13 "analysisDetails": "<analysis-details>",
14 "endToEnd": "<end-to-end>",
15 "externalId": "<external-id>",
16 "createdAt": "<created-at>",
17 "mediations": [
18 {
19 "id": "<id>",
20 "infractionId": "<infraction-id>",
21 "defense": "<defense>",
22 "attachments": [
23 "<attachments>"
24 ],
25 "status": "<status>",
26 "createdAt": "<created-at>",
27 "updatedAt": "<updated-at>"
28 }
29 ]
30 }
31 ],
32 "pagination": {
33 "page": 1,
34 "limit": 1,
35 "total": 1,
36 "totalPages": 1
37 }
38}

Campos da resposta

errorbooleanopcional
false
messagestringopcional
<message>
dataarrayopcional
<data>
idstring (uuid)opcional
<id>
statusstringopcional
<status>
typestringopcional
<type>
amountnumberopcional

Valor em reais.

<amount>
reasonstringopcional
<reason>
reportedBystringopcional
<reportedBy>
analysisResultstringopcional
<analysisResult>
analysisDetailsstringopcional
<analysisDetails>
endToEndstringopcional
<endToEnd>
externalIdstringopcional
<externalId>
createdAtstring (date-time)opcional
<createdAt>
mediationsarrayopcional
<mediations>
idstring (uuid)opcional
<id>
infractionIdstring (uuid)opcional
<infractionId>
defensestringopcional
<defense>
attachmentsarrayopcional
<attachments>
statusstringopcional
<status>
createdAtstring (date-time)opcional
<createdAt>
updatedAtstring (date-time)opcional
<updatedAt>
paginationobjectopcional
<pagination>
pageintegeropcional
<page>
limitintegeropcional
<limit>
totalintegeropcional
<total>
totalPagesintegeropcional
<totalPages>
Credenciais

Requisição

1curl --request GET \
2 --url 'https://api.monkeypay.app/api/v2/resource/infractions?page=1&limit=10&mediations=false' \
3 --header 'Content-Type: application/json' \
4 --header 'Authorization: Bearer <seu-token>'

Resposta

1{
2 "error": false,
3 "message": "<message>",
4 "data": [
5 {
6 "id": "<id>",
7 "status": "<status>",
8 "type": "<type>",
9 "amount": 1,
10 "reason": "<reason>",
11 "reportedBy": "<reported-by>",
12 "analysisResult": "<analysis-result>",
13 "analysisDetails": "<analysis-details>",
14 "endToEnd": "<end-to-end>",
15 "externalId": "<external-id>",
16 "createdAt": "<created-at>",
17 "mediations": [
18 {
19 "id": "<id>",
20 "infractionId": "<infraction-id>",
21 "defense": "<defense>",
22 "attachments": [
23 "<attachments>"
24 ],
25 "status": "<status>",
26 "createdAt": "<created-at>",
27 "updatedAt": "<updated-at>"
28 }
29 ]
30 }
31 ],
32 "pagination": {
33 "page": 1,
34 "limit": 1,
35 "total": 1,
36 "totalPages": 1
37 }
38}