Home / Products / APIs / HTTP Attendance API
API

HTTP Attendance API

The single HTTPS ingress for any client that produces attendance. The HTTP Attendance API authenticates by device serial and token, then funnels each recognized punch into the same storage and customer-push pipeline as every native Cams engine.

Overview

A device-agnostic HTTPS front door for ingesting attendance punches, heartbeats, and subscription checks from any client.

The HTTP Attendance API is the device-agnostic front door on the path /api/attendance/v1/{op}. It authenticates each request by device serial (sn) and auth-token headers, then ingests. It exposes punch (one recognized attendance event), heartbeat (device presence), validity (subscription check), and config. Punches funnel into the shared pipeline, giving identical storage and downstream customer-server push as the native HTTP, TCP, and MQTT transports โ€” so integrations stay consistent regardless of how attendance arrives.

APIRESTHTTPSJSONC++
POST /api/attendance/v1/punch
curl https://api.camsunit.com/api/attendance/v1/punch \
  -H "sn: SN7A2300583" -H "auth-token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "user_id":"1001", "att_time":"2026-06-21 09:30:00",
        "att_state":1, "input_type":50 }'
# -> 200 {"ok":true}

Capabilities

What it does

Ingest a Punch

POST one recognized attendance event with user, timestamp, IN/OUT state, input type, and optional location.

Report Presence

Send a heartbeat to mark a device online without any body.

Check Validity

Query whether the device's attendance subscription is active before sending data.

Unified Pipeline

Every punch lands in the same storage and push path as native TCP and MQTT ingest.

Features

Everything included

  • Single HTTPS ingress for edge, app, web, and hybrid clients on /api/attendance/v1/{op}
  • Header-based auth: device serial (sn) plus auth-token, with subscription gating
  • punch endpoint ingests a recognized attendance event (user, time, IN/OUT, input type, optional geolocation)
  • heartbeat endpoint marks a device online for presence tracking
  • validity endpoint returns live subscription status before a client sends data
  • Shared pipeline: identical storage and customer-server push as the native engines
  • Consistent JSON error contract for missing serial, unknown device, invalid token, or inactive subscription
  • nginx-fronted with body-size caps and rate limiting

Build with HTTP Attendance API

Grab a key, read the docs, and ship. Our team helps with your first integration.

FAQ

Common questions

What does the HTTP Attendance API do?

It is the device-agnostic front door that accepts recognized attendance punches, heartbeats, and subscription checks, authenticates them by device serial and token, and feeds them into the shared Cams attendance pipeline.

How are requests authenticated?

Every request carries a device serial (sn) header and an auth-token header; both must be valid. Biometric endpoints additionally require an active attendance subscription.

Is attendance from HTTP treated the same as from devices?

Yes. Punches funnel into the same pipeline used by the native HTTP, TCP, and MQTT engines, so storage and downstream push are identical regardless of transport.

Related

Explore more of the platform