Ir al contenido

Restaurant - Attendance Record

AttendanceRecordController_registerAttendance

POST
/restaurant/attendance-record/register
curl --request POST \
--url https://api.inspow.tech/api/v1/restaurant/attendance-record/register \
--header 'Content-Type: application/json' \
--data '{ "userId": "60d0fe4f5311236168a109ca", "beneficiaryId": "60d0fe4f5311236168a109cb", "mealType": "LUNCH", "entryMethod": "MANUAL", "methodMeta": { "qrPayload": "user123_lunch_2024-09-28", "deviceId": "terminal_001" }, "requestId": "req_123456789", "serviceDate": "2025-10-04T12:30:00.000Z", "timezoneOffset": 300 }'
Media type application/json
object
userId

ID del usuario (pagador) - requerido si no se proporciona beneficiaryId

string
Example
60d0fe4f5311236168a109ca
beneficiaryId

ID del beneficiario - requerido si no se proporciona userId

string
Example
60d0fe4f5311236168a109cb
mealType
required

Tipo de servicio a registrar (dinámico según vertical del tenant). Restaurant: BREAKFAST, LUNCH, DINNER, SNACK, DESSERT. Gym: GYM_ACCESS, CLASS_SESSION, PERSONAL_TRAINING, SPA_ACCESS. Academy: COURSE_SESSION, WORKSHOP, TUTORING, CERTIFICATION. Coworking: DESK_ACCESS, MEETING_ROOM, EVENT_SPACE, LOCKER. Club: CLUB_ACCESS, FACILITY_BOOKING, EVENT_ATTENDANCE. Clinic: CONSULTATION, THERAPY_SESSION, CHECKUP, TREATMENT.

string
Example
LUNCH
entryMethod

Método de entrada

string
Allowed values: MANUAL QR BARCODE NFC FACE
Example
QR
methodMeta

Metadatos específicos del método de registro

object
Example
{
"qrPayload": "user123_lunch_2024-09-28",
"deviceId": "terminal_001"
}
requestId

ID de request para idempotencia

string
Example
req_123456789
serviceDate

Fecha del servicio (formato ISO 8601). Si no se proporciona, se usa la fecha actual del servidor.

string
Example
2025-10-04T12:30:00.000Z
timezoneOffset

Timezone offset del cliente en minutos (e.g., 300 para UTC-5, -60 para UTC+1). Usado para determinar el día local para validación de duplicados.

number
Example
300

Registra asistencia por userId o beneficiaryId + mealType

Media type application/json
object
subscription
required

The ID of the subscription this invoice covers.

string
mealType
required

Type of meal for this attendance record.

string
Allowed values: BREAKFAST LUNCH DINNER SNACK DESSERT
serviceDate
required

Date when the service was provided.

string format: date-time
entryMethod
required

Method of entry registration.

string
Allowed values: MANUAL QR BARCODE NFC FACE
methodMeta
required

Metadata specific to the entry method.

object
requestId
required

Unique request ID for idempotency.

string
createdAt
required

The timestamp when the attendance record was created.

string format: date-time
updatedAt
required

The timestamp when the attendance record was last updated.

string format: date-time
createdBy

The user who created the attendance record.

string
updatedBy

The user who last updated the attendance record.

string
Example
{
"subscription": "645cc3d3f8a9c9a2b88a22f1",
"mealType": "BREAKFAST",
"serviceDate": "2025-05-01T12:00:00.000Z",
"entryMethod": "MANUAL",
"methodMeta": {
"qrPayload": "subscription_123_meal_lunch_date_2024-08-24",
"deviceId": "scanner_001",
"locationId": "cafeteria_main",
"capturedAt": "2024-08-24T12:00:00.000Z"
},
"requestId": "req_lunch_2024-08-24_abc123",
"createdAt": "2024-08-24T12:00:00.000Z",
"updatedAt": "2024-08-24T12:05:00.000Z",
"createdBy": "645cc3d3f8a9c9a2b88a22c1",
"updatedBy": "645cc3d3f8a9c9a2b88a22c2"
}