Cancel-label
curl --request DELETE \
--url https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
{
"accountNumber": "AC0088",
"accountType": "SHIPPER"
}
],
"callerType": "SHIPPER",
"labels": [
"PEBMLQJ7"
]
}
'import requests
url = "https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels"
payload = {
"accounts": [
{
"accountNumber": "AC0088",
"accountType": "SHIPPER"
}
],
"callerType": "SHIPPER",
"labels": ["PEBMLQJ7"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accounts: [{accountNumber: 'AC0088', accountType: 'SHIPPER'}],
callerType: 'SHIPPER',
labels: ['PEBMLQJ7']
})
};
fetch('https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels', 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-stage.orchestro.ai/e1/api/v1/core/cancel-labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'accounts' => [
[
'accountNumber' => 'AC0088',
'accountType' => 'SHIPPER'
]
],
'callerType' => 'SHIPPER',
'labels' => [
'PEBMLQJ7'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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-stage.orchestro.ai/e1/api/v1/core/cancel-labels"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"accountNumber\": \"AC0088\",\n \"accountType\": \"SHIPPER\"\n }\n ],\n \"callerType\": \"SHIPPER\",\n \"labels\": [\n \"PEBMLQJ7\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.delete("https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n {\n \"accountNumber\": \"AC0088\",\n \"accountType\": \"SHIPPER\"\n }\n ],\n \"callerType\": \"SHIPPER\",\n \"labels\": [\n \"PEBMLQJ7\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounts\": [\n {\n \"accountNumber\": \"AC0088\",\n \"accountType\": \"SHIPPER\"\n }\n ],\n \"callerType\": \"SHIPPER\",\n \"labels\": [\n \"PEBMLQJ7\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"errors": [
{
"code": "ERR-3201",
"message": "Label is already cancelled."
}
],
"labelId": "PEBMLQJ7",
"status": "FAILURE"
}
]Shipper
Cancel-label
This endpoint allows users to cancel shipping labels by sending account details, caller type, and the label ID. It returns the cancellation status or relevant errors if the label was already canceled.
DELETE
/
api
/
v1
/
core
/
cancel-labels
Cancel-label
curl --request DELETE \
--url https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
{
"accountNumber": "AC0088",
"accountType": "SHIPPER"
}
],
"callerType": "SHIPPER",
"labels": [
"PEBMLQJ7"
]
}
'import requests
url = "https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels"
payload = {
"accounts": [
{
"accountNumber": "AC0088",
"accountType": "SHIPPER"
}
],
"callerType": "SHIPPER",
"labels": ["PEBMLQJ7"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accounts: [{accountNumber: 'AC0088', accountType: 'SHIPPER'}],
callerType: 'SHIPPER',
labels: ['PEBMLQJ7']
})
};
fetch('https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels', 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-stage.orchestro.ai/e1/api/v1/core/cancel-labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'accounts' => [
[
'accountNumber' => 'AC0088',
'accountType' => 'SHIPPER'
]
],
'callerType' => 'SHIPPER',
'labels' => [
'PEBMLQJ7'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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-stage.orchestro.ai/e1/api/v1/core/cancel-labels"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"accountNumber\": \"AC0088\",\n \"accountType\": \"SHIPPER\"\n }\n ],\n \"callerType\": \"SHIPPER\",\n \"labels\": [\n \"PEBMLQJ7\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.delete("https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n {\n \"accountNumber\": \"AC0088\",\n \"accountType\": \"SHIPPER\"\n }\n ],\n \"callerType\": \"SHIPPER\",\n \"labels\": [\n \"PEBMLQJ7\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stage.orchestro.ai/e1/api/v1/core/cancel-labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounts\": [\n {\n \"accountNumber\": \"AC0088\",\n \"accountType\": \"SHIPPER\"\n }\n ],\n \"callerType\": \"SHIPPER\",\n \"labels\": [\n \"PEBMLQJ7\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"errors": [
{
"code": "ERR-3201",
"message": "Label is already cancelled."
}
],
"labelId": "PEBMLQJ7",
"status": "FAILURE"
}
]Authorizations
Body
application/json
The request body for this endpoint accepts a JSON object that includes account information, caller type, and the IDs of the labels that are to be canceled.
A list of accounts involved in the label cancellation request.
Show child attributes
Show child attributes
Example:
[
{
"accountNumber": "AC0088",
"accountType": "SHIPPER"
}
]The type of entity making the cancellation request (e.g., SHIPPER or CARRIER).
Example:
"SHIPPER"
A list of label IDs to be canceled.
The unique identifier of the label to be canceled.
Example:
["PEBMLQJ7"]Response
200 - application/json
Cancel label successful
Example:
[
{
"errors": [
{
"code": "ERR-3201",
"message": "Label is already cancelled."
}
],
"labelId": "PEBMLQJ7",
"status": "FAILURE"
}
]⌘I