Delete a route leg cost
curl --request DELETE \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}', 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}/costs/{cost}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyTransport legs, vehicles and costs
Delete a route leg cost
Deletes a transport cost from a route leg.
DELETE
/
catalog
/
transfers
/
{transfer}
/
route-legs
/
{route_leg}
/
costs
/
{cost}
Delete a route leg cost
curl --request DELETE \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}', 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}/costs/{cost}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/route-legs/{route_leg}/costs/{cost}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyCompany space
Cannot be undone
For: Stock keeper, Manager · Permission:
transfer_route_leg_costs.delete
Conditions
- The transfer must be visible to the current company (owned by it, or not a draft and with a step at a location the company can use).
- The leg must be accessible to the current company: one of its two steps must be at a location group holding a location linked to the company.
- Only the company that recorded the cost can delete it, even when it owns the transfer.
- The transfer must be draft or running.
- A cost that has already been allocated to the goods cannot be deleted.
- The cost row is deleted for good.
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.
Identifier of the route leg cost, which must belong to the leg.
Response
204
No content