Absentify Departments API

The Departments API from Absentify — 2 operation(s) for departments.

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-member-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-department-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-leave-type-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-absence-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-workspace-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-schema/absentify-public-holiday-calendar-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-member-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-department-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-leave-type-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-request-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-absence-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-workspace-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/absentify/refs/heads/main/json-structure/absentify-public-holiday-calendar-structure.json

Other Resources

OpenAPI Specification

absentify-departments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Absentify Absences Departments API
  description: 'The Absentify REST API provides comprehensive absence management capabilities for Microsoft 365-integrated organizations. Manage members, departments, leave types, requests, allowances, public holidays, and workspace settings. The API requires the Plus plan and uses API key authentication. Rate limit: 150 requests per second per IP.'
  version: 1.0.0
  contact:
    url: https://absentify.com/docs
    email: support@absentify.com
  license:
    name: Proprietary
    url: https://absentify.com/terms-and-conditions
  x-generated-from: official-openapi-spec
servers:
- url: https://api.absentify.com/api/v1
tags:
- name: Departments
paths:
  /departments:
    get:
      operationId: department-getDepartments
      summary: Absentify Get All Departments
      description: Get all departments
      tags:
      - Departments
      security:
      - ApiKey: []
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    custom_id:
                      anyOf:
                      - type: string
                      - type: 'null'
                    name:
                      type: string
                    createdAt:
                      type: string
                    updatedAt:
                      type: string
                    approval_process:
                      type: string
                      enum:
                      - Linear_all_have_to_agree
                      - Linear_one_has_to_agree
                      - Parallel_all_have_to_agree
                      - Parallel_one_has_to_agree
                    maximum_absent:
                      anyOf:
                      - type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      - type: 'null'
                    members:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            anyOf:
                            - type: string
                            - type: 'null'
                          email:
                            anyOf:
                            - type: string
                            - type: 'null'
                          custom_id:
                            anyOf:
                            - type: string
                            - type: 'null'
                          manager_type:
                            type: string
                            enum:
                            - Member
                            - Manager
                        required:
                        - id
                        - name
                        - email
                        - custom_id
                        - manager_type
                        additionalProperties: false
                  required:
                  - id
                  - custom_id
                  - name
                  - createdAt
                  - updatedAt
                  - approval_process
                  - maximum_absent
                  - members
                  additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: department-createDepartment
      summary: Absentify Create a Department
      description: Create a department
      tags:
      - Departments
      security:
      - ApiKey: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                custom_id:
                  anyOf:
                  - type: string
                  - type: 'null'
                default_allowance:
                  type: number
                maximum_absent:
                  type: number
                approval_process:
                  type: string
                  enum:
                  - Linear_all_have_to_agree
                  - Linear_one_has_to_agree
                  - Parallel_all_have_to_agree
                  - Parallel_one_has_to_agree
                manager_member:
                  type: array
                  items:
                    type: object
                    properties:
                      member_id:
                        type: string
                      predecessor_manager_id:
                        anyOf:
                        - type: string
                        - type: 'null'
                    required:
                    - member_id
                    - predecessor_manager_id
                default_department_allowances:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      value:
                        type: number
                    required:
                    - id
                    - value
              required:
              - name
              - custom_id
              - default_allowance
              - maximum_absent
              - approval_process
              - manager_member
              - default_department_allowances
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: string
                format: uuid
                pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /departments/{id}:
    get:
      operationId: department-getDepartmentByid
      summary: Absentify Read a Department by Id
      description: Read a department by id
      tags:
      - Departments
      security:
      - ApiKey: []
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                anyOf:
                - type: object
                  properties:
                    id:
                      type: string
                    custom_id:
                      anyOf:
                      - type: string
                      - type: 'null'
                    name:
                      type: string
                    createdAt:
                      type: string
                    updatedAt:
                      type: string
                    approval_process:
                      type: string
                      enum:
                      - Linear_all_have_to_agree
                      - Linear_one_has_to_agree
                      - Parallel_all_have_to_agree
                      - Parallel_one_has_to_agree
                    maximum_absent:
                      anyOf:
                      - type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      - type: 'null'
                    members:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            anyOf:
                            - type: string
                            - type: 'null'
                          email:
                            anyOf:
                            - type: string
                            - type: 'null'
                          custom_id:
                            anyOf:
                            - type: string
                            - type: 'null'
                          manager_type:
                            type: string
                            enum:
                            - Member
                            - Manager
                        required:
                        - id
                        - name
                        - email
                        - custom_id
                        - manager_type
                        additionalProperties: false
                  required:
                  - id
                  - custom_id
                  - name
                  - createdAt
                  - updatedAt
                  - approval_process
                  - maximum_absent
                  - members
                  additionalProperties: false
                - type: 'null'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: department-updateDepartment
      summary: Absentify Update a Department
      description: Update a department
      tags:
      - Departments
      security:
      - ApiKey: []
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                custom_id:
                  anyOf:
                  - type: string
                  - type: 'null'
                name:
                  type: string
                maximum_absent:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                approval_process:
                  type: string
                  enum:
                  - Linear_all_have_to_agree
                  - Linear_one_has_to_agree
                  - Parallel_all_have_to_agree
                  - Parallel_one_has_to_agree
                manager_member:
                  type: array
                  items:
                    type: object
                    properties:
                      member_id:
                        type: string
                      predecessor_manager_id:
                        anyOf:
                        - type: string
                        - type: 'null'
                    required:
                    - member_id
                    - predecessor_manager_id
                default_department_allowances:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      value:
                        type: number
                    required:
                    - id
                    - value
              required:
              - default_department_allowances
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: string
                format: uuid
                pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: department-DeleteDepartmentById
      summary: Absentify Delete a Department
      description: Delete a department
      tags:
      - Departments
      security:
      - ApiKey: []
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    error.BAD_REQUEST:
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Invalid input data
          type: string
        code:
          description: The error code
          example: BAD_REQUEST
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
    error.UNAUTHORIZED:
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Authorization not provided
          type: string
        code:
          description: The error code
          example: UNAUTHORIZED
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
    error.NOT_FOUND:
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Not found
          type: string
        code:
          description: The error code
          example: NOT_FOUND
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
    error.INTERNAL_SERVER_ERROR:
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Internal server error
          type: string
        code:
          description: The error code
          example: INTERNAL_SERVER_ERROR
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
    error.FORBIDDEN:
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Insufficient access
          type: string
        code:
          description: The error code
          example: FORBIDDEN
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-API-KEY
      in: header
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key from your absentify account settings. Requires Plus plan.
externalDocs:
  url: https://absentify.com/docs/en/api-reference