cURL
curl --request PATCH --fail-with-body --max-time 30 \
"${AMLOK_API_BASE_URL}/v1/originations/record_synthetic" \
--header "Authorization: Bearer ${AMLOK_API_KEY}" \
--header 'Accept: application/json' \
--header 'If-Match: "1"' \
--header 'Content-Type: application/json' \
--data '{"status":"cancelled"}'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/originations/record_synthetic', headers=headers, json={'status': 'cancelled'}, 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/originations/record_synthetic", {
method: "PATCH", headers, redirect: "error", signal: AbortSignal.timeout(30000),
body: JSON.stringify({"status": "cancelled"})
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
{
"data": {
"id": "orgn_synthetic",
"borrower_id": "bor_synthetic",
"institution_reference": "LOS-2026-0042",
"status": "cancelled",
"created_at": "2026-11-06T12:00:00Z",
"updated_at": "2026-11-06T12:00:00Z",
"requirements": [],
"risk_package_id": null,
"failure": null,
"record_version": 2,
"submitted_request": {
"borrower_id": "bor_synthetic",
"application": {
"institution_reference": "LOS-2026-0042",
"requested_amount": {
"amount": "50000.00",
"currency": "CAD"
},
"requested_term_months": 12,
"purpose": "Working capital",
"application_schema_id": "app_schema_synthetic",
"declared_data": {
"annual_revenue": "600000.00"
}
},
"lending_product_version_id": "lpv_synthetic",
"risk_policy_version_id": "rpv_synthetic",
"connection_ids": [
"con_synthetic"
],
"document_ids": []
},
"document_ids": [],
"connection_ids": [
"con_synthetic"
],
"borrower_snapshot": {
"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": "active",
"archived_at": null,
"updated_at": "2026-11-06T12:00:00Z",
"record_version": 1,
"profile_version": 1
},
"borrower_profile_version": 1,
"participants": [],
"attempt_number": 1,
"supersedes_origination_id": null
},
"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
}
}Insights
Cancel origination
Cancel origination.
PATCH
/
v1
/
originations
/
{id}
cURL
curl --request PATCH --fail-with-body --max-time 30 \
"${AMLOK_API_BASE_URL}/v1/originations/record_synthetic" \
--header "Authorization: Bearer ${AMLOK_API_KEY}" \
--header 'Accept: application/json' \
--header 'If-Match: "1"' \
--header 'Content-Type: application/json' \
--data '{"status":"cancelled"}'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/originations/record_synthetic', headers=headers, json={'status': 'cancelled'}, 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/originations/record_synthetic", {
method: "PATCH", headers, redirect: "error", signal: AbortSignal.timeout(30000),
body: JSON.stringify({"status": "cancelled"})
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());
{
"data": {
"id": "orgn_synthetic",
"borrower_id": "bor_synthetic",
"institution_reference": "LOS-2026-0042",
"status": "cancelled",
"created_at": "2026-11-06T12:00:00Z",
"updated_at": "2026-11-06T12:00:00Z",
"requirements": [],
"risk_package_id": null,
"failure": null,
"record_version": 2,
"submitted_request": {
"borrower_id": "bor_synthetic",
"application": {
"institution_reference": "LOS-2026-0042",
"requested_amount": {
"amount": "50000.00",
"currency": "CAD"
},
"requested_term_months": 12,
"purpose": "Working capital",
"application_schema_id": "app_schema_synthetic",
"declared_data": {
"annual_revenue": "600000.00"
}
},
"lending_product_version_id": "lpv_synthetic",
"risk_policy_version_id": "rpv_synthetic",
"connection_ids": [
"con_synthetic"
],
"document_ids": []
},
"document_ids": [],
"connection_ids": [
"con_synthetic"
],
"borrower_snapshot": {
"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": "active",
"archived_at": null,
"updated_at": "2026-11-06T12:00:00Z",
"record_version": 1,
"profile_version": 1
},
"borrower_profile_version": 1,
"participants": [],
"attempt_number": 1,
"supersedes_origination_id": null
},
"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
}
}Cancel an unfinished origination with its current ETag. Cancelling invalidates queued work; completed and failed results cannot be changed. A new assessment uses supersedes_origination_id and the same stable application reference. Historical results/charges are preserved; unfinished cancelled work creates no assessment charge. Required scope: insights:write.
Examples use synthetic IDs. Replace them with values returned by your environment.
Operation name
updateOrigination
The X-Amlok-Operation-Id response header identifies this endpoint. Request receipts apply to accepted POST commands.Authorizations
Headers
Body
application/json