> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.crehana.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.crehana.com/_mcp/server.

# Get Attendance Marks Consolidated Report

GET https://www.crehana.com/api/v5/rest/org/{organization_slug}/reports/attendance/marks-consolidated/

Consolidated marks: one row per employee with the totals of the period.

Same values as the "Consolidado de marcas por colaborador" Excel report, with
durations in minutes. The date range is required and bounded.

Reference: https://developer.crehana.com/api-reference/endpoints/reports/get-attendance-marks-consolidated-report

## Authentication

- `Api-Key` header (required) — API key of the organization. Always sent together with the `Secret-Access` header.

## Servers

- `https://www.crehana.com` (Production, default)
- `https://qa.creha.co` (QA)

## Request

### Path parameters

- `organization_slug` (string, required)

### Query parameters

- `from_date` (string, required) — Required, in YYYY-MM-DD format. Inclusive. The window between `from_date` and `to_date` cannot exceed 31 days. Applies to the date of the workday, the same period the consolidated marks Excel report asks for.
- `to_date` (string, required) — Required, in YYYY-MM-DD format. Inclusive. The window between `from_date` and `to_date` cannot exceed 31 days. Applies to the date of the workday, the same period the consolidated marks Excel report asks for.
- `centralized_user_id` (integer, optional) — **Centralized** id of the employee to filter by. Note: this is not the learning `user_id` used by the `/reports/learning/…` reports — for the same person they are different numbers.
- `limit` (integer, optional, default: 100) — Rows per page, up to 500. Defaults to 100 when omitted.
- `cursor` (string, optional) — Cursor for the next page. Take it from `next_cursor` in the previous response and send it back unchanged; it is opaque. Omit it for the first page.

## Response

### 200

Successful Response

- `results` (list of AttendanceMarksConsolidatedReport, required)
- `total` (integer, optional)
- `next_cursor` (string, optional)
- `has_next_page` (boolean, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, required)
- `errors` (list of string, required)
- `datetime` (string, optional)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### AttendanceMarksConsolidatedReport

Consolidated marks. One row per employee with the totals of the period. Same values as the "Consolidado de marcas por colaborador" Excel report, with durations in minutes instead of `[hh]:mm`.

- `user_name` (string, optional)
- `username` (string, optional)
- `user_email` (string, optional)
- `user_document` (string, optional)
- `user_area_level_1` (string, optional) — Area of the employee at level 1 of the organization structure. Each organization names its levels (for example Dirección, Oficina, Suboficina).
- `user_area_level_2` (string, optional) — Area of the employee at level 2.
- `user_area_level_3` (string, optional) — Area of the employee at level 3.
- `user_area_level_4` (string, optional) — Area of the employee at level 4.
- `user_headquarter` (string, optional)
- `days_with_records` (integer, optional) — Days attended plus days with incidents.
- `days_attended` (integer, optional)
- `days_with_incidents` (integer, optional)
- `effective_worked_minutes` (integer, optional)
- `ordinary_day_minutes` (integer, optional) — Ordinary daytime minutes. `null` when a day of the period has ordinary time without the day/night split.
- `ordinary_night_minutes` (integer, optional) — Ordinary night minutes. `null` when a day of the period has ordinary time without the day/night split.
- `sunday_worked_minutes` (integer, optional)
- `days_worked_on_sunday` (integer, optional)
- `holiday_worked_minutes` (integer, optional)
- `days_worked_on_holidays` (integer, optional)
- `overtime_day_minutes` (integer, optional)
- `overtime_night_minutes` (integer, optional)
- `overtime_sunday_day_minutes` (integer, optional)
- `overtime_holiday_day_minutes` (integer, optional)
- `overtime_sunday_night_minutes` (integer, optional)
- `overtime_holiday_night_minutes` (integer, optional)
- `overtime_total_minutes` (integer, optional) — Sum of the six overtime fields; `null` when all of them are.
- `excess_time_total_minutes` (integer, optional)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "results": [
    {
      "user_name": "string",
      "username": "string",
      "user_email": "string",
      "user_document": "string",
      "user_area_level_1": "string",
      "user_area_level_2": "string",
      "user_area_level_3": "string",
      "user_area_level_4": "string",
      "user_headquarter": "string",
      "days_with_records": 1,
      "days_attended": 1,
      "days_with_incidents": 1,
      "effective_worked_minutes": 1,
      "ordinary_day_minutes": 1,
      "ordinary_night_minutes": 1,
      "sunday_worked_minutes": 1,
      "days_worked_on_sunday": 1,
      "holiday_worked_minutes": 1,
      "days_worked_on_holidays": 1,
      "overtime_day_minutes": 1,
      "overtime_night_minutes": 1,
      "overtime_sunday_day_minutes": 1,
      "overtime_holiday_day_minutes": 1,
      "overtime_sunday_night_minutes": 1,
      "overtime_holiday_night_minutes": 1,
      "overtime_total_minutes": 1,
      "excess_time_total_minutes": 1
    }
  ],
  "total": 1,
  "next_cursor": "string",
  "has_next_page": true
}
```

**SDK Code**

```python
import requests

url = "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/"

querystring = {"from_date":"from_date","to_date":"to_date"}

headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date';
const options = {
  method: 'GET',
  headers: {'Secret-Access': 'Secret-Access', 'Api-Key': '<apiKey>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Secret-Access"] = 'Secret-Access'
request["Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date', [
  'headers' => [
    'Api-Key' => '<apiKey>',
    'Secret-Access' => 'Secret-Access',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date");
var request = new RestRequest(Method.GET);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/attendance/marks-consolidated/?from_date=from_date&to_date=to_date")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```