Setting quota with API | XM Community
Skip to main content

I'm trying to set a quota following the documentation here. After many attempts, I think that my request is complete and well-formatted but apparently that's not the case. Would you be so nice as to take a look at the JSON file below or point me to some resources that would help me out in this case?

$meta$requestId
[1] "ec66de1b-2aec-4241-9a2a-0f90818b9b11"
$meta$httpStatus
[1] "400 - Bad Request"
$meta$error
$meta$error$errorCode
[1] "QMST_1"
$meta$error$errorMessage
[1] "The request was invalid."
$meta$error$code
[1] "ESRV35"
$meta$error$message
[1] "Invalid request. Missing or invalid parameter ID."

Below is the json file that I'm using in my API call:
   {
    "Name": "New Quota",
    "Occurrences": 55,
    "Logic": {
     "0": {
      "0": {
       "LogicType": "Question",
       "QuestionID": "QID112",
       "QuestionIsInLoop": "no",
       "ChoiceLocator": "q://QID112/SelectableAnswer/25",
       "Operator": "Selected",
       "QuestionIDFromLocator": "QID112",
       "LeftOperand": "q://QID112/SelectableAnswer/25",
       "Type": "Expression",
       "Description": "If In what regency/city do you live? - Sumatera Barat Is Selected "
      },
      "1": {
       "LogicType": "Question",
       "QuestionID": "QID132",
       "QuestionIsInLoop": "no",
       "ChoiceLocator": "q://QID132/SelectableChoice/1",
       "Operator": "Selected",
       "QuestionIDFromLocator": "QID132",
       "LeftOperand": "q://QID132/SelectableChoice/1",
       "Type": "Expression",
       "Description": "And What is your gender? Male Is Selected ",
       "Conjuction": "And"
      },
      "2": {
       "LogicType": "Question",
       "QuestionID": "QID96",
       "QuestionIsInLoop": "no",
       "ChoiceLocator": "q://QID96/ChoiceTextEntryValue",
       "Operator": "GreaterThanOrEqual",
       "QuestionIDFromLocator": "QID96",
       "LeftOperand": "q://QID96/ChoiceTextEntryValue",
       "RightOperand": "21",
       "Type": "Expression",
       "Description": "And What is your Age (years)? Text Response Is Greater Than or Equal to 21 ",
       "Conjuction": "And"
      },
      "3": {
       "LogicType": "Question",
       "QuestionID": "QID96",
       "QuestionIsInLoop": "no",
       "ChoiceLocator": "q://QID96/ChoiceTextEntryValue",
       "Operator": "LessThanOrEqual",
       "QuestionIDFromLocator": "QID96",
       "LeftOperand": "q://QID96/ChoiceTextEntryValue",
       "RightOperand": "29",
       "Type": "Expression",
       "Description": "And What is your Age (years)? Text Response Is Less Than or Equal to 29 ",
       "Conjuction": "And"
      },
      "Type": "If"
     },
     "Type": "BooleanExpression"
    },
    "LogicType": "Simple",
    "QuotaAction": "EndCurrentSurvey",
    "ActionInfo": {
     "0": {
      "0": {
       "ActionType": "EndCurrentSurvey",
       "Type": "Expression",
       "LogicType": "QuotaAction"
      },
      "Type": "If"
     },
     "Type": "BooleanExpression"
    },
    "ID": "QO_12345678901",
    "QuotaRealm": "Survey",
    "EndSurveyOptions": {
     "EndingType": "Default",
     "ResponseFlag": "QuotaMet",
     "SurveyTermination": "DefaultMessage"
    },
    "Count": 0
   }

Be the first to reply!

Leave a Reply