curl --request GET \
--url https://pre-partners-api.cobee.io/api/v3/corporations/{corporationId}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/consumptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/corporations/{corporationId}/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{
"corporation": {
"id": "4a0425b0-e420-4fe4-9d05-783be0360993",
"alias": "Corp. Inc.",
"externalId": "12345",
"companies": [
{
"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"
},
"employees": [
{
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"behaviour": "allowance",
"category": "Wellness Bonus",
"sumType": "expenses",
"amountInCents": 1
}
]
}
]
}
]
}
}{
"message": "Unauthorized"
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}List corporation consumptions
curl --request GET \
--url https://pre-partners-api.cobee.io/api/v3/corporations/{corporationId}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/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-partners-api.cobee.io/api/v3/corporations/{corporationId}/consumptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/corporations/{corporationId}/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{
"corporation": {
"id": "4a0425b0-e420-4fe4-9d05-783be0360993",
"alias": "Corp. Inc.",
"externalId": "12345",
"companies": [
{
"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"
},
"employees": [
{
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"behaviour": "allowance",
"category": "Wellness Bonus",
"sumType": "expenses",
"amountInCents": 1
}
]
}
]
}
]
}
}{
"message": "Unauthorized"
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Overview
Retrieves all confirmed transactions of a specific corporation for a specific year and month.Important: The payload can be transformed depending onformat,categoriesandgroupBy. 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.
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 thepayroll(i.e.2025-08) query param belongs to a cycle that is not closed yet, then the propertypayrollCycle.endwill be the current date. Otherwise,payrollCycle.endwill correspond to the last day of the cycle.
Important: when an employee has migrated between companies of the same corporation, they may appear more than once in the response (once per company) under the sameExample responses based onlegalId. UsemergeEmployeesto consolidate those duplicates into a single employee with the summed consumptions:If not provided, duplicates are preserved as-is. Only applies to employees within the same corporation sharing the same
mergeEmployees=newestkeeps the employee with the largestcreatedAt(most recently created employee record).mergeEmployees=oldestkeeps the employee with the smallestcreatedAt(earliest created employee record).legalId.
csvFormat and categories:
Show Examples
Show Examples
application/json
Show default
Show default
{
"corporation": {
"id": "4a0425b0-e420-4fe4-9d05-783be0360993",
"alias": "Corp Inc.",
"externalId": "12345",
"companies": [{
"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"
},
"employees": [
{
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"behaviour": "flex",
"category": "meal-benefit",
"sumType": "expenses",
"amountInCents": 42001
},
{
"behaviour": "flex",
"category": "meal-benefit",
"sumType": "withdrawn",
"amountInCents": 2199
},
{
"behaviour": "flex-not-exempt",
"category": "meal-benefit",
"sumType": "expenses",
"amountInCents": 1599
},
{
"behaviour": "flex",
"category": "transport-benefit",
"sumType": "expenses",
"amountInCents": 13636
},
{
"behaviour": "flex",
"category": "nursery-benefit",
"sumType": "expenses",
"amountInCents": 77969
}
]
}
]
}]
}
}
Show with a custom benefit
Show with a custom benefit
{
"corporation": {
"id": "4a0425b0-e420-4fe4-9d05-783be0360993",
"alias": "Corp Inc.",
"externalId": "12345",
"companies": [{
"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"
},
"employees": [{
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"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
{
"corporation": {
"id": "4a0425b0-e420-4fe4-9d05-783be0360993",
"alias": "Corp Inc.",
"externalId": "12345",
"companies": [{
"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"
},
"employees": [
{
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"category": "meal-benefit",
"amountInCents": 45799
},
{
"category": "transport-benefit",
"amountInCents": 13636
},
{
"category": "nursery-benefit",
"amountInCents": 77969
}
]
}
]
}]
}
}
Show groupBy=category,behaviour
Show groupBy=category,behaviour
{
"corporation": {
"id": "4a0425b0-e420-4fe4-9d05-783be0360993",
"alias": "Corp Inc.",
"externalId": "12345",
"companies": [{
"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"
},
"employees": [
{
"employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
"internalId": "12345",
"legalId": "129387655X",
"consumptions": [
{
"category": "meal-benefit",
"behaviour": "flex",
"amountInCents": 42001
},
{
"category": "meal-benefit",
"behaviour": "flex-not-exempt",
"amountInCents": 1599
},
{
"category": "nursery-benefit",
"behaviour": "flex",
"amountInCents": 77969
},
{
"category": "transport-benefit",
"behaviour": "flex",
"amountInCents": 13636
}
]
}
]
}]
}
}
text/csv
Show csvFormat=lines
Show csvFormat=lines
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,category,behaviour,sumType,amount.amountInCents
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,flex,expenses,42001
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,flex,withdrawn,2199
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,flex-not-exempt,expenses,1599
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,transport-benefit,flex,expenses,13636
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,nursery-benefit,flex,expenses,77969
Show csvFormat=lines & groupBy=category
Show csvFormat=lines & groupBy=category
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,category,amount.amountInCents
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,45799
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,transport-benefit,13636
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,nursery-benefit,77969
Show csvFormat=lines & groupBy=category,behaviour
Show csvFormat=lines & groupBy=category,behaviour
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,category,behaviour,amount.amountInCents
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,flex,42001
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,flex-not-exempt,1599
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,nursery-benefit,flex,77969
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,transport-benefit,flex,13636
Show csvFormat=columns
Show csvFormat=columns
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,meal-benefit_flex_expenses,meal-benefit_flex_withdrawn,meal-benefit_flex-not-exempt_expenses,meal-benefit_flex-not-exempt_withdrawn,transport-benefit_flex_expenses,nursery-benefit_flex_expenses
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,42001,2199,1599,0,13636,77969
Show csvFormat=columns & groupBy=category
Show csvFormat=columns & groupBy=category
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,meal-benefit,transport-benefit,nursery-benefit
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,45799,13636,77969
Show csvFormat=columns & groupBy=category & categories=meal-benefit,transport-benefit,nursery-benefit
Show csvFormat=columns & groupBy=category & categories=meal-benefit,transport-benefit,nursery-benefit
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,meal-benefit,transport-benefit,nursery-benefit
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,45799,13636,0
Show csvFormat=columns & groupBy=category,behaviour
Show csvFormat=columns & groupBy=category,behaviour
corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,meal-benefit_flex,meal-benefit_flex-not-exempt,transport-benefit_flex,nursery-benefit_flex
4a0425b0-e420-4fe4-9d05-783be0360993,Corp
Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,b2c3d4e5-f678-9012-a1b2-c3d4e5f67890,1753939051,1756616806,2025,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,42001,1599,13636,77969
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 corporation
Query Parameters
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.
lines: as many lines as grouping benefits for each employeecolumns: one line for each employee and as many columns as grouping benefits Incolumnsformat the columns are derived from the data, so a missing column means no consumption. When combined withgroupBy=categoryandcategories, 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.
Merges consumptions of employees that appear in multiple companies of the corporation under the same legalId (e.g. after a migration between companies). Consumptions from duplicate employees are summed and assigned to a single "winner" employee; losing duplicates are dropped from the response.
newest: keep the employee with the largestcreatedAt(most recently created employee record).oldest: keep the employee with the smallestcreatedAt(earliest created employee record).
When not provided, no merging is performed and duplicate employees are preserved as-is.
newest, oldest Response
Corporation employee consumptions successfully retrieved
Show child attributes
Show child attributes