Hop til hovedindhold

Aktivitetslog

Hent aktivitetslog

GET /api/v1/kyc/cases/:id/audit-log

Hent den fulde audit trail — alle handlinger, ændringer og søgninger for en KYC-sag.

Scope: kyc:read

Path parametre

ParameterTypeBeskrivelse
idintegerKYC-sagens ID

Query parametre

ParameterTypeStandardBeskrivelse
actionstringFiltrer på handlingstype (ANSWER_SAVED, SANCTIONS_SEARCH, osv.)
pageinteger1Sidetal
page_sizeinteger25Resultater pr. side (1-100)

Response-felter

FeltTypeBeskrivelse
idintegerLog-ID
userstringBrugernavn
entity_typestringEnhedstype (kyc_case, kyc_answer, osv.)
actionstringHandling (ANSWER_SAVED, STATUS_CHANGED, osv.)
fieldstring | nullÆndret felt
old_valuestring | nullGammel værdi
new_valuestring | nullNy værdi
reasonstring | nullBegrundelse
timestampstringTidspunkt

Eksempel

# Alle logposter
curl "https://auditply.dk/api/v1/kyc/cases/42/audit-log" \
-H "X-API-Key: ap_live_..."

# Kun sanktionssøgninger
curl "https://auditply.dk/api/v1/kyc/cases/42/audit-log?action=SANCTIONS_SEARCH" \
-H "X-API-Key: ap_live_..."
Response — 200 OK
{
"data": [
{
"id": 501,
"user": "Martin Hansen",
"entity_type": "kyc_case",
"action": "STATUS_CHANGED",
"field": "status",
"old_value": "PENDING_REVIEW",
"new_value": "REVIEWED",
"reason": null,
"timestamp": "2025-03-10T09:15:00.000Z"
},
{
"id": 495,
"user": "Anna Jensen",
"entity_type": "kyc_answer",
"action": "ANSWER_SAVED",
"field": "value",
"old_value": null,
"new_value": "YES",
"reason": null,
"timestamp": "2025-02-10T11:30:00.000Z"
}
],
"pagination": {
"page": 1,
"page_size": 25,
"total_count": 47,
"total_pages": 2,
"has_more": true
},
"meta": {
"api_version": "v1",
"timestamp": "2026-04-13T12:00:00.000Z"
}
}