Skip to main content

Documentation Portal

Return Methods

 

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/GetReturnShippingOptions
Parameters

Request

Parameter Name

Type

Description

Mandatory

CultureCode

String

10-character code. Default is EN

Maximum: 10 characters.

No

CurrencyCode

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

Email

String

Email that identifies the source of the request.

No

OrderId

String

Unique Global-e Order ID or Merchant Order ID.

Maximum: 100 characters.

Yes

ProviderCode

String

Provider name that identifies the source of the request.

Yes

ReturnedProducts

Array of Products

The following fields should be populated:

  • ProductCode

  • CartItemID

  • ReturnQuantity

Yes

ReturnShippingMethodId

Long

Provides the ID of the return shipping method.

No

Response

Parameter Name

Type

Description

Mandatory

Cost

Double

The cost of the shipment

Yes

Currency

String

3-letter currency ISO code

Yes

IsQrLabel

String

Whether this is a label-free return (QR code only).

No

isTrackable

String

Identifies whether this is a trackable return.

Yes

MerchantOrderId

String

The unique merchant Order ID.

Maximum: 100 characters

Yes

OrderId

String

The unique Global-e Order ID.

Maximum: 100 characters

Yes

ReturnShippingDestinationDetails

Object ReturnShippingDestinationDetails

The ReturnShippingDestinationDetails object contains all relevant details of the return destination.

Contains the following values:

  • Address (Mandatory)

  • City (Mandatory)

  • Country (Mandatory)

  • Email (Optional)

  • Phone (Optional)

  • State or Province (Optional)

  • Zip (Mandatory)

Yes

ReturnShippingMethods

Array of ReturnShippingMethods 

ReturnShippingMethods describes the available return shipping option for the requested items.

Yes

ShippingMethodDescription

String

Description of the shipping method.

Yes

ShippingMethodId

Integer

The shipping method identifier. Can be used when calling GetReturnDocuments to receive the return document for the selected shipping method.GetReturnDocuments

Yes

ShippingMethodType

String

Identifies the shipping method type.

Yes

ShippingMethodTypeId

Integer

Possible values:

  • Self-postage (standard)     

  • Prepaid

  • Local Prepaid Courier

  • Local Prepaid

  • Consolidated

Can be used when calling GetReturnDocuments to receive the return document for the selected shipping method.

Yes

ShipperName

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 %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 orderID %orderID%

E06

The ReturnShippingMethodId %ReturnShippingMethodId% is not valid

ME01

Input value for ProductCode is not valid

ME02

Input value for CartItemId is not valid

ME03

Input value for ReturnQuantity is not valid

ME06

Input value for OrderId is not valid

ME07

Input value for Email is not valid

ME09

Input value for ReturnedProducts is not valid

ME10

Input value for CultureCode is not valid

ME12

Input value for CurrencyCode is not valid

ME13

Input value for ProviderCode is not valid

SME15

Input value for ReturnShippingMethodId is not valid

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/GetReturnDocuments
Parameters

Request

Field

Type

Description

Mandatory

CurrencyCode

String

The currency of the returned prepaid shipping cost. 3-character ISO code.

Mandatory if ShippingCost has a greater value than 0.

CultureCode

String

The language for the Return Note document. 3-character ISO code.

Currently, English is the only supported language.

No

Email

String

The customer's email address.

Maximum 100 characters.

No

IsReturnForService

Boolean

Indicates if return is created for service

No

MerchantRMANumber

String

The Merchant's internal return merchandise authorization (RMA) Number.

Maximum 200 characters.

No

OrderId

String

Then unique Order ID.

Maximum 100 characters.

Yes

ProviderCode

String

The provider's name identifies the source of the request.

Yes

ReturnAddress

Object ReturnAddress

The merchant hub delivery address with return details.

No

ReturnedProducts

Array

An array containing the returned products' details. Contains array of ReturnedProduct objects:

  • CartItemID

  • MerchantReturnReasonCode

  • MerchantReturnReasonDescription

  • ProductCode

  • ReturnQuantity

Yes

ReturnShippingMethodId

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

ReturnShippingTypeId

Integer

Possible values:

  1. Self postage (standard)

  2. Prepaid

  3. Local Prepaid Courier

  4. Local Prepaid

  5. Consolidated

No

ShippingCost

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

IsSuccess

Boolean

True: If the API call is successful.

False: If the API call fails.

Data

Object Data

Data regarding the return, including:

  • GlobalRMANumber (String, Max 100 chars)

  • MerchantOrderId (String, Max 100 chars)

  • MerchantRMANumber (String, Max 100 chars)

  • OrderId (String, Max 100 chars)

  • ReturnDocuments, array containing:

    • DocumentData

    • DocumentTypeCode

    • DocumentTypeName

    • URL

  • ReturnTrackingDetails, array containing:

    • IsQrLabel

    • IsTrackable

    • ShipperName

    • TrackingNumber

    • TrackingURL

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 ReturnShippingTypeId is not valid ({0})

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     ReturnAddressStateIsNotValid

E18

Return address country is not allowed for given order ReturnAddressCountryIsNotAllowed

E19

MerchantRMANumber is required

E20

ReturnShippingMethodId is required for provider ({0})

Product Errors

Model Validation Errors

Code

Message

ME01

The input value for ProductCode is Invalid

ME02

The input value for CartItemId is Invalid

ME03

The input value for ReturnQuantity is Invalid     

ME04

The input value for MerchantReturnReasonCode is Invalid

ME05

The input value for MerchantReturnReasonDescription is Invalid

ME06

The input value for OrderId is Invalid

ME07

The input value for Email is Invalid

ME08

The input value for ReturnShippingTypeId is Invalid

ME09

The input value for ReturnedProducts is Invalid

ME10

The input value for CultureCode is Invalid

ME11

The input value for MerchantRMANumber is Invalid

ME12

The input value for CurrencyCode is Invalid

ME13

The input value for ProviderCode is Invalid

ME14

The input value for ShippingCost is Invalid

ME15

The input value for ReturnShippingMethodId is Invalid

ME16

"Input value for ReturnAddress.CompanyName is required"

ME17

Input value for ReturnAddress.FirstName is required

ME19

Input value for ReturnAddress.City is required

ME20

Input value for ReturnAddress.PostalCode is required

ME21

Input value for ReturnAddress.CountryCode is required

ME22

Input value for ReturnAddress.CompanyName exceeds the 100-character limit

ME23

Input value for ReturnAddress.FirstName exceeds the 500-character limit

ME24

Input value for ReturnAddress.LastName exceeds the 500-character limit

ME25

Input value for ReturnAddress.Email exceeds the 500-character limit

ME26

Input value for ReturnAddress.Phone1 exceeds the 50-character limit

ME27

Input value for ReturnAddress.Phone2 exceeds the 50-character limit

ME28

Input value for ReturnAddress.Fax exceeds the 50-character limit

ME29

Input value for ReturnAddress.City exceeds the 100-character limit

ME30

Input value for ReturnAddress.StateOrProvince exceeds the 100-character limit

ME31

Input value for ReturnAddress.StateCode exceeds the 10-character limit

ME32

Input value for ReturnAddress.PostalCode exceeds the 50-character limit

ME33

Input value for ReturnAddress.CountryCode exceeds the 2-character limit

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
        }
    ]
}
SendRMAToMerchant (Global-e to Merchant)

Use the SendRMAToMerchant API to send the Global‑e RMA number to the merchant. Sends MerchantReturn object to the merchant.

This API streamlines the refund process for merchants. Merchants can initiate refunds directly from the Shopify Admin. Supports Shopify’s ability to get the return shipping fee when creating a return in their system.

MerchantAppSetting, SendRMAInfoToMerchantURI must be set to turn on this feature.

Method/URL

POST https://www.merchant-site-domain.com/rma-info-to-merchant-url
Parameters

Request

Name

Type

Description

Mandatory

merchantOrder

Object merchantOrder

Provides order return details.

merchantReturn

Object merchantReturn

Provides merchant return information. Includes the following information:

  • CreatedBy

  • MerchantGUID

  • MerchantOrderId

  • OrderId

  • ReturnedProducts

  • ReturnShippingCost

  • ReturnTrackingNumber

  • RMANumber

  • ShipperName

  • TrackingURL

Return

Name

Type

Description

Mandatory

merchant.ResponseInfo

Object Merchant.ResponseInfo

Provides API call response info.

Objects for SendRMAToMerchant API
Examples

Request Example

{
    "OrderId": "GE24192321GB",
    "MerchantOrderId": "71144",
    "RMANumber": "223878",
    "ShipperName": "DHL",
    "ReturnTrackingNumber": "857854854778",
    "TrackingURL": "www.dhl.com/Tracking?TrackingNumber=857854854778",
    "CreatedBy": "Customer",
    "ReturnedProducts": [
        {
            "SKU": "ProductD",
            "Name": "Blue jacket",
            "CartItemId": "2",
            "ReturnQuantity": 1,
            "ReturnReasonName": "Arrived too late",
            "MerchantReturnReasonCode": null,
            "MerchantReturnReasonName": null
        }
    ],
    "MerchantGUID": "7e3d5523-d86a-4c56-8f47-5a48b829e3b7",
    "CurrencyCode": "EUR",
    "ReturnShippingCost": 10.00
}

Response Example

{
    "Success": "True",
    "Message": "success message",
    "Description": "success description"
}
UpdateRMA

Call the UpdateRMA API to set or update the MerchantRMANumber and send an email to the customer.

URL

https://{server_name}/Return/UpdateRMA
Parameters

Request

Name

Type

Description

Mandatory

updateRMANumber

Object UpdateRMANumber

Provides API call response info.

Return

Name

Type

Description

Mandatory

merchant.ResponseInfo

Object Merchant.ResponseInfo

Provides API call response info.

Examples