Alerts by CNPJ
create_alerts_by_cnpjAlerts for new procurements by the company CNPJ (requires the token edm_…): the activities (CNAE) become families of terms, and there is one alert per family, main first, up to max_familias. A CNAE outside the dictionary is listed in the response with a null family. Two modes. By termos: a space requires all groups; | accepts alternatives within a group. By cnpj: known activity families produce alerts, up to max_familias. Unmapped activities remain in the response without an alert. The cron checks every 30 minutes. Email requires an account session and EMAIL_ALERTAS=1. It uses explicit recipients or the verified account email.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uf | No | State (UF) abbreviation (optional). | |
| cnpj | Yes | CNPJ with 14 digits, with or without punctuation. | |
| nome | No | Alert name, up to 100 characters. | |
| canal | No | pull, webhook or email (default pull). | pull |
| destino | No | HTTPS webhook URL. Ignored for pull and email. | |
| filtros | No | Extra filter: modalities, municipalities, exclusions, values, open proposals and CNAEs. PATCH replaces the whole filter; {} clears it. | |
| max_familias | No | 1 to 8 (default 8): how many families become alerts. | |
| destinatarios | No | Email recipients: `para`, `cc` and `bcc` arrays. Up to 10 distinct addresses in total. An empty `para` list uses the account email. PATCH replaces all three lists. BCC is hidden from other recipients. | |
| organizacao_id | No | Organization from `GET /api/me/empresas`. Membership and MFA are checked. Null removes the label. This does not share alert ownership. |