> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get return documents

> Generates a Global-e RMA and returns the required return documents (label, return note, commercial invoice) with tracking details.

<Note>
  Part of the [Returns via API](/returns-via-api) integration guide — see it for when and how to use this endpoint.
</Note>


## OpenAPI

````yaml api-reference/specs/getreturndocuments.yaml POST /Return/GetReturnDocuments
openapi: 3.0.3
info:
  title: GetReturnDocuments
  version: 1.0.0
  description: >-
    Use the GetReturnDocuments API to integrate the return documents capability
    into your Returns Portal or a third-party returns provider. The API provides
    return documents and related information — the label, the tracking number,
    the tracking URL, the shipper's name, the commercial invoice (if relevant),
    the return merchandise authorization (RMA) number, and the return note —
    and, as part of the process, produces a Global-e RMA.
servers:
  - url: https://{globale_api_domain}
    variables:
      globale_api_domain:
        default: globale_api_domain
        description: Global-e API host, supplied to the merchant by Global-e.
security: []
tags:
  - name: GetReturnDocuments
    x-page-title: GetReturnDocuments
  - name: 'Direction: Merchant → Global-e'
  - name: 'Domain: Returns'
paths:
  /Return/GetReturnDocuments:
    post:
      tags:
        - GetReturnDocuments
      summary: Generate the RMA and return documents for an order
      description: >-
        Generates a Global-e RMA and returns the required return documents
        (shipping label, return note, commercial invoice if relevant) with
        tracking information, as a single PDF file when configured. Global-e
        enables and configures this API on the Global-e side.
      operationId: getReturnDocuments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetReturnDocumentsRequest'
            example:
              ProviderCode: Loop
              OrderId: GE314856569TS
              Email: shopper@example.com
              MerchantRMANumber: RM132
              ShippingCost: 10
              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:
        '200':
          description: >-
            The return documents required for the return process, with RMA and
            tracking details, wrapped in the standard `IsSuccess` / `Data`
            envelope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReturnDocumentsResponse'
              example:
                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
        '400':
          description: >-
            Error response. The documented failures take two shapes: an
            `ErrorInfo` object (`Code` / `Error` / `Description`), or an
            envelope with `IsSuccess: false` and an `Errors` array. Clients
            should accept both. See the integration guide for the full list of
            documented error codes (E-, ME-, PE-).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorInfo'
                  - $ref: '#/components/schemas/ErrorsEnvelope'
              examples:
                errorInfo:
                  summary: General error response (ErrorInfo)
                  value:
                    Code: error code
                    Error: error message
                    Description: error description
                singleError:
                  summary: Errors envelope — single error
                  value:
                    IsSuccess: false
                    Errors:
                      - Code: E500
                        Error: >-
                          We encountered an unexpected error and are working to
                          resolve the issue
                        Description: null
                        Success: false
                multipleErrors:
                  summary: Errors envelope — multiple errors
                  value:
                    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
components:
  schemas:
    GetReturnDocumentsRequest:
      type: object
      title: GetReturnDocumentsRequest
      required:
        - OrderId
        - ReturnedProducts
      properties:
        CurrencyCode:
          type: string
          description: >-
            The currency of the returned prepaid shipping cost. 3-character ISO
            code. Mandatory if ShippingCost has a greater value than 0.
        CultureCode:
          type: string
          description: >-
            Sets the language of the Combined Return Note. The note is
            translated into the language specified by CultureCode. If
            CultureCode is missing, empty, or unsupported, the note defaults to
            English. Supported cultures: all languages supported by the product.
            Translated: static text and labels in the note. Not translated:
            merchant-specific and dynamic content, such as addresses, SKUs, and
            prices. Provider support: Not all return providers support
            translation by default — it is currently enabled for ReturnGO. To
            receive translated return notes, providers must include their
            provider code in the ProviderCode parameter and ensure their CSM has
            added them to the translation allow-list.
        Email:
          type: string
          maxLength: 100
          description: The customer's email address. Maximum 100 characters.
        IsReturnForService:
          type: boolean
          description: Indicates if return is created for service.
        MerchantRMANumber:
          type: string
          maxLength: 200
          description: >-
            The Merchant's internal return merchandise authorization (RMA)
            Number. Maximum 200 characters.
        OrderId:
          type: string
          maxLength: 100
          description: The unique Order ID. Maximum 100 characters.
        ProviderCode:
          type: string
          description: The provider's name identifies the source of the request.
        ReturnAddress:
          allOf:
            - $ref: '#/components/schemas/ReturnAddress'
          description: The merchant hub delivery address with return details.
        ReturnedProducts:
          type: array
          description: >-
            An array containing the returned products' details. Each item
            carries CartItemId, MerchantReturnReasonCode,
            MerchantReturnReasonDescription, ProductCode and ReturnQuantity.
          items:
            $ref: '#/components/schemas/ReturnedProduct'
        ReturnShippingMethodId:
          type: integer
          description: >-
            Based on the end customer's selected shipping method, as returned in
            the GetReturnShippingOptions response. If empty, Global-e uses the
            cheapest method based on the return shipping type ID (or
            self-postage if configured).
        ReturnShippingTypeId:
          type: integer
          description: >-
            The return shipping type. Possible values: 1 - Self-postage
            (standard); 2 - Prepaid; 3 - Local Prepaid Courier; 4 - Local
            Prepaid; 5 - Consolidated.
        ShippingCost:
          type: number
          description: >-
            The prepaid shipping cost associated with the return. If not
            provided, then the ShippingCost will be the configured prepaid/flat
            return rate.
    GetReturnDocumentsResponse:
      type: object
      title: GetReturnDocumentsResponse
      properties:
        IsSuccess:
          type: boolean
          description: True if the API call is successful. False if the API call fails.
        Data:
          $ref: '#/components/schemas/ReturnDocumentsData'
    ErrorInfo:
      type: object
      title: ErrorInfo
      description: Error response (Code / Error / Description form).
      properties:
        Code:
          type: string
          description: The error code.
        Error:
          type: string
          description: The error message.
        Description:
          type: string
          nullable: true
          description: The error description.
    ErrorsEnvelope:
      type: object
      title: ErrorsEnvelope
      description: >-
        Error response envelope carrying one or more errors (from the documented
        failure examples).
      properties:
        IsSuccess:
          type: boolean
          description: False on error.
        Errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
    ReturnAddress:
      type: object
      title: ReturnAddress
      required:
        - Address1
        - City
        - CompanyName
        - CountryCode
        - FirstName
        - PostalCode
      properties:
        Address1:
          type: string
          description: Address line 1 for return.
        Address2:
          type: string
          description: Address line 2 for return.
        City:
          type: string
          maxLength: 100
          description: City name for return. Maximum 100 characters.
        CompanyName:
          type: string
          maxLength: 100
          description: Company name for return. Maximum 100 characters.
        CountryCode:
          type: string
          description: Country code for return, 2-character code.
        Email:
          type: string
          maxLength: 500
          description: Email address for return. Maximum 500 characters.
        Fax:
          type: string
          maxLength: 50
          description: Fax number for return. Maximum 50 characters.
        FirstName:
          type: string
          maxLength: 500
          description: First name for return. Maximum 500 characters.
        LastName:
          type: string
          maxLength: 500
          description: Last name for return. Maximum 500 characters.
        Phone1:
          type: string
          maxLength: 50
          description: Phone 1 for return. Maximum 50 characters.
        Phone2:
          type: string
          maxLength: 50
          description: Phone 2 for return. Maximum 50 characters.
        PostalCode:
          type: string
          maxLength: 50
          description: Postal code for return. Maximum 50 characters.
        StateCode:
          type: string
          maxLength: 20
          description: State code for return. Maximum 20 characters.
        StateOrProvince:
          type: string
          maxLength: 100
          description: State or province for return. Maximum 100 characters.
    ReturnedProduct:
      type: object
      title: ReturnedProduct
      required:
        - ProductCode
        - ReturnQuantity
      properties:
        CartItemId:
          type: string
          maxLength: 50
          description: Identifier of the cart item. Maximum 50 characters.
        MerchantReturnReasonCode:
          type: string
          maxLength: 100
          description: >-
            The code of the reason for the product return on the merchant.
            Maximum 100 characters.
        MerchantReturnReasonDescription:
          type: string
          maxLength: 100
          description: >-
            The description of the reason for the return on the merchant site.
            Maximum 100 characters. Mandatory if no reason code provided.
        ProductCode:
          type: string
          maxLength: 600
          description: The ProductCode identifying the product. Maximum 600 characters.
        ReturnQuantity:
          type: integer
          description: Quantity of the returned product. Maximum 100 characters.
    ReturnDocumentsData:
      type: object
      title: ReturnDocumentsData
      properties:
        GlobaleRMANumber:
          type: string
          maxLength: 100
          description: >-
            The Global-e return merchandise authorization (RMA) Number. Maximum
            100 characters.
        MerchantOrderId:
          type: string
          maxLength: 100
          description: The Merchant Order ID. Maximum 100 characters.
        MerchantRMANumber:
          type: string
          maxLength: 100
          description: The Merchant RMA Number. Maximum 100 characters.
        OrderId:
          type: string
          maxLength: 100
          description: The Global-e Order ID. Maximum 100 characters.
        ReturnDocuments:
          type: array
          description: >-
            Documents associated with the return, returned individually or
            unified as a single multi-page document: Commercial Invoice (if the
            electronic invoice is not supported), Shipping Label, Return Note.
          items:
            $ref: '#/components/schemas/ReturnDocument'
        ReturnTrackingDetails:
          allOf:
            - $ref: '#/components/schemas/ReturnTrackingDetails'
          description: Contains tracking details for the return.
    ErrorItem:
      type: object
      title: ErrorItem
      properties:
        Code:
          type: string
          description: The error code.
        Error:
          type: string
          description: The error message.
        Description:
          type: string
          nullable: true
          description: The error description.
        Success:
          type: boolean
          description: >-
            Indicates if the call has succeeded. FALSE denotes an error or
            failure.
    ReturnDocument:
      type: object
      title: ReturnDocument
      properties:
        DocumentData:
          type: string
          description: Base64 file type representing the document file content.
        DocumentTypeCode:
          type: string
          description: >-
            The code value of the document type. This value can be:
            ShippingLabel, ReturnNote, CommercialInvoice, or
            CombinedReturnDocuments (if UnifiedAllDocumentsUnderOneFile = true).
            Each document contains the relevant content with relevant copies.
        DocumentTypeName:
          type: string
          description: >-
            The name of the document type, e.g. ShippingLabel, ReturnNote or
            CommercialInvoice (unless the invoice is electronic, no invoice is
            returned).
        URL:
          type: string
          description: URL of the document.
    ReturnTrackingDetails:
      type: object
      title: ReturnTrackingDetails
      required:
        - ShipperName
        - TrackingNumber
        - TrackingURL
      properties:
        IsQrLabel:
          type: boolean
          description: >-
            Identifies whether this is a label-free return (QR code only). This
            information also applies to the ShippingLabel object.
        IsTrackable:
          type: boolean
          description: Identifies whether this is a trackable return.
        ShipperName:
          type: string
          description: The name of the Shipping Service of the return provider.
        TrackingNumber:
          type: string
          description: >-
            Reference number for the tracking service used by the shipper for
            this return.
        TrackingURL:
          type: string
          description: Tracking URL of the tracking service site used by the shipper.

````