Skip to main content

Documentation Portal

Global‑e Shipping Options

Prerequisites
API Access

Global‑e must enable and configure each API on the Global‑e side. Make sure that Global‑e has enabled this API.

Permissions and Credentials

Make sure you have:

  • The API UserName header and the Authorization header, including the token retrieved via the GetAuthenticationToken API using merchant-specific credentials (provided to you by Global‑e).

  • Your MerchantGUID - the MerchantGUID is provided to you by Global-e during the initial setup. Note that the merchantGUID is different for test and live environments.

  • The API UserName header and the Authorizationheader, including the token retrieved via the GetAuthenticationToken API using merchant-specific credentials (provided to you by Global‑e). See the Authentication section.

GetShippingDetail

The GetShippingDetail API retrieves shipping details per cart or mini cart and product page.

Response

The API response can include up to two objects per destination:

  • Object with the cheapest estimated shipping cost for the submitted currency and amount value

  • Object with the Free Shipping threshold range (where applicable).

The returned data is determined by the submitted amount, that is, the response only returns a shipping service for which the amount passed in the request is greater than or equal to the minimum flat shipping rate range, and lower than the maximum flat shipping rate range.

Minimum flat shipping rate range ≤ product/cart amount < maximum flat shipping rate range.

Examples

Request Example

{ 
   "destinationCountry":"USA",   
   "amount":"50",
   "currencyCode":"USD",    
   "productCodes":[]
}

Response Example

[
    {
        "destinationCountry": "USA",
        "status": "active",
        "shippingRates": [
            {
                "minOrderSubtotal": 0.0000,
                "maxOrderSubtotal": 100.0000,
                "shippingCost": 15.0000,
                "shippingCostCurrency": "USD",
                "shippingPriority": "Express Courier (Air)",
                "estimatedDeliveryDays": "1-3",
                "specialOfferExpiryDate": null
            },
            {
                "minOrderSubtotal": 100.0000,
                "maxOrderSubtotal": 9999999.0000,
                "shippingCost": 0.0000,
                "shippingCostCurrency": "USD",
                "shippingPriority": "Express Courier (Air)",
                "estimatedDeliveryDays": "1-3",
                "specialOfferExpiryDate": null
            }
        ]
    }
]

Failures

Error Code 500

{
  "Code": "500",      
  "Error": "Error occurred, Please contact Global‑e",    
  "Description": "Please send valid authentication token/userName in HTTP headers (Authorization/UserName)"    
}

Error Code 401

{
    "Code": "401",
    "Error": "Parameter merchantGUID is not a valid GUID. Provided value C064DA15-65E6-42B7-B705-3554FC631.
    MerchantId=",
    "Description": "Please provide the valid merchantGUID as supplied to you during initial setup"
}

Error Code 400

{
    "Code": "400",
    "Error": "Invalid country code",
    "Description": "Country with code UT not found"
}
{
    "Code": "400",
    "Error": "Parameter Amount was not a number", 
    "Description": "Please provide a valid value for the Amount parameter"
}
{
    "Code": "400",
    "Error": "Invalid currency code",
    "Description": "Currency with code D not found"
}

Missing Parameter Error

{
    "Code": "EmptyString",
    "Error": "Parameter Currency was empty or null",    
    "Description": "Please provide a valid value for the Currency parameter"
}

Error Codes

Code

Description

400

Error. Problem with the data passed in the request payload.

401

Error. The authorization has failed for this merchant GUID. Note: The MerchantGUID is different for test and live environments.

500

Issue with JWT authentication, such as wrong credentials or expired token.

GetShippingDetailsExtended

The GetShippingDetailsExtended API extends the GetShippingDetails API to provide all flat shipping rate thresholds for all shipping services related to a product.

The GetShippingDetailsExtended API lets you:

  • Get all shipping rates available for a given country

  • Get the rates for all specific shipping service levels

  • Revert to all shipping rates available, for instance, if the request passed with amount = 0.