> ## Documentation Index
> Fetch the complete documentation index at: https://absentify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set a member's default and hidden allowance types

> Sets which allowance type is preselected for a member (`default`) and whether a type is hidden from them (`disabled`). Until now this was only reachable through the `set_as_default` / `disabled` fields of the deprecated PUT /members/{id}/allowance/{allowance_type_id}/{year}, so an integration that stopped calling that endpoint lost the ability to set the default at all. One invariant is enforced for you: a member always has exactly one default type. Setting `default: true` therefore demotes the previous default, and hiding the current default promotes the oldest remaining visible type. Known limit: if the member has no OTHER visible type, hiding the addressed one is accepted and leaves that type both default and hidden, so the member sees no allowance at all — check `allowance_type_configurations` in GET /members/{id} before hiding a type. A single call can rewrite sibling rows, so read the member back via GET /members/{id} if you need the resulting `allowance_type_configurations`. Both fields are required: the request states the complete desired state for this one allowance type, it is not a partial update. That is deliberate — the two flags are resolved together, so a merge against a separately read row could resolve against a state that no longer holds. GET /members/{id} already returns both current values under `allowance_type_configurations`. To set this when creating a member, use the `defaultAllowances` array of POST /members instead.



## OpenAPI

````yaml https://api.absentify.com/api/v1/openapi.json put /members/{member_id}/allowance-type-configurations/{allowance_type_id}
openapi: 3.1.0
info:
  title: absentify CRUD API
  description: OpenAPI compliant REST API
  version: 1.0.0
servers:
  - url: https://api.absentify.com/api/v1
security: []
tags:
  - name: Departments
  - name: Leave types
  - name: Members
  - name: Requests
  - name: Public holidays
  - name: Workspace
  - name: Absences
  - name: Allowance Management
externalDocs:
  url: https://absentify.com/docs/en/api-reference
paths:
  /members/{member_id}/allowance-type-configurations/{allowance_type_id}:
    put:
      tags:
        - Members
      summary: Set a member's default and hidden allowance types
      description: >-
        Sets which allowance type is preselected for a member (`default`) and
        whether a type is hidden from them (`disabled`). Until now this was only
        reachable through the `set_as_default` / `disabled` fields of the
        deprecated PUT /members/{id}/allowance/{allowance_type_id}/{year}, so an
        integration that stopped calling that endpoint lost the ability to set
        the default at all. One invariant is enforced for you: a member always
        has exactly one default type. Setting `default: true` therefore demotes
        the previous default, and hiding the current default promotes the oldest
        remaining visible type. Known limit: if the member has no OTHER visible
        type, hiding the addressed one is accepted and leaves that type both
        default and hidden, so the member sees no allowance at all — check
        `allowance_type_configurations` in GET /members/{id} before hiding a
        type. A single call can rewrite sibling rows, so read the member back
        via GET /members/{id} if you need the resulting
        `allowance_type_configurations`. Both fields are required: the request
        states the complete desired state for this one allowance type, it is not
        a partial update. That is deliberate — the two flags are resolved
        together, so a merge against a separately read row could resolve against
        a state that no longer holds. GET /members/{id} already returns both
        current values under `allowance_type_configurations`. To set this when
        creating a member, use the `defaultAllowances` array of POST /members
        instead.
      operationId: member-updateMemberAllowanceTypeConfiguration
      parameters:
        - in: path
          name: member_id
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
        - in: path
          name: allowance_type_id
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                default:
                  type: boolean
                  description: >-
                    Preselect this allowance type for the member. Setting it to
                    true demotes the member's previous default.
                disabled:
                  type: boolean
                  description: >-
                    Hide this allowance type from the member. The last visible
                    type cannot be hidden.
              required:
                - default
                - disabled
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - ApiKey: []
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-API-KEY
      in: header

````