> ## 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 Review Count as per status

> API to fetch the Review Count as per status

API to fetch the Review Count as per status

```http theme={null}
GET https://services.leadconnectorhq.com/products/reviews/count
```

## 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="altId" type="string" required default="6578278e879ad2646715ba9c">
  Account Id or Agency Id
</ParamField>

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

<ParamField query="rating" type="number" default="4">
  Key to filter the ratings
</ParamField>

<ParamField query="startDate" type="string" default="2023-01-01T00:00:00Z">
  The start date for filtering reviews
</ParamField>

<ParamField query="endDate" type="string" default="2023-12-31T23:59:59Z">
  The end date for filtering reviews
</ParamField>

<ParamField query="productId" type="string" default="60d21b4667d0d8992e610c88,60d21b4667d0d8992e610c89,60d21b4667d0d8992e610c8a">
  Comma-separated list of product IDs
</ParamField>

<ParamField query="storeId" type="string" default="60d21b4667d0d8992e610c85,60d21b4667d0d8992e610c86,60d21b4667d0d8992e610c87">
  Comma-separated list of store IDs
</ParamField>

## Respuestas

<Accordion title="200 - Successful response">
  <ResponseField name="data" type="array[]" required>
    Array of review status counts
  </ResponseField>

  ```json theme={null}
  {
    "data": [
      []
    ]
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="422 - Unprocessable Entity">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

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

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/products/reviews/count', {
    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/products/reviews/count',
      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/products/reviews/count');
  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>
