Sanctions Search API: v2

<back to all web services

GetClients

"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 PagedRequest extends BaseRequest {
    /** @param {{page_limit_?:number,page_offset_?:number,sort?:string,authentication?:Authentication}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {number}
     * @description The maximum number of records to be returned in one page */
    page_limit_;
    /**
     * @type {number}
     * @description The starting point in the list of records from where the data should be fetched. Zero based index. */
    page_offset_;
    /**
     * @type {string}
     * @description The term to determine the order in which the data is returned */
    sort;
}
/** @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 GetClients extends PagedRequest {
    /** @param {{state?:ClientState,isValidateMe?:boolean,name?:string,dateFrom?:string,dateTo?:string,subUserName?:string,page_limit_?:number,page_offset_?:number,sort?:string,authentication?:Authentication}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {ClientState}
     * @description Filter the results to those that have a State matching the state specified */
    state;
    /**
     * @type {?boolean}
     * @description Filter the results to those that have a IsValidateMe flag matching the specified value */
    isValidateMe;
    /**
     * @type {string}
     * @description Filter the results to those that have a Name including the specified value */
    name;
    /**
     * @type {string}
     * @description Filter the results to those that were created after (or on) this date */
    dateFrom;
    /**
     * @type {string}
     * @description Filter the results to those that were created before this date */
    dateTo;
    /**
     * @type {string}
     * @description If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view */
    subUserName;
}
export class Links {
    /** @param {{self?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    self;
}
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 ClientShort {
    /** @param {{id?:number,dateCreated?:string,name?:string,reference?:string,isValidateMe?:boolean,state?:ClientState,links?:Links,numOfDocuments?:number,photo?:Image}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {string} */
    dateCreated;
    /** @type {string} */
    name;
    /** @type {string} */
    reference;
    /** @type {boolean} */
    isValidateMe;
    /** @type {ClientState} */
    state;
    /** @type {Links} */
    links;
    /** @type {number} */
    numOfDocuments;
    /** @type {Image} */
    photo;
}
export class ArrayOfClientShort extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetClientsData extends PagedResponse {
    /** @param {{clients?:ArrayOfClientShort,meta?:Meta<T>,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {ArrayOfClientShort} */
    clients;
}
export class GetClientsResponse {
    /** @param {{data?:GetClientsData}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {GetClientsData} */
    data;
}
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;
}
/** @typedef T {any} */
export class PagedResponse extends BaseResponse {
    /** @param {{meta?:Meta<T>,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {Meta<T>}
     * @description The response Metadata */
    meta;
}
export class MetaLinks extends Links {
    /** @param {{first?:string,last?:string,next?:string,prev?:string,self?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {string}
     * @description The link to the first page of records */
    first;
    /**
     * @type {string}
     * @description The link to the last page of records */
    last;
    /**
     * @type {string}
     * @description The link to the next page of records, if applicable */
    next;
    /**
     * @type {string}
     * @description The link to the last page of records, if applicable */
    prev;
}
/** @typedef T {any} */
export class Meta {
    /** @param {{links?:MetaLinks,totalCount?:number,pageLimit?:number,pageOffset?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {MetaLinks}
     * @description Pagination links */
    links;
    /**
     * @type {?number}
     * @description The total number of records for the query */
    totalCount;
    /**
     * @type {?number}
     * @description The maximum number of records to be returned in one page */
    pageLimit;
    /**
     * @type {?number}
     * @description The starting point in the list of records from where the data should be fetched. Zero based index. */
    pageOffset;
}

JavaScript GetClients DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .soap12 suffix or ?format=soap12

HTTP + SOAP12

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /soap12 HTTP/1.1 
Host: api.sanctionssearch.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>

<GetClients xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Authentication>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Authentication>
  <Sort>String</Sort>
  <page_x005B_limit_x005D_>0</page_x005B_limit_x005D_>
  <page_x005B_offset_x005D_>0</page_x005B_offset_x005D_>
  <DateFrom>0001-01-01T00:00:00</DateFrom>
  <DateTo>0001-01-01T00:00:00</DateTo>
  <IsValidateMe>false</IsValidateMe>
  <Name>String</Name>
  <State>Undefined</State>
  <SubUserName>String</SubUserName>
</GetClients>

</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>

<GetClientsResponse 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>
    <Meta>
      <Links>
        <Self>String</Self>
        <First>String</First>
        <Last>String</Last>
        <Next>String</Next>
        <Prev>String</Prev>
      </Links>
      <PageLimit>0</PageLimit>
      <PageOffset>0</PageOffset>
      <TotalCount>0</TotalCount>
    </Meta>
    <Clients>
      <ClientShort>
        <DateCreated>0001-01-01T00:00:00</DateCreated>
        <Id>0</Id>
        <IsValidateMe>false</IsValidateMe>
        <Links>
          <Self>String</Self>
        </Links>
        <Name>String</Name>
        <NumOfDocuments>0</NumOfDocuments>
        <Photo>
          <Id>0</Id>
          <Name>String</Name>
          <OcrId>0</OcrId>
          <Url>String</Url>
        </Photo>
        <Reference>String</Reference>
        <State>Undefined</State>
      </ClientShort>
    </Clients>
  </Data>
</GetClientsResponse>

</soap12:Body>
</soap12:Envelope>