{
  "openapi": "3.0.3",
  "info": {
    "title": "OpenAPI definition",
    "version": "v0"
  },
  "servers": [
    {
      "url": "https://vwt-api.acc.recognize.hosting",
      "description": "Generated server url"
    }
  ],
  "tags": [
    {
      "name": "Departments API"
    },
    {
      "name": "Locations API"
    },
    {
      "name": "Employee Schedules / leave API"
    },
    {
      "name": "Employer API"
    },
    {
      "name": "Function API"
    },
    {
      "name": "Employee API"
    },
    {
      "name": "Projects API"
    }
  ],
  "paths": {
    "/api/departments": {
      "get": {
        "tags": [
          "Departments API"
        ],
        "summary": "Get a hierarchical list of departments",
        "operationId": "getDepartmentHierarchy",
        "parameters": [
          {
            "name": "maxLayers",
            "in": "query",
            "description": "Optional: maximum hierarchy level",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Optional: date in past for historical department information. ISO 8601 format. Time is optional",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Optional: second date in past for historical department information. ISO 8601 format. Time is optional.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available departments, grouped under the top-level department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Department"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/departments/{departmentId}": {
      "get": {
        "tags": [
          "Departments API"
        ],
        "summary": "Get a hierarchical list of departments, starting from the mentioned department ID",
        "operationId": "getDepartmentHierarchy_1",
        "parameters": [
          {
            "name": "departmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxLayers",
            "in": "query",
            "description": "Optional: maximum hierarchy layers",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Optional: date in past for historical department information. ISO 8601 format. Time is optional",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Optional: second date in past for historical department information. ISO 8601 format. Time is optional.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available departments, grouped under the top-level department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Department"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the requested department based on it's ID"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/departments/{departmentId}/projects": {
      "get": {
        "tags": [
          "Departments API"
        ],
        "summary": "Gets a list of projects for this department",
        "operationId": "getProjectsForDepartment",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "departmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available departments, grouped under the top-level department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Department"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the requested department based on it's ID"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/departments/{departmentId}/employees": {
      "get": {
        "tags": [
          "Departments API"
        ],
        "summary": "Get a list of employees for a specific department, with their current function / department / manager",
        "operationId": "getEmployees",
        "parameters": [
          {
            "name": "departmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "recurse",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available employees inside that department",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/locations": {
      "get": {
        "tags": [
          "Locations API"
        ],
        "summary": "Get a list of locations, with their current address",
        "operationId": "getLocations",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available locations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageLocation"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/locations/{locationId}": {
      "get": {
        "tags": [
          "Locations API"
        ],
        "summary": "Get the details of a location",
        "operationId": "getLocation",
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Detail information for the location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the requested location based on it's ID"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/functions": {
      "get": {
        "tags": [
          "Function API"
        ],
        "summary": "Get a list of all available functions",
        "operationId": "getJobFunctions",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "function_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available functions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageJobFunction"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/functions/{id}": {
      "get": {
        "tags": [
          "Function API"
        ],
        "summary": "Get the details of a function, referenced via its id",
        "operationId": "getJobFunctions_1",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "id of the function to retrieve",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Function information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobFunction"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/functions/{id}/employees": {
      "get": {
        "tags": [
          "Function API"
        ],
        "summary": "Gets a list of employees for the given function",
        "operationId": "getEmployeesWithJobFunction",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "id of the function to retrieve employees for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The employees that have the given function",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageJobFunction"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employers": {
      "get": {
        "tags": [
          "Employer API"
        ],
        "summary": "Get a list of employers",
        "operationId": "getEmployers",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available empployers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee1"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get a list of employees, with their current function / department / manager",
        "operationId": "getEmployees1",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available employees",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee1"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the details of an employee, including it's history of functions / departments",
        "operationId": "getEmployeeDetails",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Detail information for the employee",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDetails"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the requested employee based on it's ID"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/schedule": {
      "get": {
        "tags": [
          "Employee Schedules / leave API"
        ],
        "summary": "Gets the work schedule for this employee in the requested period. This schedule ",
        "operationId": "getScheduleForEmployee",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "description": "The employee's id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "The first date inclusive to retrieve the employee's schedule for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "The last date inclusive to retrieve the employee's schedule for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A (possibly empty) page of schedule entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageScheduleEntry"
                }
              }
            }
          },
          "400": {
            "description": "One of the parameters was not accepted. For instance, the requested date lies to far in the future or the past",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/PageScheduleEntry"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/projects": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Gets a list of projects the request employee has access to",
        "operationId": "getProjectsForEmployee",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available projects for the employee",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee1"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/leave": {
      "get": {
        "tags": [
          "Employee Schedules / leave API"
        ],
        "summary": "Gets the leave for this employee in the requested period",
        "operationId": "getLeaveForEmployee",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "description": "The employee's id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "The first date inclusive to retrieve leave for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "The last date inclusive to retrieve leave for. Defaults to today",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A (possibly empty) page of leave entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageLeaveEntry"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/{employeeId}/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the employees the employee is the manager of, if any",
        "operationId": "getEmployeesForManager",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of employees the employee is the manager of",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee1"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the employee corresponding to the employee id"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/me": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the employee for the authenticated user",
        "operationId": "getEmployee",
        "responses": {
          "200": {
            "description": "Information for the employee of the authenticated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDetails"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the employee corresponding to the authenticated user"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "azureAdToken": []
          }
        ]
      }
    },
    "/api/staff/employees/me/employees": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the employees the logged in user is the manager of, if any",
        "operationId": "getEmployeesForManager_1",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of employees the user is the manager of",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageEmployee1"
                }
              }
            }
          },
          "404": {
            "description": "Unable to find the employee corresponding to the authenticated user"
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "azureAdToken": []
          }
        ]
      }
    },
    "/api/staff/employees/list": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get a list of multiple employees. If one or more ids cannot be found, the results for those IDs will be omitted in the list",
        "operationId": "getEmployeesList",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "List of the ids to retrieve, comma separated. Example: 1,2",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Employee information for the specified list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDetails"
                  }
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/staff/employees/details": {
      "get": {
        "tags": [
          "Employee API"
        ],
        "summary": "Get the details of multiple employees, including it's history of functions / departments. If one or more ids cannot be found, the results for those IDs will be omitted in the list",
        "operationId": "getEmployeesDetails",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "List of the ids to retrieve, comma separated. Example: 1,2",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Employee details for the specified list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDetails"
                  }
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying AFAS service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/projects": {
      "get": {
        "tags": [
          "Projects API"
        ],
        "summary": "Get a list of projects for the given companyIds",
        "operationId": "getProjects",
        "parameters": [
          {
            "name": "page_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "companyIds",
            "in": "query",
            "description": "Comma-separated list of companyIds",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the available projects based on the query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageProject"
                }
              }
            }
          },
          "502": {
            "description": "Unable to contact the underlying service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects API"
        ],
        "summary": "Get the project for the given projectId",
        "operationId": "getProject",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project with the given id, if it exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "404": {
            "description": "A project with the given id could not be found"
          },
          "502": {
            "description": "Unable to contact the underlying service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/projects/list": {
      "get": {
        "tags": [
          "Projects API"
        ],
        "summary": "Get the projects as listed in ids. Will retrieve each project fully.",
        "operationId": "listProjects",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The projects with the given ids, if they exist. This means that the resulting list may contain a strict subset of the given ids",
            "content": {
              "application/json": {}
            }
          },
          "502": {
            "description": "Unable to contact the underlying service"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Department": {
        "required": [
          "departmentId",
          "departmentName",
          "layer",
          "managerEmployeeId",
          "managerName",
          "managerWorkEmailAddress",
          "parentDepartmentId",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "departmentId": {
            "title": "The ID of this department",
            "type": "string"
          },
          "departmentName": {
            "title": "The name of this department",
            "type": "string"
          },
          "layer": {
            "title": "The layer of this department",
            "type": "string"
          },
          "parentDepartmentId": {
            "title": "The parent ID for this department, null in case it's the top-level department",
            "type": "string"
          },
          "managerEmployeeId": {
            "title": "The employee ID of the manager for this department",
            "type": "string"
          },
          "managerName": {
            "title": "The name of the manager for this department",
            "type": "string"
          },
          "managerWorkEmailAddress": {
            "title": "The work email address of the manager for this department",
            "type": "string"
          },
          "childDepartments": {
            "title": "The child departments, if present",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Department"
            }
          },
          "startDate": {
            "title": "The start date for this department",
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "title": "The historical end date of this department. Can be empty",
            "type": "string",
            "format": "date-time"
          },
          "erpCompanyCodes": {
            "title": "Optional list of erp company codes, associated to this department",
            "uniqueItems": true,
            "type": "array",
            "items": {
              "title": "Optional list of erp company codes, associated to this department",
              "type": "string"
            }
          },
          "departmentHistory": {
            "title": "Optional: historical data, if relevant, of the organisation",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Department"
            }
          }
        }
      },
      "Employee": {
        "title": "The results",
        "required": [
          "departmentId",
          "departmentName",
          "employeeId",
          "employeeName",
          "employeeWorkEmailAddress",
          "employerId",
          "employerName",
          "functionHouseId",
          "functionId",
          "functionName",
          "managerEmployeeId",
          "managerName"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "employeeName": {
            "title": "The name of this employee",
            "type": "string"
          },
          "employeeWorkEmailAddress": {
            "title": "The work email address of this employee",
            "type": "string"
          },
          "departmentId": {
            "title": "The department ID of this employee",
            "type": "string"
          },
          "departmentName": {
            "title": "The department name",
            "type": "string"
          },
          "functionId": {
            "title": "The function ID",
            "type": "string"
          },
          "functionHouseId": {
            "title": "The house ID of the function",
            "type": "string"
          },
          "functionName": {
            "title": "The function name",
            "type": "string"
          },
          "functionStartdate": {
            "title": "Startdate of this function.",
            "type": "string",
            "format": "date"
          },
          "functionEnddate": {
            "title": "Enddate of this function.",
            "type": "string",
            "format": "date"
          },
          "managerEmployeeId": {
            "title": "The employee ID of the manager for this department",
            "type": "string"
          },
          "managerName": {
            "title": "The name of the manager for this department",
            "type": "string"
          },
          "employerId": {
            "title": "The ID of the employer",
            "type": "string"
          },
          "employerName": {
            "title": "The name of the employer",
            "type": "string"
          },
          "isManager": {
            "title": "True if this employee is a manager",
            "type": "boolean"
          },
          "costCentre": {
            "title": "The employee cost centre",
            "type": "string"
          },
          "costCentreDescription": {
            "title": "The employee cost centre description",
            "type": "string"
          },
          "costBearer": {
            "title": "The cost bearer for the employee",
            "type": "string"
          },
          "postingCode": {
            "title": "The employee posting code",
            "type": "string"
          },
          "posting": {
            "title": "The employee posting. Usually a city, but may be more specific",
            "type": "string"
          },
          "phoneNumberWork": {
            "title": "The employee's work phone number",
            "type": "string"
          },
          "ibanAccountDetails": {
            "$ref": "#/components/schemas/IbanAccountDetails"
          }
        }
      },
      "IbanAccountDetails": {
        "title": "The IBAN bank account details for the employee. By default, NOT returned via the API",
        "required": [
          "accountHolderName",
          "ibanAccountNumber"
        ],
        "type": "object",
        "properties": {
          "ibanAccountNumber": {
            "title": "The IBAN account number, if known",
            "type": "string"
          },
          "accountHolderName": {
            "title": "Account holders name",
            "type": "string"
          }
        }
      },
      "PageEmployee": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employee"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Address": {
        "title": "The address for the location, if known. Otherwise not supplied",
        "type": "object",
        "properties": {
          "street": {
            "title": "Street",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "streetNumber": {
            "title": "Street number",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "postalCode": {
            "title": "Postal code",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "city": {
            "title": "City",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "countryCode": {
            "title": "Country code (ISO 3166-1 Alpha 2 code",
            "maxLength": 2,
            "minLength": 0,
            "type": "string"
          }
        }
      },
      "Location": {
        "required": [
          "locationId",
          "locationName",
          "locationType"
        ],
        "type": "object",
        "properties": {
          "locationId": {
            "title": "The ID of this location",
            "type": "string"
          },
          "locationType": {
            "title": "Type of the location",
            "type": "string",
            "enum": [
              "POSTING"
            ]
          },
          "locationName": {
            "title": "The name of this location",
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          }
        }
      },
      "PageLocation": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Location"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "JobFunction": {
        "title": "The results",
        "type": "object",
        "properties": {
          "id": {
            "title": "The unique ID of the function",
            "type": "string"
          },
          "houseId": {
            "title": "The ID of the function in the function house",
            "type": "string"
          },
          "name": {
            "title": "The function name",
            "type": "string"
          },
          "type": {
            "title": "The function type",
            "type": "string"
          },
          "employer_id": {
            "title": "The employer associated with the function",
            "type": "string"
          },
          "employer_name": {
            "title": "The name of the employer associated with the function",
            "type": "string"
          }
        }
      },
      "PageJobFunction": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobFunction"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Employee1": {
        "required": [
          "departmentId",
          "departmentName",
          "employeeId",
          "employeeName",
          "employeeWorkEmailAddress",
          "employerId",
          "employerName",
          "functionHouseId",
          "functionId",
          "functionName",
          "managerEmployeeId",
          "managerName"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "employeeName": {
            "title": "The name of this employee",
            "type": "string"
          },
          "employeeWorkEmailAddress": {
            "title": "The work email address of this employee",
            "type": "string"
          },
          "departmentId": {
            "title": "The department ID of this employee",
            "type": "string"
          },
          "departmentName": {
            "title": "The department name",
            "type": "string"
          },
          "functionId": {
            "title": "The function ID",
            "type": "string"
          },
          "functionHouseId": {
            "title": "The house ID of the function",
            "type": "string"
          },
          "functionName": {
            "title": "The function name",
            "type": "string"
          },
          "functionStartdate": {
            "title": "Startdate of this function.",
            "type": "string",
            "format": "date"
          },
          "functionEnddate": {
            "title": "Enddate of this function.",
            "type": "string",
            "format": "date"
          },
          "managerEmployeeId": {
            "title": "The employee ID of the manager for this department",
            "type": "string"
          },
          "managerName": {
            "title": "The name of the manager for this department",
            "type": "string"
          },
          "employerId": {
            "title": "The ID of the employer",
            "type": "string"
          },
          "employerName": {
            "title": "The name of the employer",
            "type": "string"
          },
          "isManager": {
            "title": "True if this employee is a manager",
            "type": "boolean"
          },
          "costCentre": {
            "title": "The employee cost centre",
            "type": "string"
          },
          "costCentreDescription": {
            "title": "The employee cost centre description",
            "type": "string"
          },
          "costBearer": {
            "title": "The cost bearer for the employee",
            "type": "string"
          },
          "postingCode": {
            "title": "The employee posting code",
            "type": "string"
          },
          "posting": {
            "title": "The employee posting. Usually a city, but may be more specific",
            "type": "string"
          },
          "phoneNumberWork": {
            "title": "The employee's work phone number",
            "type": "string"
          },
          "ibanAccountDetails": {
            "$ref": "#/components/schemas/IbanAccountDetails"
          }
        }
      },
      "PageEmployee1": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employee1"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "EmployeeDetails": {
        "required": [
          "employeeId",
          "employeeName",
          "employeeWorkEmailAddress"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "employeeName": {
            "title": "The name of this employee",
            "type": "string"
          },
          "employeeWorkEmailAddress": {
            "title": "The work email address of this employee",
            "type": "string"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employee1"
            }
          }
        }
      },
      "PageScheduleEntry": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleEntry"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ScheduleEntry": {
        "title": "The results",
        "required": [
          "employeeId"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "startDate": {
            "title": "The start day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "title": "The end day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "breakDuration": {
            "title": "The duration of a possible break in minutes. Zero for no scheduled break",
            "type": "integer",
            "format": "int32"
          },
          "hours": {
            "title": "The duration of the scheduled item in hours",
            "type": "number"
          }
        }
      },
      "LeaveEntry": {
        "title": "The results",
        "required": [
          "employeeId"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "title": "The ID of this employee",
            "type": "string"
          },
          "startDate": {
            "title": "The start day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "title": "The end day of the scheduled item",
            "type": "string",
            "format": "date"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "breakDuration": {
            "title": "The duration of a possible break in minutes. Zero for no scheduled break",
            "type": "integer",
            "format": "int32"
          },
          "hours": {
            "title": "The duration of the scheduled item in hours",
            "type": "number"
          },
          "sickLeave": {
            "title": "This entry represents sick leave. Note that leave code and description may be absent if this is true",
            "type": "boolean"
          },
          "leaveCode": {
            "title": "The leave code of the leave entry. Precise meaning depends on the backend and possibly if the leave is composite",
            "type": "string"
          },
          "leaveDescription": {
            "title": "The description for the given leave",
            "type": "string"
          },
          "composite": {
            "title": "If this is true the leave is composed of multiple leave types. Rarely true",
            "type": "boolean"
          }
        }
      },
      "PageLeaveEntry": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaveEntry"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "PageProject": {
        "type": "object",
        "properties": {
          "status": {
            "title": "The status of the response. Normally: Success",
            "type": "string"
          },
          "results": {
            "title": "The results",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Project"
            }
          },
          "next_cursor": {
            "title": "Cursor result. pass this value into a subsequent request in order to obtain the next/previous page",
            "type": "string"
          },
          "page_size": {
            "title": "Number of results in the returned page",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Project": {
        "required": [
          "erpCompany",
          "projectId",
          "projectNumber",
          "teamId"
        ],
        "type": "object",
        "properties": {
          "projectId": {
            "title": "The project identifier. This uniquely identifies the project in the API. Contrast with the project number. ",
            "type": "string"
          },
          "erpCompany": {
            "title": "The ERP company code",
            "type": "string"
          },
          "teamId": {
            "title": "The identifier of the team associated with the project",
            "type": "string"
          },
          "teamName": {
            "title": "The name of the team",
            "type": "string"
          },
          "teamDescription": {
            "title": "The description of the team",
            "type": "string"
          },
          "projectNumber": {
            "title": "The project number. This differs from the id in that it might not be unique",
            "type": "string"
          },
          "projectName": {
            "title": "The project name",
            "type": "string"
          },
          "projectStatus": {
            "title": "The project status",
            "type": "string"
          },
          "structureParts": {
            "title": "The structure parts associated with this project",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StructurePart"
            }
          }
        }
      },
      "StructurePart": {
        "title": "The structure parts associated with this project",
        "required": [
          "id",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "title": "The identifier for this structure part",
            "type": "string"
          },
          "description": {
            "title": "The description",
            "type": "string"
          },
          "status": {
            "title": "The status",
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "in": "header"
      },
      "azureAdToken": {
        "type": "oauth2",
        "description": "Valid Azure AD token representing a Hanab employee",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/common/v2.0",
            "scopes": {
              "openid": "OpenID scope"
            }
          }
        }
      }
    }
  }
}