체크인 저장
체크인 레코드를 생성합니다. API는 회원, 시설, 타임스탬프를 기준으로 중복을 자동으로 제거합니다.
매개변수
-
check_ins
array필수저장할 체크인 객체의 배열입니다. 최적의 성능을 위해 요청당 최대 1000개 항목을 권장합니다. API는 처리를 위해 항목을 자동으로 배치로 묶습니다. 각 항목에는
facility_id(linking_identifier를 사용하지 않는 경우 필수) 또는linking_identifier(facility_id를 사용하지 않는 경우 필수)가 포함되어야 합니다.
반환값
동기화 작업을 확인하는 간단한 메시지를 반환합니다.
요청
curl -X POST https://partner-api.performancehub.co/partner/v1/check-ins \
-u sk_live_YOUR_PARTNER_SECRET_KEY: \
-H "Content-Type: application/json" \
-d '{
"check_ins": [
{
// "check_in_id": "checkin_abc123", // Optional - auto-generated from member_id + timestamp if not provided
"member_id": "mem_12345",
"facility_id": "550e8400-e29b-41d4-a716-446655440000",
// "linking_identifier": "branch_downtown", // If using linking identifier
"check_in_type": "member",
"source": "rfid",
"timestamp": "2025-01-20T08:45:30Z"
}
]
}'
응답
동기화 작업에 대한 메타데이터와 함께 성공 메시지를 반환합니다.
{
"message": "Check-in sync successful.",
"metadata": {
"success": 523,
"skipped": 3,
"skipped_items": [
{
"member_id": "member_789",
"facility_id": null,
"reason": "No matching facility_id for the linking_identifier"
}
]
}
}
메타데이터 필드:
- success - 성공적으로 처리된 체크인 수
- skipped - 건너뛴 체크인 수(있는 경우)
- skipped_items - 건너뛴 체크인과 그 사유의 배열(있는 경우)
- dry-run - dryrun 키 유형을 사용하는 경우의 부울 플래그(해당하는 경우)