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

# Get Return Order Context

> The customer and the returnable lines of an order (VEN-26).

The return form used to pick the order among the latest 100 and the product
from the whole catalogue; now it picks a line of THE order and pre-fills
the customer from it.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json get /api/v1/admin/returns/order-context/{order_id}
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/admin/returns/order-context/{order_id}:
    get:
      tags:
        - admin:returns
      summary: Get Return Order Context
      description: >-
        The customer and the returnable lines of an order (VEN-26).


        The return form used to pick the order among the latest 100 and the
        product

        from the whole catalogue; now it picks a line of THE order and pre-fills

        the customer from it.
      operationId: >-
        get_return_order_context_api_v1_admin_returns_order_context__order_id__get
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
        - name: exclude_return_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: 'Editing a return: do not count its own units as returned'
            title: Exclude Return Id
          description: 'Editing a return: do not count its own units as returned'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_ReturnOrderContextOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_ReturnOrderContextOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/ReturnOrderContextOut'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[ReturnOrderContextOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReturnOrderContextOut:
      properties:
        order_id:
          type: string
          format: uuid
          title: Order Id
        customer_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Customer Id
        firstname:
          type: string
          title: Firstname
        lastname:
          type: string
          title: Lastname
        email:
          type: string
          title: Email
        telephone:
          type: string
          title: Telephone
        date_ordered:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Ordered
        currency:
          type: string
          title: Currency
        lines:
          items:
            $ref: '#/components/schemas/ReturnOrderLineOut'
          type: array
          title: Lines
      type: object
      required:
        - order_id
        - customer_id
        - firstname
        - lastname
        - email
        - telephone
        - date_ordered
        - currency
        - lines
      title: ReturnOrderContextOut
      description: What the return form pre-fills once the operator picks the order.
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ReturnOrderLineOut:
      properties:
        order_item_id:
          type: string
          format: uuid
          title: Order Item Id
        product_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Product Id
        variant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Variant Id
        product_name:
          type: string
          title: Product Name
        sku:
          type: string
          title: Sku
        variant_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Variant Attributes
        quantity:
          type: integer
          title: Quantity
        returned:
          type: integer
          title: Returned
        returnable:
          type: integer
          title: Returnable
      type: object
      required:
        - order_item_id
        - product_id
        - variant_id
        - product_name
        - sku
        - quantity
        - returned
        - returnable
      title: ReturnOrderLineOut
      description: A line of the order, with what is still returnable of it.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.