## DER / SP / DARE
Consulta Documento de Arrecadação de Receitas Estaduais (DARE) no Departamento de Estradas de Rodagem do Estado de São Paulo (DER/SP).


### Site URL
- http://www.edare.der.sp.gov.br/der_edare_web/pages/DER_eDARE/DARE.aspx

### Request
POST endpoint: `https://api.infosimples.com/api/v2/consultas/der/sp/dare`



| Parameter | Description                                                                                                |
| --------- | ---------------------------------------------------------------------------------------------------------- |
| token*    | The token that will authenticate and authorize the request.                                                |
| cnpj*     | CNPJ of the company to be queried.                                                                         |
| ait**     | Informar o AIT para retornar o DARE desejado. Caso não seja informado será retornado o primeiro resultado. |

> * Required parameter.

> ** Optional parameter. Sometimes it is necessary to set at least one of the optional parameters for the service to work properly.


### Response examples (OK)
```json
{
  "code": 200,
  "code_message": "A requisição foi processada com sucesso.",
  "errors": [],
  "header": {
    "api_version": "v2",
    "api_version_full": "2.2.29-20250814131715",
    "product": "Consultas",
    "service": "der/sp/dare",
    "parameters": {
      "cnpj": "12.345.678/9012-34"
    },
    "client_name": "Minha Empresa",
    "token_name": "Token de Produção",
    "billable": true,
    "price": "0.2",
    "requested_at": "2025-08-15T09:03:06.000-03:00",
    "elapsed_time_in_milliseconds": 150,
    "remote_ip": "111.111.111.111",
    "signature": "U2FsdGVkX184AB42Q7RmeWChro/J3h4Wi8k/wl37aUO0VumxhZ/Ov9IArT76+4TfPo9zTOU/qyn2PB9+RNCaRg=="
  },
  "data_count": 1,
  "data": [
    {
      "dare": {
        "placa": "AAA1111",
        "auto_infracao": "ABC1111111",
        "cpf": "123.456.789-01",
        "cnpj": "12.345.678/9012-34",
        "nome": "Exemplo de Nome",
        "numero_dare": "111111111111111",
        "situacao": {
          "status": "Ativa",
          "envio_fazenda": "06/07/2021",
          "retorno_fazenda": "06/07/2021",
          "emissao": "06/07/2021",
          "vencimento": "30/07/2021",
          "valor": "700,00",
          "normalizado_valor": 700.0,
          "valor_desconto": "700,00",
          "normalizado_valor_desconto": 700.0,
          "acrescimo_financeiro": "0,00",
          "normalizado_acrescimo_financeiro": 0.0,
          "juros_mora": "0,00",
          "normalizado_juros_mora": 0.0,
          "honorarios_advocaticios": "0,00",
          "normalizado_honorarios_advocaticios": 0.0,
          "multa_mora": "0,00",
          "normalizado_multa_mora": 0.0,
          "valor_total": "700,00",
          "normalizado_valor_total": 700.0,
          "pagamento": "Não consta",
          "valor_pago": "0,00",
          "normalizado_valor_pago": 0.0,
          "tipo_dare": "ProdutosPerigosos"
        },
        "boleto": {
          "nome/razao_social": "Exemplo de Nome",
          "endereco": "Avenida Paulista, 1636. São Paulo. SP. Brasil.",
          "cnpj": "12.345.678/9012-34",
          "normalizado_cnpj": "12345678901234",
          "cpf": "123.456.789-01",
          "normalizado_cpf": "12345678901",
          "telefone": "(11) 1111-1111",
          "vencimento": "01/09/2025",
          "observacao": "Exemplo de Texto",
          "emissao": "15/08/2025",
          "numero_documento_detalhe": "111111111111111-1111",
          "codigo_receita_descricao": "Multa por infração à legislação (DER - SEGMENTO 5)",
          "codigo_servico_descricao": "DER - 2800003 - Cobrança Multas Produtos Perigosos (PP)",
          "inscricao_estadual": "",
          "referencia": "",
          "numero_aiim": "",
          "valor_total": "700,00",
          "normalizado_valor_total": 700.0,
          "codigo_barras": "123456789012345678901234567890123456789012345678",
          "normalizado_codigo_barras": "111111111111111111111111111111111111111111111111",
          "pdf_url": "https://www.exemplo.com/exemplo-de-url"
        }
      },
      "lista_dares": [
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "30/07/2021",
          "valor_total": "700",
          "normalizado_valor_total": 700.0,
          "pagamento": "",
          "valor_pago": "",
          "normalizado_valor_pago": ""
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "22/04/2021",
          "valor_total": "1000",
          "normalizado_valor_total": 1000.0,
          "pagamento": "",
          "valor_pago": "",
          "normalizado_valor_pago": ""
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "22/04/2021",
          "valor_total": "1000",
          "normalizado_valor_total": 1000.0,
          "pagamento": "",
          "valor_pago": "",
          "normalizado_valor_pago": ""
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "11/02/2025",
          "valor_total": "1400",
          "normalizado_valor_total": 1400.0,
          "pagamento": "11/02/2025",
          "valor_pago": "1400",
          "normalizado_valor_pago": 1400.0
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "12/02/2025",
          "valor_total": "1400",
          "normalizado_valor_total": 1400.0,
          "pagamento": "12/02/2025",
          "valor_pago": "1400",
          "normalizado_valor_pago": 1400.0
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "12/02/2025",
          "valor_total": "1000",
          "normalizado_valor_total": 1000.0,
          "pagamento": "12/02/2025",
          "valor_pago": "1000",
          "normalizado_valor_pago": 1000.0
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "04/12/2024",
          "valor_total": "1400",
          "normalizado_valor_total": 1400.0,
          "pagamento": "04/12/2024",
          "valor_pago": "1400",
          "normalizado_valor_pago": 1400.0
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "09/12/2024",
          "valor_total": "600",
          "normalizado_valor_total": 600.0,
          "pagamento": "",
          "valor_pago": "",
          "normalizado_valor_pago": ""
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "17/02/2025",
          "valor_total": "1000",
          "normalizado_valor_total": 1000.0,
          "pagamento": "",
          "valor_pago": "",
          "normalizado_valor_pago": ""
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "Produtos Perigosos",
          "vencimento": "09/12/2024",
          "valor_total": "1000",
          "normalizado_valor_total": 1000.0,
          "pagamento": "",
          "valor_pago": "",
          "normalizado_valor_pago": ""
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "3",
          "vencimento": "4",
          "valor_total": "5",
          "normalizado_valor_total": 5.0,
          "pagamento": "6",
          "valor_pago": "7",
          "normalizado_valor_pago": 7.0
        },
        {
          "ait": "A123456789",
          "dare": "111111111111111",
          "placa": "AAA1111",
          "tipo": "4",
          "vencimento": "5",
          "valor_total": "6",
          "normalizado_valor_total": 6.0,
          "pagamento": "7",
          "valor_pago": "8",
          "normalizado_valor_pago": 8.0
        }
      ],
      "site_receipt": "https://www.exemplo.com/exemplo-de-url"
    }
  ],
  "site_receipts": [
    "https://www.exemplo.com/exemplo-de-url"
  ]
}
```


### Preview file

The preview file (`site_receipts`) in the response JSON is **generated by the source (website/app)** that processed the automation.

### Code snippets


#### Python
```python
# Tested with: Python 3.10.19, Python 3.14.0
import requests

url = 'https://api.infosimples.com/api/v2/consultas/der/sp/dare'
args = {
  "cnpj":    "VALUE_OF_PARAMETER_CNPJ",
  "ait":     "VALUE_OF_PARAMETER_AIT",
  "token":   "WRITE_YOUR_TOKEN_HERE",
  "timeout": "300"
}

response = requests.post(url, args)
response_json = response.json()
response.close()

if response_json['code'] == 200:
  print("Retorno com sucesso: ", response_json['data'])
elif response_json['code'] in range(600, 799):
  mensagem = "Resultado sem sucesso. Leia para saber mais: \n"
  mensagem += "Código: {} ({})\n".format(response_json['code'], response_json['code_message'])
  mensagem += "; ".join(response_json['errors'])
  print(mensagem)

print("Cabeçalho da consulta: ", response_json['header'])
print("URLs com arquivos de visualização (HTML/PDF): ", response_json['site_receipts'])
```


## We are here to help
Do you still need to figure something out? Reach us at [suporte@infosimples.com.br](mailto:suporte@infosimples.com.br) and our highly qualified support team will be happy to help.
