Returns via API
As part of Global-e's comprehensive solution, Global-e delivers a Returns Portal branded with the merchant logo and theme as well as a unique URL to access your Returns Portal.
Merchants who have their own returns portal and third-party return portals can use Global-e Return APIs to integrate functionality for Global-e return shipping options, as well as to obtain required return documents and manage tracking information.
For further information, please consult the pre-integrated third party returns providers list.
For a new third-party integration please contact your representative at Global-e.
Functional documentation
Global-e Return API’s are designed to provide a comprehensive solution for the return flow.
Global-e Return APIs
GetReturnShippingOptions API - Used to receive a list of return shipping methods available for a specific order and its associated costs.
GetReturnDocuments API - Used to receive return documents and related information, including the label, the tracking number, the tracking URL, the shipper’s name, the commercial invoice (if relevant), the RMA number, and the return note.
GetTrackingEvents API - Used to receive status events on the delivery status of an order/return.
High-level flow
Following is the recommended high-level workflow for the product(s) return process.
Shopper initiates a return, usually using an Order ID and an Email.
Shopper selects the return product(s) and the reason(s) for his return.
Returns Portal calls GetReturnShippingOptions API to receive a list of available return shipping methods and their associated prices configured on Global-e.
Returns Portal displays the available return shipping methods.
The return shipping price received from Global-e via the API can be overridden by the Returns Portal.
Additional refund\credit methods, such as store credit, can be offered to the shopper.
Once the shopper selects the desired return shipping method, the Returns Portal calls GetReturnDocuments API to generate a Global-e RMA and receive all the required return documents.
Global-e returns all the required documents as a single PDF file including tracking information, if relevant.
Returns Portal shows a confirmation page indicating the return was issued with the documents available for download.
Global-e sends an RMA email - a return request confirmation email - to the shopper with the relevant documents attached.
The RMA email can be disabled on the Global-e side and managed by the Returns Portal. To disable it please refer to your Global-e representative.
Shopper ships the return package using the return documents.
Optional: the Returns Portal calls the Tracking Events API to get all the tracking events for a given tracking number. (Not all returns are trackable)
Based on the merchant policy, the shopper should be refunded for the returned items (after shipping cost deduction). The merchant portal can use standard Global-e functionality with web portal, pre-integrated webhooks, or Refund APIs.
Integrated Returns Portal
Following is a list of pre-integrated third party returns providers.
Returns Provider | Integrated APIs | Supported Functionalities | Further Information |
|---|---|---|---|
BabackVision | Returns with:
| ||
ChapsVision | Returns with:
| ||
EasyCom | Returns with:
| ||
Loop |
| ||
ParcelLab | Returns with:
|
GetReturnShippingOptions (Merchant to Global-e)
The Return Shipping Options API provides essential return information, including a list of return shipping methods and costs.
Important
Global-e must enable and configure this API on the Global-e side.
Method/URL
POST https://{globale_api_domain}/Return/GetReturnShippingOptionsParameters
Request
Parameter Name | Type | Description | Mandatory |
|---|---|---|---|
| String | 10-character code. Default is EN Maximum: 10 characters. | No |
| String | The currency of the return prepaid shipping cost. This is a 3-char ISO currency code. The default should be the same as the origin order currency. If the submitted order currency is not the same as the (outbound) order, apply the currency exchange. | No |
| String | Email that identifies the source of the request. | No |
| String | Unique Global-e Order ID or Merchant Order ID. Maximum: 100 characters. | Yes |
| String | Provider name that identifies the source of the request. | Yes |
| Array of |
| Yes |
| Long | Provides the ID of the return shipping method. | No |
Response
Parameter Name | Type | Description | Mandatory |
|---|---|---|---|
| Double | The cost of the shipment | Yes |
| String | 3-letter currency ISO code | Yes |
| String | Whether this is a label-free return (QR code only). | No |
| String | Identifies whether this is a trackable return. | Yes |
| String | The unique merchant Order ID. Maximum: 100 characters | Yes |
| String | The unique Global-e Order ID. Maximum: 100 characters | Yes |
| Object | The Contains the following values:
| Yes |
| Array of |
| Yes |
| String | Description of the shipping method. | Yes |
| Integer | The shipping method identifier. Can be used when calling GetReturnDocuments to receive the return document for the selected shipping method. | Yes |
| String | Identifies the shipping method type. | Yes |
| Integer | Possible values:
Can be used when calling GetReturnDocuments to receive the return document for the selected shipping method. | Yes |
| String | The name of the shipping service of the return provider | Yes |
Errors
General Error Response
{
"Code": "error code",
"Error": "error message",
"Description: "error description"
} Error Codes
Code | Message |
|---|---|
E01 | Could not find an available shipping method (No shipping method was found for the submitted products and quantities) |
E02 | Return is not allowed due to order status % (Relates to Allowed Return Statuses) |
E03 | Order ID not found (Returned if the provided OrderId cannot be found for the merchant) |
E04 | Currency is not valid |
E05 | There are multiple orders with this |
E06 | The |
ME01 | Input value for |
ME02 | Input value for |
ME03 | Input value for |
ME06 | Input value for |
ME07 | Input value for |
ME09 | Input value for |
ME10 | Input value for |
ME12 | Input value for |
ME13 | Input value for |
SME15 | Input value for |
Product Errors
Examples
Examples
Request
{
"ProviderCode": "ExampleProvider",
"OrderId": "EUQA6215359",
"Email": [email protected],
"ReturnedProducts": [
{
"ProductCode": "433117270672",
"ReturnQuantity": 1
}
]
} Response
{
"IsSuccess": true,
"Data": {
"OrderId": "GE10470948238NL",
"MerchantOrderId": "EUQA6215359",
"ReturnShippingMethods": [
{
"ShippingMethodId": 40044878,
"ShippingMethodDescription": "DHL-GlobalE",
"ShippingMethodType": "Express Courier (Air)",
"ShippingMethodTypeID": 2,
"ShipperName": "DHL",
"IsQrLabel": false,
"IsTrackable": true,
"Cost": 0.0,
"Currency": "EUR"
}
],
"ReturnShippingDestinationDetails": {
"Country": "Netherlands",
"City": "Amsterdam",
"Address": "Ood 5",
"Zip": "4751XK",
"StateOrProvince": "",
"Email": [email protected],
"Phone": "310610887191"
}
}GetReturnDocuments (Merchant to Global-e)
Use the GetReturnDocuments API to integrate the return documents capability into your Returns Portal or through a third party returns provider.
Important
Global-e enables and configures this API on the Global-e side.
The API provides return documents and related information, including:
The label
The tracking number
The tracking URL
The shipper's name
The commercial invoice (if relevant)
The return merchandise authorization (RMA) number
The return note
In addition, as part of the process, Global-e produces a Global-e RMA.
If so requested by a merchant, Global-e can configure whether to send RMA letters to customers and whether to disable sending RMA information to the merchant. Electronic invoices are not returned.
Method/URL
POST https://{globale_api_domain}/Return/GetReturnDocumentsParameters
Request
Field | Type | Description | Mandatory |
|---|---|---|---|
| String | The currency of the returned prepaid shipping cost. 3-character ISO code. | Mandatory if ShippingCost has a greater value than 0. |
| String | The language for the Return Note document. 3-character ISO code. Currently, English is the only supported language. | No |
| String | The customer's email address. Maximum 100 characters. | No |
| Boolean | Indicates if return is created for service | No |
| String | The Merchant's internal return merchandise authorization (RMA) Number. Maximum 200 characters. | No |
| String | Then unique Order ID. Maximum 100 characters. | Yes |
| String | The provider's name identifies the source of the request. | No |
| Object | The merchant hub delivery address with return details. | No |
| Array | An array containing the returned products' details. Contains array of ReturnedProduct objects:
| Yes |
| Integer | Based on the end customer's selected shipping method, as returned in the Get Return Shipping Options response. If empty, Global-e uses the cheapest method based on the return shipping type ID (or self-postage if configured) | No |
| Integer | Possible values:
| No |
| Decimal | The prepaid shipping cost associated with the return. If not provided, then the ShippingCost will be the configured prepaid/flat return rate. | No |
Response
When the API call is successful, the call returns the documents required for the return process.
Name | Type | Description |
|---|---|---|
| Boolean | True: If the API call is successful. False: If the API call fails. |
| Object | Data regarding the return, including:
|
Errors
Error Codes
Code | Message |
|---|---|
E01 | Could not create the shipping label. (Note: Not applicable to the self-postage option.) |
E02 | The return is not allowed due to the order status ({0}) (Global-e can enable the E02 error code and validate the order status through configuration.) |
E03 | The Order ID was not found |
E04 | There is already an RMA request for this order ({0}) |
E07 | The return is not allowed due to the parcel status ({0}). |
E08 | Unable to find the shipping method for the provided return shipping method Id ({0}) |
E09 | The provided |
E10 | There are multiple orders with this Order ID ({0}) |
E11 | No shipping options were found for the order return ({0}) |
E12 | The return shipping address was not found for order ({0}) |
E13 | Invalid currency code for the provided shipping cost for order ({0}) |
E14 | The return shipping cost cannot be a negative number |
E15 | The return shipping cost is greater than the return product price |
E16 | Return address country code is not valid |
E17 | Return address state code is not valid or does not belong to the country |
E18 | Return address country is not allowed for given order |
E19 |
|
E20 |
|
Product Errors
Model Validation Errors
Code | Message |
|---|---|
ME01 | The input value for |
ME02 | The input value for |
ME03 | The input value for |
ME04 | The input value for |
ME05 | The input value for |
ME06 | The input value for |
ME07 | The input value for |
ME08 | The input value for |
ME09 | The input value for |
ME10 | The input value for |
ME11 | The input value for |
ME12 | The input value for |
ME13 | The input value for |
ME14 | The input value for |
ME15 | The input value for |
ME16 | "Input value for |
ME17 | Input value for |
ME19 | Input value for |
ME20 | Input value for |
ME21 | Input value for |
ME22 | Input value for |
ME23 | Input value for |
ME24 | Input value for |
ME25 | Input value for |
ME26 | Input value for |
ME27 | Input value for |
ME28 | Input value for |
ME29 | Input value for |
ME30 | Input value for |
ME31 | Input value for |
ME32 | Input value for |
ME33 | Input value for |
Examples
Request
curl --location 'https://[globale domain]/Return/GetReturnDocuments' \
--header 'MerchantGUID: D2ED2A7F-F6ED-4CCB-B611-B44AC8D02250' \
--header 'Content-Type: application/json' \
--data-raw '{ "ProviderCode": "Loop",
"OrderId": "GE314856569TS",
"Email": "[email protected]",
"MerchantRMANumber": "RM132",
"ShippingCost": 10.0,
"CurrencyCode": "USD",
"ReturnShippingTypeId": 2,
"ReturnShippingMethodId": null,
"ReturnedProducts": [
{
"ProductCode": "DKB500680.M8",
"CartItemId": null,
"ReturnQuantity": 1,
"MerchantReturnReasonCode": "",
"MerchantReturnReasonDescription": "Return Reason from GRD request for product 1"
},
{
"ProductCode": "B7ECS.C8",
"CartItemId": 1,
"ReturnQuantity": 1,
"MerchantReturnReasonCode": "TTT",
"MerchantReturnReasonDescription": "Return Reason from GRD request for product 2"
}
]
}' Responses
Success
{
"IsSuccess": true,
"Data": {
"OrderId": "GE314856569TS",
"MerchantOrderId": "314856569",
"GlobaleRmaNumber": "371104",
"ReturnTrackingDetails": {
"TrackingNumber": "1ZXXXXXXXXXXXXXXXX",
"TrackingURL": "https://wwwapps.ups.com/tracking/tracking.cgi?tracknum=1ZX&requester=ST/",
"IsQrLabel": "false",
"IsTrackable": true
},
"ReturnDocuments": [
{
"DocumentTypeCode": "ShippingLabel",
"DocumentTypeName": "Shipping Label",
"DocumentData": "AQCkosNhECNeAACYzH/NIA5NgtHU2QAAAABJRU5ErkJggg==",
"URL": "https://[MerchantDomain]/url"
}
]
},
}Failure
{
"Code": "error code",
"Error": "error message",
"Description: "error description"
}Example 1
"IsSuccess": false,
"Errors": [
{
"Code": "E500",
"Error": "We encountered an unexpected error and are working to resolve the issue”,
"Description": null,
"Success": false
}
]
}Example 2
{
"IsSuccess": false,
"Errors": [
{
"Code": "PE27",
"Error": "Return products collection has duplication",
"Description": null,
"Success": false
},
{
"Code": "PE07",
"Error": "Return product (DKB500680.M8) was not found for order",
"Description": null,
"Success": false
},
{
"Code": "PE07",
"Error": "Return product (B7ECS.C8) was not found for order",
"Description": null,
"Success": false
}
]
}