{
    "openapi": "3.0.0",
    "info": {
        "title": "Sesame Public API v2",
        "description": "Public API v2 — additive surface `/public/{context}/v{N}`, endpoint-versioned from v4",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://api.sesamehr.com",
            "description": "Production"
        }
    ],
    "paths": {
        "/core/v4/employees/{employeeId}": {
            "patch": {
                "tags": [
                    "Employees"
                ],
                "summary": "Partially update an employee",
                "description": "Partially update an employee: send only the fields you want to change.",
                "operationId": "PatchEmployee",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PatchEmployeeRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "The employee was updated."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/employees/{employeeId}/country-fields": {
            "get": {
                "tags": [
                    "Employees"
                ],
                "summary": "Get employee country fields",
                "description": "Retrieve the Portuguese employee fields (academic qualification, professional situation, retirement regime, beneficiary name). Returns `data: null` when the company is not located in Portugal.",
                "operationId": "GetEmployeeCountryFields",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The employee country fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/EmployeeCountryFieldsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/employees/{employeeId}/language-skills/{languageSkillId}": {
            "put": {
                "tags": [
                    "Language Skills"
                ],
                "summary": "Upsert employee language skill",
                "description": "Assign a language to an employee or replace the level and comment of the existing assignment. The (employeeId, languageSkillId) pair in the URL is the resource identity; languageSkillId is an ISO-639 code.",
                "operationId": "UpsertEmployeeLanguageSkill",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "languageSkillId",
                        "in": "path",
                        "description": "ISO-639 code from the catalogue served by GET /language-skills.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertEmployeeLanguageSkillRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The language was assigned to the employee."
                    },
                    "204": {
                        "description": "The existing assignment was updated."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Language Skills"
                ],
                "summary": "Delete employee language skill assignment",
                "description": "Delete the assignment of a language to an employee. The ISO-639 catalogue is unaffected.",
                "operationId": "DeleteEmployeeLanguageSkill",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "languageSkillId",
                        "in": "path",
                        "description": "ISO-639 code from the catalogue served by GET /language-skills.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "The employee language skill assignment was deleted."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/employees/{employeeId}/language-skills": {
            "get": {
                "tags": [
                    "Language Skills"
                ],
                "summary": "List employee language skills",
                "description": "List the languages assigned to an employee (paginated).",
                "operationId": "ListEmployeeLanguageSkills",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The paginated employee language skill assignments.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListEmployeeLanguageSkillsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/employees/{employeeId}/managers": {
            "get": {
                "tags": [
                    "Employee Managers"
                ],
                "summary": "List employee managers",
                "description": "List an employee's managers (clocks/leaves validators), flagging automatic (generated on the fly) vs manual (explicitly assigned).",
                "operationId": "ListEmployeeManagers",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "description": "Employee id.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "permission",
                        "in": "query",
                        "description": "Validator type. Omitted = both types.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "checksManageRequestsAndIncidences",
                                "absencesManagement"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The employee's managers. automatic=true items carry null id/createdAt/updatedAt (not persisted).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListEmployeeManagersResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/employees/{employeeId}/skills/{skillId}": {
            "put": {
                "tags": [
                    "Employee Skills"
                ],
                "summary": "Upsert employee skill",
                "description": "Assign a skill to an employee or replace the level and comment of the existing assignment. The (employeeId, skillId) pair in the URL is the resource identity.",
                "operationId": "UpsertEmployeeSkill",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "skillId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpsertEmployeeSkillRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The skill was assigned to the employee."
                    },
                    "204": {
                        "description": "The existing assignment was updated."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Employee Skills"
                ],
                "summary": "Delete employee skill assignment",
                "description": "Delete the assignment of a skill to an employee. The skill stays in the company catalog.",
                "operationId": "DeleteEmployeeSkill",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "skillId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "The employee skill assignment was deleted."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/employees/{employeeId}/skills": {
            "get": {
                "tags": [
                    "Employee Skills"
                ],
                "summary": "List employee skills",
                "description": "List the skills assigned to an employee (paginated).",
                "operationId": "ListEmployeeSkills",
                "parameters": [
                    {
                        "name": "employeeId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The paginated employee skill assignments.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListEmployeeSkillsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/language-skills": {
            "get": {
                "tags": [
                    "Language Skills"
                ],
                "summary": "List language skills catalogue",
                "description": "The full ISO-639 language catalogue managed by Sesame. Read-only and unpaginated: it is a closed set, and its ISO code is the identifier used by the employee language skill endpoints.",
                "operationId": "ListLanguageSkills",
                "responses": {
                    "200": {
                        "description": "The full language catalogue.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListLanguageSkillsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    }
                }
            }
        },
        "/core/v4/skills": {
            "get": {
                "tags": [
                    "Skills"
                ],
                "summary": "List skills",
                "description": "List the company skill catalog (paginated).",
                "operationId": "ListSkills",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The paginated skill catalog.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListSkillsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            },
            "post": {
                "tags": [
                    "Skills"
                ],
                "summary": "Create skill",
                "description": "Create a skill in the company catalog.",
                "operationId": "CreateSkill",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateSkillRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "The identifier of the created skill.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CreatedEntry"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/core/v4/skills/{skillId}": {
            "get": {
                "tags": [
                    "Skills"
                ],
                "summary": "Get skill",
                "description": "Retrieve a skill from the company catalog by id.",
                "operationId": "GetSkill",
                "parameters": [
                    {
                        "name": "skillId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The skill.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SkillResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            },
            "put": {
                "tags": [
                    "Skills"
                ],
                "summary": "Update skill",
                "description": "Update a skill name in the company catalog.",
                "operationId": "UpdateSkill",
                "parameters": [
                    {
                        "name": "skillId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateSkillRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "The skill was updated."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Skills"
                ],
                "summary": "Delete skill",
                "description": "Delete a skill from the company catalog. Cascades to employee assignments.",
                "operationId": "DeleteSkill",
                "parameters": [
                    {
                        "name": "skillId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "force",
                        "in": "query",
                        "description": "Delete the skill even when it is still assigned to employees. Omitted or false rejects the deletion with 409 when assignments exist.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "false",
                            "enum": [
                                "true",
                                "false",
                                "1",
                                "0"
                            ]
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "The skill was deleted."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/schedule/v4/absence-justifications": {
            "get": {
                "tags": [
                    "Absence Justifications"
                ],
                "summary": "List absence justification documents",
                "description": "List the justification documents attached to absence requests, most recently uploaded first. Returns ONE row per document, carrying the absence request it justifies — the complement of GET /public/schedule/v1/absence-day-off-requests, which returns one row per absence with its documentIds. Justifications of clock-in requests, stored in the same directory, are never returned. A document whose absence request no longer exists is still returned, with absence set to null. The file itself is downloaded through GET `/public/document/v1/documents/{documentId}/download`.",
                "operationId": "ListAbsenceJustifications",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "employeeId",
                        "in": "query",
                        "description": "Only justifications of this employee. The employee must exist and belong to your company.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated absence justification documents. meta counts DOCUMENTS, not absences.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListAbsenceJustificationsResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/schedule/v4/absenteeism-days": {
            "get": {
                "tags": [
                    "Absenteeism"
                ],
                "summary": "List absenteeism days",
                "description": "Absenteeism dates per employee of the company, paginated by employee. A day is absenteeism when the employee had pending theoretical time and worked nothing: vacations, full-day absences and holidays remove theoretical time, and absences that count as worked time count as worked, so none of them are absenteeism; a partial absence without clocking in the rest of the workday, or a holiday with an assigned shift without clocking in, is. Queried in arrears: `to` must be a day already over in every timezone (earlier than today at UTC-12). Results reflect the current computation, so a later recalculation (e.g. an absence registered afterwards) can remove a date.",
                "operationId": "ListAbsenteeismDays",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "description": "First day of the range (Y-m-d), inclusive.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "Last day of the range (Y-m-d), inclusive. Earlier than today at UTC-12 and earlier than `from` + 1 year.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "employeeIds[]",
                        "in": "query",
                        "description": "Employee ids. Ids that do not belong to the company are ignored.",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "format": "uuid"
                            }
                        }
                    },
                    {
                        "name": "officeIds[]",
                        "in": "query",
                        "description": "Office ids. Returns employees assigned to any of them.",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "format": "uuid"
                            }
                        }
                    },
                    {
                        "name": "departmentIds[]",
                        "in": "query",
                        "description": "Department ids. Returns employees assigned to any of them.",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "format": "uuid"
                            }
                        }
                    },
                    {
                        "name": "entityGroupIds[]",
                        "in": "query",
                        "description": "Employee group ids. Returns employees that belong to any of them.",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "format": "uuid"
                            }
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Current status of the employee. Deleted employees are never returned.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "active",
                            "enum": [
                                "active",
                                "inactive",
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Employees per page.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20,
                            "maximum": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "One entry per employee of the page, with an empty `dates` when the employee has no absenteeism.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ListAbsenteeismDaysResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/schedule/v4/entity-schedule-templates/{entityScheduleTemplateId}": {
            "put": {
                "tags": [
                    "Employee Schedule Templates"
                ],
                "summary": "Update employee schedule template dates",
                "description": "Change the start and end dates of a schedule already assigned to an employee. The assignment keeps its id; the schedule template itself cannot be changed here. Send both dates on every call: an omitted or null `endDate` leaves the assignment with no end date, it does not keep the current one. The id is the one returned by `GET /public/schedule/v1/employees/{employeeId}/entity-schedule-templates`. Rejected with 422 when the id does not exist, when the dates match another assignment of the employee exactly, when the same template already starts on `startDate`, or when the period is too long.",
                "operationId": "UpdateEntityScheduleTemplate",
                "parameters": [
                    {
                        "name": "entityScheduleTemplateId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateEntityScheduleTemplateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "The assignment dates were updated."
                    },
                    "401": {
                        "description": "Missing or invalid API key"
                    },
                    "403": {
                        "description": "API consumer lacks permission over the requested resource"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "PatchEmployeeRequest": {
                "description": "Send only the fields you want to change. A field that is not sent is left untouched. An explicit `null` clears the value only for `email` (the notification email) and for the `value` of a custom field; `null` in any other field is rejected with a 422 and nothing is saved. Accepts the same fields, with the same validation rules, as the v3 PUT. `code` and `pin` must be sent together. The body cannot be empty.",
                "properties": {
                    "accountNumber": {
                        "type": "string"
                    },
                    "address": {
                        "type": "string"
                    },
                    "bic": {
                        "type": "string"
                    },
                    "childrenCount": {
                        "type": "integer"
                    },
                    "city": {
                        "type": "string"
                    },
                    "code": {
                        "description": "Must be sent together with `pin`.",
                        "type": "integer"
                    },
                    "contractId": {
                        "type": "string"
                    },
                    "contributionGroupId": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "country": {
                        "description": "Two-letter country code (ISO alpha-2), e.g. `ES`, the same format the GET returns.",
                        "type": "string",
                        "maxLength": 2,
                        "minLength": 2,
                        "example": "ES"
                    },
                    "customFields": {
                        "description": "Pairs to create or update. A `value` of `null` deletes that custom field value; custom fields that are not listed are left untouched.",
                        "type": "array",
                        "items": {
                            "required": [
                                "customFieldId"
                            ],
                            "properties": {
                                "customFieldId": {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                "value": {
                                    "type": "string",
                                    "nullable": true
                                }
                            },
                            "type": "object"
                        }
                    },
                    "dateOfBirth": {
                        "type": "string",
                        "format": "date"
                    },
                    "description": {
                        "type": "string"
                    },
                    "disability": {
                        "type": "integer"
                    },
                    "email": {
                        "description": "Notification email. `null` clears it.",
                        "type": "string",
                        "format": "email",
                        "nullable": true
                    },
                    "emergencyPhone": {
                        "type": "string"
                    },
                    "firstName": {
                        "type": "string"
                    },
                    "gender": {
                        "type": "string"
                    },
                    "identityNumberType": {
                        "type": "string"
                    },
                    "jobChargeCompetencies": {
                        "type": "string"
                    },
                    "jobChargeDescription": {
                        "type": "string"
                    },
                    "lastName": {
                        "type": "string"
                    },
                    "mainRecruiter": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "maritalStatus": {
                        "type": "string"
                    },
                    "nationalities": {
                        "description": "Replaces the whole list of nationalities. An empty list `[]` removes them all. Takes precedence over `nationality` when both are sent.",
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "nationality": {
                        "description": "Single nationality. Ignored when `nationalities` is also sent.",
                        "type": "string"
                    },
                    "nfc": {
                        "type": "string"
                    },
                    "nid": {
                        "type": "string"
                    },
                    "personalEmail": {
                        "type": "string",
                        "format": "email"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "pin": {
                        "description": "Must be sent together with `code`.",
                        "type": "integer"
                    },
                    "postalCode": {
                        "type": "string"
                    },
                    "pricePerHour": {
                        "type": "number",
                        "format": "float",
                        "minimum": 0
                    },
                    "professionalCategoryCode": {
                        "type": "string"
                    },
                    "professionalCategoryDescription": {
                        "type": "string"
                    },
                    "province": {
                        "type": "string"
                    },
                    "remote": {
                        "type": "boolean"
                    },
                    "salaryRange": {
                        "type": "string"
                    },
                    "secondLastName": {
                        "type": "string"
                    },
                    "secondaryIdentityNumberType": {
                        "type": "string"
                    },
                    "secondaryNid": {
                        "type": "string"
                    },
                    "ssn": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "studyLevel": {
                        "type": "string"
                    },
                    "workPhone": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "EmployeeCountryFieldsResponse": {
                "properties": {
                    "data": {
                        "description": "Portuguese employee fields; null when the company is not located in Portugal.",
                        "nullable": true,
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/EmployeeCountryFieldsEntry"
                            }
                        ]
                    }
                },
                "type": "object"
            },
            "UpsertEmployeeLanguageSkillRequest": {
                "required": [
                    "level"
                ],
                "properties": {
                    "level": {
                        "type": "integer"
                    },
                    "comment": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "ListEmployeeLanguageSkillsResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/EmployeeLanguageSkillEntry"
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/PaginationMetaEntry"
                    }
                },
                "type": "object"
            },
            "ListEmployeeManagersResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/EmployeeManagerEntry"
                        }
                    }
                },
                "type": "object"
            },
            "UpsertEmployeeSkillRequest": {
                "required": [
                    "level"
                ],
                "properties": {
                    "level": {
                        "type": "integer"
                    },
                    "comment": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "ListEmployeeSkillsResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/EmployeeSkillEntry"
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/PaginationMetaEntry"
                    }
                },
                "type": "object"
            },
            "ListLanguageSkillsResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LanguageSkillEntry"
                        }
                    }
                },
                "type": "object"
            },
            "ListSkillsResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/SkillEntry"
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/PaginationMetaEntry"
                    }
                },
                "type": "object"
            },
            "CreateSkillRequest": {
                "required": [
                    "name"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "CreatedEntry": {
                "properties": {
                    "id": {
                        "description": "Identifier of the created resource.",
                        "type": "string",
                        "format": "uuid"
                    }
                },
                "type": "object"
            },
            "SkillResponse": {
                "properties": {
                    "data": {
                        "$ref": "#/components/schemas/SkillEntry"
                    }
                },
                "type": "object"
            },
            "UpdateSkillRequest": {
                "required": [
                    "name"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "ListAbsenceJustificationsResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/AbsenceJustificationEntry"
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/PaginationMetaEntry"
                    }
                },
                "type": "object"
            },
            "ListAbsenteeismDaysResponse": {
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/EmployeeAbsenteeismDaysEntry"
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/PaginationMetaEntry"
                    }
                },
                "type": "object"
            },
            "UpdateEntityScheduleTemplateRequest": {
                "required": [
                    "startDate"
                ],
                "properties": {
                    "startDate": {
                        "description": "First day the schedule applies (YYYY-MM-DD).",
                        "type": "string",
                        "format": "date"
                    },
                    "endDate": {
                        "description": "Last day the schedule applies (YYYY-MM-DD). Null or omitted leaves the assignment with no end date.",
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "EmployeeCountryFieldsEntry": {
                "properties": {
                    "country": {
                        "description": "Company country (ISO alpha-2). Only Portugal is supported.",
                        "type": "string",
                        "example": "PT"
                    },
                    "fields": {
                        "description": "Portuguese employee fields. A field without a stored value is returned with its default value.",
                        "properties": {
                            "beneficiaryName": {
                                "type": "string",
                                "example": null,
                                "nullable": true
                            },
                            "academicQualification": {
                                "type": "string",
                                "example": "1º Ciclo do Ensino Básico",
                                "nullable": true
                            },
                            "professionalSituation": {
                                "type": "string",
                                "example": "2 - Trabalhador Familiar não Remunerado",
                                "nullable": true
                            },
                            "retirementRegime": {
                                "type": "string",
                                "example": "2 - Caixa Geral de Aposentações",
                                "nullable": true
                            }
                        },
                        "type": "object"
                    }
                },
                "type": "object"
            },
            "EmployeeLanguageSkillEntry": {
                "properties": {
                    "employeeId": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "languageSkillId": {
                        "description": "ISO-639 code.",
                        "type": "string"
                    },
                    "languageName": {
                        "type": "string"
                    },
                    "level": {
                        "type": "integer"
                    },
                    "comment": {
                        "type": "string",
                        "nullable": true
                    },
                    "createdAt": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "PaginationMetaEntry": {
                "properties": {
                    "currentPage": {
                        "description": "Current page number (1-based).",
                        "type": "integer"
                    },
                    "lastPage": {
                        "description": "Last available page number.",
                        "type": "integer"
                    },
                    "total": {
                        "description": "Total number of items across all pages.",
                        "type": "integer"
                    },
                    "perPage": {
                        "description": "Number of items per page.",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "EmployeeManagerEntry": {
                "properties": {
                    "id": {
                        "description": "Assignment id. null when automatic (generated on the fly, not persisted).",
                        "type": "string",
                        "format": "uuid",
                        "nullable": true
                    },
                    "manager": {
                        "$ref": "#/components/schemas/EmployeeEntry"
                    },
                    "employee": {
                        "$ref": "#/components/schemas/EmployeeEntry"
                    },
                    "permission": {
                        "type": "string",
                        "enum": [
                            "checksManageRequestsAndIncidences",
                            "absencesManagement"
                        ]
                    },
                    "order": {
                        "type": "integer"
                    },
                    "automatic": {
                        "description": "true = validator generated on the fly (no explicit manager assigned); false = explicitly assigned manager",
                        "type": "boolean"
                    },
                    "createdAt": {
                        "description": "null when automatic",
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "updatedAt": {
                        "description": "null when automatic",
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "EmployeeSkillEntry": {
                "properties": {
                    "employeeId": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "skillId": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "skillName": {
                        "type": "string"
                    },
                    "level": {
                        "type": "integer"
                    },
                    "comment": {
                        "type": "string",
                        "nullable": true
                    },
                    "createdAt": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "LanguageSkillEntry": {
                "properties": {
                    "isoCode": {
                        "description": "ISO-639 code.",
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "SkillEntry": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "createdAt": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "type": "object"
            },
            "AbsenceJustificationEntry": {
                "properties": {
                    "documentId": {
                        "description": "Document id. Download it through GET `/public/document/v1/documents/{documentId}/download`.",
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "description": "File name as uploaded.",
                        "type": "string"
                    },
                    "fileType": {
                        "description": "File extension / type.",
                        "type": "string"
                    },
                    "fileSize": {
                        "description": "File size in bytes.",
                        "type": "integer"
                    },
                    "createdAt": {
                        "description": "When the document was uploaded (ISO 8601).",
                        "type": "string",
                        "nullable": true
                    },
                    "absence": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/AbsenceJustificationAbsenceEntry"
                            }
                        ],
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "EmployeeAbsenteeismDaysEntry": {
                "properties": {
                    "employee": {
                        "$ref": "#/components/schemas/EmployeeEntry2"
                    },
                    "dates": {
                        "description": "Absenteeism dates (Y-m-d), ascending. Empty when the employee has none in the range.",
                        "type": "array",
                        "items": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                },
                "type": "object"
            },
            "EmployeeEntry": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "firstName": {
                        "type": "string"
                    },
                    "lastName": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "AbsenceJustificationAbsenceEntry": {
                "properties": {
                    "dayOffRequestId": {
                        "description": "Absence request id.",
                        "type": "string",
                        "format": "uuid"
                    },
                    "employeeId": {
                        "description": "Employee the absence belongs to.",
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "description": "Absence request status.",
                        "type": "string"
                    },
                    "from": {
                        "description": "First day the request covers (YYYY-MM-DD). null when it covers no day.",
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    },
                    "to": {
                        "description": "Last day the request covers (YYYY-MM-DD). null when it covers no day.",
                        "type": "string",
                        "format": "date",
                        "nullable": true
                    }
                },
                "type": "object"
            },
            "EmployeeEntry2": {
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "firstName": {
                        "type": "string"
                    },
                    "lastName": {
                        "type": "string"
                    },
                    "secondLastName": {
                        "type": "string",
                        "nullable": true
                    },
                    "email": {
                        "type": "string",
                        "nullable": true
                    },
                    "imageProfileURL": {
                        "type": "string",
                        "nullable": true
                    },
                    "workStatus": {
                        "type": "string",
                        "nullable": true
                    },
                    "workCheckTypeColor": {
                        "type": "string",
                        "nullable": true
                    },
                    "workCheckTypeName": {
                        "type": "string",
                        "nullable": true
                    },
                    "workCheckTypeIcon": {
                        "type": "string",
                        "nullable": true
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "Bearer": {
                "type": "http",
                "description": "Sesame Public API consumer token (Authorization: Bearer <token>)",
                "scheme": "bearer"
            }
        }
    },
    "security": [
        {
            "Bearer": []
        }
    ]
}
