Legacy Dev Forum Posts

 View Only

Sign Up

QualityAPI - evaluations/scoring

  • 1.  QualityAPI - evaluations/scoring

    Posted 06-05-2025 18:06

    CharlVW | 2020-09-08 06:37:30 UTC | #1

    Hi, I am new to the API Explorer, and am trying to get a result back from the following API call: /api/v2/quality/evaluations/scoring.

    However I keep getting an error: { "message": "The request could not be understood by the server due to malformed syntax.", "code": "bad.request", "status": 400, "contextId": "60981422-0220-4f44-93dd-d6af1348f54c", "details": [], "errors": [] }

    No Matter what options I select I keep getting this (even if just the required fields are completed?


    CharlVW | 2020-09-08 06:41:42 UTC | #2

    The Call: (Substituted some id's with X's) { "evaluationForm": { "name": "Charl Eval", "modifiedDate": "", "published": true, "contextId": "", "questionGroups": [ { "id": "XXXX-552a8a7XXX", "name": "Welcome", "type": "questionGroup", "defaultAnswersToHighest": false, "defaultAnswersToNA": false, "naEnabled": false, "weight": 50, "manualWeight": false, "questions": [ { "id": "XXXXX-d37d322XXXX", "text": "Was Customer Welcomed", "helpText": "Customer Welcome", "type": "multipleChoiceQuestion", "naEnabled": false, "commentsRequired": false, "visibilityCondition": {}, "answerOptions": [ {} ], "isKill": false, "isCritical": false } ], "visibilityCondition": { "combiningOperation": "", "predicates": [] } } ], "publishedVersions": { "entities": [ { "name": "", "modifiedDate": "", "published": true, "contextId": "", "questionGroups": [ {} ], "publishedVersions": {} } ], "pageSize": 0, "pageNumber": 0, "total": 0, "firstUri": "", "selfUri": "", "nextUri": "", "lastUri": "", "previousUri": "", "pageCount": 0 } }, "answers": { "totalScore": {}, "totalCriticalScore": {}, "totalNonCriticalScore": {}, "questionGroupScores": [ { "questionGroupId": "XXX-552a8a73XXX", "totalScore": {}, "maxTotalScore": {}, "markedNA": true, "totalCriticalScore": {}, "maxTotalCriticalScore": {}, "totalNonCriticalScore": {}, "maxTotalNonCriticalScore": {}, "totalScoreUnweighted": {}, "maxTotalScoreUnweighted": {}, "totalCriticalScoreUnweighted": {}, "maxTotalCriticalScoreUnweighted": {}, "totalNonCriticalScoreUnweighted": {}, "maxTotalNonCriticalScoreUnweighted": {}, "questionScores": [ { "questionId": "XXXX-d37d322XXXX", "answerId": "XXXX-bca63d9XXXX", "score": 0, "markedNA": true, "failedKillQuestion": true, "comments": "" } ] } ], "anyFailedKillQuestions": true, "comments": "", "agentComments": "" } }


    anon33938915 | 2020-09-09 14:11:06 UTC | #3

    Hello @CharlVW, thanks for your post!

    I was able to get the request you posted running a bit better by changing a few things:

    • I replaced some {} object placeholders with numbers on fields that needed to be integers.
    • I wrapped publishedVersions in an array. (You had used this field correctly according to the API Explorer docs, but the docs seem to be incorrect. I'll look into getting them fixed.)

    I attached fixed.json, which is my altered version. Using that body, however, will still return a 400 error, because the answerOptions field is empty. If you'd like an example of what answerOptions can look like, you can look in the full-example.json file I attached.

    Is this helpful? Please feel free to follow up in this thread if you have any further thoughts or questions.

    full-example.json|attachment (17.8 KB) fixed.json|attachment (2.4 KB)


    CharlVW | 2020-09-10 08:33:07 UTC | #4

    Hey @anon33938915,

    Thanks for that info - seem to be correct.

    However, I am now getting a Error 500 Internal Server Error. {

    • "message": "The requested operation failed with status 500",*
    • "code": "internal.server.error",*
    • "status": 500,*
    • "contextId": "ced38b9e-a735-4e7f-b83e-d2f87cdb275b",*
    • "details": [],*
    • "errors": []*

    }

    Is there a way to troubleshoot what these errors are? Not sure why I'm getting this (Apart from Perhaps Authentication that I'm not passing but not sure where that fits in)

    Code I'm executing: { "evaluationForm": { "organizationId": "XXXXX-141d956XXXX", "id": "XXXXX-33abee3bXXXX", "name": "Charl Eval", "published": true, "contextId": "XXXXX-b0fed19XXXX", "questionGroups": [ { "type": "questionGroup", "id": "XXXXXX-552a8a7XXXXX", "name": "Welcome", "naEnabled": false, "defaultAnswersToHighest": false, "defaultAnswersToNA": false, "weight": 50.0, "manualWeight": false,

    "visibilityCondition": null }, { "type": "questionGroup", "id": "XXXXXX-66966feXXXX", "name": "Call Close", "naEnabled": false, "defaultAnswersToHighest": false, "defaultAnswersToNA": false, "weight": 50, "manualWeight": false

    } ], "answers": { "evaluationFormId": "XXXXX-33abee3bXXXX", "totalScore": 0, "totalCriticalScore": 0, "totalNonCriticalScore": 0, "questionGroupScores": [ { "questionGroupId": "XXXXX-552a8a7XXXX", "totalScore": null, "totalScoreUnweighted": null, "maxTotalScore": null, "maxTotalScoreUnweighted": null, "totalCriticalScore": null, "totalCriticalScoreUnweighted": null, "maxTotalCriticalScore": null, "maxTotalCriticalScoreUnweighted": null, "totalNonCriticalScore": null, "totalNonCriticalScoreUnweighted": null, "maxTotalNonCriticalScore": null, "maxTotalNonCriticalScoreUnweighted": null, "markedNA": false, "questionScores": [ { "questionId": "XXXXX-d37d322XXXX", "answerId": "XXXXX-e49153a0XXXX", "score": 1, "npsScore": null, "markedNA": false, "failedKillQuestion": false, "comments": null, "answerText": null, "freeTextAnswer": null, "npsTextAnswer": null } ] }, { "questionGroupId": "XXXXX-552a8a73XXXX", "totalScore": null, "totalScoreUnweighted": null, "maxTotalScore": null, "maxTotalScoreUnweighted": null, "totalCriticalScore": null, "totalCriticalScoreUnweighted": null, "maxTotalCriticalScore": null, "maxTotalCriticalScoreUnweighted": null, "totalNonCriticalScore": null, "totalNonCriticalScoreUnweighted": null, "maxTotalNonCriticalScore": null, "maxTotalNonCriticalScoreUnweighted": null, "markedNA": false, "questionScores": [ { "questionId": "XXXXX-d37d322aXXXXX", "answerId": "XXXXX-e49153a0XXXX", "score": 1, "npsScore": null, "markedNA": false, "failedKillQuestion": false, "comments": null, "answerText": null, "freeTextAnswer": null, "npsTextAnswer": null }, { "questionId": "XXXXX-5048e9f1XXXX", "answerId": "XXXX-14e13917XXXX", "score": 1, "npsScore": null, "markedNA": false, "failedKillQuestion": false, "comments": null, "answerText": null, "freeTextAnswer": null, "npsTextAnswer": null } ]

    } ],

    "anyFailedKillQuestions": false, "comments": null, "agentComments": null } } }


    Jason_Mathison | 2020-09-10 12:27:31 UTC | #5

    Hi CharlVW,

    I looked up the context ID that you provided, and one of the services that is part of processing your request is having an error, but the logging doesn't really indicate why. Please open up a ticket with customer care to have this researched by the development team and fixed.

    --Jason


    system | 2020-10-11 12:27:35 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 8765