curl --request PUT \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"costs": [
{
"label": "<string>",
"amount": 123,
"amount_minor": "<string>"
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}"
payload = {
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"costs": [
{
"label": "<string>",
"amount": 123,
"amount_minor": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from_step_id: '<string>',
from_step_position: 2,
to_step_id: '<string>',
to_step_position: 2,
costs: [{label: '<string>', amount: 123, amount_minor: '<string>'}]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}', 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/transfers/{transfer}/route-legs/{route_leg}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'from_step_id' => '<string>',
'from_step_position' => 2,
'to_step_id' => '<string>',
'to_step_position' => 2,
'costs' => [
[
'label' => '<string>',
'amount' => 123,
'amount_minor' => '<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/transfers/{transfer}/route-legs/{route_leg}"
payload := strings.NewReader("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"costs\": [\n {\n \"label\": \"<string>\",\n \"amount\": 123,\n \"amount_minor\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"costs\": [\n {\n \"label\": \"<string>\",\n \"amount\": 123,\n \"amount_minor\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"costs\": [\n {\n \"label\": \"<string>\",\n \"amount\": 123,\n \"amount_minor\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"transfer_id": "<string>",
"from_step_id": "<string>",
"to_step_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cost_total_minor": 123,
"costs": [
{
"id": "<string>",
"transfer_route_leg_id": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"label": "<string>",
"amount": 123,
"amount_minor": 123,
"allocated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"from_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
},
"to_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
}
}{
"message": "<string>",
"errors": {}
}Change a route leg
Changes the start or end step of a route leg.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"costs": [
{
"label": "<string>",
"amount": 123,
"amount_minor": "<string>"
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}"
payload = {
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"costs": [
{
"label": "<string>",
"amount": 123,
"amount_minor": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from_step_id: '<string>',
from_step_position: 2,
to_step_id: '<string>',
to_step_position: 2,
costs: [{label: '<string>', amount: 123, amount_minor: '<string>'}]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}', 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/transfers/{transfer}/route-legs/{route_leg}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'from_step_id' => '<string>',
'from_step_position' => 2,
'to_step_id' => '<string>',
'to_step_position' => 2,
'costs' => [
[
'label' => '<string>',
'amount' => 123,
'amount_minor' => '<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/transfers/{transfer}/route-legs/{route_leg}"
payload := strings.NewReader("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"costs\": [\n {\n \"label\": \"<string>\",\n \"amount\": 123,\n \"amount_minor\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"costs\": [\n {\n \"label\": \"<string>\",\n \"amount\": 123,\n \"amount_minor\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"costs\": [\n {\n \"label\": \"<string>\",\n \"amount\": 123,\n \"amount_minor\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"transfer_id": "<string>",
"from_step_id": "<string>",
"to_step_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cost_total_minor": 123,
"costs": [
{
"id": "<string>",
"transfer_route_leg_id": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"label": "<string>",
"amount": 123,
"amount_minor": 123,
"allocated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"from_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
},
"to_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
}
}{
"message": "<string>",
"errors": {}
}transfer_route_legs.update
Conditions
- Only the company that owns the transfer can change a leg.
- The transfer must be draft or running.
- Both current steps of the leg must still be upcoming.
- Both ends are required (step id or step position); the new steps must belong to the transfer, be consecutive, and no other leg may already join the same pair.
- costs is refused on update.
- After the change every transfer segment must still be covered by a complete, continuous chain of legs, otherwise the call is refused.
- The route-leg links of the transfer segments are recomputed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the transfer.
Identifier of the route leg, which must belong to the transfer.
Body
Identifier of the step where the leg starts (27 characters). Required unless from_step_position is sent; when both are sent the id is used.
27Position (1 or more) of the step where the leg starts. Required unless from_step_id is sent.
x >= 1Identifier of the step where the leg ends. Required unless to_step_position is sent. The end step must come right after the start step.
27Position of the step where the leg ends; it must equal the start position plus one. Required unless to_step_id is sent.
x >= 1Costs to record on the new leg at creation. Not accepted on update; use the route leg cost endpoints instead.
Show child attributes
Show child attributes
Response
TransferRouteLegResource
Identifier of the route leg.
Identifier of the transfer.
Step the leg starts from.
Step the leg arrives at; always the next step in order.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Total of the leg's costs in minor units (divide by 10 to the power currency_exponent). Present only when costs are loaded.
Cost lines of the leg (label and amount); shown to the owner company only.
Show child attributes
Show child attributes
Starting step, when included.
Show child attributes
Show child attributes
Arrival step, when included.
Show child attributes
Show child attributes