> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.datalbus.com.br/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.datalbus.com.br/_mcp/server.

# Falhas (DTC)

GET https://datalbus.com.br:8000/api/v2/reports/faults

Lista as falhas (DTC) registradas em um dia.

Retorna o dia completo em um único array (sem paginação).

**Cabeçalho obrigatório:** `Time-Zone` (fuso IANA). Ele define o dia consultado e os horários da resposta.

**Resposta 200** (array). Cada item:

| Campo | Tipo | Nulo | Descrição |
| --- | --- | --- | --- |
| `group_descr` | string | sim | Grupo / garagem do veículo |
| `asset_description` | string | sim | Prefixo do veículo |
| `abbrev` | string | sim | Sigla do módulo |
| `time` | string `YYYY-MM-DD HH:MM:SS` | não | Horário da falha |
| `cambio` | string | sim | Transmissão (`fabricante - nome - tipo`) |
| `coordinates` | string | sim | Posição em formato PostGIS (EWKB hexadecimal) |
| `module_abbr` | string | sim | Nome do módulo (ECU) |
| `fault_descr` | string | sim | Descrição da falha (ou o código, quando não há descrição) |
| `Duration` | string | sim | Duração informada pelo equipamento |
| `FailureStorage` | string | sim | Estado da falha: `Active` ou `Historic` |

**Erros:** `422` para `date` ausente ou inválido.

Reference: https://docs.datalbus.com.br/datalbus-api-v-2/relatorios/falhas-dtc/falhas-dtc

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `date` (string, optional) — Obrigatório. Dia consultado, formato `DD/MM/YYYY`.

### Headers

- `Time-Zone` (string, optional) — Obrigatório. Fuso horário IANA usado para definir o dia consultado e os horários da resposta.

## Response

### 200

OK

- `list of FalhasDtcFalhasDtcResponseItem`

## Errors

### 401 Falhas Dtc Falhas Dtc Request Unauthorized Error

Unauthorized

- `message` (string, required)

### 422 Falhas Dtc Falhas Dtc Request Unprocessable Entity Error

Unprocessable Content

- `errors` (UnprocessableEntityErrorBodyErrors, required)
- `message` (string, required)

## Types

### FalhasDtcFalhasDtcResponseItem

- `time` (string, required)
- `abbrev` (string, required)
- `cambio` (string, required)
- `Duration` (string, required)
- `coordinates` (string, required)
- `fault_descr` (string, required)
- `group_descr` (string, required)
- `module_abbr` (string, required)
- `FailureStorage` (string, required)
- `asset_description` (string, required)

### UnprocessableEntityErrorBodyErrors

- `date` (list of string, required)
- `groupBy` (list of string, required)

## Examples

**Response**

```json
[
  {
    "time": "2026-10-06 07:31:02",
    "abbrev": "MR",
    "cambio": "Voith - DIWA - Automático",
    "Duration": "35",
    "coordinates": "0101000020E61000006F1283C0CA2147C0E5D022DBF98C37C0",
    "fault_descr": "Pressão do óleo baixa",
    "group_descr": "Garagem Norte",
    "module_abbr": "Motor",
    "FailureStorage": "Active",
    "asset_description": "1020"
  }
]
```

**SDK Code**

```python 200 - Falhas do dia
import requests

url = "https://datalbus.com.br:8000/api/v2/reports/faults"

querystring = {"date":"06/10/2026"}

headers = {
    "Time-Zone": "America/Sao_Paulo",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript 200 - Falhas do dia
const url = 'https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026';
const options = {
  method: 'GET',
  headers: {'Time-Zone': 'America/Sao_Paulo', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 200 - Falhas do dia
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Time-Zone", "America/Sao_Paulo")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 200 - Falhas do dia
require 'uri'
require 'net/http'

url = URI("https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Time-Zone"] = 'America/Sao_Paulo'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 200 - Falhas do dia
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026")
  .header("Time-Zone", "America/Sao_Paulo")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 - Falhas do dia
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Time-Zone' => 'America/Sao_Paulo',
  ],
]);

echo $response->getBody();
```

```csharp 200 - Falhas do dia
using RestSharp;

var client = new RestClient("https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026");
var request = new RestRequest(Method.GET);
request.AddHeader("Time-Zone", "America/Sao_Paulo");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 - Falhas do dia
import Foundation

let headers = [
  "Time-Zone": "America/Sao_Paulo",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://datalbus.com.br:8000/api/v2/reports/faults?date=06%2F10%2F2026")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```