cURL
curl --request PATCH --fail-with-body --max-time 30 \
"${AMLOK_API_BASE_URL}/v1/borrowers/record_synthetic" \
--header "Authorization: Bearer ${AMLOK_API_KEY}" \
--header 'Accept: application/json' \
--header 'If-Match: "1"' \
--header 'Content-Type: application/json' \
--data '{"lifecycle_status":"archived"}'import os
import requests
headers = {'Accept': 'application/json', 'If-Match': '"1"', 'Content-Type': 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["AMLOK_API_KEY"]
response = requests.request('PATCH', os.environ["AMLOK_API_BASE_URL"] + '/v1/borrowers/record_synthetic', headers=headers, json={'lifecycle_status': 'archived'}, timeout=30, allow_redirects=False)
response.raise_for_status()
print(response.json())
const headers = {"Accept": "application/json", "If-Match": "\"1\"", "Content-Type": "application/json"};
headers.Authorization = `Bearer ${process.env.AMLOK_API_KEY}`;
const response = await fetch(process.env.AMLOK_API_BASE_URL + "/v1/borrowers/record_synthetic", {
method: "PATCH", headers, redirect: "error", signal: AbortSignal.timeout(30000),
body: JSON.stringify({"lifecycle_status": "archived"})
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
{
"data": {
"id": "bor_synthetic",
"type": "business",
"subject_id": "biz_synthetic",
"created_at": "2026-11-06T12:00:00Z",
"client_reference": "LOS-B-0042",
"profile": {
"type": "business",
"business": {
"legal_name": "Synthetic Borrower Inc.",
"incorporation_country": "CA",
"client_reference": "LOS-B-0042"
}
},
"lifecycle_status": "archived",
"archived_at": "2026-11-06T12:00:00Z",
"updated_at": "2026-11-06T12:00:00Z",
"record_version": 2,
"profile_version": 1
},
"meta": {
"request_id": "req_synthetic",
"schema_version": "1.0.0",
"environment": "sandbox"
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unauthenticated",
"message": "Unauthenticated.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "forbidden",
"message": "Forbidden.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "not_found",
"message": "Not found.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "invalid_state",
"message": "Invalid state.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "cursor_expired",
"message": "Cursor expired.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "precondition_failed",
"message": "Precondition failed.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "payload_too_large",
"message": "payload too large",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unsupported_media_type",
"message": "unsupported media type",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limited.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "temporarily_unavailable",
"message": "Temporarily unavailable.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}Borrowers
Update borrower
Update borrower.
PATCH
/
v1
/
borrowers
/
{id}
cURL
curl --request PATCH --fail-with-body --max-time 30 \
"${AMLOK_API_BASE_URL}/v1/borrowers/record_synthetic" \
--header "Authorization: Bearer ${AMLOK_API_KEY}" \
--header 'Accept: application/json' \
--header 'If-Match: "1"' \
--header 'Content-Type: application/json' \
--data '{"lifecycle_status":"archived"}'import os
import requests
headers = {'Accept': 'application/json', 'If-Match': '"1"', 'Content-Type': 'application/json'}
headers["Authorization"] = "Bearer " + os.environ["AMLOK_API_KEY"]
response = requests.request('PATCH', os.environ["AMLOK_API_BASE_URL"] + '/v1/borrowers/record_synthetic', headers=headers, json={'lifecycle_status': 'archived'}, timeout=30, allow_redirects=False)
response.raise_for_status()
print(response.json())
const headers = {"Accept": "application/json", "If-Match": "\"1\"", "Content-Type": "application/json"};
headers.Authorization = `Bearer ${process.env.AMLOK_API_KEY}`;
const response = await fetch(process.env.AMLOK_API_BASE_URL + "/v1/borrowers/record_synthetic", {
method: "PATCH", headers, redirect: "error", signal: AbortSignal.timeout(30000),
body: JSON.stringify({"lifecycle_status": "archived"})
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
{
"data": {
"id": "bor_synthetic",
"type": "business",
"subject_id": "biz_synthetic",
"created_at": "2026-11-06T12:00:00Z",
"client_reference": "LOS-B-0042",
"profile": {
"type": "business",
"business": {
"legal_name": "Synthetic Borrower Inc.",
"incorporation_country": "CA",
"client_reference": "LOS-B-0042"
}
},
"lifecycle_status": "archived",
"archived_at": "2026-11-06T12:00:00Z",
"updated_at": "2026-11-06T12:00:00Z",
"record_version": 2,
"profile_version": 1
},
"meta": {
"request_id": "req_synthetic",
"schema_version": "1.0.0",
"environment": "sandbox"
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unauthenticated",
"message": "Unauthenticated.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "forbidden",
"message": "Forbidden.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "not_found",
"message": "Not found.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "invalid_state",
"message": "Invalid state.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "cursor_expired",
"message": "Cursor expired.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "precondition_failed",
"message": "Precondition failed.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "payload_too_large",
"message": "payload too large",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "unsupported_media_type",
"message": "unsupported media type",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "validation_error",
"message": "Validation error.",
"retryable": false,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limited.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}{
"error": {
"code": "temporarily_unavailable",
"message": "Temporarily unavailable.",
"retryable": true,
"request_id": "req_synthetic",
"field": null
}
}Update current identity or archive/restore a borrower with its ETag. Archive requires every associated origination to be terminal and every associated monitor to be stopped. Historical results and evidence remain immutable; archival does not revoke consent or delete records. No automatic deletion/retention period is implied. New intake is rejected until restored. Required scope: borrowers:write. Archiving cancels outstanding Hub sessions and fences pending source ingestion; restoration requires a fresh Hub session and explicit product resumption. PATCH uses ETag concurrency, not a command-replay receipt.
Examples use synthetic IDs. Replace them with values returned by your environment.
Operation name
updateBorrower
The X-Amlok-Operation-Id response header identifies this endpoint. Request receipts apply to accepted POST commands.Authorizations
Headers
Body
application/json