Update Shipment
Updates an existing Shipment, identified by the shipment_uuid or
shipment_id query parameter.
Replace vs add: most fields replace the stored value entirely —
including the whole line_items array, the whole shipping_costs
array, and each address object as a unit. Four fields are add-only:
tags, events, linked_shipments, and documents — values you send
are appended, never removed (use the v5.2 endpoint’s tags_action to
remove or replace tags).
Immutability: shipment_id can be set once on a Shipment created
without one, and never changed after. tracking_number and
carrier_reference can be changed only while the Shipment has no track
events. A Return Shipment cannot be updated after a successful carrier
booking.
curl --request POST \
--url https://api.perform.ai/v5/shipment/update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "Fragile — repack before dispatch",
"tags": [
"repacked"
]
}
'import requests
url = "https://api.perform.ai/v5/shipment/update/"
payload = {
"note": "Fragile — repack before dispatch",
"tags": ["repacked"]
}
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({note: 'Fragile — repack before dispatch', tags: ['repacked']})
};
fetch('https://api.perform.ai/v5/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/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([
'note' => 'Fragile — repack before dispatch',
'tags' => [
'repacked'
]
]),
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/shipment/update/"
payload := strings.NewReader("{\n \"note\": \"Fragile — repack before dispatch\",\n \"tags\": [\n \"repacked\"\n ]\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/shipment/update/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"Fragile — repack before dispatch\",\n \"tags\": [\n \"repacked\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5/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 \"note\": \"Fragile — repack before dispatch\",\n \"tags\": [\n \"repacked\"\n ]\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": "4030",
"message": "validation_error",
"errors": {
"tracking_number": [
"tracking_number cannot be changed for a shipment with events"
]
}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}Authorizations
Query Parameters
Body
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.
curl --request POST \
--url https://api.perform.ai/v5/shipment/update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "Fragile — repack before dispatch",
"tags": [
"repacked"
]
}
'import requests
url = "https://api.perform.ai/v5/shipment/update/"
payload = {
"note": "Fragile — repack before dispatch",
"tags": ["repacked"]
}
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({note: 'Fragile — repack before dispatch', tags: ['repacked']})
};
fetch('https://api.perform.ai/v5/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/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([
'note' => 'Fragile — repack before dispatch',
'tags' => [
'repacked'
]
]),
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/shipment/update/"
payload := strings.NewReader("{\n \"note\": \"Fragile — repack before dispatch\",\n \"tags\": [\n \"repacked\"\n ]\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/shipment/update/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"Fragile — repack before dispatch\",\n \"tags\": [\n \"repacked\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perform.ai/v5/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 \"note\": \"Fragile — repack before dispatch\",\n \"tags\": [\n \"repacked\"\n ]\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": "4030",
"message": "validation_error",
"errors": {
"tracking_number": [
"tracking_number cannot be changed for a shipment with events"
]
}
}{
"api_response": 403,
"message": "Key not authorized"
}{
"api_response": 429,
"message": "Throttled"
}{
"api_response": "500",
"message": "System error"
}