curl --request POST \
--url https://api.exowpee.com/v1/catalog/trips/{trip}/stops \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"position": 2,
"point_type": "<string>",
"point_id": "<string>",
"label": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/catalog/trips/{trip}/stops"
payload = {
"position": 2,
"point_type": "<string>",
"point_id": "<string>",
"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({position: 2, point_type: '<string>', point_id: '<string>', label: '<string>'})
};
fetch('https://api.exowpee.com/v1/catalog/trips/{trip}/stops', 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}/stops",
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([
'position' => 2,
'point_type' => '<string>',
'point_id' => '<string>',
'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}/stops"
payload := strings.NewReader("{\n \"position\": 2,\n \"point_type\": \"<string>\",\n \"point_id\": \"<string>\",\n \"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}/stops")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"position\": 2,\n \"point_type\": \"<string>\",\n \"point_id\": \"<string>\",\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/trips/{trip}/stops")
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 \"position\": 2,\n \"point_type\": \"<string>\",\n \"point_id\": \"<string>\",\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"trip_id": "<string>",
"position": 123,
"point_type": "<string>",
"point_id": "<string>",
"point": {},
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Add a stop to a trip
Adds a stop (a location group, waypoint, supplier, supplier pickup point, customer or customer address) at a given position on a trip.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/trips/{trip}/stops \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"position": 2,
"point_type": "<string>",
"point_id": "<string>",
"label": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/catalog/trips/{trip}/stops"
payload = {
"position": 2,
"point_type": "<string>",
"point_id": "<string>",
"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({position: 2, point_type: '<string>', point_id: '<string>', label: '<string>'})
};
fetch('https://api.exowpee.com/v1/catalog/trips/{trip}/stops', 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}/stops",
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([
'position' => 2,
'point_type' => '<string>',
'point_id' => '<string>',
'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}/stops"
payload := strings.NewReader("{\n \"position\": 2,\n \"point_type\": \"<string>\",\n \"point_id\": \"<string>\",\n \"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}/stops")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"position\": 2,\n \"point_type\": \"<string>\",\n \"point_id\": \"<string>\",\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/trips/{trip}/stops")
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 \"position\": 2,\n \"point_type\": \"<string>\",\n \"point_id\": \"<string>\",\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"trip_id": "<string>",
"position": 123,
"point_type": "<string>",
"point_id": "<string>",
"point": {},
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}trip_stops.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.
- position is required, must be a positive integer and not already used by another stop of the trip (422).
- point_type and point_id are required; the point type must be registered and the point must exist (supplier, supplier pickup point, customer and customer address types require a private trip owned by the company).
- Creates the stop with a copy of the point’s name and address.
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
Position of the stop on the route, starting at 1. Required on creation and unique within the trip; not accepted on update.
x >= 1Kind of point the stop refers to: location_group, waypoint, vendor, vendor_pickup_point, customer or customer_address. Required on creation. Supplier, pickup point, customer and customer address types require a private trip owned by the company.
255Identifier of the point (27 characters) of the given point_type; it must exist. Required on creation. Changing it on update is refused when the stop is already referenced.
27Optional free-text label for the stop, up to 255 characters; null clears it.
255Response
TripStopResource
Identifier of the stop (27-character KSUID).
Identifier of the trip the stop belongs to.
Position of the stop on the route, starting at 1.
Kind of point: location_group, waypoint, vendor, vendor_pickup_point, customer or customer_address.
Identifier of the point the stop refers to.
Copy of the point taken when the stop was created or re-pointed (id and name, plus address for suppliers, waypoints and customers, and coordinates for pickup points and waypoints; other fields depend on the point type). When no copy is stored it is read from the live record.
Optional free-text label of the stop.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).