Follow a CNPJ batch
GET/v1/cnpj/batch/{id}
Returns the CNPJ batch progress and, once it finishes, the paginated results. Only the account that created the batch can read it.
Parameters
- idstringrequired
- In the path. The
batch_idreturned byPOST /v1/cnpj/batch. - pagenumber
- In the query. Results page, starting at 1. Default: 1.
- per_pagenumber
- In the query. Items per page, from 1 to 500. Default: 100.
- statusstring
- In the query. Filters by
found,not_found,invalid,errororinsufficient_credits.
Free.
- Results only appear when the batch finishes (status
completed). Before that, the response carries progress only. - Invalid parameter values answer 400 with the code
INVALID_QUERY. A missing, CPF or expired batch answers 404 withBATCH_NOT_FOUND.
Items in results
- indexnumber
- Position of the item in the list you sent, starting at 0.
- cnpjstring
- Sanitized CNPJ (no punctuation).
- statusstring
- Item result (same table as the CPF batch).
- codenumber
- HTTP code equivalent to the item.
- messagestring
- Explanation, when the item was not found, is invalid or failed.
- dataobject
- Company data, the same as the single lookup (without
credits_remaining). Present when the status isfound.
Status of each item
| found | 200 | Found. Charges 1 credit. |
| not_found | 404 | Valid CPF but no record. Not charged. |
| invalid | 400 / 422 | Invalid format or check digit. Not charged. |
| insufficient_credits | 402 | The balance ran out before this item. Not charged. |
| error | 503 | Temporary provider failure. Not charged. Resend this item. |
cURL
1curl https://api.brazid.com/v1/cnpj/batch/5d8a2c71-3e94-4b60-a1f7-92c0b4e6d318?per_page=100 \2 -H "x-api-key: $BRAZID_API_KEY"
1const res = await fetch('https://api.brazid.com/v1/cnpj/batch/5d8a2c71-3e94-4b60-a1f7-92c0b4e6d318?per_page=100', {2 headers: { 'x-api-key': process.env.BRAZID_API_KEY },3});4 5const data = await res.json();6console.log(res.status, data);
1import os2import requests3 4res = requests.get(5 "https://api.brazid.com/v1/cnpj/batch/5d8a2c71-3e94-4b60-a1f7-92c0b4e6d318?per_page=100",6 headers={"x-api-key": os.environ["BRAZID_API_KEY"]},7)8 9print(res.status_code, res.json())
1$ch = curl_init("https://api.brazid.com/v1/cnpj/batch/5d8a2c71-3e94-4b60-a1f7-92c0b4e6d318?per_page=100");2curl_setopt_array($ch, [3 CURLOPT_RETURNTRANSFER => true,4 CURLOPT_HTTPHEADER => ["x-api-key: " . getenv("BRAZID_API_KEY")],5]);6 7$data = json_decode(curl_exec($ch), true);8$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
200 OK
1{2 "success": true,3 "batch_id": "5d8a2c71-3e94-4b60-a1f7-92c0b4e6d318",4 "status": "completed",5 "total": 2,6 "processed": 2,7 "progress_percent": 100,8 "summary": {9 "found": 1,10 "not_found": 1,11 "invalid": 0,12 "errors": 0,13 "insufficient_credits": 014 },15 "created_at": "2026-10-25T14:02:11.000Z",16 "completed_at": "2026-10-25T14:02:12.000Z",17 "results": [18 {19 "index": 0,20 "cnpj": "12345678000195",21 "status": "found",22 "code": 200,23 "data": {24 "cnpj": "12345678000195",25 "legal_name": "EMPRESA EXEMPLO TECNOLOGIA LTDA",26 "trade_name": "EXEMPLO TECH",27 "status": "ATIVA",28 "status_date": "2020-03-15",29 "opening_date": "2020-03-15",30 "main_cnae": {31 "code": "6201501",32 "text": "Desenvolvimento de programas de computador sob encomenda"33 },34 "address": {35 "city": "SAO PAULO",36 "state": "SP"37 }38 }39 },40 {41 "index": 1,42 "cnpj": "11222333000181",43 "status": "not_found",44 "code": 404,45 "message": "CNPJ not found"46 }47 ],48 "pagination": {49 "page": 1,50 "per_page": 100,51 "total_results": 2,52 "total_pages": 153 }54}