Sent API

API Description

In order to use the API you must have the valid environment-specific username and password. Before any API requests, you need to obtain an API KEY. You will get a valid API KEY by using the VoC authentication API

The API KEY must be sent in the request authorization header element. If the API KEY value is valid then API request will be successful (http status code 200), otherwise it will fail (http status code 401). All API requests must be made over HTTPS.

API Endpoints

EnvironmentEndpoint
Productionhttps://api.confidently.fi/api/responses/prod/v2/survey/{surveyId}/sent
Testhttps://api.confidently.fi/api/responses/test/v2/survey/{surveyId}/sent

Note: Test environment can print max 10 answerGroup

API request header

HeaderValue
Authorizationx-api-key APIKEY

API request parameters

ParameterDescriptionMandatory
surveyIdThe unique id of the surveyX
startDateAnswers from dateX
endDateAnswers until date (default max 7 days difference)

API response

ElementDescriptionType
idId of the contact that received the surveylong
sendingTimeSending time is the time when the Id was stored. Format: 2017-12-31date/string

API request and response example

curl -X GET "https://api.confidently.fi/api/responses/test/v2/survey/3974/sent?startDate=2019-09-09&endDate=2019-09-12" -H "Authorization: x-api-key {APIKEY}"

Successful API request returns results in JSON format.

[
    {
        "id": "12345678",
        "sendingDate": "2019-09-09"
    },
    {
        "id": "123456789",
        "sendingDate": "2019-09-10"
    },
    {
        "id": "123456780",
        "sendingDate": "2019-09-11"
    }
]