Get Quota
Retrieve details for a specific segmented quota on a survey.
Note: The Quotas object is designed for use with Segmented Quotas only. To manage an Overall Quota, use the Survey Object with the options[overall_quota] parameter.
Endpoint
GET
/v5/survey/{survey_id}/quotas/{quota_id}
Authentication is required for all requests. See Authentication.
Path Parameters
survey_id
integer
required
The ID of the survey that contains the quota.
quota_id
integer
required
The ID of the quota to retrieve.
Query Parameters
None
Response
Note: Quota fields are returned at the top level of the response object, not nested under a data key.
result_ok
boolean
Returns
true if the request was successful.id
string
Unique identifier for the quota.
name
string
The name of the quota.
description
string
A description of the quota.
limit
string
The maximum number of responses allowed before the quota closes.
responses
string
The current number of responses counted toward this quota.
distributed
string
Whether this is a distributed (percentage-based) quota. Returns
"true" or "false".groups
array
Logic rule groups defining which respondents count toward this quota.
child attributes
id
string
Unique identifier for this group. Required when updating rules via the Update Quota endpoint.
rules
array
The conditions within this group.
child attributes
id
string
Unique identifier for this rule. Required when updating rules via the Update Quota endpoint.
input_value
string
The field being evaluated — typically a question ID or a system field such as
5_ip, 8_country, 9_region, 10_city, or always.operator
string
The comparison operator code (e.g.,
4 = equal to, 12 = one of, 25 = always true). See Create Quota for the full operator reference.answers_type
string
2 = open text; 17 = answer option (radio, checkbox, dropdown).answers_values
string
The value matched by this rule.
Examples
Request
curl -X GET "https://api.alchemer.com/v5/survey/123456/quotas/1?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET"
Response
{
"result_ok": true,
"id": "1",
"name": "East Coast Respondents",
"description": "Limit responses from East Coast states",
"limit": "100",
"responses": "42",
"distributed": "false",
"groups": [
{
"id": "64a1bc2e3f001",
"rules": [
{
"id": "64a1bc2e3f002",
"input_value": "9_region",
"operator": "4",
"answers_type": "2",
"answers_values": "NY"
}
]
}
]
}