SDKs & Libraries
SanctionsWise API provides multiple integration options for your applications.
Available Options​
| Option | Languages | Status |
|---|---|---|
| REST API | Any | ✅ Available |
| Python SDK | Python 3.8+ | ✅ Available |
| JavaScript SDK | Node.js 18+ | ✅ Available |
| Java SDK | Java 11+ | 🔜 Coming Soon |
Quick Comparison​
| Feature | REST API | Python SDK | JavaScript SDK |
|---|---|---|---|
| Authentication | Manual | Automatic | Automatic |
| Retry Logic | Manual | Built-in | Built-in |
| Type Safety | No | Type hints | TypeScript |
| Batch Support | Yes | Simplified | Simplified |
| Error Handling | Manual | Exceptions | Exceptions |
Installation​
Python​
pip install sanctionswise
JavaScript/Node.js​
npm install @orchestraprime/sanctionswise
REST API​
No installation required. Use any HTTP client.
Quick Start Examples​
Python​
from sanctionswise import SanctionsWiseClient
client = SanctionsWiseClient(api_key="your-api-key")
# Screen an entity
result = client.screen_entity(
name="John Smith",
entity_type="individual"
)
if result.status == "match":
print(f"Found {len(result.matches)} matches")
JavaScript​
import { SanctionsWiseClient } from '@orchestraprime/sanctionswise';
const client = new SanctionsWiseClient({ apiKey: 'your-api-key' });
// Screen an entity
const result = await client.screenEntity({
name: 'John Smith',
entityType: 'individual'
});
if (result.status === 'match') {
console.log(`Found ${result.matches.length} matches`);
}
REST API (cURL)​
curl -X POST https://api.orchestraprime.ai/sanctionswise/screen/entity \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "John Smith",
"entity_type": "individual"
}'
SDK Features​
Automatic Retry​
All SDKs include automatic retry with exponential backoff:
# Python - retries are automatic
client = SanctionsWiseClient(
api_key="your-api-key",
max_retries=3, # Default
retry_delay=1.0 # Seconds
)
Connection Pooling​
SDKs maintain connection pools for optimal performance:
// JavaScript - connection pooling is automatic
const client = new SanctionsWiseClient({
apiKey: 'your-api-key',
maxConnections: 10 // Default
});
Batch Processing​
Simplified batch operations:
# Python - process large lists easily
entities = [
{"name": "Entity 1", "entity_type": "individual"},
{"name": "Entity 2", "entity_type": "organization"},
# ... up to 100 per batch
]
results = client.screen_batch(entities)
Authentication​
All SDKs use API key authentication:
# Pass API key at initialization
client = SanctionsWiseClient(api_key="your-api-key")
# Or use environment variable
# export SANCTIONSWISE_API_KEY=your-api-key
client = SanctionsWiseClient() # Auto-loads from env
Error Handling​
SDKs provide typed exceptions:
Python​
from sanctionswise.exceptions import (
SanctionsWiseError,
AuthenticationError,
RateLimitError,
ValidationError
)
try:
result = client.screen_entity(name="Test")
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after} seconds")
except ValidationError as e:
print(f"Invalid request: {e.message}")
except SanctionsWiseError as e:
print(f"API error: {e}")
JavaScript​
import {
SanctionsWiseError,
AuthenticationError,
RateLimitError,
ValidationError
} from '@orchestraprime/sanctionswise';
try {
const result = await client.screenEntity({ name: 'Test' });
} catch (error) {
if (error instanceof AuthenticationError) {
console.log('Invalid API key');
} else if (error instanceof RateLimitError) {
console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
} else if (error instanceof ValidationError) {
console.log(`Invalid request: ${error.message}`);
}
}
Getting Your API Key​
- Subscribe via AWS Marketplace
- Complete registration at app.orchestraprime.ai
- Copy your API key from the dashboard
- Set it in your code or environment variable
Next Steps​
SanctionsWise API is a product of OrchestraPrime LLC