Skip to main content
POST
/
companies
/
{companyId}
/
limits
/
enable
Enable limits
curl --request POST \
  --url https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/limits/enable \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "employees": [
    "e3babcde-0123-4567-89ab-cdef01234567",
    "f4cdef01-2345-6789-abcd-ef0123456789"
  ],
  "categories": [
    "meal",
    "transport"
  ]
}
'
{
  "totalRequested": 500,
  "succeeded": 499,
  "failed": 1,
  "errors": [
    {
      "employeeId": "i7f01234-5678-9012-def0-123456789012",
      "error": {
        "message": "Employee not found"
      }
    }
  ]
}

Overview

This endpoint allows you to enable benefit limits for a list of employees.
  • Current payroll: If no payroll parameter is provided, the limits are enabled immediately for the current payroll cycle.
  • Future payroll: If a payroll parameter is provided (e.g., payroll=2026-05), the limits will be enabled starting from that payroll cycle.
  • Past payroll: Querying or sending past payroll cycles is not allowed and will return a 400 Bad Request.
You must explicitly specify which categories to enable in the request body (e.g., ["meal", "transport"]). The categories array is mandatory and must contain at least one item. If categories is omitted or empty, the API will return a 400 Bad Request. There is no default behavior to enable “all” categories. The employees array is optional. If you omit the employees array or send an empty array, the limits will be enabled globally for all employees in the company. If you do provide a list of IDs, it will only apply to those specific employees.

Synchronous Response

The operation is performed synchronously. The response includes a summary of success and failure counts, and a detailed list of errors for any employees that failed to process.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

companyId
string<uuid>
required

The company identifier

Query Parameters

payroll
string

The payroll cycle identifier (format YYYY-MM). If not provided, it defaults to the current payroll cycle. Past cycles will return a 400 Bad Request.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])$
Example:

"2026-05"

Body

application/json
categories
enum<string>[]
required

List of benefit categories to apply the action to. This field is strictly mandatory.

Minimum array length: 1
Available options:
meal,
transport,
nursery
employees
string<uuid>[]

List of employee IDs to apply the action to. If omitted or empty, the action applies to all employees in the company.

Response

Limits enabled successfully

totalRequested
integer

Total number of employees in the request

succeeded
integer

Number of employees successfully updated

failed
integer

Number of employees that failed to update

errors
object[]

List of errors for employees that failed to update. Empty if all succeeded.