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

# Get a product

> Returns product details belonging to the authenticated user



## OpenAPI

````yaml openapi.yaml get /product/{id}
openapi: 3.0.3
info:
  title: Lightyshare API
  description: >
    API for client access/integrations via user token.


    ## Versioning


    Inspired by Stripe's versioning strategy, we use date-based versioning to
    maintain backwards compatibility.


    ### Version Format

    API versions use the format `YYYY-MM-DD` (e.g., `2025-08-16`).


    ### How Versioning Works


    1. **Token-based versioning**: When you create an API token, it's
    automatically tied to the latest API version available at that time

    2. **Request-level override**: You can override the token's version for
    specific requests using the `lighty-version` header

    3. **Stable URLs**: API URLs remain stable - version is handled
    transparently via token or header


    ### Examples


    ```bash

    # Using token's default version (2025-08-16 in this example)

    curl -H "Authorization: Bearer lsh_live_abc123..." \
         https://lightyshare.com/api/token-secured/rental/123

    # Override with header to use a different version

    curl -H "Authorization: Bearer lsh_live_abc123..." \
         -H "lighty-version: 2025-01-15" \
         https://lightyshare.com/api/token-secured/rental/123
    ```


    The API version used is always returned in the `X-API-Version` response
    header.
  version: 0.1.0
  contact:
    name: Support Lightyshare
    url: https://support.lightyshare.com
servers:
  - url: https://lightyshare.com/api/token-secured
    description: Stable API endpoint (version handled via token/header)
security:
  - tokenAuth: []
paths:
  /product/{id}:
    get:
      tags:
        - Products
      summary: Get a product
      description: Returns product details belonging to the authenticated user
      operationId: getProduct
      parameters:
        - $ref: '#/components/parameters/idParam'
        - $ref: '#/components/parameters/tokenParam'
      responses:
        '200':
          description: Product details
          headers:
            X-API-Version:
              $ref: '#/components/headers/ApiVersion'
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    description: Product details (ads group)
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    idParam:
      name: id
      in: path
      required: true
      description: Resource identifier
      schema:
        type: integer
        example: 12345
    tokenParam:
      name: token
      in: query
      required: true
      description: User authentication token
      schema:
        type: string
        example: YOUR_TOKEN
  headers:
    ApiVersion:
      description: API version in YYYY-MM-DD format
      schema:
        type: string
        example: '2025-08-16'
  responses:
    Unauthorized:
      description: Missing or invalid token
      headers:
        X-API-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid or missing token
    Forbidden:
      description: Access denied
      headers:
        X-API-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Access denied to this resource
    NotFound:
      description: Resource not found
      headers:
        X-API-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Resource not found
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >
        Use your API token in the Authorization header with Bearer scheme.

        Alternative: You can also pass the token as a query parameter
        `?token=your_token` for backward compatibility.

````