GET | /clients/{Id} | Get a client |
---|
"use strict";
export class Authentication {
/** @param {{apiUserId?:string,apiUserKey?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API User ID provided by us when you signed up to use our API */
apiUserId;
/**
* @type {string}
* @description The API User Key provided by us when you signed up to use our API */
apiUserKey;
}
export class BaseRequest {
/** @param {{authentication?:Authentication}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {Authentication}
* @description The authentication credentials */
authentication;
}
export class ResponseError {
/** @param {{errorCode?:string,fieldName?:string,message?:string,meta?:{ [index: string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
errorCode;
/** @type {string} */
fieldName;
/** @type {string} */
message;
/** @type {{ [index: string]: string; }} */
meta;
}
export class ArrayOfResponseError extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class ResponseStatus {
/** @param {{errorCode?:string,message?:string,stackTrace?:string,errors?:ArrayOfResponseError,meta?:{ [index: string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
errorCode;
/** @type {string} */
message;
/** @type {string} */
stackTrace;
/** @type {ArrayOfResponseError} */
errors;
/** @type {{ [index: string]: string; }} */
meta;
}
export class BaseResponse {
/** @param {{responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {ResponseStatus}
* @description The status of the response */
responseStatus;
}
export class LinkedTo {
/** @param {{clientId?:number,id?:number,type?:string,subtype?:string,status?:string,description?:string,isArchived?:boolean,name?:string,date?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
clientId;
/** @type {?number} */
id;
/** @type {?string} */
type;
/** @type {?string} */
subtype;
/** @type {?string} */
status;
/** @type {?string} */
description;
/** @type {?boolean} */
isArchived;
/** @type {?string} */
name;
/** @type {?string} */
date;
}
export class ArrayOfLinkedTo extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
/** @typedef {'Undefined'|'PendingCompletion'|'PendingOcr'|'PendingVerification'|'Verified'} */
export var ClientState;
(function (ClientState) {
ClientState["Undefined"] = "Undefined"
ClientState["PendingCompletion"] = "PendingCompletion"
ClientState["PendingOcr"] = "PendingOcr"
ClientState["PendingVerification"] = "PendingVerification"
ClientState["Verified"] = "Verified"
})(ClientState || (ClientState = {}));
export class Face {
/** @param {{age?:number,gender?:string,emotion?:string,smile?:number,hairColour?:string,facialHair?:string,makeup?:string,glasses?:string,accessories?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
age;
/** @type {string} */
gender;
/** @type {string} */
emotion;
/** @type {?number} */
smile;
/** @type {string} */
hairColour;
/** @type {string} */
facialHair;
/** @type {string} */
makeup;
/** @type {string} */
glasses;
/** @type {string} */
accessories;
}
export class VideoTimestamp {
/** @param {{tagName?:string,milli?:number,imageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
tagName;
/** @type {?number} */
milli;
/** @type {string} */
imageUrl;
}
export class Video {
/** @param {{id?:number,videoUrl?:string,imageUrl?:string,videoTimestamps?:VideoTimestamp[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
videoUrl;
/** @type {string} */
imageUrl;
/** @type {VideoTimestamp[]} */
videoTimestamps;
}
export class Location {
/** @param {{latitude?:number,longitude?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
latitude;
/** @type {number} */
longitude;
}
export class Image {
/** @param {{id?:number,name?:string,ocrId?:number,url?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {?number} */
ocrId;
/** @type {string} */
url;
}
export class ArrayOfImages extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class PassportChipData {
/** @param {{isIssuerVerified?:boolean,issuerCommonName?:string,issuerOrganisationName?:string,issuerCountry?:string,mrzLine1?:string,mrzLine2?:string,isMrzLine1Verified?:boolean,isMrzLine2Verified?:boolean,dataGroupsVerified?:number[],dataGroupsFailed?:number[],isFaceMatch?:boolean,faceMatchConfidence?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
isIssuerVerified;
/** @type {string} */
issuerCommonName;
/** @type {string} */
issuerOrganisationName;
/** @type {string} */
issuerCountry;
/** @type {string} */
mrzLine1;
/** @type {string} */
mrzLine2;
/** @type {boolean} */
isMrzLine1Verified;
/** @type {boolean} */
isMrzLine2Verified;
/** @type {number[]} */
dataGroupsVerified;
/** @type {number[]} */
dataGroupsFailed;
/** @type {boolean} */
isFaceMatch;
/** @type {?number} */
faceMatchConfidence;
}
export class Passport {
/** @param {{clientFileId?:number,firstName?:string,middleName?:string,lastName?:string,dateOfBirth?:string,gender?:string,mrzLineOne?:string,mrzLineTwo1?:string,mrzLineTwo2?:string,mrzLineTwo3?:string,mrzLineTwo4?:string,mrzLineTwo5?:string,mrzLineTwo6?:string,mrzLineTwo7?:string,mrzLineTwo8?:string,images?:ArrayOfImages,isVerified?:boolean,isFaceMatch?:boolean,faceMatchConfidence?:number,hasPcvSearch?:boolean,hasDfaSearch?:boolean,isPassportChipVerified?:boolean,passportChipData?:PassportChipData,isEligibleForPcv?:boolean,isEligibleForDfa?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
clientFileId;
/** @type {string} */
firstName;
/** @type {string} */
middleName;
/** @type {string} */
lastName;
/** @type {string} */
dateOfBirth;
/** @type {string} */
gender;
/** @type {string} */
mrzLineOne;
/** @type {string} */
mrzLineTwo1;
/** @type {string} */
mrzLineTwo2;
/** @type {string} */
mrzLineTwo3;
/** @type {string} */
mrzLineTwo4;
/** @type {string} */
mrzLineTwo5;
/** @type {string} */
mrzLineTwo6;
/** @type {string} */
mrzLineTwo7;
/** @type {string} */
mrzLineTwo8;
/** @type {ArrayOfImages} */
images;
/** @type {boolean} */
isVerified;
/** @type {?boolean} */
isFaceMatch;
/** @type {?number} */
faceMatchConfidence;
/** @type {boolean} */
hasPcvSearch;
/** @type {boolean} */
hasDfaSearch;
/** @type {?boolean} */
isPassportChipVerified;
/** @type {PassportChipData} */
passportChipData;
/** @type {boolean} */
isEligibleForPcv;
/** @type {boolean} */
isEligibleForDfa;
}
export class ArrayOfPassports extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class DrivingLicence {
/** @param {{clientFileId?:number,firstName?:string,middleName?:string,lastName?:string,dateOfBirth?:string,address?:string,drivingLicenceNumber?:string,images?:ArrayOfImages,isVerified?:boolean,isFaceMatch?:boolean,faceMatchConfidence?:number,hasDfaSearch?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
clientFileId;
/** @type {string} */
firstName;
/** @type {string} */
middleName;
/** @type {string} */
lastName;
/** @type {string} */
dateOfBirth;
/** @type {string} */
address;
/** @type {string} */
drivingLicenceNumber;
/** @type {ArrayOfImages} */
images;
/** @type {boolean} */
isVerified;
/** @type {?boolean} */
isFaceMatch;
/** @type {?number} */
faceMatchConfidence;
/** @type {boolean} */
hasDfaSearch;
}
export class ArrayOfDrivingLicences extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class OtherDocument {
/** @param {{clientFileId?:number,type?:string,typeOther?:string,description?:string,originalImageUrl?:string,croppedImageUrl?:string,isVerified?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
clientFileId;
/** @type {string} */
type;
/** @type {string} */
typeOther;
/** @type {string} */
description;
/** @type {string} */
originalImageUrl;
/** @type {string} */
croppedImageUrl;
/** @type {boolean} */
isVerified;
}
export class ArrayOfOtherDocuments extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class ProofOfDocument {
/** @param {{id?:number,name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The ID of the ProofOfDocument */
id;
/**
* @type {string}
* @description The name of the ProofOfDocument */
name;
}
export class ArrayOfProofOfDocuments extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class ProofOfDocumentCategory {
/** @param {{id?:number,proofOf?:string,proofOfDocuments?:ArrayOfProofOfDocuments}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The ID of the ProofOfDocumentCategory */
id;
/**
* @type {string}
* @description The category or subject that requires proof (e.g., 'Name', 'Address', 'Right to work') */
proofOf;
/**
* @type {ArrayOfProofOfDocuments}
* @description The documents that can be used to provide proof for the specified category. */
proofOfDocuments;
}
export class ArrayOfProofOfDocumentCategories extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class Client {
/** @param {{id?:number,dateCreated?:string,name?:string,email?:string,reference?:string,state?:ClientState,mobileInternational?:string,postCode?:string,isValidateMe?:boolean,face?:Face,video?:Video,location?:Location,numOfDocuments?:number,passports?:ArrayOfPassports,drivingLicences?:ArrayOfDrivingLicences,otherDocuments?:ArrayOfOtherDocuments,proofOfDocumentCategories?:ArrayOfProofOfDocumentCategories}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
dateCreated;
/** @type {string} */
name;
/** @type {string} */
email;
/** @type {string} */
reference;
/** @type {ClientState} */
state;
/** @type {string} */
mobileInternational;
/** @type {string} */
postCode;
/** @type {boolean} */
isValidateMe;
/** @type {Face} */
face;
/** @type {Video} */
video;
/** @type {Location} */
location;
/** @type {number} */
numOfDocuments;
/** @type {ArrayOfPassports} */
passports;
/** @type {ArrayOfDrivingLicences} */
drivingLicences;
/** @type {ArrayOfOtherDocuments} */
otherDocuments;
/** @type {ArrayOfProofOfDocumentCategories} */
proofOfDocumentCategories;
}
export class GetClientData extends BaseResponse {
/** @param {{linkedTo?:ArrayOfLinkedTo,client?:Client,responseStatus?:ResponseStatus}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {ArrayOfLinkedTo} */
linkedTo;
/** @type {Client} */
client;
}
export class GetClientResponse {
/** @param {{data?:GetClientData}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {GetClientData} */
data;
}
export class GetClient extends BaseRequest {
/** @param {{id?:number,authentication?:Authentication}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
id;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /clients/{Id} HTTP/1.1 Host: api.sanctionssearch.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetClientResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <Data> <ResponseStatus> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> <Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d6p1:KeyValueOfstringstring> <d6p1:Key>String</d6p1:Key> <d6p1:Value>String</d6p1:Value> </d6p1:KeyValueOfstringstring> </Meta> </ResponseError> </Errors> <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringstring> <d4p1:Key>String</d4p1:Key> <d4p1:Value>String</d4p1:Value> </d4p1:KeyValueOfstringstring> </Meta> </ResponseStatus> <Client> <DateCreated>0001-01-01T00:00:00</DateCreated> <DrivingLicences> <Passport> <Address>String</Address> <ClientFileId>0</ClientFileId> <DateOfBirth>String</DateOfBirth> <DrivingLicenceNumber>String</DrivingLicenceNumber> <FaceMatchConfidence>0</FaceMatchConfidence> <FirstName>String</FirstName> <HasDfaSearch>false</HasDfaSearch> <Images> <CategoryId> <Id>0</Id> <Name>String</Name> <OcrId>0</OcrId> <Url>String</Url> </CategoryId> </Images> <IsFaceMatch>false</IsFaceMatch> <IsVerified>false</IsVerified> <LastName>String</LastName> <MiddleName>String</MiddleName> </Passport> </DrivingLicences> <Email>String</Email> <Face> <Accessories>String</Accessories> <Age>0</Age> <Emotion>String</Emotion> <FacialHair>String</FacialHair> <Gender>String</Gender> <Glasses>String</Glasses> <HairColour>String</HairColour> <Makeup>String</Makeup> <Smile>0</Smile> </Face> <Id>0</Id> <IsValidateMe>false</IsValidateMe> <Location> <Latitude>0</Latitude> <Longitude>0</Longitude> </Location> <MobileInternational>String</MobileInternational> <Name>String</Name> <NumOfDocuments>0</NumOfDocuments> <OtherDocuments> <OtherDocument> <ClientFileId>0</ClientFileId> <CroppedImageUrl>String</CroppedImageUrl> <Description>String</Description> <IsVerified>false</IsVerified> <OriginalImageUrl>String</OriginalImageUrl> <Type>String</Type> <TypeOther>String</TypeOther> </OtherDocument> </OtherDocuments> <Passports> <Passport> <ClientFileId>0</ClientFileId> <DateOfBirth>String</DateOfBirth> <FaceMatchConfidence>0</FaceMatchConfidence> <FirstName>String</FirstName> <Gender>String</Gender> <HasDfaSearch>false</HasDfaSearch> <HasPcvSearch>false</HasPcvSearch> <Images> <CategoryId> <Id>0</Id> <Name>String</Name> <OcrId>0</OcrId> <Url>String</Url> </CategoryId> </Images> <IsEligibleForDfa>false</IsEligibleForDfa> <IsEligibleForPcv>false</IsEligibleForPcv> <IsFaceMatch>false</IsFaceMatch> <IsPassportChipVerified>false</IsPassportChipVerified> <IsVerified>false</IsVerified> <LastName>String</LastName> <MiddleName>String</MiddleName> <MrzLineOne>String</MrzLineOne> <MrzLineTwo1>String</MrzLineTwo1> <MrzLineTwo2>String</MrzLineTwo2> <MrzLineTwo3>String</MrzLineTwo3> <MrzLineTwo4>String</MrzLineTwo4> <MrzLineTwo5>String</MrzLineTwo5> <MrzLineTwo6>String</MrzLineTwo6> <MrzLineTwo7>String</MrzLineTwo7> <MrzLineTwo8>String</MrzLineTwo8> <PassportChipData> <DataGroupsFailed xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:int>0</d7p1:int> </DataGroupsFailed> <DataGroupsVerified xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:int>0</d7p1:int> </DataGroupsVerified> <FaceMatchConfidence>0</FaceMatchConfidence> <IsFaceMatch>false</IsFaceMatch> <IsIssuerVerified>false</IsIssuerVerified> <IsMrzLine1Verified>false</IsMrzLine1Verified> <IsMrzLine2Verified>false</IsMrzLine2Verified> <IssuerCommonName>String</IssuerCommonName> <IssuerCountry>String</IssuerCountry> <IssuerOrganisationName>String</IssuerOrganisationName> <MRZLine1>String</MRZLine1> <MRZLine2>String</MRZLine2> </PassportChipData> </Passport> </Passports> <PostCode>String</PostCode> <ProofOfDocumentCategories> <CategoryId> <Id>0</Id> <ProofOf>String</ProofOf> <ProofOfDocuments> <DocumentId> <Id>0</Id> <Name>String</Name> </DocumentId> </ProofOfDocuments> </CategoryId> </ProofOfDocumentCategories> <Reference>String</Reference> <State>Undefined</State> <Video> <Id>0</Id> <ImageUrl>String</ImageUrl> <VideoTimestamps> <VideoTimestamp> <ImageUrl>String</ImageUrl> <Milli>0</Milli> <TagName>String</TagName> </VideoTimestamp> </VideoTimestamps> <VideoUrl>String</VideoUrl> </Video> </Client> <LinkedTo> <LinkedTo> <ClientId>0</ClientId> <Date>0001-01-01T00:00:00</Date> <Description>String</Description> <Id>0</Id> <IsArchived>false</IsArchived> <Name>String</Name> <Status>String</Status> <Subtype>String</Subtype> <Type>String</Type> </LinkedTo> </LinkedTo> </Data> </GetClientResponse>