PATCH
/
v1
/
projects
/
{projectId}
/
quota
cURL
curl --request PATCH \
  --url https://api-staging.respondent.io/v1/projects/{projectId}/quota \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-api-secret: <x-api-secret>' \
  --data '{
  "criteria": {
    "category": "gender",
    "segments": [
      {
        "value": "male",
        "percentage": 50
      }
    ]
  },
  "version": "v1"
}'
{
  "id": "<string>",
  "projectId": "<string>",
  "version": "v1",
  "totalTarget": 2,
  "status": "IN_PROGRESS",
  "criteria": {
    "category": "gender",
    "segments": [
      {
        "value": "male",
        "percentage": 50,
        "id": "1"
      }
    ]
  },
  "progress": {
    "1": {
      "currentCount": 10,
      "targetCount": 25
    },
    "2": {
      "currentCount": 15,
      "targetCount": 30
    }
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Headers

x-api-key
string
required
x-api-secret
string
required

Path Parameters

projectId
string
required

Body

application/json
version
enum<string>
required
Available options:
v1
criteria
object

Updated quota criteria details

Response

200 - application/json
progress
object
required

Quota progress by segment ID

Example:
{
"1": { "currentCount": 10, "targetCount": 25 },
"2": { "currentCount": 15, "targetCount": 30 }
}
id
string<ObjectId>
projectId
string<ObjectId>
version
enum<string>
Available options:
v1
totalTarget
number
Required range: x >= 1
status
enum<string>
Available options:
IN_PROGRESS,
FILLED
criteria
object
createdAt
string<date-time>
updatedAt
string<date-time>