NAV Navbar
C#cURLJavaJavaScriptPython

Introduction

Get started easily with our powerful, easy-to-use API! With the API your application can send and retrieve PEP and sanction data. There are several endpoints for different tasks:

PEP/Sanction screening process

In Pliance the screening process consist of these steps:

  1. Start by registering a Person or Company with the corresponding endpoint with your data.
  2. Retrieve the PEP and Sanction matches with the endpoint.
  3. Retrive the watchlist data from the endpoint and review the matches.
  4. Classify all the matches, choose between Unknown, False Positive and Match.
  5. Archive the person when the person is no longer a customer.
  6. Delete the person from the service, for example if they stop being a customer or to comply with GDPR.

Installation

Pilance provides packages for several popular languages to ease the the development.

.NET

dotnet add package Pliance.NET-SDK

Nuget

Java

Maven Central

Node.js

npm i @pliance/pliance.js.sdk

npm

Python

pip install pliance.py.sdk

PyPI

Authentication

Authentication in Pliance is done with JWT.

You will need to add the generated authorization token to the request header of all request.

Authorization : Bearer token

Generating JSON Web Token

To generate a valid JSON Web Token, add the same fields as specified below and sign with your own secret.

{"typ":"JWT","alg":"HS256"}{"iat":1555495956,"nbf":1555495956,"exp":1555496256,"aud":"pliance.io","iss":"CUSTOMER_ID","given_name":"USERNAME","sub":"USER_ID"}

First request

Now its time to do the first request. We provide a simple Ping endpoint for testing the authentication.

usingSystem;usingSystem.Security.Cryptography.X509Certificates;usingPliance.SDK;usingPliance.SDK.Contract;namespaceExample{classProgram{staticasyncvoidMain(string[]args){varfactory=newPlianceClientFactory(secret:"2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b",issuer:"Test",url:"https://test-stage4.pliance.io/",certificate:newX509Certificate2("client-certificate.pfx"));varclient=factory.Create("givenname","sub");awaitclient.Ping();}}}

Examples

You can find code examples for implementations in various language on Github.

Pliance provides SDKs to the popular languages to boost your development.

Person

Register Person

Example register person:

varresult=awaitclient.RegisterPerson(newRegisterPersonCommand{PersonReferenceId="person-reference-id",FirstName="John",LastName="Doe"});

The above command returns JSON structured like this:

{"hits":[[{"matchId":"list-13935","matchedFirstName":[{"text":"Vendela","isMatch":true}],"matchedLastName":[{"text":"Bogren","isMatch":true}],"isPep":true,"isRca":false,"isSanction":false,"classification":"Unknown","aliasId":"55601e25d6c885e8e7c549970315016196bb01c9ff22aa796d81ba5469c87a8c"}]],"status":"Success","success":true}

The register person endpoint allows a person to be registered for PEP and Sanction screening, and automatic monitoring. This is the first step in the the process. It also returns all the hits.

HTTP Request

PUT /api/PersonCommand

Data Parameters

NameTypeValuesDescriptionRequired
PersonReferenceIdstringA unique identifieryes
IdentityPersonIdentityyes
FirstNamestringyes
LastNamestringyes
GenderstringMale, Female, Unknownno
BirthdateBirthdateno
AddressesAddress[]no
OptionsRegisterPersonOptionsno

Types

PersonIdentity
NametypeValuesDescriptionRequired
IdentitystringNational Identification Number/Swedish Personal Number
CountrystringIn ISO 3166 format
Birthdate
NametypeValuesDescriptionRequired
Yearint0-9999
Monthint1-12
Dayint1-31
Address
NametypeValuesDescriptionRequired
CountrystringIn ISO 3166 format
Citystring
Street1string
Street2string
StreetNostring
PostalCodestring
RegisterPersonOptions
NametypeValuesDescriptionRequired
OrderstringAny, Strict, ExactUsed to set the match order for names
FuzzinessstringMetaphone, Simple, DiacriticsSet the algorithm used to match names
Fuzziness: Simple

Simple case insensitive compare

InputListMatch
LinnéaLinnéax
LinneaLinnéa
LineaLinnéa
LinaLinnéa
LnneaLinnéa
Fuzziness: Diacritics

Smash diacritics before insensitive compare

InputListMatch
LinnéaLinnéax
LinneaLinnéax
LineaLinnéa
LinaLinnéa
LnneaLinnéa
Fuzziness: Metaphone

Phonetic compare (https://en.wikipedia.org/wiki/Metaphone)

InputListMatch
LinnéaLinnéax
LinneaLinnéax
LineaLinnéax
LinaLinnéax
LnneaLinnéax
Order: Any

Names can be matched in any order

InputListMatch
OsamaOsama bin Ladenx
binOsama bin Ladenx
LadenOsama bin Ladenx
bin LadenOsama bin Ladenx
Laden bin OsamaOsama bin Ladenx
Osama bin LadenOsama bin Ladenx
Order: Strict

Names must appear in the same order

InputListMatch
OsamaOsama bin Ladenx
binOsama bin Ladenx
LadenOsama bin Ladenx
bin LadenOsama bin Ladenx
Laden bin OsamaOsama bin Laden
Osama bin LadenOsama bin Ladenx
Order: Exact

All names must match, and appear in the same order

InputListMatch
OsamaOsama bin Laden
binOsama bin Laden
LadenOsama bin Laden
bin LadenOsama bin Laden
Laden bin OsamaOsama bin Laden
Osama bin LadenOsama bin Ladenx

View Person

The view person is used to retrieve a person and all the matches.

Example view person:

varresult=awaitclient.ViewPerson(newViewPersonQuery{PersonReferenceId="person-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true,"data":{"personReferenceId":"person-reference-id","identity":{"identity":"19600714-8841","country":"se"},"firstName":"Vendela","lastName":"Bogren","birthdate":"1960-07-14","gender":"Female","addresses":[{"street1":"Jaktstigen","street2":"","city":"ESKILSTUNA","streetNo":"12","postalCode":"632 31","country":"se"}],"hits":[[{"matchId":"list-13935","matchedFirstName":[{"text":"Vendela","isMatch":true}],"matchedLastName":[{"text":"Bogren","isMatch":true}],"gender":"Unknown","isPep":true,"isRca":false,"isSanction":false,"classification":"Unknown","aliasId":"55601e25d6c885e8e7c549970315016196bb01c9ff22aa796d81ba5469c87a8c"}]]}}

HTTP Request

GET /api/PersonQuery?PersonReferenceId=[string]

Query Parameters

NameTypeRequired
PersonReferenceIdstringyes

Search Person

The Search Person endpoint is used to search persons by name and filter by matches.

Example search person:

varresult=awaitclient.SearchPerson(newPersonSearchQuery{Query="John Doe"});

The above command returns JSON structured like this:

{"status":"Success","success":true,"data":{"result":[{"personReferenceId":"company-reference-id","identity":{"Identity":"600714-8841","Country":"se"},"firstName":[{"isMatch":false,"text":"Vendela"}],"lastName":[{"isMatch":true,"text":"Bogren"}],"isPep":false,"isRca":false,"isSanction":false}]}}

HTTP Request

GET /api/PersonQuery/Search?query=[string]&filter.isPep=[boolean]&filter.isRca=[boolean]&filter.isSanction=[boolean]&page.size=[number]&page.no=[number]

Query Parameters

NameTypeRequired
querystringyes
filterFilterno
pagePageno

Filter

NameTypeRequiredDefault
isPepbooleannonull
isRcabooleannonull
isSanctionbooleannonull

Page

NameTypeRequiredDefault
sizenumberno100
nonumberno0

Classify Match

The Classify Match endpoint is used to classify PEP/Sanction matches for a person.

Example classify match:

varresult=awaitclient.ClassifyPersonHit(newClassifyHitCommand{PersonReferenceId="person-reference-id",MatchId="match-id",AliasId="alias-id",Classification=ClassificationType.Positive});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

POST /api/PersonCommand/Classify

Data Parameters

NameTypeValuesDescriptionRequired
PersonReferenceIdstringyes
MatchIdstringyes
ClassificationstringUnknown, FalsePositive, Positiveyes

Archive a person

An archived person will no longer be daily monitored for PEP or sanction matches, also if the person has been archived for the entire billing month, it will be excluded from billing.

Example archive person:

varresult=awaitclient.ArchivePerson(newArchivePersonCommand{PersonReferenceId="person-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

POST /api/PersonCommand/Unarchive

Data Parameters

NameTypeValuesDescriptionRequired
PersonReferenceIdstringyes

Unarchive a person

To revert an archive operation, just call the unarchive endpoint and the person will once again be actively monitored for new PEP and sanction matches.

Example unarchive person:

varresult=awaitclient.UnarchivePerson(newUnarchivePersonCommand{PersonReferenceId="person-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

POST /api/PersonCommand/Unarchive

Data Parameters

NameTypeValuesDescriptionRequired
PersonReferenceIdstringyes

Delete Person

The delete person endpoint allows developers to delete a person completely from the system. For example this could be used for remove a person for GDPR compliance.

Example delete person:

varresult=awaitclient.DeletePerson(newDeletePersonCommand{PersonReferenceId="person-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

Delete /api/PersonCommand?PersonReferenceId=[string]

Query Parameters

NameTypeValuesDescriptionRequired
PersonReferenceIdstringyes

Company

Register Company

Example register company:

varresult=awaitclient.RegisterCompany(newRegisterCompanyCommand{CompanyReferenceId="company-reference-id",Name="Plisec AB",Identity=newCompanyIdentity{Identity="559161-4275",Country="SWE"}});

The above command returns JSON structured like this:

{"status":"Success","success":true}

The register company endpoint is used to register a company for PEP screening of the company beneficiaries.

HTTP Request

PUT /api/CompanyCommand

Data Parameters

NameTypeValuesDescriptionRequired
CompanyReferenceIdstringA unique identifier for a companyyes
IdentityCompanyIdentityyes
Namestringyes

Types

CompanyIdentity
NameTypeValuesDescriptionRequired
IdentitystringCompany Organization number
Countrystringin ISO 3166 format

View Company

The view company endpoint is used to retrieve a company with all the beneficiaries and their PEP status.

Example view company:

varresult=awaitclient.ViewCompany(newViewCompanyQuery{CompanyReferenceId="company-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true,"data":{"companyReferenceId":"company-reference-id","identity":{"Identity":"559161-4275","Country":"se"},"name":"Pliance AB","graph":{"nodes":[{"id":0,"name":"Plisec AB","type":"Plisec AB","reference":"559161-4275","isPep":false},{"id":1,"name":"Jan Nelson","type":"Person","reference":"19630728-2571","isPep":false},{"id":2,"name":"We Go To Eleven AB","type":"Company","reference":"559118-2901","isPep":false},{"id":3,"name":"Jonas Holmén","type":"Person","reference":"19670812-1311","isPep":false},{"id":4,"name":"Jan-Olof Halvarsson","type":"Person","reference":"19800610-2837","isPep":false}],"links":[{"source":1,"target":2,"type":"Huvudman"},{"source":0,"target":2,"type":"Moderbolag"},{"source":3,"target":2,"type":"Huvudman"},{"source":4,"target":0,"type":"Huvudman"}]},"beneficiaries":[{"nationIdentityNumber":"19630728-2571","firstName":"Jan","lastName":"Nelson","isPep":false,"engagements":[{"registrationNumber":"559118-2901","name":"We Go To Eleven AB"}]},{"nationIdentityNumber":"19670812-1311","firstName":"Jonas","lastName":"Holmén","isPep":false,"engagements":[{"registrationNumber":"559118-2901","name":"We Go To Eleven AB"}]},{"nationIdentityNumber":"19800610-2837","firstName":"Jan-Olof","lastName":"Halvarsson","isPep":false,"engagements":[]}]}}

HTTP Request

GET /api/CompanyQuery?companyReferenceId=[string]

Query Parameters

NametypeRequired
companyReferenceIdstringyes

Search Company

The Search Company endpoint is used to search company by name and filter by matches.

Example search company:

varresult=awaitclient.SearchCompany(newCompanySearchQuery{Query="Plisec"});

The above command returns JSON structured like this:

{"status":"Success","success":true,"data":{"result":[{"companyReferenceId":"company-reference-id","identity":{"Identity":"559161-4275","Country":"se"},"names":[{"text":"Pliance AB","isMatch":true}],"isPep":false,"isRca":false,"isSanction":false}]}}

HTTP Request

GET api/CompanyQuery/Search?query=[string]&isPep=[boolean]&isRca=[boolean]&isSanction=[boolean]

Query Parameters

NametypeRequired
querystringyes
filterFilterno
pagePageno

Filter

NameTypeRequiredDefault
isPepbooleannonull
isRcabooleannonull
isSanctionbooleannonull

Page

NameTypeRequiredDefault
sizenumberno100
nonumberno0

Archive Company

The archive endpoint allows developers to archive a company. It will remain in the database but will no longer be billed or automatically updated.

Example archive company:

varresult=awaitclient.ArchiveCompany(newArchiveCompanyCommand{CompanyReferenceId="company-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

POST /api/CompanyCommand/Archive

Data Parameters

NameTypeValuesDescriptionRequired
CompanyReferenceIdstringyes

Unarchive Company

To revert an archive operation, just call the unarchive endpoint and the person will once again be actively monitored for new PEP and sanction matches.

Example unarchive company:

varresult=awaitclient.UnarchiveCompany(newUnarchiveCompanyCommand{CompanyReferenceId="company-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

POST /api/CompanyCommand/Unarchive

Data Parameters

NameTypeValuesDescriptionRequired
CompanyReferenceIdstringyes

Delete Company

The delete company endpoint allows developers to delete a company completely from the system.

Example delete company:

varresult=awaitclient.DeleteCompany(newDeleteCompanyCommand{CompanyReferenceId="company-reference-id"});

The above command returns JSON structured like this:

{"status":"Success","success":true}

HTTP Request

Delete /api/CompanyCommand?companyReferenceId=[string]

Query Parameters

NameTypeValuesDescriptionRequired
CompanyReferenceIdstringyes

Watchlist

Retrieve Person

The above command returns JSON structured like this:

{"data":{"listId":"list-3954","NationalIdentificationNumber":"19960106-3143","gender":"Female","names":[{"firstName":"Selma","lastName":"Söderblom","selectedFirstName":[{"text":"Selma","isMatch":true}],"selectedLastName":[{"text":"Söderblom","isMatch":true}]},{"firstName":"Selma Anna","lastName":"Söderblom","selectedFirstName":[{"text":"Selma ","isMatch":true},{"text":" ","isMatch":false},{"text":"Selma","isMatch":true}],"selectedLastName":[{"text":"Söderblom","isMatch":true}]}],"birthdates":[{"circa":false,"year":1996,"month":01,"day":06}],"addresses":[],"countries":["se"],"isPep":false,"isRca":true,"isSanction":false,"nationalities":[],"images":[],"roles":[],"relations":[{"firstName":"Lena","lastName":"Söderblom","relationPersonId":"list-279","isPep":true,"isRca":false,"isSanction":false,"relationType":"Mor"}]},"status":"Success","success":true}

The Watchlist endpoint is used to retrieve data from PEP and sanctions lists by the matchId.

HTTP Request

GET /api/WatchlistQuery?id=[string]&FirstName=[string]&LastName=[string]

Query Parameters

NametypeRequiredDescription
IdstringyesThe list Id
FirstNamestringno
LastNamestringno

Webhook

Overview

Daily monitoring automatically matches your customers to PEP(Political Exposed Person) and sanction lists. When matches are found you can use webhooks to receive notification when changes have occured. Instead of performing searches and doing queries for induvidual persons and companies looking for changes.

You easily register your webook callback with the /api/WebhookCommand endpoint.

When changes are triggered your endpoint will be invoked with a POST call, containing metadata and data of the change. If the secret has been set and the webhook url is using the HTTPS-protocol, the call will be accompanied by the header X-PLIANCE-SECRET, so you can easily discard calls from dubious sources.

Query Settings

GET /api/WebhookQuery

Example view webhook:

The above command returns JSON structured like this:

{"data":{"url":"https://webhook.company.com","secret":"COMPANY_SECRET","enabled":true},"status":"Success","success":true}

Update Settings

PUT /api/WebhookCommand

Example update webhook:

The above command returns JSON structured like this:

{"status":"Success","success":true}

Data Parameters

NametypeRequiredDescription
UrlstringnoUrl of webhook endpoint
EnabledbooleannoIf webhook notifications should be enabled
SecretstringnoThe HTTP Header 'X-PLIANCE-SECRET' will include your secret

Webhook Payloads

PersonSanctionMatched

{"type":"PersonSanctionMatched","metadata":{"subject":"1337","ip":"localhost","givenName":"Adam Furtenbach","timestampUtc":"2019-10-11T06:46:20.3555253Z"},"body":{"aliasId":"4cc0a567bc9f3642a72ba606552d9a3a6fae403869fbf02bd7cdaa2f0b22fdbf","matchId":"EuSanction-7091","personReferenceId":"person-reference-id","matchedFirstName":[{"text":"Mohammad","isMatch":true}],"matchedLastName":[{"text":"Ali","isMatch":true},{"text":" ","isMatch":false},{"text":"Nasr","isMatch":true}],"isPep":false,"isRca":false,"isSanction":true,"firstName":"Mohammad","lastName":"Ali Nasr"}}

PersonSanctionMatchRemoved

{"type":"PersonSanctionMatchRemoved","checkpoint":"a2d6a86b942dedfb703f5035ee6349edb4fa30696e6533df8e0e291f40941a22","metadata":{"subject":"1337","ip":"localhost","givenName":"Adam Furtenbach","timestampUtc":"2019-10-25T12:02:09.7555535Z"},"body":{"personReferenceId":"person-reference-id","aliasId":"4cc0a567bc9f3642a72ba606552d9a3a6fae403869fbf02bd7cdaa2f0b22fdbf","classification":0,"matchId":"EuSanction-7091"}}

Feed

Overview

The feed API lets you retreive all data from a certain checkpoint and a batch of the proceeding events. To fetch the next batch, use the latest value of data.items[].checkpoint. In the example below, you should use /api/FeedQuery/?From=05f1d630986abbb3fb11687e23defba5958b51fb01d5b68f2c3e07d37fb98270. Omiting the From parameter, selects data from the first begining.

Query Settings

GET /api/FeedQuery

Data Parameters

NametypeRequiredDescription
FromstringnoLast Checkpoint

The above command returns JSON structured like this:

{"data":{"items":[{"checkpoint":"c290ee5c93ed35fad7976ef85ac785bad2499ecfa33b0ea57418c9585156c9b5","type":"CompanyCreated","body":{"companyReferenceId":"556936-9761","identity":{"identity":"556936-9761","country":"se"},"name":"Acturum Tox AB"},"metadata":{"subject":"1337","ip":"localhost","givenName":"Adam Furtenbach","timestampUtc":"2019-10-25T15:34:35.0469008Z"}},{"checkpoint":"05f1d630986abbb3fb11687e23defba5958b51fb01d5b68f2c3e07d37fb98270","type":"CompanyCreated","body":{"companyReferenceId":"559118-2901","identity":{"identity":"559118-2901","country":"se"},"name":"We Go To Eleven AB"},"metadata":{"subject":"1337","ip":"localhost","givenName":"Adam Furtenbach","timestampUtc":"2019-10-25T15:34:35.069991Z"}}]},"status":"Success","success":true,"checkpoint":"0000000000000000000000000000000000000000000000000000000000000000"}