Find employee consumptions for a specific payroll cycle
curl --request GET \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/payroll-cycles/{payrollCycleId}/employees/{employeeId}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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{
"consumptions": [
{
"behaviour": "allowance",
"category": "meal-benefit",
"sumType": "expenses",
"amount": {
"amountInCents": 4500000,
"currency": "EUR"
}
}
]
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Consumption Reports
[Deprecated] - List employee consumptions
deprecated
GET
/
companies
/
{companyId}
/
payroll-cycles
/
{payrollCycleId}
/
employees
/
{employeeId}
/
consumptions
Find employee consumptions for a specific payroll cycle
curl --request GET \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/payroll-cycles/{payrollCycleId}/employees/{employeeId}/consumptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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}/payroll-cycles/{payrollCycleId}/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{
"consumptions": [
{
"behaviour": "allowance",
"category": "meal-benefit",
"sumType": "expenses",
"amount": {
"amountInCents": 4500000,
"currency": "EUR"
}
}
]
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}Deprecated Endpoint
This endpoint is deprecated. Please use the new endpoint List Employee Consumptions instead.
This endpoint is deprecated. Please use the new endpoint List Employee Consumptions instead.
Overview
Retrieves all confirmed transactions of a specific employee for a specific payroll cycle.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the company
The unique identifier of the payroll cycle
The unique identifier of the employee
Response
Employee consumptions successfully retrieved
List of employee consumptions
Show child attributes
Show child attributes
⌘I