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

# Look Up Order Return Eligibility by Order Name

> Report per-line-item return eligibility for an order, by its order name, without starting a return.
Available to Shopify and Commerce Data merchants.

The result is **advisory**. It is evaluated from Loop's order snapshot without creating a draft return,
so a draft return created afterwards stays authoritative and may disagree. Do not hard-disable UI solely
because an item reports `eligible: false`; let the draft return decide.

It does not create a draft return. For Shopify merchants, it may import or refresh Loop's copy of the
order from Shopify.

### Joining with the Orders API

When the order is in Commerce Data, identifiers match
[Get Order](/api-reference/latest/orders/get-order) and
[List Orders](/api-reference/latest/orders/list-orders):

- `order_id` is the order's global identifier, the same value as the order's `id`.
- Each item's `id` is the line item's global identifier, the same value as `line_items[].id`.
- Each item's `external_id` is the commerce platform's line item id, the same value as
  `line_items[].external_id`. It is `null` when the line item has none.

Join items to the order's `line_items` on `id`.



## OpenAPI

````yaml post /orders/return-eligibility
openapi: 3.1.0
info:
  title: Orders API
  version: v1
  description: >-
    The Orders API allows managing your shop's orders within the Loop Platform.


    ### Resource identifier format


    Resource identifiers (the `id` field and related global-identifier fields)
    are returned as JSON

    integers by default. To receive them as strings instead, send the

    `X-Loop-Global-Identifier-Type: string` request header.
  contact:
    name: Loop Returns
    url: https://loopreturns.com/
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Orders
paths:
  /orders/return-eligibility:
    post:
      tags:
        - Orders
      summary: Look Up Order Return Eligibility by Order Name
      description: >-
        Report per-line-item return eligibility for an order, by its order name,
        without starting a return.

        Available to Shopify and Commerce Data merchants.


        The result is **advisory**. It is evaluated from Loop's order snapshot
        without creating a draft return,

        so a draft return created afterwards stays authoritative and may
        disagree. Do not hard-disable UI solely

        because an item reports `eligible: false`; let the draft return decide.


        It does not create a draft return. For Shopify merchants, it may import
        or refresh Loop's copy of the

        order from Shopify.


        ### Joining with the Orders API


        When the order is in Commerce Data, identifiers match

        [Get Order](/api-reference/latest/orders/get-order) and

        [List Orders](/api-reference/latest/orders/list-orders):


        - `order_id` is the order's global identifier, the same value as the
        order's `id`.

        - Each item's `id` is the line item's global identifier, the same value
        as `line_items[].id`.

        - Each item's `external_id` is the commerce platform's line item id, the
        same value as
          `line_items[].external_id`. It is `null` when the line item has none.

        Join items to the order's `line_items` on `id`.
      operationId: lookupOrderReturnEligibilityByName
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReturnEligibilityLookupRequest'
            example:
              order_name: '#1001'
      responses:
        '200':
          $ref: '#/components/responses/ReturnEligibility'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/ReturnEligibilityOrderCancelled'
        '422':
          description: >-
            One of:


            - No return policy covers the order
            (`returns-unavailable-for-order`).

            - `order_name` is missing. Validation errors are keyed by the field.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ReturnEligibilityErrorResponse'
                  - $ref: '#/components/schemas/ValidationErrorResponse'
              examples:
                returnsUnavailableForOrder:
                  summary: No return policy covers the order
                  value:
                    errors:
                      - code: returns-unavailable-for-order
                        message: Returns are unavailable for this order.
      security:
        - orders: []
components:
  schemas:
    ReturnEligibilityLookupRequest:
      title: ReturnEligibilityLookupRequest
      type: object
      required:
        - order_name
      properties:
        order_name:
          type: string
          description: The order name, as accepted by draft initialize.
          examples:
            - '#1001'
    ReturnEligibilityErrorResponse:
      title: ReturnEligibilityErrorResponse
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                examples:
                  - returns-unavailable-for-order
              message:
                type: string
                examples:
                  - Returns are unavailable for this order.
    ValidationErrorResponse:
      title: ValidationErrorResponse
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          description: Validation messages keyed by the request field that failed.
          additionalProperties:
            type: array
            items:
              type: string
    ReturnEligibilityResponse:
      title: ReturnEligibilityResponse
      type: object
      required:
        - return_eligibility
      properties:
        return_eligibility:
          $ref: '#/components/schemas/ReturnEligibility'
    ReturnEligibility:
      title: ReturnEligibility
      type: object
      required:
        - order_id
        - as_of
        - advisory
        - items
      properties:
        order_id:
          type: integer
          format: int64
          minimum: 1
          description: >-
            Identifier of the order. When the order is in Commerce Data, this is
            its global identifier, the same value as the order's `id` on Get
            Order. Returned as a string when the `X-Loop-Global-Identifier-Type:
            string` header is sent.
          examples:
            - 390519090
        as_of:
          type: string
          format: date-time
          description: ISO 8601 UTC time the eligibility was evaluated.
          examples:
            - '2026-09-30T16:00:00Z'
        advisory:
          type: boolean
          description: >-
            Marks the result as advisory. A draft return created afterwards
            stays authoritative and may disagree.
        items:
          type: array
          items:
            $ref: '#/components/schemas/ReturnEligibilityItem'
    ReturnEligibilityItem:
      title: ReturnEligibilityItem
      type: object
      required:
        - id
        - external_id
        - eligible
        - expiration
        - ineligibility_code
        - return_reason_group_id
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          description: >-
            Identifier of the line item. When the order is in Commerce Data,
            this is its global identifier, the same value as `line_items[].id`
            on Get Order. Returned as a string when the
            `X-Loop-Global-Identifier-Type: string` header is sent.
          examples:
            - 390519093
        external_id:
          type:
            - string
            - 'null'
          description: >-
            The commerce platform's line item id. When the order is in Commerce
            Data, the same value as `line_items[].external_id` on Get Order.
            `null` when the line item has none.
          examples:
            - '44580305076398'
        eligible:
          type: boolean
        expiration:
          type:
            - string
            - 'null'
          format: date
          description: >-
            `Y-m-d` end of the return window. Set for eligible items and for
            items whose window closed.
          examples:
            - '2026-10-23'
        ineligibility_code:
          anyOf:
            - $ref: '#/components/schemas/ReturnIneligibilityCode'
            - type: 'null'
        return_reason_group_id:
          type:
            - integer
            - 'null'
          description: Set for eligible items only.
          examples:
            - 12
    ReturnIneligibilityCode:
      title: ReturnIneligibilityCode
      type: string
      description: Why the line item is not eligible for return.
      enum:
        - final-sale
        - does-not-meet-conditions-for-return
        - unavailable-for-return
        - already-returned
        - not-fulfilled
        - not-delivered
        - return-window-closed
        - has-shipping-protection-claim
  responses:
    ReturnEligibility:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ReturnEligibilityResponse'
          example:
            return_eligibility:
              order_id: 390519090
              as_of: '2026-09-30T16:00:00Z'
              advisory: true
              items:
                - id: 390519093
                  external_id: '44580305076398'
                  eligible: true
                  expiration: '2026-10-23'
                  ineligibility_code: null
                  return_reason_group_id: 12
                - id: 390519094
                  external_id: '44580305076399'
                  eligible: false
                  expiration: '2026-09-15'
                  ineligibility_code: return-window-closed
                  return_reason_group_id: null
                - id: 390519095
                  external_id: null
                  eligible: false
                  expiration: null
                  ineligibility_code: final-sale
                  return_reason_group_id: null
    Unauthorized:
      description: >-
        Example response if request submitted without a valid API Key in
        X-Authorization.
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: string
                examples:
                  - Unauthorized.
      headers:
        X-Loop-Request-ID:
          schema:
            type: string
            examples:
              - 5a748e7c-5fcc-4fb0-a777-6a4d28e60d4c
            format: uuid
          description: UUID to aid in debugging API issues.
    NotFound:
      description: The requested entity could not be found.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
                examples:
                  - Resource not found.
      headers:
        X-Loop-Request-ID:
          schema:
            type: string
          description: UUID to aid in debugging API issues.
    ReturnEligibilityOrderCancelled:
      description: The order has been cancelled.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ReturnEligibilityErrorResponse'
          example:
            errors:
              - code: order-has-been-cancelled
                message: The order has been cancelled.
  securitySchemes:
    orders:
      type: apiKey
      in: header
      name: X-Authorization
      description: 'API Scope: "Orders"'
      x-scope: Orders

````