Skip to main content

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.

MethodPathSummary
GET/sanctions/geofenceRead the sanctions geofence policy and its readiness
GET/sanctions/screening/statusRead list freshness and the size of the review queue
POST/sanctions/screening/refreshRefresh the sanctions lists now and rescreen tenants
GET/sanctions/casesList sanctions review cases
GET/sanctions/cases/{case_id}Read one sanctions review case
POST/sanctions/cases/{case_id}/clearClear a case: the candidates are not the customer
POST/sanctions/cases/{case_id}/confirmConfirm a case as a true match
GET/sanctions/reportsList OFAC report tasks
POST/sanctions/reports/{report_id}/filedRecord that counsel filed a report with OFAC
GET/sanctions/eventsRead 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.

Docs

Example request:

curl -X GET "http://localhost:4000/sanctions/geofence" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The policy as this gateway applies itapplication/json GeofenceStatus
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin or an admin viewerapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
readinessGeofenceReadinessYes
block_unknownbooleanYesBlock Unknown
approved_bystring or nullYesApproved By
approved_onstring or nullYesApproved On
noticestring or nullYesNotice
rulesarray of RuleViewYesRules
overridesOverridesView or nullYes

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:

StatusDescriptionBody
200Freshness of the active lists, the versions in force and the open countsapplication/json ScreeningStatusResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloudapplication/json ErrorDetail
404Spanway Cloud is not enabled on this gatewayapplication/json ErrorDetail
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
listsListFreshnessYesHow fresh the active sanctions lists are
matcher_versionstringYesThe version of the name matching rules in force
dispositions_versionstringYesThe version of the program disposition table in force
dispositions_approvedbooleanYesWhether counsel approved that disposition table
on_possible_match_existingstringYesWhat happens to an existing customer on a possible match
on_list_unavailablestringYesWhat the gateway does while no usable list is loaded
open_casesintegerYesHow many review cases are waiting
open_reportsintegerYesHow many OFAC report tasks are waiting
retention_yearsintegerYesHow many years sanctions records are kept
retention_basisstringYesThe rule the retention period comes from
retention_source_urlstringYesWhere that rule is published
settings_problemstring or nullNoWhy 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):

FieldTypeRequiredDescription
reasonstringYesWhy 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:

StatusDescriptionBody
200refreshed with what changed, rejected with the verification failure, or skipped with the reasonapplication/json RefreshResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloudapplication/json ErrorDetail
404Spanway Cloud is not enabled on this gatewayapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
outcomestringYesrefreshed, rejected or skipped
publishedstring or nullNoThe publication date of the lists now active
rescreenedintegerNoHow many customers were screened again
changed_entriesintegerNoHow many list entries changed since the previous lists
reasonstring or nullNoWhy 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:

NameInTypeRequiredDescription
statusqueryenum: "open", "cleared", "confirmed" or nullNo
pagequeryintegerNo
page_sizequeryintegerNo

Example request:

curl -X GET "http://localhost:4000/sanctions/cases" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Cases in the requested status, high priority firstapplication/json CasesResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloudapplication/json ErrorDetail
404Spanway Cloud is not enabled on this gatewayapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
casesarray of Spanway_SanctionsCaseTableYesThe cases on this page, high priority first
totalintegerYesHow many rows match in all
pageintegerYesThe page number, counting from 1
page_sizeintegerYesHow 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:

NameInTypeRequiredDescription
case_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/sanctions/cases/case_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The case, the tenant's status and the events recorded for itapplication/json CaseDetailResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloudapplication/json ErrorDetail
404No case with this id, or Spanway Cloud is not enabledapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
caseSpanway_SanctionsCaseTableYesThe review case
tenant_statusstring or nullYesThe customer account's current status
screening_statusstring or nullYesThe customer's current screening status
default_dispositionenum: "block", "restrict", "informational"YesThe disposition a confirmation applies unless you choose another
eventsarray of Spanway_SanctionsEventTableYesThe 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:

NameInTypeRequiredDescription
case_idpathstringYes

Request body (application/json, schema ClearCaseRequest):

FieldTypeRequiredDescription
reasonstringYesWhy 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:

StatusDescriptionBody
200The cleared caseapplication/json Spanway_SanctionsCaseTable
400The reason holds only spacesapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloudapplication/json ErrorDetail
404No case with this id, or Spanway Cloud is not enabledapplication/json ErrorDetail
409The case was already decidedapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
case_idstringYesThe id of the case
subject_type"tenant"YesAlways tenant
subject_idstringYesThe customer account the case is about
subjectSubjectSnapshotYesThe customer details that were screened
subject_hashstringYesA fingerprint of those details, so changed details raise a new case
kindenum: "name_match", "jurisdiction", "address_unclear"Yesname_match, jurisdiction or address_unclear
priorityenum: "high", "low"Yeshigh or low
list_digeststring or nullNoA fingerprint of the lists the case was raised against
matcher_versionstring or nullNoThe version of the matching rules that raised it
candidatesarray of CaseCandidateNoThe list entries that may be the customer
rule_idstring or nullNoThe jurisdiction rule that raised the case
statusenum: "open", "cleared", "confirmed"Yesopen, cleared or confirmed
dispositionenum: "block", "restrict", "informational" or nullNoWhat the confirmation applied
decided_bystring or nullNoWho decided the case
decision_reasonstring or nullNoWhy they decided that
decided_atstring or nullNoWhen the case was decided
created_atstring or nullNoWhen 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:

NameInTypeRequiredDescription
case_idpathstringYes

Request body (application/json, schema ConfirmCaseRequest):

FieldTypeRequiredDescription
reasonstringYesWhy the match is real, kept in the decision log
dispositionenum: "block", "restrict", "informational" or nullNoblock, 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:

StatusDescriptionBody
200The confirmed case with the disposition appliedapplication/json Spanway_SanctionsCaseTable
400The reason holds only spacesapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloudapplication/json ErrorDetail
404No case with this id, or Spanway Cloud is not enabledapplication/json ErrorDetail
409The case was already decidedapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
case_idstringYesThe id of the case
subject_type"tenant"YesAlways tenant
subject_idstringYesThe customer account the case is about
subjectSubjectSnapshotYesThe customer details that were screened
subject_hashstringYesA fingerprint of those details, so changed details raise a new case
kindenum: "name_match", "jurisdiction", "address_unclear"Yesname_match, jurisdiction or address_unclear
priorityenum: "high", "low"Yeshigh or low
list_digeststring or nullNoA fingerprint of the lists the case was raised against
matcher_versionstring or nullNoThe version of the matching rules that raised it
candidatesarray of CaseCandidateNoThe list entries that may be the customer
rule_idstring or nullNoThe jurisdiction rule that raised the case
statusenum: "open", "cleared", "confirmed"Yesopen, cleared or confirmed
dispositionenum: "block", "restrict", "informational" or nullNoWhat the confirmation applied
decided_bystring or nullNoWho decided the case
decision_reasonstring or nullNoWhy they decided that
decided_atstring or nullNoWhen the case was decided
created_atstring or nullNoWhen 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:

NameInTypeRequiredDescription
statusqueryenum: "open", "filed" or nullNo
pagequeryintegerNo
page_sizequeryintegerNo

Example request:

curl -X GET "http://localhost:4000/sanctions/reports" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Report tasks in the requested status, soonest due firstapplication/json ReportsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloudapplication/json ErrorDetail
404Spanway Cloud is not enabled on this gatewayapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
reportsarray of ReportViewYesThe report tasks on this page, soonest due first
totalintegerYesHow many rows match in all
pageintegerYesThe page number, counting from 1
page_sizeintegerYesHow 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:

NameInTypeRequiredDescription
report_idpathstringYes

Request body (application/json, schema FileReportRequest):

FieldTypeRequiredDescription
filing_referencestringYesThe 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:

StatusDescriptionBody
200The report task marked as filed, with who filed it and the filing referenceapplication/json ReportView
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin or a role with sanctions.write, or the license lacks cloudapplication/json ErrorDetail
404Spanway Cloud is not enabled on this gatewayapplication/json ErrorDetail
409The report is already filed or does not existapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
report_idstringYesThe id of the report task
case_idstring or nullNoThe case that opened it
subject_idstringYesThe customer account it is about
kindenum: "blocked_property", "rejected_transaction"Yesblocked_property or rejected_transaction
detailsobjectYesWhat has to be reported
amount_usdnumberYesThe amount involved, in US dollars
occurred_onstringYesWhen the blocking or rejection happened
due_onstringYesWhen the report is due with OFAC
statusenum: "open", "filed"Yesopen or filed
filed_bystring or nullNoWho recorded the filing
filed_atstring or nullNoWhen the filing was recorded
filing_referencestring or nullNoThe reference OFAC gave the report
created_atstring or nullNoWhen the task was opened
business_days_leftintegerYesBusiness 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:

NameInTypeRequiredDescription
subject_idquerystring or nullNo
pagequeryintegerNo
page_sizequeryintegerNo

Example request:

curl -X GET "http://localhost:4000/sanctions/events" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Events newest first, optionally for one subjectapplication/json EventsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller is not a proxy admin, an admin viewer or a role with sanctions.read, or the license lacks cloudapplication/json ErrorDetail
404Spanway Cloud is not enabled on this gatewayapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500general_settings.cloud does not validate, or the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
eventsarray of Spanway_SanctionsEventTableYesThe log events on this page, newest first
totalintegerYesHow many rows match in all
pageintegerYesThe page number, counting from 1
page_sizeintegerYesHow many rows a page holds