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

# Quotas

> List the quotas of a survey and view the details and progress of a quota.

## List the quotas of a survey

Retrieves all the quotas of a survey. Quotas are returned in descending order of creation (most recent first).

```http theme={null}
GET /api/v1/surveys/{SURVEY_ID}/quotas
```

### Parameters

<ParamField path="SURVEY_ID" type="integer" required>
  The identifier of the survey.
</ParamField>

### `kind` field

| Value | Description |
| - | - |
| `questionnaire_quotas` | Quota with a leeway. |
| `target_quotas` | Quota without leeway. |
| `follow_up` | Quota without an objective. |

### `type` field

| Value | Description |
| - | - |
| `FlatQuota` | Quota on a single question. |
| `CrossedQuota` | Quota crossed on two questions. |

<ResponseExample>
  ```json Response theme={null}
  {
    "quotas": [
      {
        "id": 6386,
        "kind": "questionnaire_quotas",
        "row_iteration_id": 158469,
        "column_iteration_id": 158467,
        "created_at": "2025-04-01T09:48:52.796+02:00",
        "updated_at": "2025-04-01T09:48:52.796+02:00",
        "type": "CrossedQuota"
      },
      {
        "id": 7130,
        "kind": "follow_up",
        "row_iteration_id": 158473,
        "column_iteration_id": 158469,
        "created_at": "2025-06-23T11:07:11.125+02:00",
        "updated_at": "2025-06-23T11:07:11.125+02:00",
        "type": "CrossedQuota"
      }
    ]
  }
  ```
</ResponseExample>

## View the details of a quota

Retrieves the details and progress of a quota.

```http theme={null}
GET /api/v1/quotas/{QUOTA_ID}
```

### Parameters

<ParamField path="QUOTA_ID" type="integer" required>
  The identifier of the quota.
</ParamField>

### Response fields

<ResponseField name="id" type="integer">
  ID of the quota.
</ResponseField>

<ResponseField name="kind" type="string">
  Kind of quota: `questionnaire_quotas`, `target_quotas` or `follow_up` (see above).
</ResponseField>

<ResponseField name="type" type="string">
  `FlatQuota` (a single question) or `CrossedQuota` (crossed on two questions).
</ResponseField>

<ResponseField name="leeway" type="float">
  Leeway allowed on the quota objective (e.g. `0.05`).
</ResponseField>

<ResponseField name="pretty_label_with_identifier" type="string">
  Readable label of the quota with its identifier (e.g. `RS2 - age5`).
</ResponseField>

<ResponseField name="progress" type="object">
  Progress of the quota.

  <Expandable title="progress breakdown">
    Nested object crossing the items. Each cell contains: `objective` (the target objective), `completes` (the number of complete interviews collected) and `progress` (the progress rate).
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": 7132,
    "kind": "questionnaire_quotas",
    "row_iteration_id": 158467,
    "column_iteration_id": null,
    "created_at": "2025-06-23T11:19:51.357+02:00",
    "updated_at": "2025-06-23T11:19:51.357+02:00",
    "type": "FlatQuota",
    "leeway": 0.05,
    "pretty_label_with_identifier": "RS2 - age5",
    "progress": {
      "total": {
        "total": {
          "objective": 850,
          "completes": 800,
          "progress": 1
        }
      },
      "0-17": {
        "total": {
          "objective": 170,
          "completes": 0,
          "progress": 0
        }
      }
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.