Consulting Monthly Request Consumption
In this endpoint, you can check the number of requests made per month. You must send the x_api_token
header with the token or pass the token via query string in the URL.
You can also pass the token as a parameter in the URL, example:
https://comercial.cnpj.ws/consumo?token=YOUR_TOKEN
Method: GET
Endpoint: https://comercial.cnpj.ws/consumo
Request Example
We have a package that can help you integrate with JavaScript:
yarn add consultar-cnpj
const consultarCNPJ = require("consultar-cnpj");
async function getCNPJ() {
const token = "INFORME O SEU TOKEN DE ACESSO";
const consumo = await consultarCNPJ.consumo(token);
console.log(consumo);
}
Return Example
Below is an example of the JSON returned:
{
"filtros_disponiveis": ["ano", "mes"],
"filtros_aplicados": {},
"ordenacao": ["ano", "mes"],
"data": [
{
"mes": 9,
"ano": 2021,
"quantidade": 1,
"atualizado_em": "2021-09-29T20:41:55.144Z",
"cnpjws_usuario_id": "d046b852-XXXX-XXXX-XXXX-8dccdf11d417"
}
]
}
Last updated
Was this helpful?