Security
Create vehicle access
Creates a vehicle access (invites a user to access a vehicle).
POST
/
permission
/
vehicle-access
Create vehicle access
curl --request POST \
--url https://ctechnology.io/api/v2.2/permission/vehicle-access \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"vehicle_id": "<string>"
}
'import requests
url = "https://ctechnology.io/api/v2.2/permission/vehicle-access"
payload = {
"email": "jsmith@example.com",
"vehicle_id": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', vehicle_id: '<string>'})
};
fetch('https://ctechnology.io/api/v2.2/permission/vehicle-access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ctechnology.io/api/v2.2/permission/vehicle-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'vehicle_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ctechnology.io/api/v2.2/permission/vehicle-access"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"vehicle_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://ctechnology.io/api/v2.2/permission/vehicle-access")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"vehicle_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ctechnology.io/api/v2.2/permission/vehicle-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"vehicle_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"header": {
"api_version": "<string>",
"status": "<string>",
"message": "<string>",
"permission_via": [
{
"permission": "<string>",
"organization_id": "<string>"
}
]
},
"error": {
"id": "<string>",
"status": 123,
"type": "<string>",
"message": "<string>",
"message_i18n": "<string>",
"data": {}
}
}{
"header": {
"api_version": "<string>",
"status": "<string>",
"message": "<string>",
"permission_via": [
{
"permission": "<string>",
"organization_id": "<string>"
}
]
},
"error": {
"id": "<string>",
"status": 123,
"type": "<string>",
"message": "<string>",
"message_i18n": "<string>",
"data": {}
}
}Authorizations
Note that the API key has to be sent as Token 123 where 123 is
the key you received after logging in or by creating on the developer
dashboard.
Body
application/json
The email address of the user to invite.
ID of vehicle to grant access to.
The various access roles for vehicles.
Available options:
VEHICLE_OWNER, VEHICLE_MAINTAINER, VEHICLE_MANUFACTURER, VEHICLE_READ_ONLY, VEHICLE_NO_DETAIL_NO_EDIT, VEHICLE_ONLY_CURRENT, VEHICLE_USER Response
Successful creation of vehicle access.
The response is of type UserVehicleAccessPost · object.
⌘I
Create vehicle access
curl --request POST \
--url https://ctechnology.io/api/v2.2/permission/vehicle-access \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"vehicle_id": "<string>"
}
'import requests
url = "https://ctechnology.io/api/v2.2/permission/vehicle-access"
payload = {
"email": "jsmith@example.com",
"vehicle_id": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', vehicle_id: '<string>'})
};
fetch('https://ctechnology.io/api/v2.2/permission/vehicle-access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ctechnology.io/api/v2.2/permission/vehicle-access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'vehicle_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ctechnology.io/api/v2.2/permission/vehicle-access"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"vehicle_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://ctechnology.io/api/v2.2/permission/vehicle-access")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"vehicle_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ctechnology.io/api/v2.2/permission/vehicle-access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"vehicle_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"header": {
"api_version": "<string>",
"status": "<string>",
"message": "<string>",
"permission_via": [
{
"permission": "<string>",
"organization_id": "<string>"
}
]
},
"error": {
"id": "<string>",
"status": 123,
"type": "<string>",
"message": "<string>",
"message_i18n": "<string>",
"data": {}
}
}{
"header": {
"api_version": "<string>",
"status": "<string>",
"message": "<string>",
"permission_via": [
{
"permission": "<string>",
"organization_id": "<string>"
}
]
},
"error": {
"id": "<string>",
"status": 123,
"type": "<string>",
"message": "<string>",
"message_i18n": "<string>",
"data": {}
}
}
