Awell Health Developer Hub
Dev Hub

Request

Endpoint

POST

/v1/calculations

Body

This endpoint expects the below fields to be present in the request body.

FieldTypeRequired
calculation_idstringyes
calculation_inputobject (key-value pair)yes

The calculation_input parameter expects a key-value pair object where the key represents the calculation input id and the value is the corresponding value for that calculation input.

01

Response

HTTP 200

When successful, the API will return a HTTP status code of 200 and in the response an array of results. We return an array of results because some calculations return multiple "subresults" instead of a single score. The schema of the response can be found here.

Below you can find an example response of the bmi calculation:

01

HTTP 404

When you try to perform a calculation that doesn't exist (based on the calculation_id), the API will return a 404 HTTP status code and the following response:

01

HTTP 500

When unsuccessful, the API will return a 500 HTTP status.

InvalidInputsError

This error is thrown when you're passing at least 1 invalid value for a given calculation input id.

Request:

01

Response:

01

UnexpectedInputsError

This error is thrown when you're passing at least 1 unexpected calculation input id for a given calculation.

Request:

01

Response:

01