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

# Fetch List of Funnels

> Retrieves a list of all funnels based on the given query parameters.

Retrieves a list of all funnels based on the given query parameters.

```http theme={null}
GET https://services.leadconnectorhq.com/funnels/funnel/list
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Query parameters

<ParamField query="locationId" type="string" required />

<ParamField query="type" type="string" />

<ParamField query="category" type="string" />

<ParamField query="offset" type="string" />

<ParamField query="limit" type="string" />

<ParamField query="parentId" type="string" />

<ParamField query="name" type="string" />

## Respuestas

<Accordion title="200 - Successful response - List of funnels returned">
  <ResponseField name="funnels" type="object" required />

  <ResponseField name="count" type="number" required default="24" />

  <ResponseField name="traceId" type="string" required default="03774d31-a57e-4b4f-95c7-315ce61969f1" />

  ```json theme={null}
  {
    "funnels": {
      "_id": "SkIDfu0S4m3NYQyvWHC6",
      "dateAdded": "2024-04-29T15:00:05.681Z",
      "dateUpdated": "2024-04-29T15:00:28.465Z",
      "deleted": false,
      "domainId": "",
      "locationId": "ojQjykmwNIU88vfsfzvH",
      "name": "Chaitanya Copy",
      "orderFormVersion": 2,
      "originId": "hAmyh7jrJH5FfEEKAJ9z",
      "steps": [
        {
          "id": "f5d178c0-8bbb-4cd4-927c-691c68a62c59",
          "name": "Step 1",
          "originId": "80b2f227-5bc8-4ca5-980d-817745ea4e8b",
          "pages": [
            "2IhBmBcQRx9JXV1JZsRt"
          ],
          "products": [],
          "sequence": 1,
          "type": "optin_funnel_page",
          "url": "/newtestifypath"
        }
      ],
      "type": "funnel",
      "updatedAt": "2024-04-29T15:00:34.233Z",
      "faviconUrl": "",
      "globalSectionVersion": 1,
      "globalSectionsPath": "funnel/SkIDfu0S4m3NYQyvWHC6/global-sections-1",
      "globalSectionsUrl": "https://firebasestorage.googleapis.com/v0/b/leadway-staging.appspot.com/o/funnel%2FSkIDfu0S4m3NYQyvWHC6%2Fglobal-sections-1?alt=media&token=9cc5c211-093b-4751-aeba-19282ac92955",
      "isStoreActive": false,
      "trackingCodeBody": "",
      "trackingCodeHead": "",
      "url": "/chaitanya"
    },
    "count": 24,
    "traceId": "03774d31-a57e-4b4f-95c7-315ce61969f1"
  }
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://services.leadconnectorhq.com/funnels/funnel/list' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/funnels/funnel/list', {
    method: 'GET',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
    },
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'GET',
      'https://services.leadconnectorhq.com/funnels/funnel/list',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
      },
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/funnels/funnel/list');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'GET',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
      ],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
