Integration Steps
Identify Orders Processed via the Global‑e API
You can receive orders directly on your eCommerce platform or via 3rd party integrations.
Accordingly, the following scenarios should be supported to associate orders with the Global‑e integration to generate shipping documentation:
Shipping/Carrier code as provided in the order payload received
In Shopify’s context, such indication is available via the order
shipping_linescode or title field. Mapping of values presented in these fields should allow mapping orders to the Global‑e integration.Outside Shopify, standard carrier mapping as currently performed should be used.
Additionally when using a direct integration with Shopify to retrieve orders, for example, Managed Markets, the merchant_of_record_app_id field will be provided. When Global‑e is responsible for an order, this value will be set to 2745565185. However, if you are an independent merchant doing this integration, you may choose either of the methods above per your integration.
The
merchant_of_record_app_idfield is available on Shopify webhooks, RESTful GET Orders calls or GraphQL queries. Version 2022-10 or later of the Shopify API is required for this field to be present.
Both methods should be implemented to comply with different merchant setups in pushing orders to the WMS/3PL.
Orders will arrive via the same channel as all other orders for a merchant. It’s important to map such orders and prevent them from being shipped via means other than Global‑e.
Declare Order Fulfilment and Get Documents
GetShippingDocuments
From the orders indicated as fulfilled with possible exceptions, the Global‑e API will return the required shipping documentation as a base64 encoded byte array and URL for printing
Method/URL
POST https://{globale_api_domain}/Order/GetShippingDocumentsParameters: Processing attributes
UpdateOrderDispatchRequest | Description |
|---|---|
| “eCommerce order number” as passed down in the order payload, For Shopify, should be either:
|
| Additional informative dispatch reference |
(optional) | When dispatching from multiple hubs, indicates for a given call which hub the related shipment will be dispatched from |
List <Parcel> Parcels | |
→ ParcelCode (Required & MAX 20 characters) | Unique identifier for each parcel(/package) to be shipped Can be freely generated in any range as long as unique and no longer than 20 characters. |
→ List <Product> Products | ProductCode (Required) Product reference from the merchant as available in the eCommerce platform. For Shopify, should be either: Shopify SKU or Barcode for the product to be shipped |
→ → DeliveryQuantity (Required) | Quantity of a product to be shipped |
→ ShippingAdditionalInformation (Optional) | Details about additional shipping information. If a shipment contains one or multiple items with the exact same |
→ → name | Name of additional information item, for example |
→ → value | Value of additional information item. |
Response Parameters:
OrderDocumentsResponse | Description |
|---|---|
| Indicates whether the API call was successful. |
| Description of the error for getting documents. |
List< (optional) | List of |
→ | Base64 encoded byte array representing the document file content. |
→ | URL of the document. |
→ | Note: For PLT countries, the commercial invoice is not returned in the response. Document type code, this value can be:
|
→ | Document type name such as AWB, CommercialInvoiceAndPackingList or Manifest |
→ | Document extension (pdf, zpl, epl) |
→ | Description of the error for this entity (order/parcel) if it happened. |
→ | The parcel code related to the document. |
List< (optional) | The list of |
→ | The tracking number used by the selected international shipping method for this parcel. |
→ | Full tracking URL including ParcelTrackingNumber used by the selected international shipping method for this parcel. |
→ | Parcel code |
Merchant.TrackingDetails TrackingDetails (optional) | Order tracking information. |
→ | The tracking number as the shipper has specified. |
→ | The shipping method name. |
→ | Full tracking URL including the |
List< (optional) | List of |
→ | |
→ | Commercial invoice number of the parcel if it exists on the parcel level, otherwise order commercial invoice number. Can be null if a commercial invoice does not exist for the order. |
→ | Value of all products in the parcel. |
→ |
|
Example Request POST Request
UpdateOrderDispatchRequest
{
"OrderId": "GE123874638GB",
"HubCode": "hub001",
"DeliveryReferenceNumber": "123756483",
"Parcels": [
{
"ShippingAdditionalInformation":[
{
"name":"ITNNumber",
"value":"X202487492387"
}],
"ParcelCode": "123454321",
"Products": [
{
"DeliveryQuantity": 1,
"ProductCode": "sku121212",
},
{
"DeliveryQuantity": 2,
"ProductCode": "sku131313"
}
]
}
]
}Example Success Response:
OrderDocumentsResponse with List<OrderDocument> Documents
{
"IsSuccess": true,
"ErrorText": null,
"Documents":
[
{
"DocumentTypeCode": "4",
"DocumentTypeName": "AWB",
"DocumentExtension": "zpl",
"URL": "https://assets.global-e.com/documents/478D-AA72-1EB8BBDD7C27.zpl",
"DocumentData": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G"
},
{
"DocumentTypeCode": "1",
"DocumentTypeName": "CommercialInvoiceAndPackingList",
"DocumentExtension": "pdf",
"URL": "https://assets.global-e.com/documents/AE09-FAB014DAA421.pdf",
"DocumentData": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G",
"ErrorMessage": null
}
],
"ParcelsTracking": [
{
"ParcelTrackingNumber": "9895722141",
"ParcelTrackingUrl": " https://mydhl.express.dhl/us/en/tracking.html#/results?id=9895722141",
"ParcelCode": "123454321"
}
]
}ERROR RESPONSES
HTTP Error code as 500, 400 (or 200)
General API error as
ErrorInfo:{ "Code": "error code", "Error": "error message", "Description": "error description" }Object processing error as
OrderDocumentsResponse:{ "IsSuccess": false, "ErrorText": "Could not retrieve documents and/or process order. Either order is in wrong status (Cancelled) or partial information provided.", "Documents": null, "ParcelTracking": null, "TrackingDetails": null, "Errors": [ { "OrderID": "GE3008553US", "ErrorCode": "A200", "ErrorText": "Could not retrieve documents and/or process order. Either order is in wrong status (Cancelled) or partial information provided.", "MerchantOrderID": null } ] }
The response of the Get Shipping Documents API call (GSD) will include the tracking information of the shipment(s). Tracking information includes:
Shipper Name (order level)
Tracking Number (for each parcel and order level)
Tracking URL (for each parcel and order level)
Tracking should always be stored from the ParcelsTracking array by matching the relevant parcel code tracking.
If the tracking is done on the order level, the tracking information of the order (Tracking Number and URL) will be populated on the parcel level as well (with the same values).
OrderDocument DocumentTypeCode list
Use DocumentTypeCode to identify the type of document returned by the API and how to print it.
Labels for Zebra/Thermal Printer
DocumentTypeCode | Description | Paper format | Notes |
|---|---|---|---|
4 | Carrier Label | 6x4 | For direct dispatch |
7 | GELabel | 6x4 | |
9 | ArchiveLabel | 6x4 | Only for specific |
A4 / Letter Size for Laser printer
DocumentTypeCode | Description | Paper format | Notes |
|---|---|---|---|
1 | CommercialInvoice | A4 / Letter Size | Provided only for destinations not supporting electronic customs declarations |
5 | VATInvoice | A4 / Letter Size | legacy |
6 | DangerousGoods | A4 / Letter Size | Only for merchants shipping Dangerous Goods |
10 | Delivery Advice | A4 / Letter Size | For specific UAE Free Trade Zones requirements |
Notify Order Dispatch and Retrieve Carrier Manifest
DispatchOrders
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. Non-Shopify orders are tagged as Dispatched to Customer and set up to send tracking notification emails.
Method/URL
POST https://{globale_api_domain}/Order/DispatchOrdersPARAMETERS: Processing attributes
UpdateOrderDispatchRequest | Description |
|---|---|
(optional) | When dispatching from multiple hubs, indicates for a given call which hub the related shipment will be dispatched from |
List <String> | “eCommerce order number” as passed down in order payload For Shopify, should be either : Shopify Order Name (default), eg. #12345 Shopify Order Number, eg. 12345 |
EXAMPLES
Request
{
"OrderIds": [
"GE11111111GB", "GE2222211GB"
],
"HubCode": "hub001"
}Response: OrderDocumentsResponse
{
"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
},
{
"DocumentTypeCode": "3",
"DocumentTypeName": "ShipperManifest",
"DocumentExtension": "pdf",
"URL": "https://assets.global-e.com/documents/8F0B8A31-B424-478D-AA72-1EB8BBDD7C27.pdf",
"DocumentData": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G"
}
]
}Response
OrderDocumentsResponse | |||
|---|---|---|---|
IsSuccess | - | Indicates whether the API call was successful | |
ErrorText | - | Description of the error for getting documents | |
List<OrderDocument> ShipperManifests List of OrderDocument objects that hold shipper manifest documents. (Optional) |
| Base64 encoded byte array representing the document file content | |
| Url for the document | ||
| ** For PLT countries: commercial invoice won’t be returned in the response** | Document type code, this value can be:
DeliveryAdvice = 10 | |
| Document type name, e.g. AWB, CommercialInvoiceAndPackingList or Manifest | ||
| Document extension (pdf, zpl, epl) | ||
| Description of the error for this entity (order/parcel) if it happened | ||
| The parcel code related to the document | ||
| The name of the shipping service for this document | ||
List<Merchant.ParcelTracking> ParcelsTracking List of (optional) |
| The tracking number used by the selected international shipping method for this parcel. | |
| Full tracking URL including ParcelTrackingNumber used by the selected international shipping method for this parcel. | ||
| Parcel code | ||
Merchant.TrackingDetails TrackingDetails Order tracking information. (optional) |
| The tracking number as the shipper has specified. | |
| The shipping method name. | ||
| Full tracking URL including | ||
List<DeliveryAdviceInformation> DeliveryAdviceInformation (optional) List of DeliveryAdviceInformation objects that hold the information required for the Delivery Advice document. |
| Code used to identify the Parcel on the Merchant’s site | |
| Commercial invoice number of the parcel if it exists on the parcel level, otherwise order commercial invoice number. Can be null if a commercial invoice does not exist for the order. | ||
| Value of all products in the parcel | ||
|
|
Mark the Order Fulfilled
Once a label has been used to ship a set of goods, update the fulfilment state back to the merchant platform to complete the workflow.
Status: Success
Tracking Company: Use the
ShipperNamereturned by theGetShippingDocumentscallTracking Number: Use the
ParcelTrackingNumberreturned by theGetShippingDocumentscallItems: Only those items that have shipped with this label should be identified