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

# Obter filtros disponíveis

> Filtros

## Autenticação

**OAuth 2.0 (Client Credentials):**

Obtenha um token via `POST /oauth/token` com suas credenciais de cliente.

```bash theme={null}
curl -X POST https://backend-pied-prod.piedadmin.com.br/api/oauth/token \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "client_credentials",
    "client_id": "SEU_CLIENT_ID",
    "client_secret": "SEU_CLIENT_SECRET"
  }'
```

## Sobre este endpoint

Retorna os filtros disponíveis para cotação de kits, como tensões suportadas, marcas de inversores, tipos de inversores, potências de módulos e tipos de estrutura.

Use os valores retornados aqui como entrada para o endpoint [Obter kits disponíveis](/api-reference/v2/kits/post-kits).


## OpenAPI

````yaml /openapi/kits.json GET /v2/kits/filter
openapi: 3.0.0
info:
  title: Geração de kits
  description: Descrição da documentação.
  termsOfService: https://pied.com.br/sobre
  contact:
    email: suporte@pieta.tech
  version: 1.0.0
servers:
  - url: https://backend-pied-prod.piedadmin.com.br/api
security: []
tags:
  - name: kits
    description: Geração de kits
paths:
  /v2/kits/filter:
    get:
      tags:
        - kits
      summary: Obtem filtros disponíveis
      description: Filtros
      operationId: filterAvailable
      parameters:
        - in: query
          name: inverterVoltage
          description: >-
            Tensão de saída. A API retornará a lista de kits disponíveis com
            inversores nesta tensão de saída. Opções disponíveis no retorno de
            "voltages" do endpoint "Obter filtros disponíveis". Onde
            tensao_nominal_de_saida_V é o inverterVoltage.
          required: true
          schema:
            type: integer
        - in: query
          name: inverterConnectionType
          description: >-
            Tipo de conexão. A API retornará a lista de kits disponíveis com
            inversores neste tipo de conexão. Opções disponíveis no retorno de
            "voltages" do endpoint "Obter filtros disponíveis". Onde
            tipo_ligacao é o inverterConnectionType.
          schema:
            type: string
            enum:
              - monofasico
              - trifasico
        - in: query
          name: inverterBrand
          description: >-
            Marca do Inversor. A API retornará a lista de kits disponíveis
            aplicando um filtro por essa marca de inversor. Opções disponíveis
            no retorno de "inverterBrands" do endpoint "Obter filtros
            disponíveis". Onde value é o inverterBrand.
          schema:
            type: string
        - in: query
          name: inverterType
          description: >-
            Tipo de Inversor. A API retornará a lista de kits disponíveis
            aplicando um filtro por esse tipo de inversor. Opções disponíveis no
            retorno de "inverterType" do endpoint "Obter filtros disponíveis".
            Onde value é o inverterType.
          schema:
            type: string
            enum:
              - string
              - hibrido
              - micro
              - solaredge
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KitFilterResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityError'
      security:
        - apiKey:
            - v2:kit:*
        - oauth:
            - v2:kit:*
components:
  schemas:
    KitFilterResponse:
      allOf:
        - $ref: '#/components/schemas/Success'
        - type: object
          properties:
            data:
              type: object
              properties:
                voltages:
                  type: array
                  items:
                    type: object
                    properties:
                      label:
                        type: string
                      tensao_nominal_de_saida_V:
                        type: integer
                      tipo_ligacao:
                        type: string
                inverterBrands:
                  type: array
                  items:
                    $ref: '#/components/schemas/ListItem'
                inverterTypes:
                  type: array
                  items:
                    $ref: '#/components/schemas/ListItem'
                modulePowers:
                  type: array
                  items:
                    $ref: '#/components/schemas/ListItem'
                structures:
                  type: array
                  items:
                    $ref: '#/components/schemas/ListItem'
    UnprocessableEntityError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            error:
              type: object
              properties:
                cause:
                  type: string
                context:
                  type: array
                  items:
                    type: object
                    properties:
                      expected:
                        type: string
                      code:
                        type: string
                      received:
                        type: string
                      path:
                        type: array
                        items:
                          type: string
                      message:
                        type: string
    Success:
      type: object
      properties:
        success:
          type: boolean
        metadata:
          type: object
        data:
          type: object
    ListItem:
      type: object
      properties:
        label:
          type: string
        value:
          type: string
    Error:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: object
          properties:
            cause:
              type: string
              description: Causa do erro
            context:
              type: object
              description: Erro detalhado
      required:
        - success
        - error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://backend-pied-prod.piedadmin.com.br/api/oauth/token
          scopes:
            v2:kit:*: todas permissões para kits
            v2:kit:read: leitura em kits
            v2:kit:write: escreve em kits
            v2:kit:delete: remove kits

````