> For the complete documentation index, see [llms.txt](https://docs.we360.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.we360.ai/deployment-and-it-ops/integrations-and-api-access/integrations/oauth-for-direct-api-access/derived-punches-api.md).

# Derived Punches API

Retrieve derived attendance punches for stealth-mode users and groups.

Use the Derived Punches API to retrieve calculated punch records for a date.

## Overview

* Base URL: `https://api.in.we360.ai`
* Path: `/query/external/stealth/derived_punches`
* Method: `POST`
* Response type: `application/json`

## Authentication

Send this header with every request:

* `Authorization: Bearer ${access_token}`

Get the token from [OAuth for Direct API Access](/deployment-and-it-ops/integrations-and-api-access/integrations/oauth-for-direct-api-access.md).

{% hint style="warning" %}
Do not store access tokens in source code or documentation. Use a secret manager or environment variable.
{% endhint %}

## Request body

```json
{
  "date": "2026-08-20",
  "buffer_seconds": 30,
  "user_id": "",
  "group_id": "",
  "page": 1,
  "limit": 100
}
```

### Parameters

| Parameter        | Required | Description                                                        |
| ---------------- | -------- | ------------------------------------------------------------------ |
| `date`           | Yes      | Date to retrieve, in `YYYY-MM-DD` format.                          |
| `buffer_seconds` | No       | Additional buffer in seconds. Default is `30`; maximum is `3600`.  |
| `user_id`        | No       | Comma-separated user UUIDs to filter. Leave empty for all users.   |
| `group_id`       | No       | Comma-separated group UUIDs to filter. Leave empty for all groups. |
| `page`           | No       | Page number. Default is `1`.                                       |
| `limit`          | No       | Records per page. Default is `100`; maximum is `1000`.             |

## cURL example

```bash
curl -s "https://api.in.we360.ai/query/external/stealth/derived_punches" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${access_token}" \
  --data-raw '{
    "date": "2026-08-20",
    "buffer_seconds": 30,
    "user_id": "",
    "group_id": "",
    "page": 1,
    "limit": 100
  }' | jq
```

## Response format

```json
{
  "data": [
    {
      "identity_id": "fd560efb-98d5-43e1-83f1-19b8ea94d801",
      "employee_id": null,
      "email": "1fe7ef2362b154a6228edbda57c2bbd5@tfez-poeh-fyon.we360.local",
      "date": "2026-08-20",
      "punches": [
        {
          "punch_in": "2026-08-20T00:01:44",
          "punch_out": "2026-08-20T00:46:45",
          "span_seconds": 2701,
          "active_seconds": 2532,
          "idle_seconds": 168,
          "event_count": 9
        },
        {
          "punch_in": "2026-08-20T00:51:45",
          "punch_out": "2026-08-20T04:10:08",
          "span_seconds": 11903,
          "active_seconds": 3857,
          "idle_seconds": 8039,
          "event_count": 40
        },
        {
          "punch_in": "2026-08-20T20:33:14",
          "punch_out": "2026-08-20T23:18:21",
          "span_seconds": 9907,
          "active_seconds": 6016,
          "idle_seconds": 3883,
          "event_count": 33
        },
        {
          "punch_in": "2026-08-20T23:23:21",
          "punch_out": "2026-08-20T23:59:59",
          "span_seconds": 2198,
          "active_seconds": 190,
          "idle_seconds": 2007,
          "event_count": 8
        }
      ],
      "punch_count": 4,
      "total_active_seconds": 12595,
      "total_span_seconds": 26709,
      "first_punch": {
        "punch_in_at": "2026-08-20T00:01:29",
        "ip": "245.94.60.56",
        "location_id": "00000000-0000-0000-0000-000000000001",
        "location_name": null,
        "location_label": null,
        "country_code": null,
        "country_name": null,
        "latitude": null,
        "longitude": null
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 100,
    "total_records": 1,
    "total_pages": 1,
    "has_next": false,
    "has_previous": false
  },
  "meta": {
    "date": "2026-08-20",
    "buffer_seconds": 15
  }
}
```

## Request guidance

* Provide comma-separated UUIDs in `user_id` or `group_id` to narrow results.
* Increase `page` to retrieve subsequent results.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.we360.ai/deployment-and-it-ops/integrations-and-api-access/integrations/oauth-for-direct-api-access/derived-punches-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
