> 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/punch-logs-api.md).

# Punch Logs API

Retrieve attendance punch logs for a selected date range and employee.

Use the Punch Logs API to retrieve attendance punch records.

## Overview

* Base URL: `https://api.in.we360.ai`
* Path: `/query/attendance/logs`
* 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](https://docs.we360.ai/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
{
  "start_date": "2026-08-12T00:00:00.474505",
  "end_date": "2026-08-12T23:59:59.474505",
  "group_id": "",
  "user_id": "5afe8449-33b7-4ab4-a344-585da2c37238",
  "page": 1,
  "limit": 0,
  "datewise": false,
  "summary": false,
  "cat_name": "",
  "app": "",
  "url": "",
  "report": false,
  "type": "",
  "attendance_type": "all",
  "name": "",
  "sort_by": "",
  "desc": false,
  "type_name": "",
  "policy_wise": false,
  "return_all": false,
  "report_group_by": "userwise",
  "shift_filter": "none",
  "source": "aggregate"
}
```

### Parameters

| Parameter         | Description                                                  |
| ----------------- | ------------------------------------------------------------ |
| `start_date`      | Start of the ISO datetime range.                             |
| `end_date`        | End of the ISO datetime range.                               |
| `user_id`         | User UUID to filter. Leave empty to include all users.       |
| `group_id`        | Group UUID to filter. Leave empty to include all groups.     |
| `page`            | Page number. Use `1` for the first page.                     |
| `limit`           | Records per page. Use `0` to request all records.            |
| `attendance_type` | Attendance filter. Use `all` for every attendance type.      |
| `datewise`        | Set `true` to group results by date.                         |
| `summary`         | Set `true` to request summary results.                       |
| `sort_by`         | Field used for sorting. Leave empty for the default order.   |
| `desc`            | Set `true` for descending order.                             |
| `report_group_by` | Result grouping. Use `userwise` for user-level results.      |
| `shift_filter`    | Shift filter. Use `none` to avoid shift filtering.           |
| `source`          | Data source. Use `aggregate` for aggregated attendance data. |

## cURL example

```bash
curl -X POST "https://api.in.we360.ai/query/attendance/logs" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${access_token}" \
  -H "X-Route-To: internal" \
  -d '{
    "start_date": "2026-08-12T00:00:00.474505",
    "end_date": "2026-08-12T23:59:59.474505",
    "group_id": "",
    "user_id": "5afe8449-33b7-4ab4-a344-585da2c37238",
    "page": 1,
    "limit": 0,
    "datewise": false,
    "summary": false,
    "cat_name": "",
    "app": "",
    "url": "",
    "report": false,
    "type": "",
    "attendance_type": "all",
    "name": "",
    "sort_by": "",
    "desc": false,
    "type_name": "",
    "policy_wise": false,
    "return_all": false,
    "report_group_by": "userwise",
    "shift_filter": "none",
    "source": "aggregate"
  }'
```

## Request guidance

* Set `start_date` and `end_date` to the required reporting period.
* Supply a user or group UUID to narrow the results.
* Use pagination for larger result sets.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
