curl --request GET \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions', 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-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"company": {
"id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"legalId": "B12345678",
"currency": "EUR",
"payrollCycle": {
"id": "7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8",
"start": 1672531200,
"end": 1675123200,
"fiscalYear": "2023",
"payrollMonth": "03"
},
"employee": {
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"behaviour": "allowance",
"category": "Wellness Bonus",
"sumType": "expenses",
"amountInCents": 1
}
]
}
}
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}List employee consumptions
curl --request GET \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions', 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-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/consumptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"company": {
"id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"legalId": "B12345678",
"currency": "EUR",
"payrollCycle": {
"id": "7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8",
"start": 1672531200,
"end": 1675123200,
"fiscalYear": "2023",
"payrollMonth": "03"
},
"employee": {
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"behaviour": "allowance",
"category": "Wellness Bonus",
"sumType": "expenses",
"amountInCents": 1
}
]
}
}
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Overview
Retrieves all confirmed transactions of a specific employee for the current payroll cycle.The parameter
payrollCycleId is deprecated. Please use the property payroll instead.Important: By default, consumptions are returned for the current (open) payroll cycle. To retrieve a previous cycle, provide it through payroll property.
Important: The payload can be transformed depending oncategoriesandgroupBy. Choose the options that better suit your integration.
Important:categoryis a stable slug for core benefits (e.g.,meal-benefit). For custom benefits,categoryis the company-configured full name (e.g.,Wellness Bonus) and cannot be used to filter through thecategoriesquery parameter. If a custom benefit has no configured name, its identifier (UUID) is returned unchanged. See Consumption Reports for details.
Important: Fortext/csvwe can select two formats throughcsvFormatoptions. Whenlinesis selected, each row corresponds to a single consumption record. Whencolumnsis selected, each row corresponds to the total consumptions of an employee, and each consumption type is represented as a separate column.
Important: Incolumnsformat the consumption columns are derived from the data: a column only appears when there is consumption for it, so a missing column means there was no consumption. As an exception, whengroupBy=categoryandcategoriesare provided, the CSV is guaranteed to contain one column per requested category — in the same order as requested — with0when there is no consumption.
Important: if the requested payroll cycle is not closed yet, then the propertyExample responses based onendwill be the current date. Otherwise,endwill correspond to the last day of the cycle.
csvFormat and categories:
Show Examples
Show Examples
application/json
Show default
Show default
{
"company": {
"id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"legalId": "B12345678",
"currency": "EUR",
"payrollCycle": {
"id": "b2c3d4e5-f678-9012-a1b2-c3d4e5f67890",
"start": 1753939051,
"end": 1756616806,
"fiscalYear": "2025",
"payrollMonth": "08"
},
"employee": {
"employeeId": "c3d4e5f6-7890-1234-b2c3-d4e5f6789012",
"internalId": "1234",
"legalId": "51626739L",
"consumptions": [
{
"category": "meal-benefit",
"behaviour": "flex",
"sumType": "expenses",
"amountInCents": 22000
},
{
"category": "meal-benefit",
"behaviour": "flex",
"sumType": "withdrawn",
"amountInCents": 2199
},
{
"category": "transport-benefit",
"behaviour": "flex",
"sumType": "expenses",
"amountInCents": 13636
},
{
"category": "nursery-benefit",
"behaviour": "flex",
"sumType": "expenses",
"amountInCents": 24569
}
]
}
}
}
Show with a custom benefit
Show with a custom benefit
{
"company": {
"id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"legalId": "B12345678",
"currency": "EUR",
"payrollCycle": {
"id": "b2c3d4e5-f678-9012-a1b2-c3d4e5f67890",
"start": 1753939051,
"end": 1756616806,
"fiscalYear": "2025",
"payrollMonth": "08"
},
"employee": {
"employeeId": "c3d4e5f6-7890-1234-b2c3-d4e5f6789012",
"internalId": "1234",
"legalId": "51626739L",
"consumptions": [
{
"category": "meal-benefit",
"behaviour": "flex",
"sumType": "expenses",
"amountInCents": 22000
},
{
"category": "Wellness Bonus",
"behaviour": "allowance",
"sumType": "expenses",
"amountInCents": 5000
}
]
}
}
}
Show groupBy=category
Show groupBy=category
{
"company": {
"id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"legalId": "B12345678",
"currency": "EUR",
"payrollCycle": {
"id": "b2c3d4e5-f678-9012-a1b2-c3d4e5f67890",
"start": 1753939051,
"end": 1756616806,
"fiscalYear": "2025",
"payrollMonth": "08"
},
"employee": {
"employeeId": "c3d4e5f6-7890-1234-b2c3-d4e5f6789012",
"internalId": "1234",
"legalId": "51626739L",
"consumptions": [
{
"category": "meal-benefit",
"amountInCents": 19801
},
{
"category": "transport-benefit",
"amountInCents": 13636
},
{
"category": "nursery-benefit",
"amountInCents": 24569
}
]
}
}
}
Show groupBy=category,behaviour
Show groupBy=category,behaviour
{
"company": {
"id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
"legalId": "B12345678",
"currency": "EUR",
"payrollCycle": {
"id": "b2c3d4e5-f678-9012-a1b2-c3d4e5f67890",
"start": 1753939051,
"end": 1756616806,
"fiscalYear": "2025",
"payrollMonth": "08"
},
"employee": {
"employeeId": "c3d4e5f6-7890-1234-b2c3-d4e5f6789012",
"internalId": "1234",
"legalId": "51626739L",
"consumptions": [
{
"category": "meal-benefit",
"behaviour": "flex",
"amountInCents": 19801
},
{
"category": "transport-benefit",
"behaviour": "flex",
"amountInCents": 13636
},
{
"category": "nursery-benefit",
"behaviour": "flex",
"amountInCents": 24569
}
]
}
}
}
text/csv
Show csvFormat=lines
Show csvFormat=lines
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,category,behaviour,sumType,amountInCents
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,meal-benefit,flex,expenses,22000
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,meal-benefit,flex,withdrawn,2199
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,transport-benefit,flex,expenses,13636
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,nursery-benefit,flex,expenses,24569
Show csvFormat=lines & groupBy=category
Show csvFormat=lines & groupBy=category
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,category,amountInCents
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,meal-benefit,19801
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,transport-benefit,13636
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,nursery-benefit,24569
Show csvFormat=lines & groupBy=category,behaviour
Show csvFormat=lines & groupBy=category,behaviour
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,category,behaviour,amountInCents
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,meal-benefit,flex,19801
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,transport-benefit,flex,13636
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,nursery-benefit,flex,24569
Show csvFormat=columns
Show csvFormat=columns
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,meal-benefit_flex_expenses,meal-benefit_flex_withdrawn,transport-benefit_flex_expenses,nursery-benefit_flex_expenses
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,22000,2199,13636,24569
Show csvFormat=columns & groupBy=category
Show csvFormat=columns & groupBy=category
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,meal-benefit,transport-benefit,nursery-benefit
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,19801,13636,24569
Show csvFormat=columns & groupBy=category & categories=meal-benefit,transport-benefit,nursery-benefit
Show csvFormat=columns & groupBy=category & categories=meal-benefit,transport-benefit,nursery-benefit
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,meal-benefit,transport-benefit,nursery-benefit
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,19801,13636,0
Show csvFormat=columns & groupBy=category,behaviour
Show csvFormat=columns & groupBy=category,behaviour
company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employee.employeeId,employee.internalId,employee.legalId,meal-benefit_flex,transport-benefit_flex,nursery-benefit_flex
a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,08,c3d4e5f6-7890-1234-b2c3-d4e5f6789012,1234,51626739L,19801,13636,24569
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The response file type. It can be application/json or text/csv.
application/json, text/csv Path Parameters
The unique identifier of the company
The unique identifier of the employee
Query Parameters
The unique identifier of the payroll cycle. If not provided, the open payroll cycle will be used. This parameter is deprecated, use payroll instead.
The fiscal year and month (YYYY-MM) of the payroll cycle the consumptions belong to (e.g. 2025-03).
^[0-9]{4}-(0[1-9]|1[0-2])$"2025-03"
The format of the resulting consumptions request. Lines: as many lines as benefits for each employee, Columns: one line for each employee and as many columns as benefits
In columns format the columns are derived from the data, so a missing column means no consumption. When combined with groupBy=category and categories, every requested category is guaranteed to appear as a column.
lines, columns List of core benefit category slugs to include in the response. Custom benefit names cannot be used as filters. When requesting text/csv with csvFormat=columns and groupBy=category, every requested category is guaranteed to appear as a column, in the requested order, with 0 when there is no consumption.
Consumptions can be grouped to return data that is more similar to how your system works. The consumptions can be grouped by:
category: it will calculate the sum of expenses minus withdrawals for all the consumptions in a category,category,behaviour: sum of all expenses minus withdrawals for all the consumptions in category and behaviour.
Response
Employee consumptions successfully retrieved
Show child attributes
Show child attributes