MENU navbar-image

Introduction

GreenIT 2025 Feedback API

Hello Saori and Gert,

These are testing routes that work exactly like how they would in production, but

The response behavior will be the same otherwise.

Remove the docs/ path segment from the routes you see to get the paths to the actual routes.

Note that the /docs/auth/response/remove endpoint only exists in this testing environment. Use it to clean up the test responses in the table when you're done.

The test responseId's for the current survey are

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by trying out the GET api/docs/token route below.

Endpoints

GET api/docs/token

Example request:
curl --request GET \
    --get "https://api.green-it.nl/api/docs/token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.green-it.nl/api/docs/token"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "bearer": "34|3oqRaL34iBZH1WR00UitcleerND04GaS3gEHccBv9121bd4f"
}
 

Request      

GET api/docs/token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/docs/auth/response

Example request:
curl --request POST \
    "https://api.green-it.nl/api/docs/auth/response" \
    --header "Authorization: Bearer 0|tokenincludingprecedingnumberandpipesymbol" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"responseId\": \"R_8rvgqfsRwrvrU0Y\"
}"
const url = new URL(
    "https://api.green-it.nl/api/docs/auth/response"
);

const headers = {
    "Authorization": "Bearer 0|tokenincludingprecedingnumberandpipesymbol",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "responseId": "R_8rvgqfsRwrvrU0Y"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/docs/auth/response

Headers

Authorization      

Example: Bearer 0|tokenincludingprecedingnumberandpipesymbol

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

responseId   required  optional  

string The responseID of the participant in Qualtrics (to retrieve or also create the TestReportData in the test table). Example: R_8rvgqfsRwrvrU0Y

POST api/docs/auth/response/hash

Example request:
curl --request POST \
    "https://api.green-it.nl/api/docs/auth/response/hash" \
    --header "Authorization: Bearer 0|tokenincludingprecedingnumberandpipesymbol" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"responseId\": \"R_8rvgqfsRwrvrU0Y\"
}"
const url = new URL(
    "https://api.green-it.nl/api/docs/auth/response/hash"
);

const headers = {
    "Authorization": "Bearer 0|tokenincludingprecedingnumberandpipesymbol",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "responseId": "R_8rvgqfsRwrvrU0Y"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/docs/auth/response/hash

Headers

Authorization      

Example: Bearer 0|tokenincludingprecedingnumberandpipesymbol

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

responseId   required  optional  

string The responseID of the participant in Qualtrics (to retrieve the hash for the email link). Example: R_8rvgqfsRwrvrU0Y

POST api/docs/auth/response/remove

Example request:
curl --request POST \
    "https://api.green-it.nl/api/docs/auth/response/remove" \
    --header "Authorization: Bearer 0|tokenincludingprecedingnumberandpipesymbol" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"responseId\": \"R_8rvgqfsRwrvrU0Y\"
}"
const url = new URL(
    "https://api.green-it.nl/api/docs/auth/response/remove"
);

const headers = {
    "Authorization": "Bearer 0|tokenincludingprecedingnumberandpipesymbol",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "responseId": "R_8rvgqfsRwrvrU0Y"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/docs/auth/response/remove

Headers

Authorization      

Example: Bearer 0|tokenincludingprecedingnumberandpipesymbol

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

responseId   required  optional  

string The responseID of the participant in Qualtrics (to remove this record from the table). Example: R_8rvgqfsRwrvrU0Y