
openapi: 3.0.3
info:
  title: Aladtec JSON API
  version: 3.6.2
  description: >-
    The Aladtec JSON API can be used to retrieve, create, or update information
    contained in an Aladtec system.
  x-base-url: https://secure#.aladtec.com/example/api/v3
paths:
  /oauth/token:
    post:
      security: []
      operationId: POST_oauth-token
      description: Generates new API access tokens given valid credentials.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                grant_type:
                  description: Method for obtaining an access token
                  type: string
                  enum:
                    - client_credentials
                client_id:
                  description: >-
                    Client ID used to identify your software interacting with
                    Aladtec
                  type: string
                client_secret:
                  description: Confidential secret to authenticate your software
                  type: string
              required:
                - grant_type
                - client_id
                - client_secret
              example:
                grant_type: client_credentials
                client_id: sys-234F3SFSE
                client_secret: ERIOBNSLWVNUIEW3843H3B3B3B3N2MN2
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                client_id:
                  description: >-
                    Client ID used to identify your software interacting with
                    Aladtec
                  type: string
                client_secret:
                  description: Confidential secret to authenticate your software
                  type: string
              required:
                - grant_type
                - client_id
                - client_secret
              example: >-
                grant_type=client_credentials&client_id=sys-234F3SFSE&client_secret=ERIOBNSLWVNUIEW3843H3B3B3B3N2MN2
        required: true
      responses:
        '200':
          description: >-
            Successful response containing a new access token and the
            permissions granted to the token
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    description: The new API token
                    type: string
                  token_type:
                    description: The token type (Bearer)
                    type: string
                  expires_in:
                    description: The number of seconds until the token expires
                    type: integer
                  scope:
                    description: All permissions granted to the API token
                    type: string
                example:
                  access_token: GdreEkwMnZUcU1tcmQ3aHJ1cXM1LmZDR05neUc4WklTcE44SHlyNHNwe
                  token_type: Bearer
                  expires_in: 3600
                  scope: view_members edit_members
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '401':
          description: >-
            Error response containing one or more errors returned as a result of
            user unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '415':
          description: >-
            Error response when the request does not contain a valid content
            type
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Invalid Content-Type
                      detail: >-
                        The Content-Type header must be set to one of the
                        following values: [application/json,
                        application/x-www-form-urlencoded]
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /members:
    get:
      operationId: GET_members
      description: >-
        Returns members and the members' associated Member Database attributes.
        Attributes must be accessible through the API or the value will be null.
        Contact Aladtec Support (support@aladtec.com, 888.749.5550) to make
        attributes accessible through the API.
      parameters:
        - name: member_ids
          in: query
          style: form
          required: false
          explode: false
          description: List of member IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: include_inactive
          in: query
          required: false
          description: Members in Aladtec are either active or inactive.
          schema:
            default: false
            type: boolean
        - name: limit
          in: query
          required: false
          description: >-
            Number of records to return in the result. The number of records
            returned is limited to 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: offset
          in: query
          required: false
          description: Paginate the records returned in the result.
          schema:
            default: 0
            type: integer
            minimum: 0
        - name: attribute_ids
          in: query
          required: false
          style: form
          explode: false
          description: Limits custom attribute values returned by IDs of Attributes
          schema:
            type: array
            items:
              type: integer
      responses:
        '200':
          description: >-
            Successful response with member data. Results sorted by last name
            ascending.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        is_active:
                          description: Members are either active or inactive.
                          type: boolean
                        first_name:
                          description: Member given name
                          type: string
                        last_name:
                          description: Member family name
                          type: string
                        login:
                          description: Member login name
                          type: string
                        mobile_phone:
                          description: Mobile phone number
                          type: string
                        primary_email:
                          description: Primary email address
                          type: string
                          nullable: true
                        secondary_emails:
                          description: Email addresses not considered the primary_email
                          type: array
                          nullable: true
                          items:
                            type: string
                        date_hired:
                          description: Date the member was hired
                          type: string
                          nullable: true
                        employee_type_id:
                          description: ID of the employee type assigned to the member
                          type: integer
                          nullable: true
                        work_group_id:
                          description: ID of the work group assigned to the member
                          type: integer
                        schedule_ids:
                          description: >-
                            List of schedule IDs the member is qualified to work
                            on
                          type: array
                          items:
                            type: integer
                        position_qualification_ids:
                          description: >-
                            List of position qualification IDs a member is
                            qualified for
                          type: array
                          items:
                            type: integer
                        custom_attributes:
                          description: >-
                            Attributes in the Member Database, defined per
                            Aladtec system.
                          type: array
                          items:
                            type: object
                            properties:
                              attribute_id:
                                description: The ID of this attribute in Aladtec.
                                type: integer
                              value:
                                description: >-
                                  The value can be Text (string), Date (string),
                                  Number (int), Single Option (array of IDs), or
                                  Multi Option (array of IDs).
                                oneOf:
                                  - type: string
                                  - type: array
                                    items:
                                      type: integer
                                  - type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 3
                      is_active: true
                      first_name: John
                      last_name: Smith
                      login: johnsmith
                      mobile_phone: 555-555-5555
                      primary_email: jsmith@company.com
                      secondary_emails:
                        - jsmith@example.com
                      employee_type_id: 7
                      work_group_id: 5
                      date_hired: '2019-01-01'
                      schedule_ids:
                        - 1
                        - 2
                      position_qualification_ids:
                        - 1
                        - 2
                        - 3
                      custom_attributes:
                        - attribute_id: 11
                          value: ''
                        - attribute_id: 10
                          value:
                            - 2
                            - 3
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
    post:
      operationId: POST_members
      description: Creates a new member in the Member Database.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                is_active:
                  description: Members are either active or inactive.
                  type: boolean
                first_name:
                  description: Member given name
                  type: string
                last_name:
                  description: Member family name
                  type: string
                login:
                  description: Member login name
                  type: string
                mobile_phone:
                  description: Mobile phone number
                  type: string
                primary_email:
                  description: Primary email address
                  type: string
                secondary_emails:
                  description: Email addresses not considered the primary_email
                  type: array
                  items:
                    type: string
                date_hired:
                  description: Date the member was hired
                  type: string
                employee_type_id:
                  description: ID of the employee type assigned to the member
                  type: integer
                work_group_id:
                  description: ID of the work group assigned to the member
                  type: integer
                schedule_ids:
                  description: List of schedule IDs the member is qualified to work on
                  type: array
                  items:
                    type: integer
                position_qualification_ids:
                  description: List of position qualification IDs a member is qualified for
                  type: array
                  items:
                    type: integer
                custom_attributes:
                  description: >-
                    Attributes in the Member Database, defined per Aladtec
                    system.
                  type: array
                  items:
                    type: object
                    properties:
                      attribute_id:
                        description: The ID of this attribute in Aladtec.
                        type: integer
                      value:
                        description: >-
                          The value can be Text (string), Date (string), Number
                          (int or float), Single Option (array of IDs), or Multi
                          Option (array of IDs).
                        oneOf:
                          - type: string
                          - type: array
                            items:
                              type: integer
                          - type: number
                    required:
                      - attribute_id
                      - value
              required:
                - first_name
                - last_name
                - login
                - primary_email
              example:
                is_active: true
                first_name: John
                last_name: Smith
                login: johnsmith
                mobile_phone: 555-555-5555
                primary_email: jsmith@company.com
                secondary_emails:
                  - jsmith@example.com
                  - jsmith2@example.com
                employee_type_id: 7
                work_group_id: 5
                date_hired: '2019-01-01'
                schedule_ids:
                  - 1
                  - 2
                position_qualification_ids:
                  - 1
                  - 2
                  - 3
                custom_attributes:
                  - attribute_id: 11
                    value: ''
                  - attribute_id: 10
                    value:
                      - 2
                      - 3
        required: true
      responses:
        '201':
          description: Successful response with new member
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      member_id:
                        description: ID assigned to a member by Aladtec
                        type: integer
                      is_active:
                        description: Members are either active or inactive.
                        type: boolean
                      first_name:
                        description: Member given name
                        type: string
                      last_name:
                        description: Member family name
                        type: string
                      login:
                        description: Member login name
                        type: string
                      mobile_phone:
                        description: Mobile phone number
                        type: string
                      primary_email:
                        description: Primary email address
                        type: string
                        nullable: true
                      secondary_emails:
                        description: Email addresses not considered the primary_email
                        type: array
                        nullable: true
                        items:
                          type: string
                      date_hired:
                        description: Date the member was hired
                        type: string
                        nullable: true
                      employee_type_id:
                        description: ID of the employee type assigned to the member
                        type: integer
                        nullable: true
                      work_group_id:
                        description: ID of the work group assigned to the member
                        type: integer
                      schedule_ids:
                        description: >-
                          List of schedule IDs the member is qualified to work
                          on
                        type: array
                        items:
                          type: integer
                      position_qualification_ids:
                        description: >-
                          List of position qualification IDs a member is
                          qualified for
                        type: array
                        items:
                          type: integer
                      custom_attributes:
                        description: >-
                          Attributes in the Member Database, defined per Aladtec
                          system.
                        type: array
                        items:
                          type: object
                          properties:
                            attribute_id:
                              description: The ID of this attribute in Aladtec.
                              type: integer
                            value:
                              description: >-
                                The value can be Text (string), Date (string),
                                Number (int), Single Option (array of IDs), or
                                Multi Option (array of IDs).
                              oneOf:
                                - type: string
                                - type: array
                                  items:
                                    type: integer
                                - type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    member_id: 3
                    is_active: true
                    first_name: John
                    last_name: Smith
                    login: johnsmith
                    mobile_phone: 555-555-5555
                    primary_email: jsmith@company.com
                    secondary_emails:
                      - jsmith@example.com
                      - jsmith2@example.com
                    employee_type_id: 7
                    work_group_id: 5
                    date_hired: '2019-01-01'
                    schedule_ids:
                      - 1
                      - 2
                    position_qualification_ids:
                      - 1
                      - 2
                      - 3
                    custom_attributes:
                      - attribute_id: 11
                        value: ''
                      - attribute_id: 10
                        value:
                          - 2
                          - 3
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
  /members/batch:
    post:
      operationId: POST_members-batch
      description: Creates multiple new members in the Member Database.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  is_active:
                    description: Members are either active or inactive.
                    type: boolean
                  first_name:
                    description: Member given name
                    type: string
                  last_name:
                    description: Member family name
                    type: string
                  login:
                    description: Member login name
                    type: string
                  mobile_phone:
                    description: Mobile phone number
                    type: string
                  primary_email:
                    description: Primary email address
                    type: string
                  secondary_emails:
                    description: Email addresses not considered the primary_email
                    type: array
                    items:
                      type: string
                  date_hired:
                    description: Date the member was hired
                    type: string
                  employee_type_id:
                    description: ID of the employee type assigned to the member
                    type: integer
                  work_group_id:
                    description: ID of the work group assigned to the member
                    type: integer
                  schedule_ids:
                    description: List of schedule IDs the member is qualified to work on
                    type: array
                    items:
                      type: integer
                  position_qualification_ids:
                    description: >-
                      List of position qualification IDs a member is qualified
                      for
                    type: array
                    items:
                      type: integer
                  custom_attributes:
                    description: >-
                      Attributes in the Member Database, defined per Aladtec
                      system.
                    type: array
                    items:
                      type: object
                      properties:
                        attribute_id:
                          description: The ID of this attribute in Aladtec.
                          type: integer
                        value:
                          description: >-
                            The value can be Text (string), Date (string),
                            Number (int or float), Single Option (array of IDs),
                            or Multi Option (array of IDs).
                          oneOf:
                            - type: string
                            - type: array
                              items:
                                type: integer
                            - type: number
                      required:
                        - attribute_id
                        - value
                required:
                  - first_name
                  - last_name
                  - login
                  - primary_email
              example:
                - is_active: true
                  first_name: Bob
                  last_name: Smith
                  login: bsmith
                  mobile_phone: 555-555-5555
                  primary_email: bsmith@company.com
                  secondary_emails:
                    - bsmith@example.com
                    - bsmith2@example.com
                  date_hired: '2019-01-01'
                  employee_type_id: 7
                  work_group_id: 5
                  schedule_ids:
                    - 1
                    - 2
                  position_qualification_ids:
                    - 1
                    - 2
                    - 3
                  custom_attributes:
                    - attribute_id: 11
                      value: ''
                    - attribute_id: 10
                      value:
                        - 2
                        - 3
                - first_name: John
                  last_name: Doe
                  login: jdoe
                  primary_email: jdoe@company.com
        required: true
      responses:
        '201':
          description: Successful response with new members.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        is_active:
                          description: Members are either active or inactive.
                          type: boolean
                        first_name:
                          description: Member given name
                          type: string
                        last_name:
                          description: Member family name
                          type: string
                        login:
                          description: Member login name
                          type: string
                        mobile_phone:
                          description: Mobile phone number
                          type: string
                        primary_email:
                          description: Primary email address
                          type: string
                          nullable: true
                        secondary_emails:
                          description: Email addresses not considered the primary_email
                          type: array
                          nullable: true
                          items:
                            type: string
                        date_hired:
                          description: Date the member was hired
                          type: string
                          nullable: true
                        employee_type_id:
                          description: ID of the employee type assigned to the member
                          type: integer
                          nullable: true
                        work_group_id:
                          description: ID of the work group assigned to the member
                          type: integer
                        schedule_ids:
                          description: >-
                            List of schedule IDs the member is qualified to work
                            on
                          type: array
                          items:
                            type: integer
                        position_qualification_ids:
                          description: >-
                            List of position qualification IDs a member is
                            qualified for
                          type: array
                          items:
                            type: integer
                        custom_attributes:
                          description: >-
                            Attributes in the Member Database, defined per
                            Aladtec system.
                          type: array
                          items:
                            type: object
                            properties:
                              attribute_id:
                                description: The ID of this attribute in Aladtec.
                                type: integer
                              value:
                                description: >-
                                  The value can be Text (string), Date (string),
                                  Number (int), Single Option (array of IDs), or
                                  Multi Option (array of IDs).
                                oneOf:
                                  - type: string
                                  - type: array
                                    items:
                                      type: integer
                                  - type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data.
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated.
                        type: string
                example:
                  data:
                    - member_id: 1
                      is_active: true
                      first_name: Bob
                      last_name: Smith
                      login: bsmith
                      mobile_phone: 555-555-5555
                      primary_email: bsmith@company.com
                      secondary_emails:
                        - bsmith@example.com
                        - bsmith2@example.com
                      date_hired: '2019-01-01'
                      employee_type_id: 7
                      work_group_id: 5
                      schedule_ids:
                        - 1
                        - 2
                      position_qualification_ids:
                        - 1
                        - 2
                        - 3
                      custom_attributes:
                        - attribute_id: 11
                          value: ''
                        - attribute_id: 10
                          value:
                            - 2
                            - 3
                    - member_id: 2
                      is_active: true
                      first_name: John
                      last_name: Doe
                      login: jdoe
                      mobile_phone: ''
                      primary_email: jdoe@company.com
                      secondary_emails: []
                      date_hired: ''
                      employee_type_id: 0
                      work_group_id: 1
                      schedule_ids: []
                      position_qualification_ids: []
                      custom_attributes: []
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
    patch:
      operationId: PATCH_members-batch
      description: >-
        Updates a subset of existing members given a list of IDs and new
        attribute values.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  member_id:
                    description: ID assigned to a member by Aladtec
                    type: integer
                  is_active:
                    description: Members are either active or inactive.
                    type: boolean
                  first_name:
                    description: Member given name
                    type: string
                  last_name:
                    description: Member family name
                    type: string
                  login:
                    description: Member login name
                    type: string
                  mobile_phone:
                    description: Mobile phone number
                    type: string
                  primary_email:
                    description: Primary email address
                    type: string
                  secondary_emails:
                    description: Email addresses not considered the primary_email
                    type: array
                    items:
                      type: string
                  date_hired:
                    description: Date the member was hired
                    type: string
                  employee_type_id:
                    description: ID of the employee type assigned to the member
                    type: integer
                  work_group_id:
                    description: ID of the work group assigned to the member
                    type: integer
                  schedule_ids:
                    description: List of schedule IDs the member is qualified to work on
                    type: array
                    items:
                      type: integer
                  position_qualification_ids:
                    description: >-
                      List of position qualification IDs a member is qualified
                      for
                    type: array
                    items:
                      type: integer
                  custom_attributes:
                    description: >-
                      Attributes in the Member Database, defined per Aladtec
                      system.
                    type: array
                    items:
                      type: object
                      properties:
                        attribute_id:
                          description: The ID of this attribute in Aladtec.
                          type: integer
                        value:
                          description: >-
                            The value can be Text (string), Date (string),
                            Number (int or float), Single Option (array of IDs),
                            or Multi Option (array of IDs).
                          oneOf:
                            - type: string
                            - type: array
                              items:
                                type: integer
                            - type: number
                      required:
                        - attribute_id
                        - value
                required:
                  - member_id
              example:
                - member_id: 1
                  is_active: true
                  first_name: Bob
                  last_name: Smith
                  login: bobsmith
                  mobile_phone: 555-555-5555
                  primary_email: bsmith@company.com
                  secondary_emails:
                    - bsmith3@example.com
                  employee_type_id: 7
                  work_group_id: 5
                  date_hired: '2019-01-01'
                  schedule_ids:
                    - 1
                    - 2
                  position_qualification_ids:
                    - 1
                    - 2
                    - 3
                  custom_attributes:
                    - attribute_id: 11
                      value: ''
                    - attribute_id: 10
                      value:
                        - 2
                        - 3
                - member_id: 2
                  primary_email: jdoe@example.com
                  mobile_phone: 555-555-5555
                  login: jdoe
                  last_name: Doe
                  position_qualification_ids:
                    - 3
                    - 5
        required: true
      responses:
        '200':
          description: Successful response with updated members.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        is_active:
                          description: Members are either active or inactive.
                          type: boolean
                        first_name:
                          description: Member given name
                          type: string
                        last_name:
                          description: Member family name
                          type: string
                        login:
                          description: Member login name
                          type: string
                        mobile_phone:
                          description: Mobile phone number
                          type: string
                        primary_email:
                          description: Primary email address
                          type: string
                          nullable: true
                        secondary_emails:
                          description: Email addresses not considered the primary_email
                          type: array
                          nullable: true
                          items:
                            type: string
                        date_hired:
                          description: Date the member was hired
                          type: string
                          nullable: true
                        employee_type_id:
                          description: ID of the employee type assigned to the member
                          type: integer
                          nullable: true
                        work_group_id:
                          description: ID of the work group assigned to the member
                          type: integer
                        schedule_ids:
                          description: >-
                            List of schedule IDs the member is qualified to work
                            on
                          type: array
                          items:
                            type: integer
                        position_qualification_ids:
                          description: >-
                            List of position qualification IDs a member is
                            qualified for
                          type: array
                          items:
                            type: integer
                        custom_attributes:
                          description: >-
                            Attributes in the Member Database, defined per
                            Aladtec system.
                          type: array
                          items:
                            type: object
                            properties:
                              attribute_id:
                                description: The ID of this attribute in Aladtec.
                                type: integer
                              value:
                                description: >-
                                  The value can be Text (string), Date (string),
                                  Number (int), Single Option (array of IDs), or
                                  Multi Option (array of IDs).
                                oneOf:
                                  - type: string
                                  - type: array
                                    items:
                                      type: integer
                                  - type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data.
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated.
                        type: string
                example:
                  data:
                    - member_id: 1
                      is_active: true
                      first_name: Bob
                      last_name: Smith
                      login: bobsmith
                      mobile_phone: 555-555-5555
                      primary_email: bsmith@company.com
                      secondary_emails:
                        - bsmith3@example.com
                      employee_type_id: 7
                      work_group_id: 5
                      date_hired: '2019-01-01'
                      schedule_ids:
                        - 1
                        - 2
                      position_qualification_ids:
                        - 1
                        - 2
                        - 3
                      custom_attributes:
                        - attribute_id: 11
                          value: ''
                        - attribute_id: 10
                          value:
                            - 2
                            - 3
                    - member_id: 2
                      is_active: true
                      first_name: John
                      last_name: Doe
                      login: jdoe
                      mobile_phone: 555-555-5555
                      primary_email: jdoe@example.com
                      secondary_emails:
                        - jdoe2@example.com
                      employee_type_id: 7
                      work_group_id: 5
                      date_hired: '2019-01-01'
                      schedule_ids:
                        - 2
                      position_qualification_ids:
                        - 3
                        - 5
                      custom_attributes:
                        - attribute_id: 11
                          value: ''
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
  /members/{member_id}:
    patch:
      operationId: PATCH_members-member_id
      description: >-
        Updates an existing member using a subset of attributes or the entire
        member.
      parameters:
        - name: member_id
          in: path
          required: true
          schema:
            type: integer
            example: 2
          description: ID assigned to a member by Aladtec
      requestBody:
        content:
          application/json:
            schema:
              properties:
                is_active:
                  description: Members are either active or inactive.
                  type: boolean
                first_name:
                  description: Member given name
                  type: string
                last_name:
                  description: Member family name
                  type: string
                login:
                  description: Member login name
                  type: string
                mobile_phone:
                  description: Mobile phone number
                  type: string
                primary_email:
                  description: Primary email address
                  type: string
                secondary_emails:
                  description: Email addresses not considered the primary_email
                  type: array
                  items:
                    type: string
                date_hired:
                  description: Date the member was hired
                  type: string
                employee_type_id:
                  description: ID of the employee type assigned to the member
                  type: integer
                work_group_id:
                  description: ID of the work group assigned to the member
                  type: integer
                schedule_ids:
                  description: List of schedule IDs the member is qualified to work on
                  type: array
                  items:
                    type: integer
                position_qualification_ids:
                  description: List of position qualification IDs a member is qualified for
                  type: array
                  items:
                    type: integer
                custom_attributes:
                  description: >-
                    Attributes in the Member Database, defined per Aladtec
                    system.
                  type: array
                  items:
                    type: object
                    properties:
                      attribute_id:
                        description: The ID of this attribute in Aladtec.
                        type: integer
                      value:
                        description: >-
                          The value can be Text (string), Date (string), Number
                          (int or float), Single Option (array of IDs), or Multi
                          Option (array of IDs).
                        oneOf:
                          - type: string
                          - type: array
                            items:
                              type: integer
                          - type: number
                    required:
                      - attribute_id
                      - value
              example:
                is_active: true
                first_name: John
                last_name: Smith
                login: johnsmith
                mobile_phone: 555-555-5555
                primary_email: jsmith@company.com
                secondary_emails:
                  - jsmith@example.com
                  - jsmith2@example.com
                employee_type_id: 7
                work_group_id: 5
                date_hired: '2019-01-01'
                schedule_ids:
                  - 1
                  - 2
                position_qualification_ids:
                  - 1
                  - 2
                  - 3
                custom_attributes:
                  - attribute_id: 11
                    value: ''
                  - attribute_id: 10
                    value:
                      - 2
                      - 3
        required: true
      responses:
        '200':
          description: Successful response with updated member
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The Members properties
                    properties:
                      member_id:
                        description: ID assigned to a member by Aladtec
                        type: integer
                      is_active:
                        description: Members are either active or inactive.
                        type: boolean
                      first_name:
                        description: Member given name
                        type: string
                      last_name:
                        description: Member family name
                        type: string
                      login:
                        description: Member login name
                        type: string
                      mobile_phone:
                        description: Mobile phone number
                        type: string
                      primary_email:
                        description: Primary email address
                        type: string
                        nullable: true
                      secondary_emails:
                        description: Email addresses not considered the primary_email
                        type: array
                        nullable: true
                        items:
                          type: string
                      date_hired:
                        description: Date the member was hired
                        type: string
                        nullable: true
                      employee_type_id:
                        description: ID of the employee type assigned to the member
                        type: integer
                        nullable: true
                      work_group_id:
                        description: ID of the work group assigned to the member
                        type: integer
                      schedule_ids:
                        description: >-
                          List of schedule IDs the member is qualified to work
                          on
                        type: array
                        items:
                          type: integer
                      position_qualification_ids:
                        description: >-
                          List of position qualification IDs a member is
                          qualified for
                        type: array
                        items:
                          type: integer
                      custom_attributes:
                        description: >-
                          Attributes in the Member Database, defined per Aladtec
                          system.
                        type: array
                        items:
                          type: object
                          properties:
                            attribute_id:
                              description: The ID of this attribute in Aladtec.
                              type: integer
                            value:
                              description: >-
                                The value can be Text (string), Date (string),
                                Number (int), Single Option (array of IDs), or
                                Multi Option (array of IDs).
                              oneOf:
                                - type: string
                                - type: array
                                  items:
                                    type: integer
                                - type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    member_id: 3
                    is_active: true
                    first_name: John
                    last_name: Smith
                    login: johnsmith
                    mobile_phone: 555-555-5555
                    primary_email: jsmith@company.com
                    secondary_emails:
                      - jsmith@example.com
                      - jsmith2@example.com
                    employee_type_id: 7
                    work_group_id: 5
                    date_hired: '2019-01-01'
                    schedule_ids:
                      - 1
                      - 2
                    position_qualification_ids:
                      - 1
                      - 2
                      - 3
                    custom_attributes:
                      - attribute_id: 11
                        value: ''
                      - attribute_id: 10
                        value:
                          - 2
                          - 3
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '204':
          description: Successful response when no changes were saved
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: Error response when a resource is not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
  /members/employee-types:
    get:
      operationId: GET_members-employee-types
      description: >-
        Returns all employee types. These can be customized per Aladtec system.
        Examples: part time, full time, volunteer.
      responses:
        '200':
          description: Successful response with Employee Type objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of employee type records
                    items:
                      type: object
                      properties:
                        employee_type_id:
                          description: ID of the employee type
                          type: integer
                        name:
                          description: Name assigned to the employee type
                          type: string
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - employee_type_id: 1
                      name: Full Time
                    - employee_type_id: 2
                      name: Part Time
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /members/custom-attributes:
    get:
      operationId: GET_members-custom-attributes
      description: Returns all customer created Member Database attribute definitions.
      responses:
        '200':
          description: >-
            Successful response containing all customer created attribute
            definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of custom attribute records
                    items:
                      type: object
                      properties:
                        attribute_group_id:
                          description: ID for a group of Member Database attributes
                          type: integer
                        name:
                          description: Name assigned to a group, attribute, or option
                          type: string
                        attributes:
                          description: Array of Attributes
                          type: array
                          items:
                            type: object
                            properties:
                              attribute_id:
                                description: >-
                                  ID assigned to an attribute in the Member
                                  Database
                                type: integer
                              type:
                                description: The custom attribute type
                                type: string
                                enum:
                                  - text
                                  - singleoption
                                  - multioption
                                  - number
                                  - date
                                  - expirationdate
                              name:
                                description: The attribute name
                                type: string
                              required:
                                description: >-
                                  Whether the attribute is required to have a
                                  value
                                type: boolean
                              options:
                                description: >-
                                  Possible values for attributes defined as a
                                  'singleoption' or 'multioption' type
                                type: array
                                items:
                                  type: object
                                  properties:
                                    option_id:
                                      description: ID of the attribute option
                                      type: integer
                                    name:
                                      description: The name of the attribute option
                                      type: string
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - attribute_group_id: 2
                      name: Certifications
                      attributes:
                        - attribute_id: 18
                          type: date
                          name: 'EMT-B Course: Completed'
                          required: true
                          options: []
                        - attribute_id: 19
                          type: multioption
                          name: Preferred Shift Times
                          required: false
                          options:
                            - option_id: 34
                              name: Morning
                            - option_id: 35
                              name: Evening
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /availability:
    get:
      operationId: GET_availability
      description: Returns Member Availability for the requested date/time range.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
      responses:
        '200':
          description: Successful response with Member Availability objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: An array of member availability records
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        type:
                          description: The type of availability
                          type: string
                          enum:
                            - Available
                            - Prefer
                            - Unavailable
                        start_datetime:
                          description: The date/time that the availability record starts
                          type: string
                        stop_datetime:
                          description: The date/time that the availability record stops
                          type: string
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 2
                      type: Available
                      start_datetime: '2022-02-05T12:00:00-06:00'
                      stop_datetime: '2022-02-05T20:00:00-06:00'
                    - member_id: 4
                      type: Prefer
                      start_datetime: '2022-03-19T03:00:00-06:00'
                      stop_datetime: '2022-03-19T21:00:00-06:00'
                  meta:
                    generated_at_datetime: '2022-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-off:
    get:
      operationId: GET_time-off
      description: >
        Approved and pending Time Off ranges for the requested date/time range.
        Note: By default, only approved Time Off ranges are included in the
        response.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: statuses
          in: query
          required: false
          description: >
            Time Off request statuses to filter by. Possible values: [ approved,
            pending ].
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - approved
                - pending
            example: approved,pending
            default: approved
        - name: daily_split_time
          in: query
          required: false
          description: >
            Time at which scheduled shifts will be split, e.g. if the
            daily_split_time is 07:00, a single scheduled shift from 3/27 06:00
            to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and
            3/27 07:00 - 3/28 06:00. Time must be expressed in an increment
            matching the Aladtec system, i.e. hour, half-hour, or quarter-hour
            increment. Default is the Aladtec system split time of day.
          schema:
            type: string
            pattern: ^(\d\d)(:)(\d\d)$
            example: '07:00'
        - name: include_notes
          in: query
          required: false
          description: Whether to include notes for the records in the result.
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: >-
            Time off records that have been cut by the
            <code>daily_split_time</code> query parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        daily_split_date:
                          type: string
                          format: date
                          description: >-
                            A date which is used to group
                            <code>time_records</code> together. The
                            <code>daily_split_time</code> query parameter
                            affects how records are grouped.
                        time_records:
                          type: array
                          description: List of time off records
                          items:
                            type: object
                            properties:
                              time_off_id:
                                type: integer
                                description: ID assigned to a Time Off request in Aladtec
                              member_id:
                                type: integer
                                description: ID assigned to a member by Aladtec
                              schedule_ids:
                                type: array
                                description: >-
                                  IDs of the schedules associated with the Time
                                  Off request
                              time_off_type:
                                type: string
                                description: Name of the assigned Time Off type
                              status:
                                type: string
                                enum:
                                  - Approved
                                  - Pending
                              start_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record starts at, format is
                                  RFC 3339
                              stop_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record stops at, format is
                                  RFC 3339
                              extends_before:
                                type: boolean
                                description: >-
                                  Whether additional time for this "shift"
                                  exists before the requested query range
                              extends_after:
                                type: boolean
                                description: >-
                                  Whether additional time for this "shift"
                                  exists after the requested query range
                              pto_hours:
                                type: number
                                description: Hours of paid Time Off time
                              notes:
                                type: array
                                description: >-
                                  List of notes associated with this record, if
                                  any. This property is always empty when
                                  include_notes is set to false
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - daily_split_date: '2022-01-15'
                      time_records:
                        - time_off_id: 387
                          member_id: 18
                          schedule_ids:
                            - 12
                            - 25
                          time_off_type: Sick Leave
                          status: Approved
                          start_datetime: '2022-01-15T12:00:00-05:00'
                          stop_datetime: '2022-01-16T07:00:00-05:00'
                          extends_before: true
                          extends_after: false
                          pto_hours: 0
                          notes:
                            - member_id: 18
                              datetime: '2022-01-08T08:15:00-05:00'
                              content: Example member note about the record.
                            - member_id: 12
                              datetime: '2022-01-08T09:00:00-05:00'
                              content: Example admin note about the record.
                        - time_off_id: 379
                          member_id: 24
                          schedule_ids: []
                          time_off_type: Vacation
                          status: Approved
                          start_datetime: '2022-01-15T12:00:00-05:00'
                          stop_datetime: '2022-01-16T09:00:00-05:00'
                          extends_before: false
                          extends_after: false
                          pto_hours: 0
                          notes:
                            - member_id: 24
                              datetime: '2022-01-13T12:00:00-05:00'
                              content: Example member note about the record.
                    - daily_split_date: '2022-01-16'
                      time_records:
                        - time_off_id: 378
                          member_id: 24
                          schedule_ids:
                            - 14
                          time_off_type: Sick Leave
                          status: Approved
                          start_datetime: '2022-01-16T09:00:00-05:00'
                          stop_datetime: '2022-01-17T09:00:00-05:00'
                          extends_before: false
                          extends_after: true
                          pto_hours: 8.5
                          notes: []
                  meta:
                    generated_at_datetime: '2024-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Off is not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-off/types:
    get:
      operationId: GET_time-off-types
      description: Returns all active Time Off Types.
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Number of records to return in the result. The number of records
            returned is limited to 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: offset
          in: query
          required: false
          description: Paginate the records returned in the result.
          schema:
            default: 0
            type: integer
            minimum: 0
      responses:
        '200':
          description: Successful response with Time Off Type definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        time_off_type_id:
                          type: integer
                          description: ID assigned to the Time Off Type
                        name:
                          type: string
                          description: Name of the Time Off Type
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - time_off_type_id: 1
                      name: Sick Leave
                    - time_off_type_id: 2
                      name: Paid Time Off
                    - time_off_type_id: 3
                      name: Short Term Leave of Absence
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Off is not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
    post:
      operationId: POST_time-off-types
      description: Creates new Time Off Types given a list of names.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Name to be assigned to the Time Off Type
                required:
                  - name
              example:
                - name: Sick Leave
                - name: Paid Time Off
                - name: Short Term Leave of Absence
      responses:
        '201':
          description: Successful response with the new Time Off Types
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        time_off_type_id:
                          type: integer
                          description: ID assigned to the Time Off Type
                        name:
                          type: string
                          description: Name of the Time Off Type
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - time_off_type_id: 1
                      name: Sick Leave
                    - time_off_type_id: 2
                      name: Paid Time Off
                    - time_off_type_id: 3
                      name: Short Term Leave of Absence
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Off is not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
    patch:
      operationId: PATCH_time-off-types
      description: >-
        Updates a subset of existing Time Off Types given a list of IDs and
        corresponding new names.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  time_off_type_id:
                    type: integer
                    description: ID assigned to a Time Off Type in Aladtec
                  name:
                    type: string
                    description: Name to be assigned to the Time Off Type
                required:
                  - time_off_type_id
                  - name
              example:
                - time_off_type_id: 1
                  name: Sick Leave
                - time_off_type_id: 2
                  name: Paid Time Off
                - time_off_type_id: 3
                  name: Short Term Leave of Absence
      responses:
        '200':
          description: Successful response with the updated Time Off Types
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        time_off_type_id:
                          type: integer
                          description: ID assigned to the Time Off Type
                        name:
                          type: string
                          description: Name of the Time Off Type
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        type: string
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                example:
                  data:
                    - time_off_type_id: 1
                      name: Sick Leave
                    - time_off_type_id: 2
                      name: Paid Time Off
                    - time_off_type_id: 3
                      name: Short Term Leave of Absence
                  meta:
                    generated_at_datetime: '2024-06-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Off is not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
    delete:
      operationId: DELETE_time-off-types
      description: Deletes a subset of Time Off Types given a list of IDs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  time_off_type_id:
                    type: integer
                    description: ID assigned to a Time Off Type in Aladtec
                required:
                  - time_off_type_id
              example:
                - time_off_type_id: 1
                - time_off_type_id: 2
                - time_off_type_id: 3
                - time_off_type_id: 4
      responses:
        '204':
          description: Successful response when deletion is successful.
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Off is not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
  /schedules:
    get:
      operationId: GET_schedules
      description: >-
        Schedule configuration defined in an Aladtec system. Data is sorted by
        the order defined on the Setup -> Schedules page.
      parameters:
        - name: include_archived
          in: query
          required: false
          description: Whether to include archived schedules in result.
          schema:
            type: boolean
            default: false
            example: false
      responses:
        '200':
          description: Successful response with schedule definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        schedule_id:
                          type: integer
                          description: ID assigned to a schedule in Aladtec
                        name:
                          type: string
                          description: Name of the schedule
                        is_archived:
                          type: boolean
                          description: Schedules are either active or archived
                        order:
                          type: integer
                          description: Sort order as defined on the Setup -> Schedules page
                        start_time:
                          type: integer
                          description: Schedule start time in minutes
                        positions:
                          type: array
                          items:
                            type: object
                            properties:
                              position_id:
                                type: integer
                                description: >-
                                  ID assigned to a schedule position in Aladtec.
                                  Example: Firefighter #1, Firefighter #2, etc.
                              position_qualification_id:
                                type: integer
                                description: >-
                                  ID assigned to a position qualification in
                                  Aladtec. Example: Firefighter, EMT, Officer,
                                  etc.
                              label:
                                type: string
                                description: Name of the position
                              order:
                                type: integer
                                description: >-
                                  Sort order as defined on the Setup ->
                                  Schedules page
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - schedule_id: 1
                      name: Ambulance 1
                      is_archived: false
                      order: 1
                      start_time: 420
                      positions:
                        - position_id: 1
                          position_qualification_id: 1
                          label: Driver
                          order: 1
                        - position_id: 2
                          position_qualification_id: 3
                          label: EMT
                          order: 2
                    - schedule_id: 2
                      name: Fire Crew 1
                      is_archived: true
                      order: 2
                      start_time: 540
                      positions:
                        - position_id: 3
                          position_qualification_id: 2
                          label: Firefighter
                          order: 1
                        - position_id: 4
                          position_qualification_id: 2
                          label: Firefighter
                          order: 2
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /schedules/position-qualifications:
    get:
      operationId: GET_schedules-position-qualifications
      description: Returns a list of unique position qualifications.
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Number of records to return in the result. The number of records
            returned is limited to 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: offset
          in: query
          required: false
          description: Paginate the records returned in the result.
          schema:
            default: 0
            type: integer
            minimum: 0
      responses:
        '200':
          description: Successful response with position qualification definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        position_qualification_id:
                          type: integer
                          description: ID assigned to a position qualification in Aladtec
                        name:
                          type: string
                          description: Name assigned to the qualification
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - position_qualification_id: 1
                      name: Driver
                    - position_qualification_id: 2
                      name: Firefighter
                    - position_qualification_id: 3
                      name: EMT
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
    post:
      operationId: POST_schedules-position-qualifications
      description: Creates new position qualifications given a list of names.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Name to be assigned to the position qualification
                required:
                  - name
              example:
                - name: Driver
                - name: Firefighter
                - name: EMT
      responses:
        '201':
          description: Successful response with the new position qualifications
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        position_qualification_id:
                          type: integer
                          description: ID assigned to a position qualification in Aladtec
                        name:
                          type: string
                          description: Name assigned to the qualification
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        type: string
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                example:
                  data:
                    - position_qualification_id: 1
                      name: Driver
                    - position_qualification_id: 2
                      name: Firefighter
                    - position_qualification_id: 3
                      name: EMT
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
    patch:
      operationId: PATCH_schedules-position-qualifications
      description: >-
        Updates a subset of existing position qualifications given a list of IDs
        and corresponding new names.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  position_qualification_id:
                    type: integer
                    description: ID assigned to a position qualification in Aladtec
                  name:
                    type: string
                    description: Name to be assigned to the position qualification
                required:
                  - position_qualification_id
                  - name
              example:
                - position_qualification_id: 1
                  name: position1
                - position_qualification_id: 2
                  name: position2
                - position_qualification_id: 3
                  name: position3
      responses:
        '200':
          description: Successful response with the new position qualifications
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        position_qualification_id:
                          type: integer
                          description: ID assigned to a position qualification in Aladtec
                        name:
                          type: string
                          description: Name assigned to the qualification
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        type: string
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                example:
                  data:
                    - position_qualification_id: 1
                      name: position1
                    - position_qualification_id: 2
                      name: position2
                    - position_qualification_id: 3
                      name: position3
                  meta:
                    generated_at_datetime: '2024-02-29T11:42:48-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
    delete:
      operationId: DELETE_schedules-position-qualifications
      description: Deletes a subset of position qualifications given a list of IDs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  position_qualification_id:
                    type: integer
                    description: ID assigned to a position qualification in Aladtec
                required:
                  - position_qualification_id
              example:
                - position_qualification_id: 1
                - position_qualification_id: 2
                - position_qualification_id: 3
      responses:
        '204':
          description: Successful response when deletion is successful.
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '409':
          description: >-
            Error response when the route cannot be used due to a conflict with
            the system configuration. Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
  /scheduled-time:
    get:
      operationId: GET_scheduled-time
      description: Returns scheduled time ranges for a specified period of time
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: schedule_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of schedule IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: member_ids
          in: query
          style: form
          required: false
          explode: false
          description: List of member IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: position_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of position IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: time_type_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of time type IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: daily_split_time
          in: query
          required: false
          description: >
            Time at which scheduled shifts will be split, e.g. if the
            daily_split_time is 07:00, a single scheduled shift from 3/27 06:00
            to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and
            3/27 07:00 - 3/28 06:00. Time must be expressed in an increment
            matching the Aladtec system, i.e. hour, half-hour, or quarter-hour
            increment. Default is the Aladtec system split time of day.
          schema:
            type: string
            pattern: ^(\d\d)(:)(\d\d)$
            example: '07:00'
      responses:
        '200':
          description: >-
            Scheduled time records that have been cut by the
            <code>daily_split_time</code> query parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        daily_split_date:
                          type: string
                          format: date
                          description: >-
                            A date which is used to group
                            <code>time_records</code> together. The
                            <code>daily_split_time</code> query parameter
                            affects how records are grouped.
                        time_records:
                          type: array
                          description: List of scheduled time records
                          items:
                            type: object
                            properties:
                              member_id:
                                type: integer
                                description: ID assigned to a member by Aladtec
                              schedule_id:
                                type: integer
                                description: ID assigned to a schedule in Aladtec
                              position_id:
                                type: integer
                                description: ID assigned to a schedule position in Aladtec
                              position_qualification_id:
                                type: integer
                                description: >-
                                  ID assigned to a position qualification in
                                  Aladtec
                              time_type_id:
                                type: integer
                                description: ID assigned to a time type in Aladtec
                              time_type:
                                type: string
                                description: Name of the assigned time type
                              start_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record starts at, format is
                                  RFC 3339
                              stop_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record stops at, format is
                                  RFC 3339
                              extends_before:
                                type: boolean
                                description: >-
                                  Whether additional time for this "shift"
                                  exists before the requested query range
                              extends_after:
                                type: boolean
                                description: >-
                                  Whether additional time for this "shift"
                                  exists after the requested query range
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - daily_split_date: '2022-02-18'
                      time_records:
                        - member_id: 3
                          schedule_id: 16
                          position_id: 50
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-18T07:00:00-05:00'
                          stop_datetime: '2022-02-19T07:00:00-05:00'
                          extends_before: true
                          extends_after: false
                        - member_id: 53
                          schedule_id: 16
                          position_id: 51
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-18T07:00:00-05:00'
                          stop_datetime: '2022-02-19T07:00:00-05:00'
                          extends_before: false
                          extends_after: false
                    - daily_split_date: '2022-02-19'
                      time_records:
                        - member_id: 52
                          schedule_id: 16
                          position_id: 50
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-19T09:00:00-05:00'
                          stop_datetime: '2022-02-19T17:00:00-05:00'
                          extends_before: false
                          extends_after: true
                        - member_id: 96
                          schedule_id: 16
                          position_id: 53
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-19T09:00:00-05:00'
                          stop_datetime: '2022-02-19T17:00:00-05:00'
                          extends_before: false
                          extends_after: false
                  meta:
                    generated_at_datetime: '2023-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /scheduled-time/open-time:
    get:
      operationId: GET_scheduled-time-open-time
      description: >-
        Returns time ranges where no member is scheduled. Typically used for
        finding shifts needing coverage. Up to one month can be retrieved in a
        single request.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: schedule_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of schedule IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: position_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of position IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: include_only_shift_time
          in: query
          required: false
          description: >
            Whether to only include time ranges that exist within the boundaries
            of schedule shifts. For example, if a schedule has one shift (7am -
            3pm), Open Time ranges from 3pm - 7am (next day) would be excluded.
            Shift boundaries are defined on the Setup -> Schedules page.
          schema:
            type: boolean
            default: true
            example: true
        - name: daily_split_time
          in: query
          required: false
          description: >
            Time at which scheduled shifts will be split, e.g. if the
            daily_split_time is 07:00, a single scheduled shift from 3/27 06:00
            to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and
            3/27 07:00 - 3/28 06:00. Time must be expressed in an increment
            matching the Aladtec system, i.e. hour, half-hour, or quarter-hour
            increment. Default is the Aladtec system split time of day.
          schema:
            type: string
            pattern: ^(\d\d)(:)(\d\d)$
            example: '07:00'
      responses:
        '200':
          description: >-
            Open time records that have been cut by the
            <code>daily_split_time</code> query parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        daily_split_date:
                          type: string
                          format: date
                          description: >-
                            A date which is used to group
                            <code>time_records</code> together. The
                            <code>daily_split_time</code> query parameter
                            affects how records are grouped.
                        time_records:
                          type: array
                          description: List of open time records
                          items:
                            type: object
                            properties:
                              schedule_id:
                                type: integer
                                description: ID assigned to a schedule in Aladtec
                              position_id:
                                type: integer
                                description: ID assigned to a schedule position in Aladtec
                              position_qualification_id:
                                type: integer
                                description: >-
                                  ID assigned to a position qualification in
                                  Aladtec
                              start_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record starts at, format is
                                  RFC 3339
                              stop_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record stops at, format is
                                  RFC 3339
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - daily_split_date: '2022-04-18'
                      time_records:
                        - schedule_id: 2
                          position_id: 1
                          position_qualification_id: 1
                          start_datetime: '2022-04-18T07:00:00-05:00'
                          stop_datetime: '2022-04-19T07:00:00-05:00'
                        - schedule_id: 16
                          position_id: 51
                          position_qualification_id: 2
                          start_datetime: '2022-04-18T07:00:00-05:00'
                          stop_datetime: '2022-04-19T07:00:00-05:00'
                    - daily_split_date: '2022-05-19'
                      time_records:
                        - schedule_id: 16
                          position_id: 50
                          position_qualification_id: 1
                          start_datetime: '2022-05-19T09:00:00-05:00'
                          stop_datetime: '2022-05-19T17:00:00-05:00'
                  meta:
                    generated_at_datetime: '2022-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /scheduled-time/members-scheduled-now:
    get:
      operationId: GET_scheduled-time-members-scheduled-now
      description: >-
        Schedule and position for each member scheduled at the time of the
        request.
      parameters:
        - name: schedule_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of schedule IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
      responses:
        '200':
          description: Position assignments organized by schedule
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        schedule_id:
                          type: integer
                          description: ID assigned to a schedule in Aladtec
                        positions:
                          type: array
                          items:
                            type: object
                            properties:
                              position_id:
                                type: integer
                                description: ID assigned to a position in Aladtec
                              member_id:
                                type: integer
                                description: ID assigned to a member by Aladtec
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - schedule_id: 1
                      positions:
                        - position_id: 1
                          member_id: 42
                    - schedule_id: 2
                      positions:
                        - position_id: 3
                          member_id: 27
                        - position_id: 4
                          member_id: 22
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /scheduled-time/notes:
    get:
      operationId: GET_scheduled-time-notes
      description: >-
        Returns Schedule Notes grouped by calendar date. Up to one year can be
        retrieved in a single request.
      parameters:
        - name: range_start_date
          in: query
          required: true
          description: Start date of the query range. Date format is YYYY-MM-DD.
          schema:
            type: string
            format: date
            example: '2019-01-01'
        - name: range_stop_date
          in: query
          required: true
          description: Stop date of the query range. Date format is YYYY-MM-DD.
          schema:
            type: string
            format: date
            example: '2019-01-02'
        - name: schedule_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of schedule IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
      responses:
        '200':
          description: >-
            Schedule notes grouped by calendar date. Results sorted by ascending
            dates, then by ascending schedule IDs.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        calendar_date:
                          type: string
                          format: date
                          description: >-
                            Date used to group schedule notes on the same
                            calendar date together
                        notes:
                          type: array
                          description: List of schedule note objects
                          items:
                            type: object
                            properties:
                              schedule_id:
                                type: integer
                                description: ID assigned to a schedule in Aladtec
                              date:
                                type: string
                                format: date
                                description: YYYY-MM-DD date the note is for
                              member_id:
                                type: integer
                                description: ID of the member who last updated the note
                              content:
                                type: string
                                description: >-
                                  Text content of the note. Line breaks are
                                  specified by the "\n" escape string.
                              modified_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time when the note was last updated,
                                  format is RFC 3999
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - calendar_date: '2022-01-01'
                      notes:
                        - schedule_id: 1
                          date: '2022-01-01'
                          member_id: 2
                          content: Chris and Steve are running the drills
                          modified_datetime: '2022-08-22T15:43:00-05:00'
                        - schedule_id: 2
                          date: '2022-01-01'
                          member_id: 1
                          content: Tire pressure checks on K1 and K2 needed today
                          modified_datetime: '2022-08-22T15:43:00-05:00'
                    - calendar_date: '2022-01-02'
                      notes:
                        - schedule_id: 2
                          date: '2022-01-02'
                          member_id: 1
                          content: >-
                            Weather is predicted to be especially hot and dry.
                            Prepare for an influx of calls today.

                            Joe is on standby if needed.
                          modified_datetime: '2022-08-22T15:36:00-05:00'
                  meta:
                    generated_at_datetime: '2023-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /scheduled-time/ends-in-range:
    get:
      operationId: GET_scheduled-time-ends-in-range
      description: >-
        Returns scheduled time ranges that end within a specified period of
        time. Adjacent blocks of scheduled time are merged if they meet all of
        the following criteria: <ul> <li>Worked by the same member</li> <li>Are
        on the same schedule</li> <li>Have the same position</li> <li>Have the
        same Time Type</li> <li>Have the same Shift Attributes</li> </ul>
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: schedule_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of schedule IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: member_ids
          in: query
          style: form
          required: false
          explode: false
          description: List of member IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: position_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of position IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: time_type_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of time type IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
      responses:
        '200':
          description: >-
            Scheduled time records ending in the range specified by the
            <code>range_start_datetime</code> and
            <code>range_stop_datetime</code>.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        time_records:
                          type: array
                          description: List of scheduled time records
                          items:
                            type: object
                            properties:
                              member_id:
                                type: integer
                                description: ID assigned to a member by Aladtec
                              schedule_id:
                                type: integer
                                description: ID assigned to a schedule in Aladtec
                              position_id:
                                type: integer
                                description: ID assigned to a schedule position in Aladtec
                              position_qualification_id:
                                type: integer
                                description: >-
                                  ID assigned to a position qualification in
                                  Aladtec
                              time_type_id:
                                type: integer
                                description: ID assigned to a time type in Aladtec
                              time_type:
                                type: string
                                description: Name of the assigned time type
                              start_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record starts at, format is
                                  RFC 3339
                              stop_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record stops at, format is
                                  RFC 3339
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - time_records:
                        - member_id: 3
                          schedule_id: 16
                          position_id: 50
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-01T07:00:00-05:00'
                          stop_datetime: '2022-02-01T17:00:00-05:00'
                        - member_id: 53
                          schedule_id: 16
                          position_id: 51
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-25T07:00:00-05:00'
                          stop_datetime: '2022-02-27T07:00:00-05:00'
                  meta:
                    generated_at_datetime: '2024-08-13T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /extra-hours:
    get:
      operationId: GET_extra-hours
      description: Returns extra hours ranges for a specified period of time in the past.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: schedule_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of schedule IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: member_ids
          in: query
          style: form
          required: false
          explode: false
          description: List of member IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: position_qualification_ids
          in: query
          required: false
          description: |
            List of position qualification IDs to filter by
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: time_type_ids
          in: query
          required: false
          style: form
          explode: false
          description: List of time type IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: statuses
          in: query
          required: false
          description: >
            Extra Hours request statuses to filter by. Possible values: [
            approved, pending ].
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - approved
                - pending
            example: approved,pending
            default: approved
        - name: daily_split_time
          in: query
          required: false
          description: >
            Time at which scheduled shifts will be split, e.g. if the
            daily_split_time is 07:00, a single scheduled shift from 3/27 06:00
            to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and
            3/27 07:00 - 3/28 06:00. Time must be expressed in an increment
            matching the Aladtec system, i.e. hour, half-hour, or quarter-hour
            increment. Default is the Aladtec system split time of day.
          schema:
            type: string
            pattern: ^(\d\d)(:)(\d\d)$
            example: '07:00'
        - name: include_notes
          in: query
          required: false
          description: Whether to include notes for the records in the result.
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: >-
            Extra hours records that have been cut by the
            <code>daily_split_time</code> query parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        daily_split_date:
                          type: string
                          format: date
                          description: >-
                            A date which is used to group
                            <code>extra_hours_records</code> together. The
                            <code>daily_split_time</code> query parameter
                            affects how records are grouped.
                        extra_hours_records:
                          type: array
                          description: List of extra hours records
                          items:
                            type: object
                            properties:
                              member_id:
                                type: integer
                                description: ID assigned to a member by Aladtec
                              schedule_id:
                                type: integer
                                description: ID assigned to a schedule in Aladtec
                              position_qualification_id:
                                type: integer
                                description: >-
                                  ID assigned to a position qualification in
                                  Aladtec
                              time_type_id:
                                type: integer
                                description: ID assigned to a time type in Aladtec
                              time_type:
                                type: string
                                description: Name of the assigned time type
                              start_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record starts at, format is
                                  RFC 3339
                              stop_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record stops at, format is
                                  RFC 3339
                              status:
                                type: string
                                enum:
                                  - Approved
                                  - Pending
                              extends_before:
                                type: boolean
                                description: >-
                                  Whether additional time for this record exists
                                  before the requested query range
                              extends_after:
                                type: boolean
                                description: >-
                                  Whether additional time for this record exists
                                  after the requested query range
                              notes:
                                type: array
                                description: >-
                                  List of notes associated with this record, if
                                  any. This property is always empty when
                                  include_notes is set to false
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - daily_split_date: '2022-02-01'
                      extra_hours_records:
                        - member_id: 3
                          schedule_id: 16
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-01T07:00:00-05:00'
                          stop_datetime: '2022-02-02T07:00:00-05:00'
                          status: Pending
                          extends_before: true
                          extends_after: false
                          notes:
                            - member_id: 3
                              datetime: '2022-01-31T08:15:00-05:00'
                              content: Example member note about the record.
                        - member_id: 53
                          schedule_id: 16
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-02-01T07:00:00-05:00'
                          stop_datetime: '2022-02-02T07:00:00-05:00'
                          status: Approved
                          extends_before: false
                          extends_after: false
                          notes:
                            - member_id: 53
                              datetime: '2022-02-15T08:15:00-05:00'
                              content: Example member note about the record.
                            - member_id: 12
                              datetime: '2022-02-16T09:00:00-05:00'
                              content: Example admin note about the record.
                    - daily_split_date: '2022-03-18'
                      extra_hours_records:
                        - member_id: 52
                          schedule_id: 16
                          position_qualification_id: 1
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-03-18T09:00:00-05:00'
                          stop_datetime: '2022-03-19T17:00:00-05:00'
                          status: Pending
                          extends_before: false
                          extends_after: false
                          notes: []
                        - member_id: 96
                          schedule_id: 16
                          position_qualification_id: 53
                          time_type_id: 1
                          time_type: Regular
                          start_datetime: '2022-03-18T09:00:00-05:00'
                          stop_datetime: '2022-03-19T17:00:00-05:00'
                          status: Approved
                          extends_before: false
                          extends_after: true
                          notes: []
                  meta:
                    generated_at_datetime: '2024-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-clock/paycodes:
    get:
      operationId: GET_time-clock-paycodes
      description: >-
        Returns a list of unique, active Paycodes which can be applied to time
        clock time.
      responses:
        '200':
          description: Successful response with Paycode objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        paycode_id:
                          type: integer
                          description: ID of the Aladtec paycode
                        name:
                          type: string
                          description: A name associated with the paycode
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - paycode_id: 24
                      name: Regular
                    - paycode_id: 46
                      name: Training
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Clock or Time Clock Paycodes are not
            enabled in the system. <br> Please contact Aladtec Support
            (support@aladtec.com, 888.749.5550) for help if this error is
            received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Clock is not enabled for this system.
                    - error: Paycodes are not enabled for this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-clock/kiosks:
    get:
      operationId: GET_time-clock-kiosks
      description: Returns a list of unique, active Kiosks used to clock in and out.
      responses:
        '200':
          description: Successful response with kiosk objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        kiosk_id:
                          type: integer
                          description: ID of the Aladtec time clock kiosk
                        name:
                          type: string
                          description: A name associated with the time clock kiosk
                        is_enabled:
                          type: boolean
                          description: >-
                            True if the time clock kiosk is enabled in the
                            system
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - kiosk_id: 1
                      name: Station
                      is_enabled: true
                    - kiosk_id: 2
                      name: Break Room
                      is_enabled: true
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Clock is not enabled in the system.<br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Clock is not enabled for this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-clock-time:
    get:
      operationId: GET_time-clock-time
      description: >-
        Time Clock records for the requested date/time range. If a member is
        clocked in at the time of the request, the time clock record will be
        excluded.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
      responses:
        '200':
          description: Successful response with time clock records found
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          type: integer
                          description: ID assigned to a member by Aladtec
                        paycode_label:
                          type: string
                          description: Name of paycode associated to the Time Clock record
                        start_datetime:
                          type: string
                          format: date-time
                          description: >-
                            Date and time the member clocked in, format is RFC
                            3339.
                        stop_datetime:
                          type: string
                          format: date-time
                          description: >-
                            Date and time the member clocked out, format is RFC
                            3339.
                        clocked_in:
                          type: boolean
                          description: Indicates if the member is currently clocked in
                        in_note:
                          type: string
                          description: Note associated to Clock-In
                        out_note:
                          type: string
                          description: Note associated to Clock-Out
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 24
                      paycode_label: Regular
                      start_datetime: '2022-02-02T09:02:00-06:00'
                      stop_datetime: '2022-02-03T09:02:00-06:00'
                      clocked_in: false
                      in_note: ''
                      out_note: ''
                    - member_id: 46
                      paycode_label: Regular
                      start_datetime: '2022-02-15T08:02:00-06:00'
                      stop_datetime: '2022-02-16T08:02:00-06:00'
                      clocked_in: false
                      in_note: ''
                      out_note: ''
                  meta:
                    generated_at_datetime: '2023-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Clock is not enabled in the system.<br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Clock is not enabled for this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-clock-time/clocked-in-members:
    get:
      operationId: GET_time-clock-time-clocked-in-members
      description: Members clocked in at the time of the request.
      responses:
        '200':
          description: Successful response with all clocked in members
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          type: integer
                          description: ID assigned to a member by Aladtec
                        paycode_label:
                          type: string
                          description: Name of paycode associated to the Time Clock record
                        in_note:
                          type: string
                          description: Note associated to Clock-In
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 24
                      paycode_label: Regular
                      in_note: ''
                    - member_id: 46
                      paycode_label: Training
                      in_note: I arrived 10 minutes late due to a personal emergency.
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Clock is not enabled in the system.<br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Clock is not enabled for this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-clock-time/clock-in:
    post:
      operationId: POST_time-clock-time-clock-in
      description: Clocks a member in given a valid member ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                member_id:
                  type: integer
                  description: ID assigned to a member by Aladtec
                kiosk_id:
                  type: integer
                  description: ID of an authenticated time clock kiosk
                clock_in_datetime:
                  type: string
                  format: date-time
                  description: >-
                    Date and time the member is clocking in, format is RFC 3339.
                    The date and time is limited to up to 5 minutes in the
                    future.
                paycode_id:
                  type: integer
                  description: >-
                    ID of an associated paycode, required if paycodes are
                    enabled in the system
              required:
                - member_id
                - kiosk_id
                - clock_in_datetime
              example:
                member_id: 50
                kiosk_id: 18
                clock_in_datetime: '2022-08-16T09:02:00-06:00'
                paycode_id: 1
      responses:
        '200':
          description: Successful clock in response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      member_id:
                        type: integer
                        description: ID assigned to a member by Aladtec
                      kiosk_id:
                        type: integer
                        description: ID of an authenticated time clock kiosk
                      clock_in_datetime:
                        type: string
                        format: date-time
                        description: >-
                          Date and time the member clocked in, format is RFC
                          3339
                      paycode_id:
                        type: integer
                        nullable: true
                        description: >-
                          ID of an associated paycode, <code>null</code> if
                          paycodes are turned off in the system.
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    member_id: 50
                    kiosk_id: 18
                    clock_in_datetime: '2022-08-16T09:02:00-06:00'
                    paycode_id: 1
                  meta:
                    generated_at_datetime: '2023-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Clock is not enabled in the system.<br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Clock is not enabled for this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-clock-time/clock-out:
    post:
      operationId: POST_time-clock-time-clock-out
      description: Clocks a member out given a valid member ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                member_id:
                  type: integer
                  description: ID assigned to a member by Aladtec
                kiosk_id:
                  type: integer
                  description: ID of an authenticated time clock kiosk
                clock_out_datetime:
                  type: string
                  format: date-time
                  description: >-
                    Date and time the member is clocking out, format is RFC
                    3339. The date and time is limited to up to 5 minutes in the
                    future.
              required:
                - member_id
                - kiosk_id
                - clock_out_datetime
              example:
                member_id: 50
                kiosk_id: 18
                clock_out_datetime: '2022-08-16T09:02:00-06:00'
      responses:
        '200':
          description: Successful clock out response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      member_id:
                        type: integer
                        description: ID assigned to a member by Aladtec
                      kiosk_id:
                        type: integer
                        description: ID of an authenticated time clock kiosk
                      clock_out_datetime:
                        type: string
                        format: date-time
                        description: >-
                          Date and time the member clocked out, format is RFC
                          3339.
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    member_id: 50
                    kiosk_id: 18
                    clock_out_datetime: '2022-08-16T09:02:00-06:00'
                  meta:
                    generated_at_datetime: '2023-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Clock is not enabled in the system.<br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Clock is not enabled for this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /events:
    get:
      operationId: GET_events
      description: Events for requested date/time range.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: daily_split_time
          in: query
          required: false
          description: >
            Time at which scheduled shifts will be split, e.g. if the
            daily_split_time is 07:00, a single scheduled shift from 3/27 06:00
            to 3/28 06:00 will be split into two: 3/27 06:00 - 3/27 07:00 and
            3/27 07:00 - 3/28 06:00. Time must be expressed in an increment
            matching the Aladtec system, i.e. hour, half-hour, or quarter-hour
            increment. Default is the Aladtec system split time of day.
          schema:
            type: string
            pattern: ^(\d\d)(:)(\d\d)$
            example: '07:00'
      responses:
        '200':
          description: >-
            Events that have been cut by the <code>daily_split_time</code> query
            parameter
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        daily_split_date:
                          type: string
                          format: date
                          description: >-
                            A date which is used to group
                            <code>event_records</code> together. The
                            <code>daily_split_time</code> query parameter
                            affects how records are grouped.
                        event_records:
                          type: array
                          description: List of event records
                          items:
                            type: object
                            properties:
                              event_id:
                                type: integer
                                description: ID assigned to an event in Aladtec
                              title:
                                type: string
                                description: Event title
                              description:
                                type: string
                                description: Event description
                              location:
                                type: string
                                description: Event location
                              start_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record starts at, format is
                                  RFC 3339
                              stop_datetime:
                                type: string
                                format: date-time
                                description: >-
                                  Date and time the record stops at, format is
                                  RFC 3339
                              extends_before:
                                type: boolean
                                description: >-
                                  Whether additional time for this record exists
                                  before the requested query range
                              extends_after:
                                type: boolean
                                description: >-
                                  Whether additional time for this record exists
                                  after the requested query range
                              schedules:
                                type: array
                                description: Event is viewable by the included schedules
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - daily_split_date: '2018-01-16'
                      event_records:
                        - event_id: 22
                          title: EMS Monthly Meeting
                          description: Open to the community
                          location: EMS Station
                          start_datetime: '2018-01-16T09:00:00-05:00'
                          stop_datetime: '2018-01-16T11:00:00-05:00'
                          extends_before: true
                          extends_after: false
                          schedules:
                            - 1
                            - 2
                        - event_id: 43
                          title: Game Night
                          description: Bring some games and have some fun!
                          location: Event Hall
                          start_datetime: '2018-01-16T22:00:00-05:00'
                          stop_datetime: '2018-01-16T00:00:00-05:00'
                          extends_before: false
                          extends_after: false
                          schedules:
                            - 2
                    - daily_split_date: '2018-01-17'
                      event_records:
                        - event_id: 43
                          title: EMS Coverage for Football Game
                          description: High School Football Game
                          location: Ramer Field
                          start_datetime: '2018-01-17T18:00:00-05:00'
                          stop_datetime: '2018-01-17T04:00:00-05:00'
                          extends_before: false
                          extends_after: true
                          schedules:
                            - 2
                  meta:
                    generated_at_datetime: '2019-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /shift-labels:
    get:
      operationId: GET_shift-labels
      description: Shift Labels for requested date range.
      parameters:
        - name: range_start_date
          in: query
          required: true
          description: Start date of the query range. Date format is YYYY-MM-DD.
          schema:
            type: string
            format: date
            example: '2019-01-01'
        - name: range_stop_date
          in: query
          required: true
          description: Stop date of the query range. Date format is YYYY-MM-DD.
          schema:
            type: string
            format: date
            example: '2019-01-02'
      responses:
        '200':
          description: Successful response with shift labels
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        shift_date:
                          type: string
                          format: date
                          description: >-
                            Calendar date the shift label is for. Date format is
                            YYYY-MM-DD.
                        label:
                          type: string
                          description: Name of the shift label
                        color:
                          type: string
                          description: Color of the shift label
                          enum:
                            - Black
                            - Blue
                            - Brown
                            - Gold
                            - Green
                            - Orange
                            - Purple
                            - Red
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - shift_date: '2019-01-01'
                      label: Shift 1
                      color: Blue
                    - shift_date: '2019-01-02'
                      label: Shift 2
                      color: Red
                    - shift_date: '2019-01-03'
                      label: Shift 1
                      color: Blue
                    - shift_date: '2019-01-04'
                      label: Shift 2
                      color: Red
                  meta:
                    generated_at_datetime: '2020-08-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Shift Labels are not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Shift Labels are not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /work-groups:
    get:
      operationId: GET_work-groups
      description: >-
        Returns all work groups. Work groups are used for putting members into
        groups if they follow the same schedule and work limit rules. Work
        groups can be customized per Aladtec system.
      responses:
        '200':
          description: Successful response with work group definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        work_group_id:
                          type: integer
                          description: ID of the work group
                        name:
                          type: string
                          description: Name assigned to the work group
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - work_group_id: 1
                      name: Default
                    - work_group_id: 2
                      name: Duty Crew
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /time-types:
    get:
      operationId: GET_time-types
      description: >-
        Returns a list of unique Time Types which can be applied to scheduled
        time.
      parameters:
        - name: limit
          in: query
          required: false
          description: >-
            Number of records to return in the result. The number of records
            returned is limited to 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: offset
          in: query
          required: false
          description: Paginate the records returned in the result.
          schema:
            default: 0
            type: integer
            minimum: 0
      responses:
        '200':
          description: Successful response with time type objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        time_type_id:
                          type: integer
                          description: ID assigned to a time type in Aladtec
                        name:
                          type: string
                          description: Name assigned to a time type in Aladtec
                        is_default:
                          type: boolean
                          description: >-
                            Whether or not the time type is applied by default
                            to new time records; For systems using Time Types,
                            one time type must be set as the default.
                        is_active:
                          type: boolean
                          description: A time type is either active or inactive
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - time_type_id: 0
                      name: Regular
                      is_default: true
                      is_active: true
                    - time_type_id: 2
                      name: Training
                      is_default: false
                      is_active: true
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Time Types are not enabled in the system.<br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Types are not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /accrual-banks:
    get:
      operationId: GET_accrual-banks
      description: Returns a list of all accrual banks.
      responses:
        '200':
          description: Successful response with accrual bank definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        accrual_bank_id:
                          description: ID assigned to an accrual bank in Aladtec
                          type: integer
                        name:
                          description: Name assigned to an accrual bank in Aladtec
                          type: string
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - accrual_bank_id: 1
                      name: Personal Time
                    - accrual_bank_id: 2
                      name: Vacation Time
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Accrual or Time Off is not enabled in the
            system. <br> Please contact Aladtec Support (support@aladtec.com,
            888.749.5550) for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /accrual-banks/balances:
    get:
      operationId: GET_accrual-banks-balances
      description: >-
        Returns the number of hours in each specified accrual bank for a list of
        provided members.
      parameters:
        - name: member_ids
          in: query
          required: true
          style: form
          explode: false
          description: List of member IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: accrual_bank_ids
          in: query
          required: true
          style: form
          explode: false
          description: IDs assigned to accrual banks in Aladtec
          schema:
            type: array
            items:
              type: integer
      responses:
        '200':
          description: Successful response with accrual banks balances data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        accrual_bank_id:
                          description: ID assigned to an accrual bank in Aladtec
                          type: integer
                        hours:
                          description: >-
                            The number of hours in the bank for the specified
                            member in Aladtec
                          type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 1
                      accrual_bank_id: 1
                      hours: 24.5
                    - member_id: 1
                      accrual_bank_id: 2
                      hours: 36.1234
                    - member_id: 3
                      accrual_bank_id: 1
                      hours: 0
                    - member_id: 3
                      accrual_bank_id: 2
                      hours: -12
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Accrual or Time Off is not enabled in the
            system. <br> Please contact Aladtec Support (support@aladtec.com,
            888.749.5550) for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
    put:
      operationId: PUT_accrual-banks-balances
      description: >-
        Sets accrual bank balances given a list of hours for members' accrual
        banks.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  member_id:
                    description: ID assigned to a member by Aladtec
                    type: integer
                  accrual_bank_id:
                    description: ID assigned to an accrual bank in Aladtec
                    type: integer
                  hours:
                    description: >-
                      The absolute number of hours to set the accrual bank
                      balance. Both positive and negative values are allowed to
                      be specified. The number can have, at most, four decimal
                      places of precision (e.g. 10.1234).
                    type: number
                  note:
                    description: An optional note to log details about the set
                    type: string
                required:
                  - member_id
                  - accrual_bank_id
                  - hours
              example:
                - member_id: 1
                  accrual_bank_id: 1
                  hours: 0
                - member_id: 1
                  accrual_bank_id: 2
                  hours: 36.1234
                  note: Example note about setting the accrual balance.
                - member_id: 3
                  accrual_bank_id: 2
                  hours: -12
        required: true
      responses:
        '200':
          description: Successful response containing the updated accrual bank balances
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        accrual_bank_id:
                          description: ID assigned to an accrual bank in Aladtec
                          type: integer
                        hours:
                          description: >-
                            The number of hours in the bank for the specified
                            member in Aladtec
                          type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 1
                      accrual_bank_id: 1
                      hours: 0
                    - member_id: 1
                      accrual_bank_id: 2
                      hours: 36.1234
                    - member_id: 3
                      accrual_bank_id: 2
                      hours: -12
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Accrual or Time Off is not enabled in the
            system. <br> Please contact Aladtec Support (support@aladtec.com,
            888.749.5550) for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /accrual-banks/balances/adjustments:
    post:
      operationId: POST_accrual-banks-balances-adjustments
      description: >-
        Updates accrual bank balances given a list of adjustment hours for
        members' accrual banks.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  member_id:
                    description: ID assigned to a member by Aladtec
                    type: integer
                  accrual_bank_id:
                    description: ID assigned to an accrual bank in Aladtec
                    type: integer
                  adjustment_hours:
                    description: >-
                      The relative number of hours to adjust the accrual bank
                      balance. A positive number will increase the balance, and
                      a negative number will decrease the balance. The number
                      can have, at most, four decimal places of precision (e.g.
                      10.1234).
                    type: number
                  note:
                    description: An optional note to log details about the adjustment
                    type: string
                required:
                  - member_id
                  - accrual_bank_id
                  - adjustment_hours
              example:
                - member_id: 1
                  accrual_bank_id: 1
                  adjustment_hours: 24
                - member_id: 1
                  accrual_bank_id: 2
                  adjustment_hours: -40
                  note: Example note about the adjustment.
                - member_id: 3
                  accrual_bank_id: 2
                  adjustment_hours: 12.5001
        required: true
      responses:
        '200':
          description: Successful response containing the updated accrual bank balances
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member_id:
                          description: ID assigned to a member by Aladtec
                          type: integer
                        accrual_bank_id:
                          description: ID assigned to an accrual bank in Aladtec
                          type: integer
                        hours:
                          description: >-
                            The number of hours in the bank for the specified
                            member in Aladtec
                          type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member_id: 1
                      accrual_bank_id: 1
                      hours: 48
                    - member_id: 1
                      accrual_bank_id: 2
                      hours: -4
                    - member_id: 3
                      accrual_bank_id: 2
                      hours: 0.5001
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Accrual or Time Off is not enabled in the
            system. <br> Please contact Aladtec Support (support@aladtec.com,
            888.749.5550) for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Time Off is not enabled in this system.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /configuration:
    get:
      operationId: GET_configuration
      description: Returns a list of configuration settings.
      responses:
        '200':
          description: Successful response with configuration data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The Configuration properties
                    properties:
                      timezone:
                        description: >-
                          The timezone used by the system in tz database format,
                          also known as IANA or Olson
                        type: string
                      organization_name:
                        description: The name of the organization using this Aladtec system
                        type: string
                      system_admin_member_id:
                        description: >-
                          The member_id of the system admin. This can be used in
                          conjunction with the /members resource to get
                          information about this member.
                        type: integer
                      historical_edits_limit:
                        description: >-
                          The number of days a record remains editable after it
                          occurs. If no limit is imposed, this will return a
                          value of <code>null</code>.
                        type: integer
                        nullable: true
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    timezone: America/Chicago
                    organization_name: Example Department
                    system_admin_member_id: 3
                    historical_edits_limit: 7
                  meta:
                    generated_at_datetime: '2022-01-01T07:42:33-06:00'
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
  /reports/payroll:
    get:
      operationId: GET_reports-payroll
      description: >
        Runs the Payroll Report export.


        <strong>Pagination is required</strong> to export all records within the
        requested range.
      parameters:
        - name: range_start_datetime
          in: query
          required: true
          description: Start date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-01T06:00:00.000Z
        - name: range_stop_datetime
          in: query
          required: true
          description: Stop date and time of the query range. Datetime format is RFC 3339.
          schema:
            type: string
            format: date-time
            example: 2022-01-05T06:00:00.000Z
        - name: member_ids
          in: query
          style: form
          required: false
          explode: false
          description: List of member IDs to filter by
          schema:
            type: array
            items:
              type: integer
            example: 1,2,3
        - name: time_categories
          in: query
          required: false
          explode: false
          description: >
            One or more payroll categories to filter by. Possible values: [
            time_worked, time_off, overtime, holiday ]
          schema:
            type: array
            items:
              type: string
              enum:
                - time_worked
                - time_off
                - overtime
                - holiday
        - name: next_token
          in: query
          required: false
          description: Pagination token used to request the next set of records
          schema:
            type: string
      responses:
        '200':
          description: >-
            Successful response containing a partial set of Payroll Report
            records
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        member:
                          type: object
                          description: Member information
                          properties:
                            member_id:
                              description: ID assigned to a member by Aladtec
                              type: integer
                            first_name:
                              type: string
                              description: Member given name
                            last_name:
                              type: string
                              description: Member family name
                        report_entries:
                          description: Array of Payroll Report time records
                          type: array
                          items:
                            type: object
                            properties:
                              start_datetime:
                                description: Datetime format is RFC 3339.
                                type: string
                                format: date-time
                              stop_datetime:
                                description: Datetime format is RFC 3339.
                                type: string
                                format: date-time
                              schedule:
                                description: >-
                                  This property has a value when
                                  <code>pay_type.record_type</code> equals
                                  "time_type". Otherwise, it will have a value
                                  of null.
                                type: object
                                nullable: true
                                properties:
                                  schedule_id:
                                    description: ID assigned to a schedule in Aladtec
                                    type: integer
                                  name:
                                    description: The name of the schedule
                                    type: string
                              position_qualification:
                                description: >-
                                  This property has a value when
                                  <code>pay_type.record_type</code> equals
                                  "time_type". Otherwise, it will have a value
                                  of null.
                                type: object
                                nullable: true
                                properties:
                                  position_qualification_id:
                                    description: >-
                                      ID assigned to a position qualification in
                                      Aladtec
                                    type: integer
                                  name:
                                    description: Name assigned to the qualification
                                    type: string
                              pay_type:
                                description: The entry's Aladtec time record type
                                type: object
                                properties:
                                  id:
                                    description: ID of the type
                                    type: integer
                                  name:
                                    description: Name of the type
                                    type: string
                                  record_type:
                                    description: The time record type in Aladtec.
                                    type: string
                                    enum:
                                      - time_type
                                      - paycode
                                      - time_off_type
                              time_category:
                                description: The payroll category in Aladtec.
                                type: string
                                enum:
                                  - time_worked
                                  - time_off
                                  - overtime
                                  - holiday
                              shift_differential:
                                description: >-
                                  The shift differential value if this record is
                                  mapped to one
                                type: string
                              payroll_hours:
                                description: Total number of hours for this entry
                                type: number
                  meta:
                    type: object
                    description: >-
                      Additional properties describing the record set within
                      data
                    properties:
                      next_token:
                        description: >-
                          Pagination token used to request the next set of
                          records. When this value is an empty "", all records
                          in the requested range have been returned.
                        type: string
                      generated_at_datetime:
                        description: >-
                          RFC 3339 formatted datetime at which data was
                          generated
                        type: string
                example:
                  data:
                    - member:
                        member_id: 4
                        first_name: John
                        last_name: Doe
                      report_entries:
                        - start_datetime: '2018-12-02T09:00:00-06:00'
                          stop_datetime: '2018-12-02T17:00:00-06:00'
                          schedule:
                            schedule_id: 1
                            name: Ambulance 1
                          position_qualification:
                            position_qualification_id: 10
                            name: EMT
                          pay_type:
                            record_type: time_type
                            id: 1
                            name: Regular
                          time_category: time_worked
                          shift_differential: ''
                          payroll_hours: 8
                        - start_datetime: '2019-01-01T00:00:00-06:00'
                          stop_datetime: '2019-01-03T00:00:00-06:00'
                          schedule: null
                          position_qualification: null
                          pay_type:
                            record_type: paycode
                            id: 1
                            name: Hourly
                          time_category: overtime
                          shift_differential: ''
                          payroll_hours: 48
                  meta:
                    generated_at_datetime: '2020-08-01T07:42:33-06:00'
                    next_token: >-
                      eyJyYW5nZV9zdGFydCI6IjIwMTktMDEtMDFUMDA6MDAiLCJyYW5nZV9zdG9wIjoiMjAxOS0wMS0wM1QwMDowMCIsIm1lbWJlcl9pZHMiOiJbODEsODIsODMsODQsODUsODYsODcsODgsODksOTAsOTEsOTIsOTMsOTUsOTYsOTgsOTksMTAxLDEwMiwxMDgsMTgsNDMsMTAwLDE1LDEwNiwxMDQsMTA1LDk0LDEwMywxMDddIn0=
        '400':
          description: >-
            Error response containing one or more errors returned as a result of
            invalid request data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
                example:
                  errors:
                    - error: An example error message 1.
                      detail: More details about the specific error 1.
                    - error: An example error message 2.
                      detail: More details about the specific error 2.
        '403':
          description: >-
            Error response returned when the API token does not have permission
            to perform this action.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: >-
                        Your API token does not have permission to perform this
                        action.
                      detail: >-
                        If you believe this is in error, please talk to your
                        system contact.
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
        '404':
          description: >-
            Error response when Payroll is not enabled in the system. <br>
            Please contact Aladtec Support (support@aladtec.com, 888.749.5550)
            for help if this error is received.
          content:
            application/json:
              schema:
                example:
                  errors:
                    - error: Payroll is not enabled in this system.
                      detail: ''
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        error:
                          type: string
                          description: The specific error returned
                        detail:
                          type: string
                          description: More details about the error that occurred
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
security:
  - bearerAuth: []
