Shipments
Update Shipment (v5.2)
Same as Update Shipment v5.0, plus the tags_action
field controlling how the tags array is applied:
add(default) — appends the provided tags, like v5.0.remove— removes the provided tags from the Shipment.replace— replaces the Shipment’s tags with the provided ones. System-generated tags (SLA, routing, and similar) are preserved.
Sending tags_action without any tags values returns a 299 warning.
POST
/
v5-2-0
/
shipment
/
update
/
Update Shipment (v5.2)
curl --request POST \
--url https://api.perform.ai/v5-2-0/shipment/update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tags": [
"priority"
],
"tags_action": "replace"
}
'import requests
url = "https://api.perform.ai/v5-2-0/shipment/update/"
payload = {
"tags": ["priority"],
"tags_action": "replace"
}
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({tags: ['priority'], tags_action: 'replace'})
};
fetch('https://api.perform.ai/v5-2-0/shipment/update/', 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.perform.ai/v5-2-0/shipment/update/",
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([
'tags' => [
'priority'
],
'tags_action' => 'replace'
]),
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.perform.ai/v5-2-0/shipment/update/"
payload := strings.NewReader("{\n \"tags\": [\n \"priority\"\n ],\n \"tags_action\": \"replace\"\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.perform.ai/v5-2-0/shipment/update/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n \"priority\"\n ],\n \"tags_action\": \"replace\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5-2-0/shipment/update/")
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 \"tags\": [\n \"priority\"\n ],\n \"tags_action\": \"replace\"\n}"
response = http.request(request)
puts response.read_body{
"api_response": "200",
"data": {
"shipment_uuid": "5b8ed503-20d2-46cf-8675-ce77a059f691",
"order_uuid": null,
"documents": [],
"created_date": "2026-09-19T03:26:29+00:00",
"updated_date": "2026-09-19T03:26:31+00:00"
}
}{
"api_response": "<string>",
"warnings": {},
"data": {}
}{
"api_response": "<string>",
"message": "<string>",
"errors": {}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}Authorizations
Query Parameters
Body
application/json
Same fields and constraints as Create Shipment; no field is required. Most fields replace the stored value entirely (whole arrays, whole address objects); tags, events, linked_shipments, and documents are add-only.
⌘I
Update Shipment (v5.2)
curl --request POST \
--url https://api.perform.ai/v5-2-0/shipment/update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tags": [
"priority"
],
"tags_action": "replace"
}
'import requests
url = "https://api.perform.ai/v5-2-0/shipment/update/"
payload = {
"tags": ["priority"],
"tags_action": "replace"
}
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({tags: ['priority'], tags_action: 'replace'})
};
fetch('https://api.perform.ai/v5-2-0/shipment/update/', 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.perform.ai/v5-2-0/shipment/update/",
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([
'tags' => [
'priority'
],
'tags_action' => 'replace'
]),
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.perform.ai/v5-2-0/shipment/update/"
payload := strings.NewReader("{\n \"tags\": [\n \"priority\"\n ],\n \"tags_action\": \"replace\"\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.perform.ai/v5-2-0/shipment/update/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n \"priority\"\n ],\n \"tags_action\": \"replace\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5-2-0/shipment/update/")
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 \"tags\": [\n \"priority\"\n ],\n \"tags_action\": \"replace\"\n}"
response = http.request(request)
puts response.read_body{
"api_response": "200",
"data": {
"shipment_uuid": "5b8ed503-20d2-46cf-8675-ce77a059f691",
"order_uuid": null,
"documents": [],
"created_date": "2026-09-19T03:26:29+00:00",
"updated_date": "2026-09-19T03:26:31+00:00"
}
}{
"api_response": "<string>",
"warnings": {},
"data": {}
}{
"api_response": "<string>",
"message": "<string>",
"errors": {}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}