POST
/
creditCalculation
curl --request POST \
  --url https://api.redem.io/creditCalculation \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "OESDataPoints": 2,
  "GQSAnswers": 35,
  "TSDataPoints": 2,
  "CHSAnswers": 25,
  "BASDataPoints": 2
}'
{
  "success": true,
  "message": "Credit calculation successfully retrieved",
  "results": {
    "creditCalculation": {
      "totalCredits": 12,
      "calculationBreakdown": {
        "OES": {
          "credits": 4,
          "dataPoints": 2
        },
        "GQS": {
          "credits": 3,
          "answers": 35
        },
        "TS": {
          "credits": 1,
          "dataPoints": 2
        },
        "CHS": {
          "credits": 4,
          "answers": 25
        },
        "BAS": {
          "credits": 4,
          "dataPoints": 2
        }
      }
    }
  }
}

If you need to estimate the number of credits required to add a respondent, you can use this endpoint.

This endpoint is optional and serves informational purposes only. It provides an estimate of the credits required based on the selected quality scores.

Authorizations

api-key
string
header
required

Body

application/json

Request body for calculating the maximum number of credits needed for a respondent

Response

200
application/json
When a request is successfully processed, the API returns a 200 OK status code along with the expected data.

The response is of type object.