OBD Codes
GET /api/obd-codes
Section titled “GET /api/obd-codes”Search OBD-II diagnostic trouble codes by code or description using wildcard matching. Non-subscribers will have access to the demo dataset which contains one code per category. Subscribers have full access.
There are four categories of OBD-II codes:
- P — Powertrain (engine and transmission)
- B — Body
- C — Chassis
- U — Network and wiring systems
Sample Request
Section titled “Sample Request”curl "https://carapi.app/api/obd-codes?code=P0300" \ -H "Authorization: Bearer YOUR_JWT_TOKEN_HERE"const params = new URLSearchParams({ code: 'P0300' });
const response = await fetch(`https://carapi.app/api/obd-codes?${params}`, { headers: { 'Authorization': `Bearer ${jwt}` }});
const data = await response.json();console.log('OBD Codes:', data);import requests
headers = { 'Authorization': f'Bearer {jwt}'}
params = { 'code': 'P0300'}
response = requests.get( 'https://carapi.app/api/obd-codes', headers=headers, params=params)
data = response.json()print('OBD Codes:', data)use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://carapi.app/api/obd-codes', [ 'headers' => [ 'Authorization' => 'Bearer YOUR_JWT_TOKEN_HERE', ], 'query' => [ 'code' => 'P0300', ],]);
$data = json_decode($response->getBody(), true);print_r($data);$url = 'https://carapi.app/api/obd-codes?' . http_build_query(['code' => 'P0300']);
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_JWT_TOKEN_HERE',]);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);print_r($data);Sample Response
Section titled “Sample Response”{ "collection": { "url": "/api/obd-codes", "count": 2, "pages": 1, "total": 2, "next": "", "prev": "", "first": "/api/obd-codes", "last": "" }, "data": [ { "code": "P0100", "description": "Mass or Volume Air Flow Sensor A Circuit" }, { "code": "U1000", "description": "Manufacturer Controlled DTC" } ]}GET /api/obd-codes/{code}
Section titled “GET /api/obd-codes/{code}”Returns the details for a single OBD-II trouble code by its exact code value.
Non-subscribers are limited to one code per category: B1200, P0100, U1000, and C1091.
Sample Request
Section titled “Sample Request”curl "https://carapi.app/api/obd-codes/P0300" \ -H "Authorization: Bearer YOUR_JWT_TOKEN_HERE"const code = 'P0300';
const response = await fetch(`https://carapi.app/api/obd-codes/${code}`, { headers: { 'Authorization': `Bearer ${jwt}` }});
const data = await response.json();console.log('OBD Code:', data);import requests
code = 'P0300'headers = { 'Authorization': f'Bearer {jwt}'}
response = requests.get( f'https://carapi.app/api/obd-codes/{code}', headers=headers)
data = response.json()print('OBD Code:', data)use GuzzleHttp\Client;
$code = 'P0300';$client = new Client();
$response = $client->get("https://carapi.app/api/obd-codes/{$code}", [ 'headers' => [ 'Authorization' => 'Bearer YOUR_JWT_TOKEN_HERE', ],]);
$data = json_decode($response->getBody(), true);print_r($data);$code = 'P0300';
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, "https://carapi.app/api/obd-codes/{$code}");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_JWT_TOKEN_HERE',]);
$response = curl_exec($ch);curl_close($ch);
$data = json_decode($response, true);print_r($data);Sample Response
Section titled “Sample Response”{ "code": "U1000", "description": "Manufacturer Controlled DTC"}