curl --request POST \
--url https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_id": "<string>",
"load_weight": "<string>",
"load_volume": "<string>",
"driver_label": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles"
payload = {
"asset_id": "<string>",
"load_weight": "<string>",
"load_volume": "<string>",
"driver_label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_id: '<string>',
load_weight: '<string>',
load_volume: '<string>',
driver_label: '<string>'
})
};
fetch('https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles', 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://api.exowpee.com/v1/catalog/trips/{trip}/vehicles",
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([
'asset_id' => '<string>',
'load_weight' => '<string>',
'load_volume' => '<string>',
'driver_label' => '<string>'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles"
payload := strings.NewReader("{\n \"asset_id\": \"<string>\",\n \"load_weight\": \"<string>\",\n \"load_volume\": \"<string>\",\n \"driver_label\": \"<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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset_id\": \"<string>\",\n \"load_weight\": \"<string>\",\n \"load_volume\": \"<string>\",\n \"driver_label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles")
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 \"asset_id\": \"<string>\",\n \"load_weight\": \"<string>\",\n \"load_volume\": \"<string>\",\n \"driver_label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"trip_id": "<string>",
"asset_id": "<string>",
"driver_label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Add a vehicle to a trip
Assigns a vehicle of your organization, with an optional driver name, to a trip.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_id": "<string>",
"load_weight": "<string>",
"load_volume": "<string>",
"driver_label": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles"
payload = {
"asset_id": "<string>",
"load_weight": "<string>",
"load_volume": "<string>",
"driver_label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_id: '<string>',
load_weight: '<string>',
load_volume: '<string>',
driver_label: '<string>'
})
};
fetch('https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles', 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://api.exowpee.com/v1/catalog/trips/{trip}/vehicles",
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([
'asset_id' => '<string>',
'load_weight' => '<string>',
'load_volume' => '<string>',
'driver_label' => '<string>'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles"
payload := strings.NewReader("{\n \"asset_id\": \"<string>\",\n \"load_weight\": \"<string>\",\n \"load_volume\": \"<string>\",\n \"driver_label\": \"<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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset_id\": \"<string>\",\n \"load_weight\": \"<string>\",\n \"load_volume\": \"<string>\",\n \"driver_label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/trips/{trip}/vehicles")
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 \"asset_id\": \"<string>\",\n \"load_weight\": \"<string>\",\n \"load_volume\": \"<string>\",\n \"driver_label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"trip_id": "<string>",
"asset_id": "<string>",
"driver_label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}trip_vehicles.create
Conditions
- Only the company that owns the trip can change it; a trip shared by another company can be read but not modified.
- Only a trip whose status is active can be modified; an archived trip is refused with a validation error.
- asset_id is required, 27 characters, and must be an asset of the organization whose type is vehicle (422).
- A vehicle can be attached only once to a trip.
- load_weight and load_volume are refused.
- Attaches the vehicle asset to the trip; the asset itself is not modified.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the trip (27-character KSUID). The trip must be visible to the calling company.
Body
Identifier of the vehicle to attach. Required on creation; must be a vehicle of the organization, and attached only once per trip. Not accepted on update.
27Not accepted: trip vehicles no longer carry load dimensions.
Not accepted: trip vehicles no longer carry load dimensions.
Optional free-text name or label of the driver, up to 255 characters; null clears it.
255Response
TripVehicleResource
Identifier of the trip vehicle link (27-character KSUID).
Identifier of the trip.
Identifier of the vehicle asset.
Free-text label of the driver; null when none.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).