Skip to Content
Conversions

Conversions

All responses have content-type application/json.

Get all asked questions

curl https://api.ednia.se/elysia/external/conversions/askedQuestions \ -X GET \ -H "Authorization: Bearer <token>"

200

Successful response. There is no pagination. Asked questions are sorted by date descending.

askedQuestions.sender.mode can be either email or phone. Depending on the mode, the sender.phone or sender.email field will be populated.

Example response:

{ "askedQuestions": [ { "id": "sample-asked-question", "highSchoolId": "sample-high-school", "highSchoolName": "Foo Gymnasium", "createdAt": "2022-01-01T00:00:00.000Z", "question": "What is the best way to learn a new language?", "sender": { "mode": "email", "phone": null, "email": "test@example.com" } }, { "id": "sample-asked-question", "highSchoolId": "sample-high-school", "highSchoolName": "Bar Gymnasium", "createdAt": "2022-01-01T00:00:00.000Z", "question": "To whom it may concern, I am inquiring about the weather.", "sender": { "mode": "phone", "phone": "+467000000000", "email": null } } ] }

Get all declarations of interest

In swedish this is called “intresseanmälan” and is sent by the user to the school.

curl https://api.ednia.se/elysia/external/conversions/declarationsOfInterest \ -X GET \ -H "Authorization: Bearer <token>"

200

Successful response. There is no pagination. Declarations of interest are sorted by date descending.

declarationsOfInterest.user.highSchoolEnrollmentYear is the year the student will begin high school.

Example response:

{ "declarationsOfInterest": [ { "id": "sample-declaration-of-interest", "highSchoolId": "sample-high-school", "createdAt": "2022-01-01T00:00:00.000Z", "user": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phone": "+467000000000", "highSchoolEnrollmentYear": 2021 } } ] }

Error responses

401

If you encounter this error, you are not authenticated.

{ "error": "Unauthenticated" }

403

Unauthorized

{ "error": "Unauthorized" }

429

Rate limit exceeded. Please limit requests to 10 per second and 600 per hour.

{ "error": "Rate limit exceeded" }