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

# Query Returns including LineItems.



## OpenAPI

````yaml /api-reference/openapi.json get /openapi/v1/Returns/returnsWithLineItems
openapi: 3.0.1
info:
  title: OmniServices Web API
  version: v1
servers:
  - url: https://api.oplog.one
    description: Production Server
  - url: https://api.staging.oplog.one
    description: Staging Server
security:
  - Authorization: []
paths:
  /openapi/v1/Returns/returnsWithLineItems:
    get:
      tags:
        - Returns
      summary: Query Returns including LineItems.
      parameters:
        - name: X-Tenant-Id
          in: header
          description: If you want to emulate, please enter TenantId.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ReturnDetailResponseDTO'
            application/json:
              schema:
                $ref: '#/components/schemas/ReturnDetailResponseDTO'
            text/json:
              schema:
                $ref: '#/components/schemas/ReturnDetailResponseDTO'
components:
  schemas:
    ReturnDetailResponseDTO:
      type: object
      properties:
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/ReturnLineItemResponseDTO'
        source:
          $ref: '#/components/schemas/ReturnSource'
        returnReferenceNumber:
          type: string
        salesOrderChannel:
          type: string
        salesOrderReferenceNumber:
          type: string
        notes:
          type: string
        state:
          $ref: '#/components/schemas/ReturnState'
        trackingId:
          type: string
        cargoCarrier:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        arrivedToWarehouseAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        courierRequest:
          $ref: '#/components/schemas/ReturnCourierRequest'
      additionalProperties: false
    ReturnLineItemResponseDTO:
      type: object
      properties:
        lineItemReferenceNumber:
          type: string
        sku:
          type: string
        processedAt:
          type: string
          format: date-time
        state:
          $ref: '#/components/schemas/ReturnLineItemState'
        damagedState:
          $ref: '#/components/schemas/DamagedReturnLineItemState'
        serialNumber:
          type: string
      additionalProperties: false
    ReturnSource:
      enum:
        - Oplog
        - WMS
      type: string
    ReturnState:
      enum:
        - ReturnCreated
        - ArrivedToWarehouse
        - Completed
      type: string
    ReturnCourierRequest:
      enum:
        - 'No'
        - Requested
        - Success
        - Fail
      type: string
    ReturnLineItemState:
      enum:
        - WaitingToBeProcessed
        - Missing
        - Damaged
        - Undamaged
      type: string
    DamagedReturnLineItemState:
      enum:
        - WaitingInWarehouse
        - SendToCustomer
      type: string
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization

````