Set recurrent employee limits
curl --request PUT \
--url https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"companyId": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"payroll": "2023-11",
"limits": {
"meal": {
"amount": {
"amountInCents": 10000,
"currency": "EUR"
},
"appliesTo": "employee",
"period": "payroll"
},
"transport": {
"amount": {
"amountInCents": 5000,
"currency": "EUR"
},
"appliesTo": "employee",
"period": "payroll"
},
"nursery": {
"amount": {
"amountInCents": 15000,
"currency": "EUR"
},
"appliesTo": "employee",
"period": "year"
}
}
}{
"code": "validation_error",
"message": "Invalid employeeId"
}{
"message": "invalid_token"
}{
"message": "Company does not belong to the specified partner"
}Limits
Set recurrent limit
Sets the recurrent employee limits for all the benefits defined by the partner
PUT
/
companies
/
{companyId}
/
employees
/
{employeeId}
/
limits
/
recurrent
Set recurrent employee limits
curl --request PUT \
--url https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/recurrent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"companyId": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"payroll": "2023-11",
"limits": {
"meal": {
"amount": {
"amountInCents": 10000,
"currency": "EUR"
},
"appliesTo": "employee",
"period": "payroll"
},
"transport": {
"amount": {
"amountInCents": 5000,
"currency": "EUR"
},
"appliesTo": "employee",
"period": "payroll"
},
"nursery": {
"amount": {
"amountInCents": 15000,
"currency": "EUR"
},
"appliesTo": "employee",
"period": "year"
}
}
}{
"code": "validation_error",
"message": "Invalid employeeId"
}{
"message": "invalid_token"
}{
"message": "Company does not belong to the specified partner"
}Overview
This endpoint allows you to set the employee limits for all the benefits defined by the partner, such as meals, transport and nurseries.Allowed values per benefit
TheappliesTo and period fields are mandatory for each benefit, and each benefit only supports a subset of values:
| Benefit | Allowed appliesTo values | Allowed period values |
|---|---|---|
meal | employee | payroll |
transport | employee | payroll |
nursery | employee, child | year |
appliesTo or period value for a given benefit will result in a validation error.
How it works?
The recurrent limit acts as the foundational base for an employee’s benefits month after month. It is tied to a specific payroll cycle using the mandatorypayroll query parameter.
- Next payroll cycle: You can only set recurrent limits for the next upcoming payroll cycle (e.g., if the current month is February, you must send March). Once set, this limit will automatically carry over into all subsequent payrolls.
- Current or other future payroll cycles: If you attempt to update recurrent limits for the current payroll cycle or any cycle beyond the next one, the API will reject the request with a
400 Bad Requesterror. - Precedence: If an employee has a recurrent limit set, but a punctual limit is also set for the exact same month, the punctual limit will always prevail for that specific cycle.
If you need to make an adjustment for the current payroll cycle, please use the Punctual
Limits endpoint instead.
For a detailed explanation of how limits work, including examples and scenarios, please refer to the
Overview page.
Important: The response returned by this endpoint only echoes the limits you have just configured. It does not recalculate or return the final, effectively applied limits for the employee (e.g., if a punctual limit overrides this recurrent configuration).To retrieve the actual limits that will apply to an employee for a specific payroll cycle, you must use the Get employee limits endpoint.
Authorizations
Path Parameters
Query Parameters
Body
application/json
Response
Limits successfully set