{
  "openapi": "3.1.1",
  "info": {
    "title": "Customer API",
    "version": "1.0.369073"
  },
  "servers": [
    {
      "url": "https://api.bright.hr"
    }
  ],
  "paths": {
    "/employees/v1/query": {
      "post": {
        "tags": [
          "Employees"
        ],
        "summary": "List Employees",
        "description": "List all employees in your organisation.",
        "operationId": "post_employees_v1_query",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ListEmployeesRequestDto"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseDto_EmployeeDto"
                }
              }
            }
          },
          "401": {
            "description": "Token Expired. Re-authenticate to obtain a new token.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#token-expired",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "description": "Problem definition for when a bearer token has expired."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#forbidden",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "required": [
                    "errors"
                  ],
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#field-validation",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/employees/v1/{employeeId}/external-reference": {
      "put": {
        "tags": [
          "Employees"
        ],
        "summary": "Set Employee External Reference",
        "description": "Set the external reference for an employee.",
        "operationId": "put_employees_v1_employeeId_guid_external_reference",
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Guid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetExternalIdRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetExternalIdResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Token Expired. Re-authenticate to obtain a new token.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#token-expired",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "description": "Problem definition for when a bearer token has expired."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#forbidden",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFoundProblem.ResourceNotFoundProblemDefinition"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ConflictProblem.ConflictProblemDefinition"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "required": [
                    "errors"
                  ],
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#field-validation",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/blip/v1/clockings/query": {
      "post": {
        "tags": [
          "Blip"
        ],
        "summary": "List Blip clockings",
        "description": "List clockings for all employees in your organisation.",
        "operationId": "post_blip_v1_clockings_query",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListClockingsRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseDto_ClockingDto"
                }
              }
            }
          },
          "401": {
            "description": "Token Expired. Re-authenticate to obtain a new token.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#token-expired",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "description": "Problem definition for when a bearer token has expired."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#forbidden",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "required": [
                    "errors"
                  ],
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#field-validation",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    },
    "/absences/v1/query": {
      "post": {
        "tags": [
          "Absences"
        ],
        "summary": "List Absences",
        "description": "List approved absences for employees in your organisation.\n\nThis includes sickness, time-off-in-lieu (TOIL), annual leave and \"other\" absences.\nLateness is not included.\n\nThe `$type` field denotes the type of absence:\n- Holiday: used for annual leave, public holidays, and mandatory leave.\n- Sickness: used for absences due to sickness or illness.\n- Toil: used for time-off-in-lieu (TOIL)\n- Other: used for any other type of absence (except Lateness) that doesn't fit into the above categories.",
        "operationId": "post_absences_v1_query",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListAbsencesRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseDto_AbsenceDto"
                }
              }
            }
          },
          "401": {
            "description": "Token Expired. Re-authenticate to obtain a new token.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#token-expired",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "description": "Problem definition for when a bearer token has expired."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#forbidden",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "required": [
                    "errors"
                  ],
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer"
                    },
                    "type": {
                      "const": "https://docs.bright.hr/problems#field-validation",
                      "type": "string"
                    },
                    "title": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "details": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AbsenceBoundaryDto": {
        "required": [
          "$type"
        ],
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/AbsenceBoundaryDtoAbsenceBoundaryLocalDateOnlyDto"
          },
          {
            "$ref": "#/components/schemas/AbsenceBoundaryDtoAbsenceBoundaryLocalDateTimeDto"
          },
          {
            "$ref": "#/components/schemas/AbsenceBoundaryDtoAbsenceBoundaryDateWithPartDto"
          }
        ],
        "description": "Absence boundaries are inclusive: the absence starts at the specified date and ends at the specified date.\n\nAll dates and times are local to the employee.",
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "LocalDate": "#/components/schemas/AbsenceBoundaryDtoAbsenceBoundaryLocalDateOnlyDto",
            "LocalDateTime": "#/components/schemas/AbsenceBoundaryDtoAbsenceBoundaryLocalDateTimeDto",
            "LocalDatePart": "#/components/schemas/AbsenceBoundaryDtoAbsenceBoundaryDateWithPartDto"
          }
        }
      },
      "AbsenceBoundaryDtoAbsenceBoundaryDateWithPartDto": {
        "required": [
          "datePart",
          "date"
        ],
        "properties": {
          "$type": {
            "enum": [
              "LocalDatePart"
            ],
            "type": "string"
          },
          "datePart": {
            "$ref": "#/components/schemas/DatePart"
          },
          "date": {
            "$ref": "#/components/schemas/DateOnly"
          }
        },
        "description": "Local date and part of the day (FirstHalf, SecondHalf or FullDay) of the absence."
      },
      "AbsenceBoundaryDtoAbsenceBoundaryLocalDateOnlyDto": {
        "required": [
          "date"
        ],
        "properties": {
          "$type": {
            "enum": [
              "LocalDate"
            ],
            "type": "string"
          },
          "date": {
            "$ref": "#/components/schemas/DateOnly"
          }
        },
        "description": "Local date of the absence. The part of the day is not specified."
      },
      "AbsenceBoundaryDtoAbsenceBoundaryLocalDateTimeDto": {
        "required": [
          "time",
          "date"
        ],
        "properties": {
          "$type": {
            "enum": [
              "LocalDateTime"
            ],
            "type": "string"
          },
          "time": {
            "$ref": "#/components/schemas/TimeOnly"
          },
          "date": {
            "$ref": "#/components/schemas/DateOnly"
          }
        },
        "description": "Local date and time of the absence."
      },
      "AbsenceDto": {
        "required": [
          "$type"
        ],
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/AbsenceDtoSicknessAbsenceDto"
          },
          {
            "$ref": "#/components/schemas/AbsenceDtoToilAbsenceDto"
          },
          {
            "$ref": "#/components/schemas/AbsenceDtoHolidayAbsenceDto"
          },
          {
            "$ref": "#/components/schemas/AbsenceDtoOtherAbsenceDto"
          }
        ],
        "description": "An employee absence.",
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "Sickness": "#/components/schemas/AbsenceDtoSicknessAbsenceDto",
            "Toil": "#/components/schemas/AbsenceDtoToilAbsenceDto",
            "Holiday": "#/components/schemas/AbsenceDtoHolidayAbsenceDto",
            "Other": "#/components/schemas/AbsenceDtoOtherAbsenceDto"
          }
        }
      },
      "AbsenceDtoHolidayAbsenceDto": {
        "required": [
          "id",
          "employeeId",
          "start",
          "end",
          "displayName",
          "note"
        ],
        "properties": {
          "$type": {
            "enum": [
              "Holiday"
            ],
            "type": "string"
          },
          "id": {
            "description": "The unique identifier of the absence.",
            "$ref": "#/components/schemas/Guid"
          },
          "employeeId": {
            "description": "The unique identifier of the employee the absence belongs to.",
            "$ref": "#/components/schemas/Guid"
          },
          "start": {
            "description": "The inclusive start boundary of the absence.",
            "$ref": "#/components/schemas/AbsenceBoundaryDto"
          },
          "end": {
            "oneOf": [
              {
                "description": "The inclusive end boundary of the absence, if the absence has a defined end.",
                "$ref": "#/components/schemas/AbsenceBoundaryDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "type": "string",
            "description": "The human-readable name of the absence type."
          },
          "note": {
            "type": "string",
            "description": "A note about the absence, if present."
          }
        },
        "description": "Used for annual leave, public holidays, and mandatory leave."
      },
      "AbsenceDtoOtherAbsenceDto": {
        "required": [
          "id",
          "employeeId",
          "start",
          "end",
          "displayName",
          "note"
        ],
        "properties": {
          "$type": {
            "enum": [
              "Other"
            ],
            "type": "string"
          },
          "id": {
            "description": "The unique identifier of the absence.",
            "$ref": "#/components/schemas/Guid"
          },
          "employeeId": {
            "description": "The unique identifier of the employee the absence belongs to.",
            "$ref": "#/components/schemas/Guid"
          },
          "start": {
            "description": "The inclusive start boundary of the absence.",
            "$ref": "#/components/schemas/AbsenceBoundaryDto"
          },
          "end": {
            "oneOf": [
              {
                "description": "The inclusive end boundary of the absence, if the absence has a defined end.",
                "$ref": "#/components/schemas/AbsenceBoundaryDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "type": "string",
            "description": "The human-readable name of the absence type."
          },
          "note": {
            "type": "string",
            "description": "A note about the absence, if present."
          }
        },
        "description": "Used for all other types of leave (e.g. Maternity leave, paternity leave, etc.)."
      },
      "AbsenceDtoSicknessAbsenceDto": {
        "required": [
          "estimatedReturn",
          "isCertified",
          "reason",
          "duration",
          "isPaid",
          "paidDuration",
          "id",
          "employeeId",
          "start",
          "end",
          "displayName",
          "note"
        ],
        "properties": {
          "$type": {
            "enum": [
              "Sickness"
            ],
            "type": "string"
          },
          "estimatedReturn": {
            "oneOf": [
              {
                "description": "When the employee is estimated to return to work, if known.",
                "$ref": "#/components/schemas/EstimatedReturnDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "isCertified": {
            "description": "When the employee's sickness is certified by a medical professional.",
            "$ref": "#/components/schemas/Boolean"
          },
          "reason": {
            "description": "The reason for the sickness.",
            "$ref": "#/components/schemas/SicknessReasonDto"
          },
          "duration": {
            "oneOf": [
              {
                "description": "The duration of the absence.",
                "$ref": "#/components/schemas/DurationDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "isPaid": {
            "description": "Whether the absence is paid.",
            "$ref": "#/components/schemas/Boolean"
          },
          "paidDuration": {
            "oneOf": [
              {
                "description": "The duration of the sickness which is paid. This can be `null` even if the absence is paid. To guarantee a value for the paid duration, ensure that Sickness Entitlements are assigned to all employees.",
                "$ref": "#/components/schemas/DurationDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier of the absence.",
            "$ref": "#/components/schemas/Guid"
          },
          "employeeId": {
            "description": "The unique identifier of the employee the absence belongs to.",
            "$ref": "#/components/schemas/Guid"
          },
          "start": {
            "description": "The inclusive start boundary of the absence.",
            "$ref": "#/components/schemas/AbsenceBoundaryDto"
          },
          "end": {
            "oneOf": [
              {
                "description": "The inclusive end boundary of the absence, if the absence has a defined end.",
                "$ref": "#/components/schemas/AbsenceBoundaryDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "type": "string",
            "description": "The human-readable name of the absence type."
          },
          "note": {
            "type": "string",
            "description": "A note about the absence, if present."
          }
        },
        "description": "Sickness absence is used to record sickness or illness that prevents the employee's ability to work."
      },
      "AbsenceDtoToilAbsenceDto": {
        "required": [
          "id",
          "employeeId",
          "start",
          "end",
          "displayName",
          "note"
        ],
        "properties": {
          "$type": {
            "enum": [
              "Toil"
            ],
            "type": "string"
          },
          "id": {
            "description": "The unique identifier of the absence.",
            "$ref": "#/components/schemas/Guid"
          },
          "employeeId": {
            "description": "The unique identifier of the employee the absence belongs to.",
            "$ref": "#/components/schemas/Guid"
          },
          "start": {
            "description": "The inclusive start boundary of the absence.",
            "$ref": "#/components/schemas/AbsenceBoundaryDto"
          },
          "end": {
            "oneOf": [
              {
                "description": "The inclusive end boundary of the absence, if the absence has a defined end.",
                "$ref": "#/components/schemas/AbsenceBoundaryDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "type": "string",
            "description": "The human-readable name of the absence type."
          },
          "note": {
            "type": "string",
            "description": "A note about the absence, if present."
          }
        },
        "description": "Time-off-in-lieu (TOIL) is a type of absence that is used to allow employees to take time off from work when they have worked over their required hours."
      },
      "Boolean": {
        "type": "boolean"
      },
      "ClockingBreakDto": {
        "required": [
          "id",
          "start",
          "end"
        ],
        "type": "object",
        "properties": {
          "id": {
            "description": "The ID of the break.",
            "$ref": "#/components/schemas/Guid"
          },
          "start": {
            "description": "The start time of the break (UTC).",
            "$ref": "#/components/schemas/DateTime"
          },
          "end": {
            "oneOf": [
              {
                "description": "The end time of the break (UTC).",
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "Represents a break in a Blip clocking."
      },
      "ClockingDto": {
        "required": [
          "id",
          "employeeId",
          "start",
          "end",
          "startTimeZone",
          "endTimeZone",
          "breaks",
          "note"
        ],
        "type": "object",
        "properties": {
          "id": {
            "description": "The ID of the clocking.",
            "$ref": "#/components/schemas/Guid"
          },
          "employeeId": {
            "description": "The ID of the employee.",
            "$ref": "#/components/schemas/Guid"
          },
          "start": {
            "description": "When the employee clocked in (UTC).",
            "$ref": "#/components/schemas/DateTime"
          },
          "end": {
            "oneOf": [
              {
                "description": "When the employee clocked out (UTC).",
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "type": "null"
              }
            ]
          },
          "startTimeZone": {
            "type": "string",
            "description": "The time zone in which the employee clocked in."
          },
          "endTimeZone": {
            "type": "string",
            "description": "The time zone in which the employee clocked out."
          },
          "breaks": {
            "description": "Any breaks taken during the clocking.",
            "$ref": "#/components/schemas/IReadOnlyCollection_ClockingBreakDto"
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "description": "Any notes associated with the clocking."
              },
              {
                "type": "null",
                "description": "Any notes associated with the clocking."
              }
            ]
          }
        },
        "description": "Represents a clocking in a Blip. A clocking contains information about an employee's clock-in and clock-out times, breaks, and location details."
      },
      "ConflictProblem.ConflictProblemDefinition": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer"
          },
          "type": {
            "const": "https://docs.bright.hr/problems#conflict",
            "type": "string"
          },
          "title": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "details": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DateOnly": {
        "type": "string",
        "format": "date"
      },
      "DatePart": {
        "enum": [
          "FirstHalf",
          "SecondHalf",
          "FullDay"
        ]
      },
      "DateTime": {
        "type": "string",
        "format": "date-time"
      },
      "Double": {
        "type": "number"
      },
      "DurationDto": {
        "required": [
          "$type"
        ],
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/DurationDtoDurationInDaysDto"
          },
          {
            "$ref": "#/components/schemas/DurationDtoDurationInMinutesDto"
          }
        ],
        "description": "The duration of an absence. The value can be either in days or minutes.",
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "Days": "#/components/schemas/DurationDtoDurationInDaysDto",
            "Minutes": "#/components/schemas/DurationDtoDurationInMinutesDto"
          }
        }
      },
      "DurationDtoDurationInDaysDto": {
        "required": [
          "days"
        ],
        "properties": {
          "$type": {
            "enum": [
              "Days"
            ],
            "type": "string"
          },
          "days": {
            "$ref": "#/components/schemas/Double"
          }
        },
        "description": "The duration of an absence in days."
      },
      "DurationDtoDurationInMinutesDto": {
        "required": [
          "minutes"
        ],
        "properties": {
          "$type": {
            "enum": [
              "Minutes"
            ],
            "type": "string"
          },
          "minutes": {
            "$ref": "#/components/schemas/Double"
          }
        },
        "description": "The duration of an absence in minutes."
      },
      "EmployeeDto": {
        "required": [
          "id",
          "name",
          "employment",
          "email",
          "externalReference",
          "_metadata"
        ],
        "type": "object",
        "properties": {
          "id": {
            "description": "The employee's unique identifier within Bright.",
            "$ref": "#/components/schemas/Guid"
          },
          "name": {
            "$ref": "#/components/schemas/EmployeeNameDto"
          },
          "employment": {
            "$ref": "#/components/schemas/EmploymentDto"
          },
          "email": {
            "type": "string",
            "description": "Email address of the employee. This is unique within the organisation."
          },
          "externalReference": {
            "oneOf": [
              {
                "type": "string",
                "description": "An external reference you can set for the employee. Multiple employees can have the same external reference."
              },
              {
                "type": "null",
                "description": "An external reference you can set for the employee. Multiple employees can have the same external reference."
              }
            ]
          },
          "_metadata": {
            "description": "Metadata about the employee.",
            "$ref": "#/components/schemas/EmployeeMetadataDto"
          }
        },
        "description": "An employee in your organisation."
      },
      "EmployeeMetadataDto": {
        "required": [
          "isRegistered",
          "isTerminated"
        ],
        "type": "object",
        "properties": {
          "isRegistered": {
            "$ref": "#/components/schemas/Boolean"
          },
          "isTerminated": {
            "$ref": "#/components/schemas/Boolean"
          }
        }
      },
      "EmployeeNameDto": {
        "required": [
          "givenName",
          "familyName"
        ],
        "type": "object",
        "properties": {
          "givenName": {
            "type": "string"
          },
          "familyName": {
            "type": "string"
          }
        }
      },
      "EmploymentDto": {
        "required": [
          "jobTitle",
          "start",
          "end",
          "payrollNumber"
        ],
        "type": "object",
        "properties": {
          "jobTitle": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "start": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DateOnly"
              },
              {
                "type": "null"
              }
            ]
          },
          "end": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DateOnly"
              },
              {
                "type": "null"
              }
            ]
          },
          "payrollNumber": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "EstimatedReturnDto": {
        "required": [
          "date"
        ],
        "type": "object",
        "properties": {
          "date": {
            "$ref": "#/components/schemas/DateOnly"
          },
          "time": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimeOnly"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "The estimated return date and time of the employee."
      },
      "Guid": {
        "type": "string",
        "format": "uuid"
      },
      "Int32": {
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      },
      "IReadOnlyCollection_AbsenceDto": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AbsenceDto"
        }
      },
      "IReadOnlyCollection_ClockingBreakDto": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ClockingBreakDto"
        }
      },
      "IReadOnlyCollection_ClockingDto": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ClockingDto"
        }
      },
      "IReadOnlyCollection_EmployeeDto": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/EmployeeDto"
        }
      },
      "List_SortOption_ListEmployeesSortBy": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/SortOption_ListEmployeesSortBy"
        }
      },
      "ListAbsencesFilters": {
        "required": [
          "employeeId"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "description": "The employee ID to filter by.",
            "$ref": "#/components/schemas/Guid"
          },
          "from": {
            "oneOf": [
              {
                "description": "The date range to filter by. It must be no more than 90 days in the past.\n\nDefaults to today (in UTC timezone) if not specified.",
                "$ref": "#/components/schemas/DateOnly"
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "oneOf": [
              {
                "description": "Defaults to today (in UTC timezone) if not specified.",
                "$ref": "#/components/schemas/DateOnly"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "Filters for the list of absences."
      },
      "ListAbsencesRequestDto": {
        "required": [
          "filters"
        ],
        "type": "object",
        "properties": {
          "filters": {
            "description": "The filter criteria for the query.",
            "$ref": "#/components/schemas/ListAbsencesFilters"
          },
          "continuationToken": {
            "oneOf": [
              {
                "type": "string",
                "description": "The continuation token from the previous response, or `null` for the first page."
              },
              {
                "type": "null",
                "description": "The continuation token from the previous response, or `null` for the first page."
              }
            ]
          },
          "pageSize": {
            "oneOf": [
              {
                "description": "The maximum number of items to return per page. Defaults to 100.",
                "$ref": "#/components/schemas/Int32"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ListClockingsFilters": {
        "required": [
          "employeeId"
        ],
        "type": "object",
        "properties": {
          "employeeId": {
            "description": "The employee ID to filter by.\n\nIf both `From` and `To` are not specified, any currently active clockings for the specified employee will be returned.",
            "$ref": "#/components/schemas/Guid"
          },
          "from": {
            "oneOf": [
              {
                "description": "The start of the date range to filter by. Any clockings that are active during this time range will be included in the results.  It must be no more than 90 days in the past.\n\nWhen specified without `To`, acts as a point-in-time filter, returning clockings active at exactly this moment.\n\nWhen both `From` and `To` are omitted, the current UTC time is used as a point-in-time filter.\n\nThe date range between `From` and `To` must not exceed 31 days.",
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "oneOf": [
              {
                "description": "The end of the date range to filter by. Any clockings that are active during this time range will be included in the results.\n\nIf omitted, defaults to the value of `From` — making `From` a point-in-time filter rather than a range.\n\nThe date range between `From` and `To` must not exceed 31 days.",
                "$ref": "#/components/schemas/DateTime"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "Filters for the list of blip clockings."
      },
      "ListClockingsRequestDto": {
        "required": [
          "filters"
        ],
        "type": "object",
        "properties": {
          "filters": {
            "description": "The filter criteria for the query.",
            "$ref": "#/components/schemas/ListClockingsFilters"
          },
          "continuationToken": {
            "oneOf": [
              {
                "type": "string",
                "description": "The continuation token from the previous response, or `null` for the first page."
              },
              {
                "type": "null",
                "description": "The continuation token from the previous response, or `null` for the first page."
              }
            ]
          },
          "pageSize": {
            "oneOf": [
              {
                "description": "The maximum number of items to return per page. Defaults to 100.",
                "$ref": "#/components/schemas/Int32"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ListEmployeesFilters": {
        "type": "object",
        "properties": {
          "externalReference": {
            "oneOf": [
              {
                "type": "string",
                "description": "Filter by external reference. If null, no filtering is performed."
              },
              {
                "type": "null",
                "description": "Filter by external reference. If null, no filtering is performed."
              }
            ]
          },
          "email": {
            "oneOf": [
              {
                "type": "string",
                "description": "Filter by email address. If null, no filtering is performed."
              },
              {
                "type": "null",
                "description": "Filter by email address. If null, no filtering is performed."
              }
            ]
          },
          "isTerminated": {
            "oneOf": [
              {
                "description": "Filter by termination status. If null, no filtering is performed.",
                "$ref": "#/components/schemas/Boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "description": "Filters for the list of employees."
      },
      "ListEmployeesRequestDto": {
        "type": "object",
        "properties": {
          "sortBy": {
            "oneOf": [
              {
                "description": "The sort options to apply to the query.",
                "$ref": "#/components/schemas/List_SortOption_ListEmployeesSortBy"
              },
              {
                "type": "null"
              }
            ]
          },
          "filters": {
            "oneOf": [
              {
                "description": "The filter criteria for the query.",
                "$ref": "#/components/schemas/ListEmployeesFilters"
              },
              {
                "type": "null"
              }
            ]
          },
          "continuationToken": {
            "oneOf": [
              {
                "type": "string",
                "description": "The continuation token from the previous response, or `null` for the first page."
              },
              {
                "type": "null",
                "description": "The continuation token from the previous response, or `null` for the first page."
              }
            ]
          },
          "pageSize": {
            "oneOf": [
              {
                "description": "The maximum number of items to return per page. Defaults to 100.",
                "$ref": "#/components/schemas/Int32"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ListEmployeesSortBy": {
        "enum": [
          "Id"
        ],
        "description": "Sorting options for the list of employees."
      },
      "ListResponseDto_AbsenceDto": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "description": "The list of items.",
            "$ref": "#/components/schemas/IReadOnlyCollection_AbsenceDto"
          },
          "continuationToken": {
            "oneOf": [
              {
                "type": "string",
                "description": "The continuation token for the next page, or `null` if this is the last page."
              },
              {
                "type": "null",
                "description": "The continuation token for the next page, or `null` if this is the last page."
              }
            ]
          }
        },
        "description": "A paginated list of items."
      },
      "ListResponseDto_ClockingDto": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "description": "The list of items.",
            "$ref": "#/components/schemas/IReadOnlyCollection_ClockingDto"
          },
          "continuationToken": {
            "oneOf": [
              {
                "type": "string",
                "description": "The continuation token for the next page, or `null` if this is the last page."
              },
              {
                "type": "null",
                "description": "The continuation token for the next page, or `null` if this is the last page."
              }
            ]
          }
        },
        "description": "A paginated list of items."
      },
      "ListResponseDto_EmployeeDto": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "description": "The list of items.",
            "$ref": "#/components/schemas/IReadOnlyCollection_EmployeeDto"
          },
          "continuationToken": {
            "oneOf": [
              {
                "type": "string",
                "description": "The continuation token for the next page, or `null` if this is the last page."
              },
              {
                "type": "null",
                "description": "The continuation token for the next page, or `null` if this is the last page."
              }
            ]
          }
        },
        "description": "A paginated list of items."
      },
      "ResourceNotFoundProblem.ResourceNotFoundProblemDefinition": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer"
          },
          "type": {
            "const": "https://docs.bright.hr/problems#resource-not-found",
            "type": "string"
          },
          "title": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "details": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SetExternalIdRequestDto": {
        "required": [
          "externalReference"
        ],
        "type": "object",
        "properties": {
          "externalReference": {
            "oneOf": [
              {
                "type": "string",
                "description": "The external reference to set for the employee. Multiple employees can have the same external reference. If set, the minimum length is 1 character and the maximum length is 36 characters."
              },
              {
                "type": "null",
                "description": "The external reference to set for the employee. Multiple employees can have the same external reference. If set, the minimum length is 1 character and the maximum length is 36 characters."
              }
            ]
          }
        },
        "description": "Request to set the external reference for an employee."
      },
      "SetExternalIdResponseDto": {
        "required": [
          "externalReference"
        ],
        "type": "object",
        "properties": {
          "externalReference": {
            "oneOf": [
              {
                "type": "string",
                "description": "The external reference that was set."
              },
              {
                "type": "null",
                "description": "The external reference that was set."
              }
            ]
          }
        },
        "description": "Response to setting the external reference for an employee."
      },
      "SicknessReasonDto": {
        "required": [
          "id",
          "description"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          }
        },
        "description": "The Sickness reason of a sickness absence."
      },
      "SortOption_ListEmployeesSortBy": {
        "required": [
          "field"
        ],
        "type": "object",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/ListEmployeesSortBy"
          },
          "isAscending": {
            "$ref": "#/components/schemas/Boolean"
          }
        }
      },
      "TimeOnly": {
        "type": "string",
        "format": "time"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Bearer token authentication",
        "scheme": "Bearer"
      },
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login.brighthr.com/connect/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Employees"
    },
    {
      "name": "Blip"
    },
    {
      "name": "Absences"
    }
  ]
}