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

# Listar Produtos

> Lista os produtos cadastrados pela empresa

# Listar Produtos

Retorna os produtos ativos e visíveis da empresa autenticada.

## Comportamento atual

* a resposta é um array simples, sem wrapper `products` ou `total`
* apenas produtos `is_active=true` e `is_visible=true` entram na listagem
* cada item retorna `id`, `name`, `price`, `quantity`, `description`, `image_url` e `created_at`

## Exemplo de resposta

<ResponseExample>
  ```json 200 OK theme={null}
  [
    {
      "id": "550e8400-e29b-41d4-a716-446655440111",
      "name": "Pizza Margherita",
      "price": 45.9,
      "quantity": 50,
      "description": "Molho de tomate, mussarela e manjericão",
      "image_url": "https://storage.indiqai.com/products/pizza.jpg",
      "created_at": "2026-03-20T08:15:00Z"
    }
  ]
  ```
</ResponseExample>

## Status comuns

* `200` lista retornada com sucesso
* `401` API Key inválida ou revogada
* `403` plano sem `api_access`
* `422` header inválido
* `429` limite global da API pública excedido


## OpenAPI

````yaml GET /api/v1/public/products
openapi: 3.1.0
info:
  contact:
    email: support@indiqai.com
    name: IndiqAI Support
    url: https://indiqai.com/
  description: Especificação OpenAPI da API Pública IndiqAI.
  license:
    name: Proprietary
    url: https://indiqai.com/license
  title: IndiqAI API Pública
  version: 1.5.0
servers:
  - description: Produção
    url: https://api.indiqai.com
security: []
paths:
  /api/v1/public/products:
    get:
      tags:
        - API Pública
      summary: Listar produtos
      description: Lista produtos cadastrados pela empresa.
      operationId: list_products_api_v1_public_products_get
      parameters:
        - description: Chave de API
          in: header
          name: X-API-Key
          required: true
          schema:
            description: Chave de API
            title: X-Api-Key
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PublicProductResponse'
                title: Response List Products Api V1 Public Products Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    PublicProductResponse:
      description: Dados de um produto.
      properties:
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          title: Id
          type: string
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        name:
          title: Name
          type: string
        price:
          title: Price
          type: number
        quantity:
          title: Quantity
          type: integer
      required:
        - id
        - name
        - price
        - quantity
      title: PublicProductResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````