MerchantGUID Authentication
To implement API calls with Global-e the merchantGUID provided by Global-e must be included in the call, to ensure successful authentication.
For the authentication, make sure to include your Merchant GUID as part of each call body parameters or as part of the header, so that Global-e can verify your identity. Make sure to use the appropriate merchantGUID, depending on the Global‑e integration environment used for development or production purposes. See Global-e Environments.
For each endpoint, perform the following steps:
Add the MerchantGUID in the request header as illustrated below. Make sure to use the appropriate merchantGUID, depending on the Global‑e integration environment used, development or production.
Make sure to implement the API on the server side (rather than calling it from the client side). Alternatively, implement it outside of the frontend layer to avoid exposing the merchant GUID publicly.
MerchantGUID Implementation
The MerchantGUID indicated in the API should be specified in the API Header.
Note: Never add the merchantGUID as a path parameter in the URL.
MerchantGUID as part of the header
Add your MerchantGUID as part of the header as in the following example:
curl --location 'https://[globale domain]/[API]' \
--header 'MerchantGUID: D2ED2A7F-F6ED-4CCB-B611-B44AC8D02250' \
--header 'Content-Type: application/json' \
--data-raw '{"key1":"value1", "key2":"value2"}'Example
curl -X GET https://[globale domain]/[API] \
-H "Authorization: Bearer jwt_token_here" \
-H "Content-Type: application/json" \
-d '{
"ProviderCode": "Loop",
"OrderId": "GE314856569TS",
"Email": "[email protected]",
"MerchantRMANumber": "RM132",
"ShippingCost": 10.0,
"CurrencyCode": "USD",
"ReturnShippingTypeId": 2,
"ReturnShippingMethodId": null,
"ReturnedProducts": [
{
"ProductCode": "DKB500680.M8",
"ProductSecondaryCode": "",
"CartItemId": null,
"ReturnQuantity": 1,
"MerchantReturnReasonCode": "",
"MerchantReturnReasonDescription": "Return Reason from GRD request for product 1"
},
{
"ProductCode": "B7ECS.C8",
"ProductSecondaryCode": "",
"CartItemId": 1,
"ReturnQuantity": 1,
"MerchantReturnReasonCode": "TTT",
"MerchantReturnReasonDescription": "Return Reason from GRD request for product 2"
}
]
}'