curl --request POST \
--url https://{globale_api_domain}/Order/DispatchOrders \
--header 'Content-Type: application/json' \
--data '
{
"OrderIds": [
"GE11111111GB",
"GE2222211GB"
],
"HubCode": "hub001"
}
'import requests
url = "https://{globale_api_domain}/Order/DispatchOrders"
payload = {
"OrderIds": ["GE11111111GB", "GE2222211GB"],
"HubCode": "hub001"
}
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({OrderIds: ['GE11111111GB', 'GE2222211GB'], HubCode: 'hub001'})
};
fetch('https://{globale_api_domain}/Order/DispatchOrders', 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}/Order/DispatchOrders",
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([
'OrderIds' => [
'GE11111111GB',
'GE2222211GB'
],
'HubCode' => 'hub001'
]),
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}/Order/DispatchOrders"
payload := strings.NewReader("{\n \"OrderIds\": [\n \"GE11111111GB\",\n \"GE2222211GB\"\n ],\n \"HubCode\": \"hub001\"\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}/Order/DispatchOrders")
.header("Content-Type", "application/json")
.body("{\n \"OrderIds\": [\n \"GE11111111GB\",\n \"GE2222211GB\"\n ],\n \"HubCode\": \"hub001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/Order/DispatchOrders")
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 \"OrderIds\": [\n \"GE11111111GB\",\n \"GE2222211GB\"\n ],\n \"HubCode\": \"hub001\"\n}"
response = http.request(request)
puts response.read_body{
"IsSuccess": true,
"ShipperManifests": [
{
"DocumentTypeCode": "3",
"DocumentTypeName": "ShipperManifest",
"DocumentExtension": "pdf",
"URL": "https://assets.global-e.com/documents/04552836-ED8F-4362-AE09-FAB014DAA421.pdf",
"DocumentData": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G",
"ErrorMessage": null
}
]
}Dispatch orders (Merchant to Global-e)
The DispatchOrders API provides the necessary carrier manifest, encoded as a base64 byte array, and a printing URL for all orders with printed labels since the last DispatchOrders call.
curl --request POST \
--url https://{globale_api_domain}/Order/DispatchOrders \
--header 'Content-Type: application/json' \
--data '
{
"OrderIds": [
"GE11111111GB",
"GE2222211GB"
],
"HubCode": "hub001"
}
'import requests
url = "https://{globale_api_domain}/Order/DispatchOrders"
payload = {
"OrderIds": ["GE11111111GB", "GE2222211GB"],
"HubCode": "hub001"
}
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({OrderIds: ['GE11111111GB', 'GE2222211GB'], HubCode: 'hub001'})
};
fetch('https://{globale_api_domain}/Order/DispatchOrders', 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}/Order/DispatchOrders",
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([
'OrderIds' => [
'GE11111111GB',
'GE2222211GB'
],
'HubCode' => 'hub001'
]),
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}/Order/DispatchOrders"
payload := strings.NewReader("{\n \"OrderIds\": [\n \"GE11111111GB\",\n \"GE2222211GB\"\n ],\n \"HubCode\": \"hub001\"\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}/Order/DispatchOrders")
.header("Content-Type", "application/json")
.body("{\n \"OrderIds\": [\n \"GE11111111GB\",\n \"GE2222211GB\"\n ],\n \"HubCode\": \"hub001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/Order/DispatchOrders")
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 \"OrderIds\": [\n \"GE11111111GB\",\n \"GE2222211GB\"\n ],\n \"HubCode\": \"hub001\"\n}"
response = http.request(request)
puts response.read_body{
"IsSuccess": true,
"ShipperManifests": [
{
"DocumentTypeCode": "3",
"DocumentTypeName": "ShipperManifest",
"DocumentExtension": "pdf",
"URL": "https://assets.global-e.com/documents/04552836-ED8F-4362-AE09-FAB014DAA421.pdf",
"DocumentData": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G",
"ErrorMessage": null
}
]
}Body
"eCommerce order number" as passed down in the order payload. For Shopify, should be either the Shopify Order Name (default), e.g. #12345; or the Shopify Order Number, e.g. 12345.
When dispatching from multiple hubs, indicates for a given call which hub the related shipment will be dispatched from.
Response
Successful response.
Indicates whether the API call was successful.
Description of the error for getting documents.
List of OrderDocument objects that hold shipper manifest documents.
Show child attributes
Show child attributes
List of Merchant.ParcelTracking objects, each holding the parcel tracking number and full tracking URL for the relevant shipper (with the parcel tracking number).
Show child attributes
Show child attributes
Order tracking information.
Show child attributes
Show child attributes
List of DeliveryAdviceInformation objects that hold the information required for the Delivery Advice document.
Show child attributes
Show child attributes

