POST
/
v2
/
creditCalculation
Calculate the maximum number of credits needed for a respondent
curl --request POST \
  --url https://api.redem.io/v2/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

OESDataPoints
number
required

The number of data points to be used for the Open-Ended Score (OES). ⭕ Note: If no OES data points are available, this value can be set to 0.

GQSAnswers
number
required

The number of data points to be used for the Grid-Question Score (GQS). ⭕ Note: If no GQS answers are available, this value can be set to 0.

TSDataPoints
number
required

The number of data points to be used for the Time Score (TS). ⭕ Note: If no TS data points are available, this value can be set to 0.

CHSAnswers
number
required

The number of data points to be used for the Coherence Score (CHS). ⭕ Note: If no CHS answers are available, this value can be set to 0.

BASDataPoints
number
required

The number of data points to be used for the Behavioral-Analytics Score (BAS). ⭕ Note: If no BAS data points are available, this value can be set to 0.

Response

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

success
boolean

A variable indicating whether the operation was successful.

message
string

A variable that human-readable message providing additional context or confirmation of the requested action.

results
object

This object serves as a container to hold the results for the requested data, encapsulating all relevant information and outputs in a structured format.