Add Quota API

This API is used to add a quota to a previously submitted project. Quotas may have overlapping or encompassing ranges. For example, one quota may specify Females age 30-40 while a second may specify Females who drive a Toyota. Every quota that a panelist qualifies for must be open to qualify for the survey. Thus if a female age 30-40 who drives a Toyota arrives, both of the above quotas must be open for her to be sent into the survey.

Command

"client/addQuota/1"


Inputs

The following values are expected in the JSON body:

Name Type Required Description
command String

Must be "client/addQuota/1"

rfg_id String

RFG project identifier. This is the identifier you received when you submitted the project.

datapoints Object[]

Array of JSON objects that contains the datapoints considered by this quota, its structure should be the same as the one used in the datapoints array of the project.

limit Integer

Number of starts or completes (determined by the project-level field, quotaLimitBy) that are available for the quota.


Outputs

The JSON output will always contain the original command and a result. If the result > 0, an error has occurred (refer to Error Codes) and a message field will describe the error. If result = 0, the following is included in the response field:

Name Type Description
quota_id String

An identifier for the quota. You will need it if you want to modify or deactivate the quota later. Can be null if the quota was not successfully inserted.


Example Command

{
     command : "client/addQuota/1",
     rfg_id : "RFG12345-001",
     datapoints:[
          {
               name:"Gender",
               values:[1]
          },
          {
               name:"Ethnicity (US)",
               values:[3]
          }
     ],
     limit:11
}

Example Response

response : {
     quota_id: "RFG12345-001- q2"
}