curl --request PATCH \
--url https://api.catenatelematics.com/v2/telematics/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.catenatelematics.com/v2/telematics/workflows/{id}"
payload = { "connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.catenatelematics.com/v2/telematics/workflows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.catenatelematics.com/v2/telematics/workflows/{id}"
payload := strings.NewReader("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", 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(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.catenatelematics.com/v2/telematics/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.patch("https://api.catenatelematics.com/v2/telematics/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.catenatelematics.com/v2/telematics/workflows/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.catenatelematics.com/v2/telematics/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "asset",
"operation_type": "create",
"payload": {},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"partner_ref": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"status": "pending",
"logs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resource_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "success",
"error_type": "auth",
"error_details": "<string>",
"response_status_code": 123,
"response_headers": {}
}
]
}{
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "asset",
"operation_type": "create",
"payload": {},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"partner_ref": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"status": "pending",
"logs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resource_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "success",
"error_type": "auth",
"error_details": "<string>",
"response_status_code": 123,
"response_headers": {}
}
]
}{
"code": 400,
"message": "Bad Request",
"detail": "<string>"
}{
"code": 401,
"message": "Unauthorized",
"detail": "<string>"
}{
"code": 403,
"message": "Forbidden",
"detail": "<string>"
}{
"code": 404,
"message": "Not Found",
"detail": "<string>"
}{
"code": 405,
"message": "Method Not Allowed",
"detail": "<string>"
}{
"code": 409,
"message": "Conflict",
"detail": "<string>"
}{
"code": 422,
"message": "Invalid Request Body",
"detail": [
{
"path": "<string>",
"input": "<string>",
"message": "<string>",
"error_type": "<string>"
}
]
}{
"code": 429,
"message": "Too Many Requests",
"detail": {
"retry_after_seconds": 123,
"message": "<string>"
}
}{
"message": "Internal Server Error"
}{
"code": 501,
"message": "Not Implemented",
"detail": "<string>"
}{
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "asset",
"operation_type": "create",
"payload": {},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"partner_ref": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"status": "pending",
"logs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resource_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "success",
"error_type": "auth",
"error_details": "<string>",
"response_status_code": 123,
"response_headers": {}
}
]
}Update Workflow
Update an existing workflow resource operation.
curl --request PATCH \
--url https://api.catenatelematics.com/v2/telematics/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.catenatelematics.com/v2/telematics/workflows/{id}"
payload = { "connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connection_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.catenatelematics.com/v2/telematics/workflows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.catenatelematics.com/v2/telematics/workflows/{id}"
payload := strings.NewReader("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", 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(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.catenatelematics.com/v2/telematics/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.patch("https://api.catenatelematics.com/v2/telematics/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.catenatelematics.com/v2/telematics/workflows/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"connection_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.catenatelematics.com/v2/telematics/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'connection_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "asset",
"operation_type": "create",
"payload": {},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"partner_ref": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"status": "pending",
"logs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resource_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "success",
"error_type": "auth",
"error_details": "<string>",
"response_status_code": 123,
"response_headers": {}
}
]
}{
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "asset",
"operation_type": "create",
"payload": {},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"partner_ref": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"status": "pending",
"logs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resource_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "success",
"error_type": "auth",
"error_details": "<string>",
"response_status_code": 123,
"response_headers": {}
}
]
}{
"code": 400,
"message": "Bad Request",
"detail": "<string>"
}{
"code": 401,
"message": "Unauthorized",
"detail": "<string>"
}{
"code": 403,
"message": "Forbidden",
"detail": "<string>"
}{
"code": 404,
"message": "Not Found",
"detail": "<string>"
}{
"code": 405,
"message": "Method Not Allowed",
"detail": "<string>"
}{
"code": 409,
"message": "Conflict",
"detail": "<string>"
}{
"code": 422,
"message": "Invalid Request Body",
"detail": [
{
"path": "<string>",
"input": "<string>",
"message": "<string>",
"error_type": "<string>"
}
]
}{
"code": 429,
"message": "Too Many Requests",
"detail": {
"retry_after_seconds": 123,
"message": "<string>"
}
}{
"message": "Internal Server Error"
}{
"code": 501,
"message": "Not Implemented",
"detail": "<string>"
}{
"partner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": "asset",
"operation_type": "create",
"payload": {},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"partner_ref": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "<string>",
"status": "pending",
"logs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resource_operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "success",
"error_type": "auth",
"error_details": "<string>",
"response_status_code": 123,
"response_headers": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The unique identifier of the workflow
Query Parameters
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
Workflow model for updating existing records.
Unique identifier of the connection at Catena Telematics which will be used to create this resource. A connection represents a Fleet/TSP pairing.
Your own reference for this record. Optional, up to 255 characters, opaque to Catena: it is stored and returned unchanged on the resource operation, its GET endpoints and the resource_operation.* webhooks, so you can match the outcome of a write to the record in your system without keeping the operation ID.
255External system identifier for the workflow.
External system identifier for the driver.
External system identifier for the vehicle.
Name of the territory or region for the workflow.
Name or load reference of the workflow, passed to the TSP where supported.
Workflow status.
PLANNED, ACTIVE, COMPLETED, CANCELLED Datetime when the workflow started.
Datetime when the workflow ended.
Total workflow distance.
Unit for total_distance.
m, km, mi, ft, nmi Workflow-level instructions.
Workflow stops.
Show child attributes
Show child attributes
Response
The workflow was updated successfully.
Resource operation model
The ID of the partner that created the operation.
The ID of the connection
The type of resource to operate on (e.g., vehicle, driver).
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 The type of operation to perform (e.g., create, update).
create, update The payload of the operation, containing the resource attributes to be created or updated.
Unique identifier for the resource operation.
Immutable: The datetime the record was created in Catena Telematics.
The datetime the record was last modified in Catena Telematics.
The datetime the record was logically deleted from Catena Telematics.
The reference you supplied for this record when creating the operation, returned unchanged. null when none was supplied.
Unique identifier of the record. Can be null for create operations where the source does not exist yet.
The unique identifier of the resource in the source system. Required for update operations.
The status of the operation
pending, success, failed Log entries for each attempt to execute this operation.
Show child attributes
Show child attributes
Was this page helpful?