Skip to main content

Overview

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. Global-e Return APIs are designed to provide a comprehensive solution for the return flow:
  • 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.
For a new third-party integration please contact your representative at Global-e.

Prerequisites

  • Global-e enables and configures the Return APIs on the Global-e side. Contact your Global-e representative to set up a new third-party integration.
  • A Returns Portal — your own, or one of the pre-integrated third-party providers listed below.
  • The Global-e Order ID (or Merchant Order ID) and the shopper Email used on the order.
  • A ProviderCode that identifies the source of the request.

High-level flow

Following is the recommended high-level workflow for the product(s) return process.
  1. Shopper initiates a return, usually using an Order ID and an Email.
  2. Shopper selects the return product(s) and the reason(s) for his return.
  3. Returns Portal calls GetReturnShippingOptions API to receive a list of available return shipping methods and their associated prices configured on Global-e.
  4. 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.
  5. Additional refund/credit methods, such as store credit, can be offered to the shopper.
  6. 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.
  7. Returns Portal shows a confirmation page indicating the return was issued with the documents available for download.
  8. 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.
  9. Shopper ships the return package using the return documents.
  10. 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.)
  11. 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 ProviderIntegrated APIsSupported FunctionalitiesFurther Information
BabackVisionGetReturnDocuments APIReturns with a single shipping method per country; free shipping cost
ChapsVisionGetReturnDocuments APIReturns with a single shipping method per country; free shipping cost
EasyComGetReturnDocuments APIReturns with a single shipping method per country; free shipping cost
LoopGetReturnShippingOptions API, GetReturnDocuments APIExclusive to Shopify; returns with a single shipping method per countryLoop/Global-e Integration
ParcelLabGetReturnDocuments APIReturns with a single shipping method per country; free shipping cost

Reference

Get return shipping options — reference & playground

Request (OrderId, ProviderCode, ReturnedProducts, …), the return shipping methods and costs response, the return destination details, error shapes, examples, and the interactive playground for POST /Return/GetReturnShippingOptions.

Get return documents — reference & playground

Request (OrderId, ReturnedProducts, ReturnAddress, shipping details, …), the RMA + return-documents response, tracking details, error shapes, examples, and the interactive playground for POST /Return/GetReturnDocuments.
The GetReturnShippingOptions page also documents several standard Global-e object definitions (Attributes, BillingDetails, Brand, Category, DiscountsList, ShippingDetails, UserIdNumberType, VATRateType). These are shared, cross-endpoint objects — they are not part of the GetReturnShippingOptions request. See the Objects reference for their definitions.

Use Cases

A typical portal integration is a two-call flow: first GetReturnShippingOptions to present the available methods and costs, then GetReturnDocuments to generate the RMA and documents for the method the shopper chose.

1. Get the available return shipping options

Request the shipping methods available for the order and the products being returned.
Request
Response

2. Generate the RMA and return documents

Once the shopper selects a method, call GetReturnDocuments (passing the chosen ReturnShippingMethodId / ReturnShippingTypeId) to generate the Global-e RMA and receive the documents.
Request
Response

Error Codes

When calling the APIs, the following error codes may be returned.

GetReturnShippingOptions — Error Codes

CodeMessage
E01Could not find an available shipping method (No shipping method was found for the submitted products and quantities)
E02Return is not allowed due to order status %Order Status% (Relates to Allowed Return Statuses)
E03Order ID not found (Returned if the provided OrderId cannot be found for the merchant)
E04Currency is not valid
E05There are multiple orders with this orderID %orderID%
E06The ReturnShippingMethodId %ReturnShippingMethodId% is not valid
ME01Input value for ProductCode is not valid
ME02Input value for CartItemId is not valid
ME03Input value for ReturnQuantity is not valid
ME06Input value for OrderId is not valid
ME07Input value for Email is not valid
ME09Input value for ReturnedProducts is not valid
ME10Input value for CultureCode is not valid
ME12Input value for CurrencyCode is not valid
ME13Input value for ProviderCode is not valid
SME15Input value for ReturnShippingMethodId is not valid

GetReturnShippingOptions — Product Errors

CodeMessage
PE01Unable to process this request as the returns period has expired for product %Product% (Global-e can enable the PE01 error, and whether to enable validation for expired return periods, through configuration)
PE02Return product %Product% was not found for order
PE03Product %Product% is not returnable
PE04Requested return product quantity was not delivered to customer %Customer%
PE05Requested return product is virtual ({0})
PE06Requested return product contains dangerous goods ({0})
PE07Requested return product quantity is zero ({0})
PE08OrderProduct was not found for requested return product ({0})
PE09Child return product was requested without parent product ({0})
PE10Order product delivery quantity is zero ({0})
PE11Order product unit sale price is zero ({0})
PE13Return products collection has duplication
PE14Return products collection is empty

GetReturnDocuments — Error Codes

CodeMessage
E01Could not create the shipping label. (Note: Not applicable to the self-postage option.)
E02The 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.)
E03The Order ID was not found
E04There is already an RMA request for this order ({0})
E07The return is not allowed due to the parcel status ({0}).
E08Unable to find the shipping method for the provided return shipping method Id ({0})
E09The provided ReturnShippingTypeId is not valid ({0})
E10There are multiple orders with this Order ID ({0})
E11No shipping options were found for the order return ({0})
E12The return shipping address was not found for order ({0})
E13Invalid currency code for the provided shipping cost for order ({0})
E14The return shipping cost cannot be a negative number
E15The return shipping cost is greater than the return product price
E16Return address country code is not valid
E17Return address state code is not valid or does not belong to the country
E18Return address country is not allowed for given order
E19MerchantRMANumber is required
E20ReturnShippingMethodId is required for provider ({0})

GetReturnDocuments — Product Errors

CodeMessage
PE01Unable to process this request as the returns period has expired for product %Product% (Global-e can enable the PE01 error, and whether to enable validation for expired return periods, through configuration)
PE02Return product %Product% was not found for order
PE03Product %Product% is not returnable
PE04Requested return product quantity was not delivered to customer %Customer%
PE05Requested return product is virtual ({0})
PE06Requested return product contains dangerous goods ({0})
PE07Requested return product quantity is zero ({0})
PE08OrderProduct was not found for requested return product ({0})
PE09Child return product was requested without parent product ({0})
PE10Order product delivery quantity is zero ({0})
PE11Order product unit sale price is zero ({0})
PE13Return products collection has duplication
PE14Return products collection is empty

GetReturnDocuments — Model Validation Errors

CodeMessage
ME01The input value for ProductCode is Invalid
ME02The input value for CartItemId is Invalid
ME03The input value for ReturnQuantity is Invalid
ME04The input value for MerchantReturnReasonCode is Invalid
ME05The input value for MerchantReturnReasonDescription is Invalid
ME06The input value for OrderId is Invalid
ME07The input value for Email is Invalid
ME08The input value for ReturnShippingTypeId is Invalid
ME09The input value for ReturnedProducts is Invalid
ME10The input value for CultureCode is Invalid
ME11The input value for MerchantRMANumber is Invalid
ME12The input value for CurrencyCode is Invalid
ME13The input value for ProviderCode is Invalid
ME14The input value for ShippingCost is Invalid
ME15The input value for ReturnShippingMethodId is Invalid
ME16Input value for ReturnAddress.CompanyName is required
ME17Input value for ReturnAddress.FirstName is required
ME19Input value for ReturnAddress.City is required
ME20Input value for ReturnAddress.PostalCode is required
ME21Input value for ReturnAddress.CountryCode is required
ME22Input value for ReturnAddress.CompanyName exceeds the 100-character limit
ME23Input value for ReturnAddress.FirstName exceeds the 500-character limit
ME24Input value for ReturnAddress.LastName exceeds the 500-character limit
ME25Input value for ReturnAddress.Email exceeds the 500-character limit
ME26Input value for ReturnAddress.Phone1 exceeds the 50-character limit
ME27Input value for ReturnAddress.Phone2 exceeds the 50-character limit
ME28Input value for ReturnAddress.Fax exceeds the 50-character limit
ME29Input value for ReturnAddress.City exceeds the 100-character limit
ME30Input value for ReturnAddress.StateOrProvince exceeds the 100-character limit
ME31Input value for ReturnAddress.StateCode exceeds the 10-character limit
ME32Input value for ReturnAddress.PostalCode exceeds the 50-character limit
ME33Input value for ReturnAddress.CountryCode exceeds the 2-character limit