Void a declared parcel
curl --request POST \
--url https://{globale_api_domain}/Parcel/VoidParcel \
--header 'Content-Type: application/json' \
--data '
{
"OrderId": "#12354",
"ParcelCode": "454234",
"MerchantOrderId": "#1138"
}
'import requests
url = "https://{globale_api_domain}/Parcel/VoidParcel"
payload = {
"OrderId": "#12354",
"ParcelCode": "454234",
"MerchantOrderId": "#1138"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({OrderId: '#12354', ParcelCode: '454234', MerchantOrderId: '#1138'})
};
fetch('https://{globale_api_domain}/Parcel/VoidParcel', 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://{globale_api_domain}/Parcel/VoidParcel",
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([
'OrderId' => '#12354',
'ParcelCode' => '454234',
'MerchantOrderId' => '#1138'
]),
CURLOPT_HTTPHEADER => [
"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://{globale_api_domain}/Parcel/VoidParcel"
payload := strings.NewReader("{\n \"OrderId\": \"#12354\",\n \"ParcelCode\": \"454234\",\n \"MerchantOrderId\": \"#1138\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://{globale_api_domain}/Parcel/VoidParcel")
.header("Content-Type", "application/json")
.body("{\n \"OrderId\": \"#12354\",\n \"ParcelCode\": \"454234\",\n \"MerchantOrderId\": \"#1138\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/Parcel/VoidParcel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"OrderId\": \"#12354\",\n \"ParcelCode\": \"454234\",\n \"MerchantOrderId\": \"#1138\"\n}"
response = http.request(request)
puts response.read_body{
"IsSuccess": true,
"Errors": []
}Void parcel (Merchant to Global-e)
The Void Parcel API lets you take out a declared parcel if you do not intend to send it or if it needs to be updated due to changed shipment requirements.
POST
/
Parcel
/
VoidParcel
Void a declared parcel
curl --request POST \
--url https://{globale_api_domain}/Parcel/VoidParcel \
--header 'Content-Type: application/json' \
--data '
{
"OrderId": "#12354",
"ParcelCode": "454234",
"MerchantOrderId": "#1138"
}
'import requests
url = "https://{globale_api_domain}/Parcel/VoidParcel"
payload = {
"OrderId": "#12354",
"ParcelCode": "454234",
"MerchantOrderId": "#1138"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({OrderId: '#12354', ParcelCode: '454234', MerchantOrderId: '#1138'})
};
fetch('https://{globale_api_domain}/Parcel/VoidParcel', 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://{globale_api_domain}/Parcel/VoidParcel",
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([
'OrderId' => '#12354',
'ParcelCode' => '454234',
'MerchantOrderId' => '#1138'
]),
CURLOPT_HTTPHEADER => [
"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://{globale_api_domain}/Parcel/VoidParcel"
payload := strings.NewReader("{\n \"OrderId\": \"#12354\",\n \"ParcelCode\": \"454234\",\n \"MerchantOrderId\": \"#1138\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://{globale_api_domain}/Parcel/VoidParcel")
.header("Content-Type", "application/json")
.body("{\n \"OrderId\": \"#12354\",\n \"ParcelCode\": \"454234\",\n \"MerchantOrderId\": \"#1138\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/Parcel/VoidParcel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"OrderId\": \"#12354\",\n \"ParcelCode\": \"454234\",\n \"MerchantOrderId\": \"#1138\"\n}"
response = http.request(request)
puts response.read_body{
"IsSuccess": true,
"Errors": []
}Part of the Cancelling Declared Parcels integration guide — see it for when and how to use this endpoint.
Body
application/json
Response
200 - application/json
Result of the void request. Object-level problems are reported in the body with the Errors array populated; IsSuccess can still be true for a logged shipper-cancel failure (code C102).
Indicates whether the parcel was voided successfully.
Error entries; empty on success. Documented Void Parcel error codes are C100 and C101 (parcel cannot be voided due to its status), C102 (parcel voided but the shipper's cancel API failed — logged, with IsSuccess still true), C103 (internal unknown failure), and C104 (parcel code not found or already voided).

