Sanctions API
This page documents the 10 gateway endpoints tagged sanctions in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /sanctions/geofence | Read the sanctions geofence policy and its readiness |
| GET | /sanctions/screening/status | Read list freshness and the size of the review queue |
| POST | /sanctions/screening/refresh | Refresh the sanctions lists now and rescreen tenants |
| GET | /sanctions/cases | List sanctions review cases |
| GET | /sanctions/cases/{case_id} | Read one sanctions review case |
| POST | /sanctions/cases/{case_id}/clear | Clear a case: the candidates are not the customer |
| POST | /sanctions/cases/{case_id}/confirm | Confirm a case as a true match |
| GET | /sanctions/reports | List OFAC report tasks |
| POST | /sanctions/reports/{report_id}/filed | Record that counsel filed a report with OFAC |
| GET | /sanctions/events | Read the sanctions decision log |
Endpoints
GET /sanctions/geofence
Read the sanctions geofence policy and its readiness
The jurisdiction policy this gateway applies, whether the geofence is on, and the operator's overrides.
readiness says whether the geofence is enabled, which scope of the policy applies, the policy version, whether
counsel approved it and any configuration problem the gateway found. rules lists every rule with enforced
and in_scope, and overrides echoes the operator's allow and block settings, or is null while the geofence is
off. Proxy admins and admin viewers may read it on any gateway, with or without a license.
Example request:
curl -X GET "http://localhost:4000/sanctions/geofence" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The policy as this gateway applies it | application/json GeofenceStatus |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin or an admin viewer | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
readiness | GeofenceReadiness | Yes | |
block_unknown | boolean | Yes | Block Unknown |
approved_by | string or null | Yes | Approved By |
approved_on | string or null | Yes | Approved On |
notice | string or null | Yes | Notice |
rules | array of RuleView | Yes | Rules |
overrides | OverridesView or null | Yes |
GET /sanctions/screening/status
Read list freshness and the size of the review queue
Shows whether the sanctions lists the gateway screens customers against are fresh, which matcher and disposition versions are in force, how the gateway acts on a possible match or a missing list, and how many cases and report tasks are waiting. A proxy admin, an admin viewer or a role with sanctions.read may call it. Nothing is changed.
Example request:
curl -X GET "http://localhost:4000/sanctions/screening/status" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Freshness of the active lists, the versions in force and the open counts | application/json ScreeningStatusResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloud | application/json ErrorDetail |
| 404 | Spanway Cloud is not enabled on this gateway | application/json ErrorDetail |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
lists | ListFreshness | Yes | How fresh the active sanctions lists are |
matcher_version | string | Yes | The version of the name matching rules in force |
dispositions_version | string | Yes | The version of the program disposition table in force |
dispositions_approved | boolean | Yes | Whether counsel approved that disposition table |
on_possible_match_existing | string | Yes | What happens to an existing customer on a possible match |
on_list_unavailable | string | Yes | What the gateway does while no usable list is loaded |
open_cases | integer | Yes | How many review cases are waiting |
open_reports | integer | Yes | How many OFAC report tasks are waiting |
retention_years | integer | Yes | How many years sanctions records are kept |
retention_basis | string | Yes | The rule the retention period comes from |
retention_source_url | string | Yes | Where that rule is published |
settings_problem | string or null | No | Why general_settings.sanctions_screening was ignored, or null while it is valid |
POST /sanctions/screening/refresh
Refresh the sanctions lists now and rescreen tenants
Fetch, verify and activate the lists now, then rescreen every tenant against what changed. The reason is recorded in the decision log. A proxy admin or a role with sanctions.write may call it.
Request body (application/json, schema RefreshRequest):
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why the lists are refreshed now, kept in the decision log |
Example request:
curl -X POST "http://localhost:4000/sanctions/screening/refresh" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "OFAC published an update this morning."
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | refreshed with what changed, rejected with the verification failure, or skipped with the reason | application/json RefreshResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloud | application/json ErrorDetail |
| 404 | Spanway Cloud is not enabled on this gateway | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
outcome | string | Yes | refreshed, rejected or skipped |
published | string or null | No | The publication date of the lists now active |
rescreened | integer | No | How many customers were screened again |
changed_entries | integer | No | How many list entries changed since the previous lists |
reason | string or null | No | Why the refresh was rejected or skipped |
GET /sanctions/cases
List sanctions review cases
Lists the cases where a customer looked like a sanctions list entry and a person has to decide. Cases come high priority first and oldest first within a priority, filtered by status (open by default). A proxy admin, an admin viewer or a role with sanctions.read may call it. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | enum: "open", "cleared", "confirmed" or null | No | |
page | query | integer | No | |
page_size | query | integer | No |
Example request:
curl -X GET "http://localhost:4000/sanctions/cases" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Cases in the requested status, high priority first | application/json CasesResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloud | application/json ErrorDetail |
| 404 | Spanway Cloud is not enabled on this gateway | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
cases | array of Spanway_SanctionsCaseTable | Yes | The cases on this page, high priority first |
total | integer | Yes | How many rows match in all |
page | integer | Yes | The page number, counting from 1 |
page_size | integer | Yes | How many rows a page holds |
GET /sanctions/cases/{case_id}
Read one sanctions review case
Shows one review case with the customer details that were screened next to each candidate list entry, the tenant's current status, the disposition a confirmation would apply by default and the log events for that tenant. A proxy admin, an admin viewer or a role with sanctions.read may call it. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
case_id | path | string | Yes |
Example request:
curl -X GET "http://localhost:4000/sanctions/cases/case_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The case, the tenant's status and the events recorded for it | application/json CaseDetailResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloud | application/json ErrorDetail |
| 404 | No case with this id, or Spanway Cloud is not enabled | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
case | Spanway_SanctionsCaseTable | Yes | The review case |
tenant_status | string or null | Yes | The customer account's current status |
screening_status | string or null | Yes | The customer's current screening status |
default_disposition | enum: "block", "restrict", "informational" | Yes | The disposition a confirmation applies unless you choose another |
events | array of Spanway_SanctionsEventTable | Yes | The sanctions log events for this customer |
POST /sanctions/cases/{case_id}/clear
Clear a case: the candidates are not the customer
Record that the candidates are not the customer. The same list entries and customer details never raise a case again, while a changed entry or changed details do. The decision and reason go to the decision log. A proxy admin or a role with sanctions.write may call it.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
case_id | path | string | Yes |
Request body (application/json, schema ClearCaseRequest):
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why the candidates are not the customer, kept in the decision log |
Example request:
curl -X POST "http://localhost:4000/sanctions/cases/case_id-123/clear" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Different company: registered in Austin, candidate entry is a shipping firm in another country."
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The cleared case | application/json Spanway_SanctionsCaseTable |
| 400 | The reason holds only spaces | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloud | application/json ErrorDetail |
| 404 | No case with this id, or Spanway Cloud is not enabled | application/json ErrorDetail |
| 409 | The case was already decided | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
case_id | string | Yes | The id of the case |
subject_type | "tenant" | Yes | Always tenant |
subject_id | string | Yes | The customer account the case is about |
subject | SubjectSnapshot | Yes | The customer details that were screened |
subject_hash | string | Yes | A fingerprint of those details, so changed details raise a new case |
kind | enum: "name_match", "jurisdiction", "address_unclear" | Yes | name_match, jurisdiction or address_unclear |
priority | enum: "high", "low" | Yes | high or low |
list_digest | string or null | No | A fingerprint of the lists the case was raised against |
matcher_version | string or null | No | The version of the matching rules that raised it |
candidates | array of CaseCandidate | No | The list entries that may be the customer |
rule_id | string or null | No | The jurisdiction rule that raised the case |
status | enum: "open", "cleared", "confirmed" | Yes | open, cleared or confirmed |
disposition | enum: "block", "restrict", "informational" or null | No | What the confirmation applied |
decided_by | string or null | No | Who decided the case |
decision_reason | string or null | No | Why they decided that |
decided_at | string or null | No | When the case was decided |
created_at | string or null | No | When the case was raised |
POST /sanctions/cases/{case_id}/confirm
Confirm a case as a true match
Confirm the match. block freezes the account and its balance, cancels billing without proration or
refund and opens a 31 CFR 501.603 report task; restrict stops service; informational changes nothing.
The disposition defaults to the strongest the reviewed program data gives the candidates. The decision and
reason go to the decision log. A proxy admin or a role with sanctions.write may call it.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
case_id | path | string | Yes |
Request body (application/json, schema ConfirmCaseRequest):
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why the match is real, kept in the decision log |
disposition | enum: "block", "restrict", "informational" or null | No | block, restrict or informational, the default disposition when left out |
Example request:
curl -X POST "http://localhost:4000/sanctions/cases/case_id-123/confirm" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Name, country and year of birth all agree.",
"disposition": "block"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The confirmed case with the disposition applied | application/json Spanway_SanctionsCaseTable |
| 400 | The reason holds only spaces | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloud | application/json ErrorDetail |
| 404 | No case with this id, or Spanway Cloud is not enabled | application/json ErrorDetail |
| 409 | The case was already decided | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
case_id | string | Yes | The id of the case |
subject_type | "tenant" | Yes | Always tenant |
subject_id | string | Yes | The customer account the case is about |
subject | SubjectSnapshot | Yes | The customer details that were screened |
subject_hash | string | Yes | A fingerprint of those details, so changed details raise a new case |
kind | enum: "name_match", "jurisdiction", "address_unclear" | Yes | name_match, jurisdiction or address_unclear |
priority | enum: "high", "low" | Yes | high or low |
list_digest | string or null | No | A fingerprint of the lists the case was raised against |
matcher_version | string or null | No | The version of the matching rules that raised it |
candidates | array of CaseCandidate | No | The list entries that may be the customer |
rule_id | string or null | No | The jurisdiction rule that raised the case |
status | enum: "open", "cleared", "confirmed" | Yes | open, cleared or confirmed |
disposition | enum: "block", "restrict", "informational" or null | No | What the confirmation applied |
decided_by | string or null | No | Who decided the case |
decision_reason | string or null | No | Why they decided that |
decided_at | string or null | No | When the case was decided |
created_at | string or null | No | When the case was raised |
GET /sanctions/reports
List OFAC report tasks
Blocked property (31 CFR 501.603) and rejected transaction (31 CFR 501.604) report tasks, soonest due first, with the business days left before the ten business day deadline. A proxy admin, an admin viewer or a role with sanctions.read may call it. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | enum: "open", "filed" or null | No | |
page | query | integer | No | |
page_size | query | integer | No |
Example request:
curl -X GET "http://localhost:4000/sanctions/reports" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Report tasks in the requested status, soonest due first | application/json ReportsResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloud | application/json ErrorDetail |
| 404 | Spanway Cloud is not enabled on this gateway | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
reports | array of ReportView | Yes | The report tasks on this page, soonest due first |
total | integer | Yes | How many rows match in all |
page | integer | Yes | The page number, counting from 1 |
page_size | integer | Yes | How many rows a page holds |
POST /sanctions/reports/{report_id}/filed
Record that counsel filed a report with OFAC
Marks an open OFAC report task as filed once counsel has submitted it, and stores the filing reference OFAC gave back. The change is written to the sanctions decision log with the reviewer's name. A proxy admin or a role with sanctions.write may call it. Answers 409 when the report is already filed or does not exist.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
report_id | path | string | Yes |
Request body (application/json, schema FileReportRequest):
| Field | Type | Required | Description |
|---|---|---|---|
filing_reference | string | Yes | The reference OFAC gave the filed report |
Example request:
curl -X POST "http://localhost:4000/sanctions/reports/report_id-123/filed" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filing_reference": "OFAC-2026-0421"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The report task marked as filed, with who filed it and the filing reference | application/json ReportView |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloud | application/json ErrorDetail |
| 404 | Spanway Cloud is not enabled on this gateway | application/json ErrorDetail |
| 409 | The report is already filed or does not exist | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
report_id | string | Yes | The id of the report task |
case_id | string or null | No | The case that opened it |
subject_id | string | Yes | The customer account it is about |
kind | enum: "blocked_property", "rejected_transaction" | Yes | blocked_property or rejected_transaction |
details | object | Yes | What has to be reported |
amount_usd | number | Yes | The amount involved, in US dollars |
occurred_on | string | Yes | When the blocking or rejection happened |
due_on | string | Yes | When the report is due with OFAC |
status | enum: "open", "filed" | Yes | open or filed |
filed_by | string or null | No | Who recorded the filing |
filed_at | string or null | No | When the filing was recorded |
filing_reference | string or null | No | The reference OFAC gave the report |
created_at | string or null | No | When the task was opened |
business_days_left | integer | Yes | Business days left before the ten business day filing deadline |
GET /sanctions/events
Read the sanctions decision log
Reads the append-only sanctions log, newest first: blocks, refusals, new cases, decisions and list refreshes, optionally for one subject. A proxy admin, an admin viewer or a role with sanctions.read may call it. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
subject_id | query | string or null | No | |
page | query | integer | No | |
page_size | query | integer | No |
Example request:
curl -X GET "http://localhost:4000/sanctions/events" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Events newest first, optionally for one subject | application/json EventsResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloud | application/json ErrorDetail |
| 404 | Spanway Cloud is not enabled on this gateway | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | general_settings.cloud does not validate, or the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
events | array of Spanway_SanctionsEventTable | Yes | The log events on this page, newest first |
total | integer | Yes | How many rows match in all |
page | integer | Yes | The page number, counting from 1 |
page_size | integer | Yes | How many rows a page holds |