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

# 🧪 Create DVIR Log

POST https://api.catenatelematics.com/v2/telematics/dvir-logs
Content-Type: application/json

Create a new DVIR log asynchronously.

Reference: https://catena.ferndocs.com/api-reference/telematics/compliance-regulation/create-dvir-log

## Authentication

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

## Request

### Query parameters

- `is_sync` (boolean, optional, default: false) — Whether to process the request synchronously. If `true`, Catena will attempt to create or update the resource immediately with the TSP and return the result in the response. When performing synchronous operations, you are responsible for handling any necessary retries in case of transient failures.If `false` (default), Catena will create an asynchronous operation, and you can check the status of the operation using the returned operation ID.

### Body (application/json)

This endpoint expects a DvirLogCreate.

- `connection_id` (string, required) — Unique identifier of the connection at Catena Telematics which will be used to create this resource. A connection represents a Fleet/TSP pairing.
- `driver_id` (string, required) — Identifier for the driver
- `vehicle_id` (string, optional, nullable) — Identifier for the vehicle
- `trailer_id` (string, optional, nullable) — Identifier for the trailer
- `occurred_at` (datetime, optional, nullable) — Datetime of when the inspection occurred (must be UTC)
- `log_type` (enum, optional) — Type of DVIR log. Defaults to `unknown` when omitted.
  - Allowed values: `pre_trip`, `post_trip`, `mechanic`, `unknown`
- `inspected_by` (string, optional, nullable) — Name of the inspector conducting the DVIR
- `defect_count` (integer, optional, nullable) — Total number of defects reported in this DVIR log. Defaults to 0 when omitted and no defects provided.
- `defects` (list of enum, optional, nullable) — List of defects reported in this DVIR log
  - Allowed values: `fluid_levels`, `battery`, `belts_hoses`, `radiator`, `frame_assembly`, `front_axle`, `starter`, `transmission`, `oil_pressure`, `defroster_heater`, `lights_front`, `windshield_clean`, `windshield_wiper_fluid`, `windshield_wipers`, `brakes`, `brake_check`, `clutch`, `mirrors`, `horn`, `safety_equipment`, `trip_recorder`, `air_conditioner`, `doors`, `stop_arm_control`, `steering_wheel`, `emergency_door_buzzer`, `entrance_steps`, `interior_floor`, `windows`, `exhaust`, `fifth_wheel`, `landing_gear`, `suspension`, `alignment`, `rims`, `tires`, `tire_chains`, `stop_arm`, `muffler`, `roof`, `wheels`, `wheels_rims`, `suspension_under`, `scratches`, `air_compressor`, `air_lines`, `brake_connections`, `coupling_devices`, `reflectors`, `lights_rear`, `rear_end`, `tire_chains_rear`, `brake_accessories`, `drive_line`, `engine`, `fuel_tanks`, `lights_general`, `other`, `unset`, `first_aid_kit`
- `defects_detail` (list of DvirDefectDetail, optional, nullable) — Detailed defect entries with part and defect information
- `is_safety_critical` (boolean, optional, nullable) — Indicates whether the DVIR log is safety-critical
- `driver_comment` (string, optional, nullable) — Additional free-text comments provided by the driver
- `certify_comment` (string, optional, nullable) — Driver's certification comment acknowledging the inspection
- `odometer` (double, optional, nullable) — Vehicle odometer reading at the time of the DVIR
- `odometer_unit` (enum, optional, nullable) — Unit for odometer
  - Allowed values: `m`, `km`, `mi`, `ft`, `nmi`
- `certify_date` (datetime, optional, nullable) — Datetime when the DVIR was certified (must be UTC)
- `certified_by` (string, optional, nullable) — Identifier for the individual who certified the DVIR
- `status` (enum, optional, nullable) — Log level defects summary status
  - Allowed values: `no_defect`, `defect_noted`, `defect_corrected`

## Response

### 200

The DVIR log was created successfully.

- `partner_id` (string, required) — The ID of the partner that created the operation.
- `connection_id` (string, required) — The ID of the connection
- `resource` (enum, required) — The type of resource to operate on (e.g., vehicle, driver).
  - Allowed values: `asset`, `document`, `driver_association`, `driver_vehicle_association`, `driver_event_log`, `driver_safety_event`, `dvir_log`, `dvir_log_defect`, `engine_log`, `engine_status`, `fuel_transaction`, `fuel_card`, `fleet_info`, `hos_availability`, `hos_daily_log`, `hos_daily_snapshot`, `hos_event`, `hos_event_annotation`, `hos_event_attachment`, `hos_violation`, `ifta_summary`, `location_segment`, `message`, `group_message`, `user`, `vehicle`, `vehicle_location`, `vehicle_sensor`, `vehicle_region_segment`, `trailer`, `trailer_association`, `trailer_vehicle_association`, `trailer_location`, `trailer_status`, `workflow`
- `operation_type` (enum, required) — The type of operation to perform (e.g., create, update).
  - Allowed values: `create`, `update`
- `payload` (map from string to any, required) — The payload of the operation, containing the resource attributes to be created or updated.
- `id` (string, optional) — Unique identifier for the resource operation.
- `created_at` (datetime, optional) — Immutable: The datetime the record was created in Catena Telematics.
- `updated_at` (datetime, optional) — The datetime the record was last modified in Catena Telematics.
- `deleted_at` (datetime, optional, nullable) — The datetime the record was logically deleted from Catena Telematics.
- `resource_id` (string, optional, nullable) — Unique identifier of the record. Can be `null` for create operations where the source does not exist yet.
- `source_id` (string, optional, nullable) — The unique identifier of the resource in the source system. Required for update operations.
- `status` (enum, optional) — The status of the operation
  - Allowed values: `pending`, `success`, `failed`
- `logs` (list of ResourceOperationLog, optional) — Log entries for each attempt to execute this operation.

### 202

The request to create the DVIR log has been accepted and is being processed.

- `partner_id` (string, required) — The ID of the partner that created the operation.
- `connection_id` (string, required) — The ID of the connection
- `resource` (enum, required) — The type of resource to operate on (e.g., vehicle, driver).
  - Allowed values: `asset`, `document`, `driver_association`, `driver_vehicle_association`, `driver_event_log`, `driver_safety_event`, `dvir_log`, `dvir_log_defect`, `engine_log`, `engine_status`, `fuel_transaction`, `fuel_card`, `fleet_info`, `hos_availability`, `hos_daily_log`, `hos_daily_snapshot`, `hos_event`, `hos_event_annotation`, `hos_event_attachment`, `hos_violation`, `ifta_summary`, `location_segment`, `message`, `group_message`, `user`, `vehicle`, `vehicle_location`, `vehicle_sensor`, `vehicle_region_segment`, `trailer`, `trailer_association`, `trailer_vehicle_association`, `trailer_location`, `trailer_status`, `workflow`
- `operation_type` (enum, required) — The type of operation to perform (e.g., create, update).
  - Allowed values: `create`, `update`
- `payload` (map from string to any, required) — The payload of the operation, containing the resource attributes to be created or updated.
- `id` (string, optional) — Unique identifier for the resource operation.
- `created_at` (datetime, optional) — Immutable: The datetime the record was created in Catena Telematics.
- `updated_at` (datetime, optional) — The datetime the record was last modified in Catena Telematics.
- `deleted_at` (datetime, optional, nullable) — The datetime the record was logically deleted from Catena Telematics.
- `resource_id` (string, optional, nullable) — Unique identifier of the record. Can be `null` for create operations where the source does not exist yet.
- `source_id` (string, optional, nullable) — The unique identifier of the resource in the source system. Required for update operations.
- `status` (enum, optional) — The status of the operation
  - Allowed values: `pending`, `success`, `failed`
- `logs` (list of ResourceOperationLog, optional) — Log entries for each attempt to execute this operation.

## Errors

### 400 Bad Request Error

Bad Request

- `code` (integer, optional, default: 400)
- `message` (string, optional, default: Bad Request)
- `detail` (string, optional, nullable)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, optional, default: 401)
- `message` (string, optional, default: Unauthorized)
- `detail` (string, optional, nullable)

### 403 Forbidden Error

Forbidden

- `code` (integer, optional, default: 403)
- `message` (string, optional, default: Forbidden)
- `detail` (string, optional, nullable)

### 404 Not Found Error

Not Found

- `code` (integer, optional, default: 404)
- `message` (string, optional, default: Not Found)
- `detail` (string, optional, nullable)

### 405 Method Not Allowed Error

Method Not Allowed

- `code` (integer, optional, default: 405)
- `message` (string, optional, default: Method Not Allowed)
- `detail` (string, optional, nullable)

### 409 Conflict Error

Conflict

- `code` (integer, optional, default: 409)
- `message` (string, optional, default: Conflict)
- `detail` (string, optional, nullable)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `code` (integer, optional, default: 422)
- `message` (string, optional, default: Invalid Request Body)
- `detail` (list of ValidationErrorDetail, optional, nullable)

### 429 Too Many Requests Error

Too Many Requests

- `code` (integer, optional, default: 429)
- `message` (string, optional, default: Too Many Requests)
- `detail` (RetryAfterDetail, optional, nullable)

### 500 Internal Server Error

Internal Server Error

- `message` (string, optional, default: Internal Server Error)

### 501 Not Implemented Error

Not Implemented

- `code` (integer, optional, default: 501)
- `message` (string, optional, default: Not Implemented)
- `detail` (string, optional, nullable)

### 502 Bad Gateway Error

The request to create the DVIR log could not be processed at this time. Please see the response for more details.

- `partner_id` (string, required) — The ID of the partner that created the operation.
- `connection_id` (string, required) — The ID of the connection
- `resource` (enum, required) — The type of resource to operate on (e.g., vehicle, driver).
  - Allowed values: `asset`, `document`, `driver_association`, `driver_vehicle_association`, `driver_event_log`, `driver_safety_event`, `dvir_log`, `dvir_log_defect`, `engine_log`, `engine_status`, `fuel_transaction`, `fuel_card`, `fleet_info`, `hos_availability`, `hos_daily_log`, `hos_daily_snapshot`, `hos_event`, `hos_event_annotation`, `hos_event_attachment`, `hos_violation`, `ifta_summary`, `location_segment`, `message`, `group_message`, `user`, `vehicle`, `vehicle_location`, `vehicle_sensor`, `vehicle_region_segment`, `trailer`, `trailer_association`, `trailer_vehicle_association`, `trailer_location`, `trailer_status`, `workflow`
- `operation_type` (enum, required) — The type of operation to perform (e.g., create, update).
  - Allowed values: `create`, `update`
- `payload` (map from string to any, required) — The payload of the operation, containing the resource attributes to be created or updated.
- `id` (string, optional) — Unique identifier for the resource operation.
- `created_at` (datetime, optional) — Immutable: The datetime the record was created in Catena Telematics.
- `updated_at` (datetime, optional) — The datetime the record was last modified in Catena Telematics.
- `deleted_at` (datetime, optional, nullable) — The datetime the record was logically deleted from Catena Telematics.
- `resource_id` (string, optional, nullable) — Unique identifier of the record. Can be `null` for create operations where the source does not exist yet.
- `source_id` (string, optional, nullable) — The unique identifier of the resource in the source system. Required for update operations.
- `status` (enum, optional) — The status of the operation
  - Allowed values: `pending`, `success`, `failed`
- `logs` (list of ResourceOperationLog, optional) — Log entries for each attempt to execute this operation.

## Types

### DvirDefectDetail

Structured DVIR defect detail shared across services.

- `part` (enum, optional, nullable) — Enum for canonical DVIR inspectable parts and assemblies.
  - Allowed values: `other`, `unset`, `fluid_levels`, `battery`, `belts_hoses`, `radiator`, `frame_assembly`, `front_axle`, `starter`, `transmission`, `oil_pressure`, `defroster_heater`, `windshield_clean`, `windshield_wiper_fluid`, `windshield_wipers`, `brakes`, `parking_brakes`, `service_brakes`, `brake_check`, `brake_accessories`, `brake_connections`, `air_compressor`, `air_lines`, `air_conditioner`, `clutch`, `horn`, `mirrors`, `trip_recorder`, `doors`, `windows`, `interior_floor`, `entrance_steps`, `steering`, `steering_wheel`, `emergency_equipment`, `safety_equipment`, `first_aid_kit`, `emergency_door_buzzer`, `stop_arm`, `stop_arm_control`, `lights`, `lights_front`, `lights_rear`, `lights_and_reflectors`, `reflectors`, `exhaust`, `fifth_wheel`, `coupling_devices`, `landing_gear`, `suspension`, `suspension_under`, `alignment`, `rims`, `tires`, `tire_chains`, `tire_chains_rear`, `muffler`, `roof`, `wheels`, `wheels_rims`, `rear_end`, `drive_line`, `engine`, `fuel_tanks`, `scratches`
- `defect` (enum, optional, nullable) — Enum for canonical DVIR defect details.
  - Allowed values: `air_compressor_not_working`, `bent_cracked_or_damaged`, `binds_or_grabs`, `broken_or_cracked`, `bulging_or_swelling`, `chatters_shudders_or_vibrates`, `cracked_or_broken`, `dragging`, `drifts_or_pulls_left`, `drifts_or_pulls_right`, `fifth_wheel_cracked_or_damaged`, `fire_extinguisher_missing`, `fire_extinguisher_not_charged`, `flags_or_flares_missing`, `flat_or_leaking_air`, `fluid_level_improper`, `handle_loose_or_missing`, `improper_spraying`, `improper_wiping`, `improperly_adjusted`, `improperly_aimed_headlight`, `improperly_inflated`, `inoperable_4_way_flasher`, `inoperable_air_horn`, `inoperable_brake_light`, `inoperable_electric_horn`, `inoperable_headlight_high_beam`, `inoperable_headlight_low_beam`, `inoperable_interior_light`, `inoperable_left_turn_signal`, `inoperable_right_turn_signal`, `inoperative`, `inoperative_4_way_flasher`, `inoperative_brake_light`, `inoperative_interior_light`, `inoperative_left_turn_signal`, `inoperative_right_turn_signal`, `insufficient_tread`, `leaking_air`, `leaking_fluid`, `leaking_seals`, `lock_broken_or_inoperative`, `locking_mechanism_won_t_disengage`, `locking_mechanism_won_t_engage`, `loose_or_excessive_wheel_play`, `loose_or_insecurely_mounted`, `loose_or_malfunctioning_connections`, `missing`, `overheating_or_running_hot`, `parts_loose_or_insecurely_mounted`, `parts_missing`, `pin_cracked_or_damaged`, `pintle_hook_assembly_cracked`, `pintle_hook_assembly_damaged`, `reflective_triangles_missing`, `rusty_or_corroded`, `safety_chains_cracked_or_damaged`, `seized`, `slow_to_release`, `spare_bulbs_or_fuses_missing`, `spare_seal_beam_missing`, `ties_broken_loose_or_missing`, `tread_or_sidewall_separation`, `warning_light_not_working`, `warning_light_on`, `weak_or_ineffective`, `will_not_release`
- `defect_repair_details` (DefectRepairDetails, optional, nullable) — Structured DVIR defect repair details
- `comment` (DefectComment, optional, nullable) — Structured DVIR defect comment
- `source_part_id` (string, optional, nullable)
- `source_defect_id` (string, optional, nullable)

### ResourceOperationLog

API response model for a resource operation log entry.

- `id` (string, required) — Unique identifier for the log entry.
- `created_at` (datetime, required) — Timestamp when the log entry was created.
- `updated_at` (datetime, required) — Timestamp when the log entry was last updated.
- `resource_operation_id` (string, required) — The ID of the resource operation this log entry belongs to.
- `status` (enum, required) — The status of the operation attempt.
  - Allowed values: `success`, `failed`
- `error_type` (enum, optional, nullable) — The type of error that occurred, if any.
  - Allowed values: `auth`, `validation`, `network`, `tsp`
- `error_details` (string, optional, nullable) — Detailed information about the error, if any.
- `response_status_code` (integer, optional, nullable) — HTTP status code returned by the TSP, if available.
- `response_headers` (map from string to string, optional, nullable) — HTTP response headers from the TSP (e.g. rate limit state).

### ValidationErrorDetail

- `path` (string, required)
- `input` (string, required)
- `message` (string, required)
- `error_type` (string, required)

### RetryAfterDetail

- `retry_after_seconds` (integer, required)
- `message` (string, required)

### DefectRepairDetails

Structured DVIR defect repair details

- `repair_status` (enum, optional, nullable) — Enum for DVIR defect repair status.
  - Allowed values: `not_repaired`, `repaired`, `not_necessary`
- `repair_user_id` (string, optional, nullable)
- `repair_date_time` (datetime, optional, nullable)

### DefectComment

Structured DVIR defect comment

- `comment` (string, optional, nullable)
- `comment_date_time` (datetime, optional, nullable)
- `user_id` (string, optional, nullable)

## Examples

### Example 1

**Request**

```json
{
  "connection_id": "string",
  "driver_id": "string"
}
```

**Response**

```json
{
  "partner_id": "string",
  "connection_id": "string",
  "resource": "asset",
  "operation_type": "create",
  "payload": {},
  "id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "deleted_at": "2024-01-15T09:30:00Z",
  "resource_id": "string",
  "source_id": "string",
  "status": "pending",
  "logs": [
    {
      "id": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "resource_operation_id": "string",
      "status": "success",
      "error_type": "auth",
      "error_details": "string",
      "response_status_code": 1,
      "response_headers": {}
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.catenatelematics.com/v2/telematics/dvir-logs"

payload = {
    "connection_id": "string",
    "driver_id": "string"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.catenatelematics.com/v2/telematics/dvir-logs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"connection_id":"string","driver_id":"string"}'
};

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

```go
package main

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

func main() {

	url := "https://api.catenatelematics.com/v2/telematics/dvir-logs"

	payload := strings.NewReader("{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.catenatelematics.com/v2/telematics/dvir-logs")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.catenatelematics.com/v2/telematics/dvir-logs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.catenatelematics.com/v2/telematics/dvir-logs', [
  'body' => '{
  "connection_id": "string",
  "driver_id": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.catenatelematics.com/v2/telematics/dvir-logs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "connection_id": "string",
  "driver_id": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.catenatelematics.com/v2/telematics/dvir-logs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Example 2

**Request**

```json
{
  "connection_id": "string",
  "driver_id": "string"
}
```

**Response**

```json
{
  "partner_id": "string",
  "connection_id": "string",
  "resource": "asset",
  "operation_type": "create",
  "payload": {},
  "id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "deleted_at": "2024-01-15T09:30:00Z",
  "resource_id": "string",
  "source_id": "string",
  "status": "pending",
  "logs": [
    {
      "id": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "resource_operation_id": "string",
      "status": "success",
      "error_type": "auth",
      "error_details": "string",
      "response_status_code": 1,
      "response_headers": {}
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.catenatelematics.com/v2/telematics/dvir-logs"

payload = {
    "connection_id": "string",
    "driver_id": "string"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.catenatelematics.com/v2/telematics/dvir-logs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"connection_id":"string","driver_id":"string"}'
};

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

```go
package main

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

func main() {

	url := "https://api.catenatelematics.com/v2/telematics/dvir-logs"

	payload := strings.NewReader("{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.catenatelematics.com/v2/telematics/dvir-logs")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.catenatelematics.com/v2/telematics/dvir-logs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.catenatelematics.com/v2/telematics/dvir-logs', [
  'body' => '{
  "connection_id": "string",
  "driver_id": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.catenatelematics.com/v2/telematics/dvir-logs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"connection_id\": \"string\",\n  \"driver_id\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "connection_id": "string",
  "driver_id": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.catenatelematics.com/v2/telematics/dvir-logs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```