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

# Create employee consumptions

## Overview

<Tip>**Note**: This endpoint is available only in Sandbox environment</Tip>

Creates a new consumption for an employee in the Cobee system. This endpoint allows you to record expenses made by employees using their benefits.

The consumption will be added to the `Payroll Cycle` specified on the request.


## OpenAPI

````yaml POST /companies/{companyId}/payroll-cycles/{payrollCycleId}/employees/{employeeId}/consumptions
openapi: 3.0.1
info:
  title: Partners API
  description: >-
    Partners API definition where you can check the documentation for the
    different available operations to integrate with the platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://pre-partners-api.cobee.io/api/v3
  - url: https://partners-api.cobee.io/api/v3
security:
  - bearerAuth: []
paths:
  /companies/{companyId}/payroll-cycles/{payrollCycleId}/employees/{employeeId}/consumptions:
    post:
      summary: >-
        Creates a new employee consumption. **Note:** This endpoint is **only
        available** in the **sandbox** environment. 
      parameters:
        - name: companyId
          in: path
          required: true
          description: The unique identifier of the company
          schema:
            type: string
            format: uuid
          example: a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890
        - name: payrollCycleId
          in: path
          required: true
          description: The unique identifier of the payroll cycle
          schema:
            type: string
            format: uuid
          example: dfe4e8a9-ff19-4b3b-953a-2d64c6e88539
        - name: employeeId
          in: path
          required: true
          description: The unique identifier of the employee
          schema:
            type: string
          example: 7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8
      requestBody:
        description: Data for the employee consumption
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConsumptionRequest'
      responses:
        '201':
          description: Consumption successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterEmployeeResponse'
              example:
                id: 7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8
        '400':
          description: Bad Request - The request body is invalid or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'Invalid request: ''payrollCycleId'' field is required'
        '401':
          description: Unauthorised - Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Invalid API key
        '404':
          description: Not Found - The company ID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: >-
                  Company with ID 'a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890' not
                  found
        '500':
          description: Internal Server Error - Something went wrong on our end
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'Internal server error: Unable to process request'
components:
  schemas:
    CreateConsumptionRequest:
      type: object
      required:
        - concept
        - category
        - behaviour
        - amount
      properties:
        concept:
          type: string
          description: The concept of the consumption
          example: meal
        category:
          type: string
          description: The category of the consumption
          enum:
            - any
            - capitalization-benefit
            - claps-benefit
            - custom-benefit
            - education-benefit
            - gym-benefit
            - health-insurance-benefit
            - home-office-benefit
            - individual-capitalization-benefit
            - it-product-benefit
            - life-insurance-benefit
            - meal-benefit
            - nursery-benefit
            - pension-plan-benefit
            - renting-benefit
            - retirement-insurance-benefit
            - transport-benefit
            - unknown
            - wellness-benefit
          example: meal-benefit
        behaviour:
          enum:
            - allowance
            - allowance-not-exempt
            - flex
            - flex-not-exempt
          description: The behaviour of the consumption
        amount:
          type: number
          description: The amount of the consumption
    RegisterEmployeeResponse:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the registered employee
      example:
        id: 7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
      example:
        message: 'Bad request: Invalid field value'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````