This guide explains how to obtain all consumptions for all employees for a closed payroll cycle (e.g., end of month). Steps:Documentation Index
Fetch the complete documentation index at: https://docs.partners.api.cobee.io/llms.txt
Use this file to discover all available pages before exploring further.
-
Get the list of employees:
- Use
GET /companies/{companyId}/employeesto retrieve all employees in the company.
- Use
-
Get consumptions for each employee:
- Iterate through the list of employees and use
GET /companies/{companyId}/employees/{employeeId}/consumptions?payroll=YYYY-MMto retrieve confirmed consumptions for the desired payroll cycle (Format:YYYY-MM).
- Iterate through the list of employees and use
Key Points
- If the
payrollparameter is not provided, the API works with the ongoing cycle.