Renaming a Quota
Overview
In the quota management view for a survey, quotas are labeled according to their condition codes. For example, a quota for “Region Northeast” will read “Northeast” in our quota management UI:
For more complicated nested quotas that could benefit from shorter or more logical names, a request parameter may be passed in that relabels the quota. For example, you may want to relabel “Males 18-24” to “Young Males”.
Use
Wherever a quota is created or updated, you may pass in an optional request parameter “quota_title”.
Example
“quota_title”:”Young Males”
Important Considerations
You may use this on the POST /surveys, POST /surveys/:surveyId/quotas, PUT /surveys, PUT /surveys/:surveyId/quotas endpoints.
The “quota_title” parameter will be returned in the API response wherever a quota is present.
Request
POST $apihost/$basepath/surveys/:surveyId/quotas
($apihost is the environment against which you are testing, and $basepath is the base path with the api version. All Buy API calls will require access-token parameter in the header)
Parameters:
Body:
{
"buyer_quota_id": "qb30",
"quota_title":"Fathers of Children ages 4 to 12",
"required_count": 200,
"criteria": [
{"qualification_code": 230,"range_sets": [{"from": 4,"to": 12,"units": 311}]},
{"qualification_code": 218,"condition_codes": ["111"]},
{"qualification_code": 220,"condition_codes": ["111","112"]}]
} |
Result
Response Code
201 if POST, 200 if PUT
Response Body
{
"buyer_quota_id": "qb30",
"quota_title":"Fathers of Children ages 4 to 12",
"required_count": 200,
"criteria": [
{"qualification_code": 230,"range_sets": [{"from": 4,"to": 12,"units": 311}]},
{"qualification_code": 218,"condition_codes": ["111"]},
{"qualification_code": 220,"condition_codes": ["111","112"]}]
} |