Skip to content

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_id returned by POST /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, error or insufficient_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 with BATCH_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 is found.

Status of each item

found200Found. Charges 1 credit.
not_found404Valid CPF but no record. Not charged.
invalid400 / 422Invalid format or check digit. Not charged.
insufficient_credits402The balance ran out before this item. Not charged.
error503Temporary 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"

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}