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

# Consultar políticas de decisão

> Busca todas as políticas de decisão

<Tip>
  Retorna as características de todas as políticas em uma organização. O id é utilizado para Criar Relatórios
</Tip>

### Quando usar

Use este endpoint para listar políticas de decisão disponíveis para o contexto da organização. Você pode usar antes de criar um relatório para selecionar a política adequada ao perfil de risco, produto e estratégia comercial.

### Autenticação

Bearer JWT no header `Authorization`.

### Parâmetros

| Nome        | Local   | Tipo      | Obrigatório | Descrição                  |
| ----------- | ------- | --------- | ----------- | -------------------------- |
| `enabled`   | `query` | `boolean` | `não`       | Enabled policies           |
| `protected` | `query` | `boolean` | `não`       | Include protected policies |

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://gyra-core.gyramais.com.br/credit-policy/policy' \
  --header 'Authorization: Bearer abc123'
  ```

  ```javascript JavaScript theme={null}
  fetch("https://gyra-core.gyramais.com.br/credit-policy/policy", {
    method: "GET",
    headers: {
      "Authorization": "Bearer abc123",
    },
  })
    .then(res => res.json())
    .then(console.log)
  ```

  ```python Python theme={null}
  import requests

  url = "https://gyra-core.gyramais.com.br/credit-policy/policy"
  headers = {
    "Authorization": "Bearer abc123"
  }
  response = requests.get(url, headers=headers)
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  [
    {
      "id": "66a13ac310f297c2849e6657",
      "name": "Capital de Giro PJ",
      "documentType": "CNPJ",
      "reportType": "CUSTOMER_GYRA_360_PLUS",
      "enabled": false,
      "version": 1.24
    }
  ]
  ```

  ```json 401 Unauthorized theme={null}
  {
    "code": 401,
    "message": "Token de acesso inválido."
  }
  ```
</ResponseExample>
