Skip to main content

Documentation Portal

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_lines code 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_id field 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/GetShippingDocuments

Parameters: Processing attributes

UpdateOrderDispatchRequest

Description

OrderId

“eCommerce order number” as passed down in the order payload,

For Shopify, should be either:

  • Shopify Order Name (default), eg. #12345

  • Shopify Order Number, eg. 12345

DeliveryReferenceNumber (optional)

Additional informative dispatch reference

HubCode*

(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 HScode, the Merchant can use this parameter to provide additional information.

→ → name

Name of additional information item, for example ITNNumber.

→ → value

Value of additional information item.

Response Parameters:

OrderDocumentsResponse

Description

IsSuccess

Indicates whether the API call was successful.

ErrorText

Description of the error for getting documents.

List<OrderDocument> Documents

(optional)

List of OrderDocument objects that hold the shipping documents.

DocumentData

Base64 encoded byte array representing the document file content.

URL

URL of the document.

DocumentTypeCode

Note: For PLT countries, the commercial invoice is not returned in the response.

Document type code, this value can be:

  • CommercialInvoice = 1

  • PackingList = 2

  • ShipperManifest = 3

  • Label = 4

  • VATInvoice = 5

  • DangerousGoodDeclarationLink = 6

  • GELabel = 7

  • CustomerReceiptInvoice = 8

  • ArchibeLabel = 9

  • DeliveryAdvice = 10

DocumentTypeName

Document type name such as AWB, CommercialInvoiceAndPackingList or Manifest

DocumentExtension

Document extension (pdf, zpl, epl)

ErrorMessage

Description of the error for this entity (order/parcel) if it happened.

ParcelCode

The parcel code related to the document.

List<Merchant.ParcelTracking> ParcelsTracking

(optional)

The list of Merchant.ParcelTracking objects. Each object holds the parcel tracking number and the full tracking URL of the relevant shipper (with the parcel tracking number).

ParcelTrackingNumber

The tracking number used by the selected international shipping method for this parcel.

ParcelTrackingUrl

Full tracking URL including ParcelTrackingNumber used by the selected international shipping method for this parcel.

ParcelCode

Parcel code

Merchant.TrackingDetails TrackingDetails

(optional)

Order tracking information.

TrackingNumber

The tracking number as the shipper has specified.

ShipperName

The shipping method name.

TrackingURL

Full tracking URL including the TrackingNumber used by the selected international shipping method.

List<DeliveryAdviceInformation> DeliveryAdviceInformation

(optional)

List of DeliveryAdviceInformation objects that hold the information required for the “Delivery Advice” document.

ParcelCode

CommercialInvoiceNumber

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.

TotalValue

Value of all products in the parcel.

CurrencyCode

TotalValue 3-char ISO currency code.

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)

  1. General API error as ErrorInfo:

    {
      "Code": "error code",
      "Error": "error message",
      "Description": "error description"
    }
  2. 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/DispatchOrders

PARAMETERS: Processing attributes

UpdateOrderDispatchRequest

Description

HubCode*

(optional)

When dispatching from multiple hubs, indicates for a given call which hub the related shipment will be dispatched from

List <String> OrderIds

“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)

 

DocumentData

Base64 encoded byte array representing the document file content

URL

Url for the document

DocumentTypeCode

** For PLT countries: commercial invoice won’t be returned in the response**

Document type code, this value can be:

  • CommercialInvoice = 1

  • PackingList = 2

  • ShipperManifest = 3

  • Label = 4

  • VATInvoice = 5

  • DangerousGoodDeclarationLink = 6

  • GELabel = 7

  • CustomerReceiptInvoice = 8

  • ArchibeLabel = 9

DeliveryAdvice = 10

DocumentTypeName

Document type name, e.g. AWB, CommercialInvoiceAndPackingList or Manifest

DocumentExtension

Document extension (pdf, zpl, epl)

ErrorMessage

Description of the error for this entity (order/parcel) if it happened

ParcelCode

The parcel code related to the document

ShippingServiceName

The name of the shipping service for this document

List<Merchant.ParcelTracking> ParcelsTracking

List of Merchant.ParcelTracking objects, each object holds the parcel tracking number and full tracking URL for the relevant shipper (with the parcel tracking number).

(optional)

ParcelTrackingNumber

The tracking number used by the selected international shipping method for this parcel.

ParcelTrackingUrl

Full tracking URL including ParcelTrackingNumber used by the selected international shipping method for this parcel.

ParcelCode

Parcel code

Merchant.TrackingDetails TrackingDetails

Order tracking information.

(optional)

TrackingNumber

The tracking number as the shipper has specified.

ShipperName

The shipping method name.

TrackingURL

Full tracking URL including TrackingNumber used by the selected international shipping method.

List<DeliveryAdviceInformation> DeliveryAdviceInformation (optional)

List of DeliveryAdviceInformation objects that hold the information required for the Delivery Advice document.

ParcelCode

Code used to identify the Parcel on the Merchant’s site

CommercialInvoiceNumber

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.

TotalValue

Value of all products in the parcel

CurrencyCode

TotalValue 3-char ISO currency code

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 ShipperName returned by the GetShippingDocuments call

  • Tracking Number: Use the ParcelTrackingNumber returned by the GetShippingDocuments call

  • Items: Only those items that have shipped with this label should be identified