Create and manage CNPJ lists
How to create CNPJ lists on CNPJá from a search, by pasting CNPJs or uploading a file, add and remove entries, and use a list as a search filter.
A list keeps a fixed set of the organization’s CNPJs, built from a search, by pasting CNPJs or by loading a file, to use as a search filter or export to a spreadsheet. Lists live in the CNPJ app, in the Lists group of the sidebar, and all of them appear under Lists > View all.
What a list is
A list is static: it keeps the establishments themselves, not the criteria that picked them. It only changes when someone in the organization adds or removes CNPJs, and it does not follow the registry: an establishment that no longer matches the original search stays in the list. The data shown for each establishment, on the other hand, comes from the registry CNPJá keeps at the time you open the list, not from a copy made when it joined the list.
To keep a search whose results follow the registry, use a view, which is dynamic.
Who can use it
Lists belong to the organization. Any member, in any role, creates, uses, changes, exports and deletes the lists of the organization in use, and everyone sees the same lists, as the permissions matrix shows. Without an organization, the Lists group does not appear in the sidebar, and without an account the addresses of lists lead back to Search CNPJ, as Guests, accounts and organizations explains. A link to a deleted list, or to one from another organization, opens List not found.
Create from a search
- In Search CNPJ, or in a view, apply the search and filters that describe the establishments.
- Click Save as list, at the top of the page.
- Name the list in the Name field.
- Click Save.
The list keeps every establishment that matches the search, not only the ones on the page on screen, as a snapshot of that moment: the dialog shows the count and the time the snapshot is taken. When the search goes past the limit of a list, the dialog warns that only the first ones will be saved. Once saved, the list opens on its own page, except on a view with unsaved changes, where you stay on the view and the notice carries Open list, as Open and change explains.
With a search that has no results, Save as list is dimmed and its tooltip says No establishments to save.
Export also saves the search as a new list, when the export is sent, with no need for Save as list first, and, on a list’s page, Export is how the filtered establishments become a new list, as Export to a spreadsheet explains.
Create by pasting CNPJs or with a file
- Click Create list, at the top of the Lists page, or the + next to Lists in the sidebar.
- In the Create a list dialog, fill in the Name.
- Type or paste the CNPJs in the CNPJs field, or click Load file to read an Excel, CSV or text file.
- Click Create list.
The field highlights valid CNPJs, points out invalid ones and counts repeats only once. Only valid CNPJs go into the list. Separators, file formats and leading zeros are covered in Import CNPJs.
Work inside a list
The list’s page, opened from the sidebar or from the Lists table, shows its establishments in the same table as Search CNPJ. At the top, on wide screens, the count says how many establishments are shown and, when that number differs from the list size, how many the list holds in total. The difference comes from the filters applied or from valid CNPJs not yet in CNPJá’s data: they count in the list but only show in the table once they enter the search index, as When a new CNPJ appears explains.
- Search and filters: the Search a CNPJ, name or address field and the filter band work as in the search, but only among the list’s establishments. The filters applied stay in the page address.
- Record: click the CNPJ on a row to open the establishment’s record.
- Export: with no search or filter on screen, Export makes a spreadsheet of the whole list, and, when the search or the filters leave part of the list out, the window first asks What to export, as Export to a spreadsheet explains.
The Lists page gathers every list of the organization, with the Search lists field, which searches by name:
| Column | What it shows |
|---|---|
| Name | The list name and, under it, the creation date |
| Establishments | How many CNPJs the list holds, with a bar showing how full it is |
| Updated | How long ago the list last changed; hover to see the date and time |
| Exported | The progress of the export under way, or the date of the latest ready spreadsheet, which leads to the list’s exports |
On narrow screens, the columns on the right drop out, and the count and the export progress move under the name.
Add and remove CNPJs
To add:
- On the list’s page, click Add CNPJs.
- Type, paste or load from a file the CNPJs in the CNPJs field.
- Check the List capacity meter, which adds the CNPJs read to the list’s current size.
- Click Add.
CNPJs already in the list do not go in twice. A list at the limit opens the dialog with the This list is full warning and takes no more CNPJs until you remove some.
To remove:
- Tick the box on the left of each establishment. The box in the header ticks every row of the page.
- In the bar that appears at the foot of the table, click Remove, followed by the number ticked.
- Confirm in the dialog, which repeats the list name and the number.
Removed establishments only leave the list: they stay in the registry and can be added again at any time. Clear selection unticks everything, and moving to another page or filter clears the selection too.
Use a list as a filter
In Search CNPJ, a list becomes a filter like any other:
- Open the Filters menu and pick List, in the Lists group.
- Choose one or more of the organization’s lists.
- Keep Include to search only the establishments in the lists, or switch to Exclude to leave them out.
The filter combines with the others. With Include, you search within your customer base; with Exclude, you prospect only those not in it yet. The filter can also be kept in a view. It is only offered to members of the organization, and a link carrying it, opened without an account, runs the search without it. How to include and exclude values is covered in Search filters.
Rename and delete
Both commands sit in the actions column of the Lists page, at the end of each row.
To rename:
- Click the pencil, Rename list.
- Type the new name in the Name field, under Current name.
- Click Rename.
To delete:
- Click the trash can, Delete list.
- Check the name and the number of establishments in the Delete this list? dialog.
- Click Delete list.
Important: deleting a list cannot be undone. Its establishments leave the list, its exports are deleted along with their spreadsheets, and views and searches filtered by it stop working. Before deleting, check whether any of the organization’s views uses the List filter.
List locked during an export
While an export of the list is queued or running, the list’s CNPJs cannot change, neither in the app nor through the API: the export reads the list as it was when requested. In the app, the list can’t be deleted during that time either. Renaming still works, in the app and through the API. In the app, during that time:
- Add CNPJs shows a lock in place of the +;
- the rows’ checkboxes do not tick;
- Delete list is dimmed on the Lists page.
When you press one of these commands, the app tells you why: Export in progress and CNPJs can’t be added or removed, nor the list deleted, until the export finishes. The lock ends on its own once the export is ready, and meanwhile you can keep searching, filtering and downloading earlier spreadsheets. The progress shows on the list’s own page, as Export to a spreadsheet explains.
Limits
A list holds a maximum number of CNPJs, and each organization a maximum number of lists. The current values are in Usage limits, under Lists, exports and bulk and Organization.
In the API
Lists are the same in the app and in the API: a list created here can be used by the organization’s API keys as a Search CNPJ filter and changed by them, and the other way around. The operations are in CNPJ search and lists.