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

# Set Flex Access



## OpenAPI

````yaml put /api/v2/employees/{employeeId}/flex/access
openapi: 3.0.0
info:
  title: become.1 API
  description: become.1 API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/v2/employees/{employeeId}/flex/access:
    put:
      operationId: ApiV2EmployeeFlexController_setFlexAccessDetails
      parameters:
        - name: employeeId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetFlexAccessInputDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FlexSettingsOutputDto'
      security:
        - bearer: []
components:
  schemas:
    SetFlexAccessInputDto:
      type: object
      properties:
        budget:
          description: >-
            The flex budget will be the maximum amount that can be spent per
            month by the employee.
          allOf:
            - $ref: '#/components/schemas/MonetaryAmountInputDto'
        allowedModules:
          type: array
          nullable: true
          items:
            type: string
            enum:
              - MEALS
              - HEALTH
              - INTERNET
              - HOLIDAY
              - KITA
              - MOBILITY
              - SPORTS
        accumulateBudget:
          type: boolean
          description: |2-

                        If set, budget that has not been spent will be accumulated until the end of the year.

                        If there is an entry where this value is false, this will break the accumulation.

                        Example: 


                        Jan - Mar -> accumulation = true, 50€ budget: if the user did not spent any budget, he would have 150 € budget in march.
                        Apr - May -> accumulation = false, 50€ budget: the 150 € accumulated budget will not be available in April. The user has 50€ for april and 50€ for may
                        June - Dec -> accumulation = true, 50€ budget: if the user did not spent any budget, he would have 350 € budget in december.
                    
        flexTaxRuleTemplateId:
          type: string
          default: default
          nullable: true
        startDate:
          format: date-time
          type: string
          description: |-
            Make sure the date is UTC+0.

                    To have the access applied on 1st of January 2023, the input would be: 2023-01-01T00:00:00.000Z.

                    

                    This can be set up for any date going back in time up to the past month until the 3rd of the current month.

                    Example:

                    Current Date 7th of March -> earliest validFrom = 1st of February

                    Current Date 8th of March -> earlierst validFrom = 1st of March 

                    

                    The 7th of march is a reference date that can vary depending on the date of payroll creation.
        endDate:
          format: date-time
          type: string
          description: |-
            Make sure the date is UTC+0.

                    To have the access expire on the end of January 2023, the input would be: 2023-01-31T23:59:59.999Z\n
                    

                    This can be set up for any date going back in time up to the past 2 months until the 7th of the current month.

                    Example:

                    Current Date 7th of March -> earliest validUntil = 2023-01-31T23:59:59.999Z

                    Current Date 8th of March -> earlierst validUntil = 2023-02-29T23:59:59.999Z 

                    

                    The 7th of march is a reference date that can vary depending on the date of payroll creation.
      required:
        - budget
        - accumulateBudget
        - startDate
    FlexSettingsOutputDto:
      type: object
      properties:
        id:
          type: string
          description: The unique primary key (UUID) of the entity.
        dateCreated:
          format: date-time
          type: string
        dateModified:
          format: date-time
          type: string
        dateDeleted:
          format: date-time
          type: string
          nullable: true
        employeeId:
          type: string
        budget:
          $ref: '#/components/schemas/MonetaryAmount'
        allowedModules:
          type: array
          items:
            type: string
            enum:
              - MEALS
              - HEALTH
              - INTERNET
              - HOLIDAY
              - KITA
              - MOBILITY
              - SPORTS
        accumulateBudget:
          type: boolean
          default: false
        flexTaxRuleTemplateId:
          type: string
          default: default
          nullable: true
        validFrom:
          format: date-time
          type: string
        validFromYearMonth:
          type: string
          description: yyyy-MM
        validUntil:
          format: date-time
          type: string
          nullable: true
        validUntilYearMonth:
          type: string
          nullable: true
          description: yyyy-MM
      required:
        - id
        - dateCreated
        - dateModified
        - employeeId
        - budget
        - allowedModules
        - accumulateBudget
        - validFrom
        - validFromYearMonth
    MonetaryAmountInputDto:
      type: object
      properties:
        value:
          type: number
        currency:
          type: string
          enum:
            - EUR_CENT
            - LEU_BANI
            - GBP_PENCE
            - CHF_CENTIMES
      required:
        - value
        - currency
    MonetaryAmount:
      type: object
      properties: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````