Skip to Content
Jobs APIExamples

Examples

The examples below demonstrate common use cases for the Jobs API. Jobs are submitted via HTTP POST to https://api.ofac-api.com/v4/jobs and results are retrieved asynchronously by polling GET /v4/jobs/{id}.

Example Request Code

curl \ -X POST https://api.ofac-api.com/v4/jobs \ -d '{"apiKey": "your-api-key", "cases": [{"id": "001", "name": "Abu Abbas"}]}' \ -H "Content-Type: application/json"

Example Requests

1. Simple bulk screening job

Screen a list of names against all configured sanctions sources.

Request JSON
{ "apiKey": "your-api-key", "cases": [ { "id": "001", "name": "Abu Abbas" }, { "id": "002", "name": "Sergei Vladilenovich" }, { "id": "003", "name": "Ayman Al Zawahiri" } ] }

2. Bulk screening with specific sources and entity types

Screen individuals only, against the OFAC SDN and EU Financial Sanctions lists.

Request JSON
{ "apiKey": "your-api-key", "sources": ["SDN", "NONSDN", "EU"], "types": ["person"], "cases": [ { "id": "emp-1001", "name": "Ivan Petrov", "type": "person", "dob": "1975-03-22", "nationality": "RU" }, { "id": "emp-1002", "name": "Li Wei", "type": "person", "dob": "1983-11-05", "citizenship": "CN" } ] }

3. Bulk screening with webhook notification

Provide a webhookUrl to receive a POST notification when the job completes or fails — no polling required. The webhook payload includes the jobId and event type (JOB_COMPLETED or JOB_FAILED). Use the jobId to call GET /v4/jobs/{id} to retrieve the reportUrl and full results. The webhookUrl must use https:// — HTTP URLs are rejected at submission time.

Request JSON
{ "apiKey": "your-api-key", "jobName": "Monthly Customer Review - Jan 2025", "webhookUrl": "https://your-server.com/webhooks/ofac", "sources": ["SDN", "NONSDN", "EU", "UK"], "cases": [ { "id": "cust-5001", "name": "Alice Johnson" }, { "id": "cust-5002", "name": "Bob Smith" } ] }

4. Idempotent job submission

Use the Idempotency-Key header to safely retry a submission without creating duplicate jobs. If a job already exists for this key, the original job is returned.

CURL with Idempotency-Key
curl \ -X POST https://api.ofac-api.com/v4/jobs \ -H "Content-Type: application/json" \ -H "Idempotency-Key: a1b2c3d4-e5f6-7890-abcd-ef1234567890" \ -d '{ "apiKey": "your-api-key", "jobName": "Q1 Screening Run", "cases": [ { "id": "001", "name": "Abu Abbas" } ] }'

5. Screening with detailed case information

Include additional fields such as date of birth, address, and identification to improve match accuracy and reduce false positives.

Request JSON
{ "apiKey": "your-api-key", "sources": ["SDN", "NONSDN"], "cases": [ { "id": "kyc-7890", "name": "Ayman Al Zawahiri", "type": "person", "dob": "1951-06-19", "nationality": "EG", "address": { "country": "AF" }, "identification": [ { "type": "passport", "idNumber": "19820215", "country": "EG" } ] } ] }

6. List jobs and check status

Retrieve the most recent jobs and check the status of a specific job.

List Jobs
curl -X GET "https://api.ofac-api.com/v4/jobs?limit=10" \ -H "apiKey: your-api-key"
Get Job Status
curl -X GET "https://api.ofac-api.com/v4/jobs/3fa85f64-5717-4562-b3fc-2c963f66afa6" \ -H "apiKey: your-api-key"

Downloading Results
When status is COMPLETED, the response will include a reportUrl. Download the report using a standard HTTP GET request — no API key is required for the download URL itself. The link expires 24 hours after it is returned. Make another GET /v4/jobs/{id} request to obtain a fresh link.

Last updated on