Skip to main content
POST
/
v1
/
med
/
fraud-markers
Register a MED fraud marker
curl --request POST \
  --url https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cpfCnpj": "<string>",
  "idempotencyKey": "<string>",
  "tpFraude": 123,
  "tpPessoa": 123,
  "chave": "<string>"
}
'
import requests

url = "https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers"

payload = {
"cpfCnpj": "<string>",
"idempotencyKey": "<string>",
"tpFraude": 123,
"tpPessoa": 123,
"chave": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cpfCnpj: '<string>',
idempotencyKey: '<string>',
tpFraude: 123,
tpPessoa: 123,
chave: '<string>'
})
};

fetch('https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cpfCnpj' => '<string>',
'idempotencyKey' => '<string>',
'tpFraude' => 123,
'tpPessoa' => 123,
'chave' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers"

payload := strings.NewReader("{\n \"cpfCnpj\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"tpFraude\": 123,\n \"tpPessoa\": 123,\n \"chave\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cpfCnpj\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"tpFraude\": 123,\n \"tpPessoa\": 123,\n \"chave\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-direct.api.lerian.net/v1/med/fraud-markers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cpfCnpj\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"tpFraude\": 123,\n \"tpPessoa\": 123,\n \"chave\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "cpfCnpj": "<string>",
  "dtHrCriacao": "<string>",
  "dtHrUltModificacao": "<string>",
  "idMarcacaoFraude": "<string>",
  "ispb": "<string>",
  "status": 123,
  "statusDescription": "<string>",
  "tpFraude": 123,
  "tpFraudeDescription": "<string>",
  "tpPessoa": 123,
  "tpPessoaDescription": "<string>",
  "chave": "<string>",
  "idRelatoInfracao": "<string>",
  "ispbRelatoInfracao": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Obtain token from /v1/login/oauth/access_token endpoint using client credentials (clientId and clientSecret).

Include token in Authorization header: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Token expires after 3600 seconds (1 hour).

Body

application/json
cpfCnpj
string
required

The flagged document.

idempotencyKey
string
required

Business-derived idempotency key (Chave-Idempotencia).

tpFraude
integer<int64>
required

Fraud-type code on create (0=Falsidade ideologica, 1=Conta laranja, 2=Conta do fraudador, 3=Outra; 4 Desconhecida is read-only).

tpPessoa
integer<int64>
required

Person-type code (0=Pessoa Fisica, 1=Pessoa Juridica).

chave
string

The flagged Pix key, if known.

Response

Accepted

cpfCnpj
string
required

The flagged document.

dtHrCriacao
string
required

Upstream creation timestamp (RFC 3339 UTC).

dtHrUltModificacao
string
required

Upstream last-modification timestamp (RFC 3339 UTC) — the watermark.

idMarcacaoFraude
string
required

Fraud-marker GUID (the natural key).

ispb
string
required

ISPB of the creator PSP.

status
integer<int64>
required

stMarcacaoFraude lifecycle code (0=Registrada, 1=Cancelada).

statusDescription
string
required

Human-readable stMarcacaoFraude label.

tpFraude
integer<int64>
required

Fraud-type code (0..4; 4=Desconhecida is read-only).

tpFraudeDescription
string
required

Human-readable tpFraude label.

tpPessoa
integer<int64>
required

Person-type code (0=Pessoa Fisica, 1=Pessoa Juridica).

tpPessoaDescription
string
required

Human-readable tpPessoa label.

chave
string

The flagged Pix key, when known.

idRelatoInfracao
string

Linked infraction GUID, when the marker was auto-created from a closed infraction.

ispbRelatoInfracao
string

Linked infraction's PSP ISPB, when infraction-originated.