MENU navbar-image

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
}
 

Request   

POST api/v1/login

Headers

Accept      

Example: application/json

Content-Type      

Example: application/json

Body Parameters

email   string   
password   string   

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):


{}
 

Request   

POST api/v1/logout

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

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()

Request   

POST api/v1/employees

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

Content-Type      

Example: application/json

Body Parameters

afasEnvironment   string   

Max 50 characters.

employeeNumber   string   

Max 15 characters.

initials   string   

Max 10 characters.

prefixName   string  optional  

Max 20 characters.

lastName   string   

Max 80 characters.

street   string   

Max 100 characters.

houseNumber   integer   
numberSuffix   string  optional  

Max 10 characters

postalCode   string   

Max 10 characters.

city   string   

Max 50 characters.

hasRightToCar   boolean   

Example: true

employerId   string   

Max 16 characters.

costPlace   string   

Max 50 characters.

email   string   

Must be a valid email address. Must not be greater than 75 characters.

phoneNumber   string   

Max 15 characters.

parttimePercentage   integer   

Must be between 1 and 100.

carCategory   integer   

Must be between 1 and 9.

changeDate   string  optional  

Must be a valid date. Example: 2024-08-09T08:04:51