Create a consultation
Accepts a restriction consultation for one CPF or CNPJ and returns 202 with the consultation id. The consultation starts as pending, which is a normal state. Read the outcome with GET /v1/src/consultations/{id} or from the events.
Lerian SRC validates the request before it accepts it, and a refused request sends nothing to BACEN. X-Idempotency is required. Idempotency describes the replay rules and how long Lerian SRC keeps a key.
Autorizações
Cabeçalhos
REQUIRED client-supplied idempotency key (1..255 chars). Its absence returns 400 with code SRC-0001. Idempotency describes the replay rules and how long Lerian SRC keeps a key.
1 - 255Corpo
CPF (11 numeric digits) or CNPJ (14 characters: 12 alphanumeric [0-9A-Z] positions plus 2 numeric check digits), unmasked. The alphanumeric CNPJ is the official BACEN class [0-9]{11}|[0-9A-Z]{12}[0-9]{2}. Check digits are validated before acceptance.
^([0-9]{11}|[0-9A-Z]{12}[0-9]{2})$"52998224725"
The id of the company (CNPJ) consultation that this holder or representative belongs to: the id that the company's own request returned with its 202. Required when subjectRole is holder or representative (422 SRC-0006 when absent). Refused for individual and company (422 SRC-0007 when present). It must name a CNPJ consultation of this deployment, in any status, so you can send both requests at the same time. Otherwise the request returns 422 SRC-0008.
"8f14e45f-ceea-467a-9a36-dedd4bea2543"
The role the consulted document plays: individual | company | holder | representative. OPTIONAL — absent, it is inferred from documentType (CPF → individual, CNPJ → company). Unknown value returns 422 SRC-0004; a role the document type does not admit returns 422 SRC-0005. Declaring the inferred role explicitly does NOT change the idempotency fingerprint.
"representative"
Resposta
Accepted

