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

# Imports or updates employee bonuses compatible with data import service

> This endpoint will handle adding new employee bonuses or updating existing ones based on the provided data.



## OpenAPI

````yaml openapi/member-v1.json POST /v1/employee-bonuses/upsert
openapi: 3.0.4
info:
  title: MemberService.Api
  version: v1
servers:
  - url: https://{host}/member
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/employee-bonuses/upsert:
    post:
      tags:
        - Service2Service
      summary: Imports or updates employee bonuses compatible with data import service
      description: >-
        This endpoint will handle adding new employee bonuses or updating
        existing ones based on the provided data.
      requestBody:
        description: Employee bonuses to import or update
        content:
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: >-
                  #/components/schemas/MemberService.Api.CQRS.Models.UpsertEmployeeBonusRequest
          text/json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: >-
                  #/components/schemas/MemberService.Api.CQRS.Models.UpsertEmployeeBonusRequest
          application/*+json:
            schema:
              minItems: 1
              type: array
              items:
                $ref: >-
                  #/components/schemas/MemberService.Api.CQRS.Models.UpsertEmployeeBonusRequest
        required: true
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/MemberService.Api.Controllers.DTOs.ImportResult
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    MemberService.Api.CQRS.Models.UpsertEmployeeBonusRequest:
      required:
        - percentage
        - personalId
        - startDate
      type: object
      properties:
        personalId:
          minLength: 1
          type: string
          description: Personal identification number of the employee
        percentage:
          type: number
          description: Employee bonus percentage (0.00 to 1.00)
          format: double
        startDate:
          type: string
          description: Date when the bonus becomes effective
          format: date-time
        endDate:
          type: string
          description: Optional end date for the bonus period
          format: date-time
          nullable: true
      additionalProperties: false
    MemberService.Api.Controllers.DTOs.ImportResult:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
          description: Collection of errors that occurred during import
          nullable: true
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````