Change a trip rate
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}', 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}/rates/{rate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"trip_id": "<string>",
"trip_leg_id": "<string>",
"label": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Reusable trips and waypoints
Change a trip rate
Edits the label or amount of a trip rate.
PUT
/
catalog
/
trips
/
{trip}
/
rates
/
{rate}
Change a trip rate
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}', 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}/rates/{rate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/trips/{trip}/rates/{rate}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"trip_id": "<string>",
"trip_leg_id": "<string>",
"label": "<string>",
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Company space
For: Stock keeper, Manager · Permission:
trip_rates.update
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.
- trip_leg_id is refused: a rate cannot move to another leg.
- The rate must have been entered by the calling company (422).
- amount, when sent, follows the same rules as on creation.
- Fields not sent keep their value; the amount is stored in minor units.
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.
Identifier of the trip rate; it must belong to the trip in the URL.
Response
TripRateResource
Identifier of the rate (27-character KSUID).
Identifier of the trip the rate belongs to.
Identifier of the leg the rate applies to; null for a trip-level rate.
Name of the rate, unique per company on the same trip or leg.
Amount in major units (stored in minor units and divided by 10 to the power currency_exponent).
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).