Set a punctual limit for a specific payroll cycle
curl --request PUT \
--url https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payroll": "<string>"
}
'import requests
url = "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual"
payload = { "payroll": "<string>" }
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({payroll: '<string>'})
};
fetch('https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual', 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/punctual",
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([
'payroll' => '<string>'
]),
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/punctual"
payload := strings.NewReader("{\n \"payroll\": \"<string>\"\n}")
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/punctual")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payroll\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual")
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 = "{\n \"payroll\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"companyId": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"payroll": "2023-10",
"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": "payroll must be the current month"
}Limits
Set punctual limit
Sets a punctual limit for an employee’s benefits strictly during the current payroll cycle. Punctual limits operate independently of recurrent limits.
PUT
/
companies
/
{companyId}
/
employees
/
{employeeId}
/
limits
/
punctual
Set a punctual limit for a specific payroll cycle
curl --request PUT \
--url https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payroll": "<string>"
}
'import requests
url = "https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual"
payload = { "payroll": "<string>" }
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({payroll: '<string>'})
};
fetch('https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual', 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/punctual",
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([
'payroll' => '<string>'
]),
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/punctual"
payload := strings.NewReader("{\n \"payroll\": \"<string>\"\n}")
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/punctual")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payroll\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/limits/punctual")
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 = "{\n \"payroll\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"companyId": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"payroll": "2023-10",
"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": "payroll must be the current month"
}Overview
This endpoint allows you to set a punctual limit for an employee’s benefits strictly during the current payroll cycle. Unlike thePUT recurrent limits endpoint, making a punctual limits update here will only affect the specified current payroll period.
Mechanics
- Mandatory: To set a punctual limit, you must provide the precise
payrollidentifier (e.g.,2026-05) as a required query parameter. This identifier must correspond to the current ongoing payroll cycle. - Independent: Punctual limits do not require a recurrent limit to exist. They operate independently.
- Precedence: If an employee has both a recurrent limit and a punctual limit configured for the exact same month, the punctual limit will always prevail and be the active limit for that cycle.
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.
For a detailed explanation of how limits and payroll cycles are evaluated, 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., due to precedence rules overriding other limits).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
Punctual limit successfully created or updated