Introduction
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.
Authentication
Login
Login to require a bearer token
Example request:
curl --request POST \
"https://connectto.wevi.nl/api/v1/login" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"email\": null,
\"password\": null
}"
import requests
import json
url = 'https://connectto.wevi.nl/api/v1/login'
payload = {
"email": null,
"password": null
}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"data": {
"token": "{YOUR_AUTH_KEY}"
},
"message": "Authenticated",
"status": 200
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout
requires authentication
Signs out the user and destroy's the API token
Example request:
curl --request POST \
"https://connectto.wevi.nl/api/v1/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json"import requests
import json
url = 'https://connectto.wevi.nl/api/v1/logout'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Employees
Create or update employee
requires authentication
Post a new or updated employee
Example request:
curl --request POST \
"https://connectto.wevi.nl/api/v1/employees" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"afasEnvironment\": null,
\"employeeNumber\": null,
\"initials\": null,
\"lastName\": null,
\"street\": null,
\"houseNumber\": null,
\"postalCode\": null,
\"city\": null,
\"hasRightToCar\": true,
\"employerId\": null,
\"costPlace\": null,
\"email\": null,
\"phoneNumber\": null,
\"parttimePercentage\": null,
\"carCategory\": null,
\"changeDate\": \"2024-08-09T08:04:51\"
}"
import requests
import json
url = 'https://connectto.wevi.nl/api/v1/employees'
payload = {
"afasEnvironment": null,
"employeeNumber": null,
"initials": null,
"lastName": null,
"street": null,
"houseNumber": null,
"postalCode": null,
"city": null,
"hasRightToCar": true,
"employerId": null,
"costPlace": null,
"email": null,
"phoneNumber": null,
"parttimePercentage": null,
"carCategory": null,
"changeDate": "2024-08-09T08:04:51"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.