Skip to main content

Embargo | Node.js SDK

The Pangea Embargo API lets developers quickly check IPs and country codes against known sanction and trade embargo lists.

Embargo

constructor(token: PangeaToken, config: PangeaConfig): EmbargoService

Creates a new EmbargoService with the given Pangea API token and configuration.

required parameters

PangeaToken

Pangea API token.

Configuration.

Response Object

EmbargoService
const config = new PangeaConfig({ domain: "pangea_domain" });
const embargo = new EmbargoService("pangea_token", config);

Check IP

ipCheck(ipAddress: string): Promise<PangeaResponse<CheckResult>>

Check an IP against known sanction and trade embargo lists.

required parameters

string

Geolocate this IP and check the corresponding country against the enabled embargo lists.

Response Object

Promise<PangeaResponse<CheckResult>>
const response = await embargo.ipCheck("190.6.64.94");

ISO code check

isoCheck(isoCode: string): Promise<PangeaResponse<CheckResult>>

Check a country code against known sanction and trade embargo lists.

required parameters

string

Check the country against code the enabled embargo lists.

Response Object

Promise<PangeaResponse<CheckResult>>
const response = await embargo.isoCheck("CU");

Interface CheckResult

CheckResult

required parameters

Array<Sanction>

Interface Sanction

Sanction

required parameters

object
string
string
string
string