Sanctions Search API: v2

<back to all web services

GetDbsSearches

DBS
The following routes are available for this service:
GET/dbsGet all DBS Searches
"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;
}
export class GetDbsSearches extends PagedRequest {
    /** @param {{name?:string,dateFrom?:string,dateTo?:string,isApplicantInfoCompleted?:boolean,isIdCheckCompleted?:boolean,isApplicationCompleted?:boolean,isApplicationSubmitted?:boolean,isApplicationDisclosed?:boolean,subUserName?:string,page_limit_?:number,page_offset_?:number,sort?:string,authentication?:Authentication}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @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 {?boolean}
     * @description Filter the results to those where the applicant has provided their information (true), or not (false), or either (null) */
    isApplicantInfoCompleted;
    /**
     * @type {?boolean}
     * @description Filter the results to those where the ID Checker has verified the applicant's ID (true), or not (false), or either (null) */
    isIdCheckCompleted;
    /**
     * @type {?boolean}
     * @description Filter the results to those where the application is complete and ready to be submitted (true), or not (false), or either (null) */
    isApplicationCompleted;
    /**
     * @type {?boolean}
     * @description Filter the results to those where the application has been submitted (true), or not (false), or either (null) */
    isApplicationSubmitted;
    /**
     * @type {?boolean}
     * @description Filter the results to those where the application has been disclosed (true), or not (false), or either (null) */
    isApplicationDisclosed;
    /**
     * @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 DbsSearchShort {
    /** @param {{id?:number,dateSearched?:string,dateUpdated?:string,status?:string,disclosureStatus?:string,isApplicantInfoCompleted?:boolean,isIdCheckCompleted?:boolean,isApplicationCompleted?:boolean,isApplicationSubmitted?:boolean,isApplicationDisclosed?:boolean,disclosureLevel?:string,name?:string,reference?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {string} */
    dateSearched;
    /** @type {string} */
    dateUpdated;
    /** @type {string} */
    status;
    /** @type {string} */
    disclosureStatus;
    /** @type {boolean} */
    isApplicantInfoCompleted;
    /** @type {boolean} */
    isIdCheckCompleted;
    /** @type {boolean} */
    isApplicationCompleted;
    /** @type {boolean} */
    isApplicationSubmitted;
    /** @type {boolean} */
    isApplicationDisclosed;
    /** @type {string} */
    disclosureLevel;
    /** @type {string} */
    name;
    /** @type {string} */
    reference;
}
export class ArrayOfDbsSearchShort extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetDbsSearchesData extends PagedResponse {
    /** @param {{searches?:ArrayOfDbsSearchShort,meta?:Meta<T>,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {ArrayOfDbsSearchShort} */
    searches;
}
export class GetDbsSearchesResponse {
    /** @param {{data?:GetDbsSearchesData}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {GetDbsSearchesData} */
    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 Links {
    /** @param {{self?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    self;
}
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 GetDbsSearches DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /dbs HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":{"searches":[{"id":0,"dateSearched":"\/Date(-62135596800000-0000)\/","dateUpdated":"\/Date(-62135596800000-0000)\/","status":"String","disclosureStatus":"String","isApplicantInfoCompleted":false,"isIdCheckCompleted":false,"isApplicationCompleted":false,"isApplicationSubmitted":false,"isApplicationDisclosed":false,"disclosureLevel":"String","name":"String","reference":"String"}],"meta":{"links":{"first":"String","last":"String","next":"String","prev":"String","self":"String"},"totalCount":0,"pageLimit":0,"pageOffset":0},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}