Postman
Postman is an HTTP client for testing APIs. Our collection gathers, already assembled, the requests of every endpoint documented here: you import the file, fill in your API key and fire the first call.
⬇️ Download
What comes in the collection
There are 24 requests, organized in the same folders as the menu of this documentation. The folder and request names come in Portuguese, exactly as they appear in the file:
| Folder | Requests |
|---|---|
| Começando | Token JWT |
| Identidades | Classificador, OCR por Face (Non-Doc) |
| OCR | Full OCR, Comprovante de Residência, Full OCR + Datavalid |
| Biometria | Liveness, Face Match for Liveness, Face, Face Match, Face Match + Datavalid, Face Validation |
| Dados | Bureau PF, Bureau PF Online, Endereços da PF, Background Check PF, Background Check PJ, Listas Restritivas, Processos, Sumário de Processos, Sintegra, QSA CNPJ, E-Social |
Each request brings a short description, the link to the corresponding reference page and the optional parameters already written out and switched off — just enable the ones you want to use.
The warnings came along
The traps documented on the reference pages are repeated in the descriptions of the requests: routes where omitting the version hands the call over to a legacy version and the /lawsuits/v2 filters that do not reach the provider.
How to import
- In Postman, click Import, at the top left of the sidebar.
- Drag the
nextcode-apis.postman_collection.jsonfile into the window, or click files and select the file you downloaded. - Confirm with Import.
The Nextcode APIs collection shows up in the sidebar, with the five folders.
How to set the variables
The collection uses variables so that neither the environment nor the key has to be repeated in every request.
- Right-click the Nextcode APIs collection and choose Edit.
- Open the Variables tab.
- Fill in the Current value column:
| Variable | Value |
|---|---|
baseUrl | https://api-homolog.nxcd.app (staging) or https://api.nxcd.app (production) |
apiKey | Your API key |
livenessRequestId | The id returned by Liveness — it is only used by Face Match for Liveness |
When you are done, click Save.
baseUrl comes prefilled with the staging environment. Both environments are described in Authentication and environments.
🚧 The API key is sensitive information
The Current value of a variable is not exported when you share the collection, and that is where your key belongs. Do not put it in Initial value, which travels along in the export.
Authentication
Authentication is configured at the collection level, in the Authorization tab, as API Key:
Authorization: ApiKey {{apiKey}}Every request inherits that configuration — none of them needs an authentication header of its own.
Endpoints with file upload
The OCR and biometrics endpoints take the files as multipart/form-data. In the collection, those fields already exist in the body of the request, but empty: the file comes from your computer and Postman has no way of picking it for you.
- Open the request and go to the Body tab, with form-data selected.
- On the row of the field (
file, orfrenteandverso, ordocumentoandselfie), click Select Files and choose the image or the PDF. - Send it.
The name of the field is up to you — it comes back in the response, in metadata.filesInfo, and it is how you tell which file is which. The limits on format, quantity and size are in Sending files and on each endpoint's page.
Face Match and Face Match + Datavalid need two files
Those two endpoints require exactly 2 files per call. Fill in both fields, documento and selfie, before sending.
Sample data
The CPF 12345678909 and the CNPJ 11222333000181 used in the requests are synthetic: they pass the check-digit validation and belong to no real person or company. Replace them with the documents you want to look up.
Other tools
The same file is imported natively by Insomnia and by Bruno.