Sanctions Search API: v2

<back to all web services

GetValidIds

ValidID
The following routes are available for this service:
POST/validid/listGet all the ValidID 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 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 ValidIdSearchCriteria {
    /** @param {{fullName?:string,dateOfBirth?:string,gender?:string,address?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    fullName;
    /** @type {string} */
    dateOfBirth;
    /** @type {string} */
    gender;
    /** @type {string} */
    address;
}
export class ValidIdListItem {
    /** @param {{id?:number,type?:number,score?:number,status?:string,dateSearched?:string,reference?:string,pepError?:boolean,replaced?:boolean,replacementSearchId?:number,hasCompletedRequest?:boolean,hasCompletedSearch?:boolean,searchCriteria?:ValidIdSearchCriteria}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {number} */
    type;
    /** @type {?number} */
    score;
    /** @type {string} */
    status;
    /** @type {string} */
    dateSearched;
    /** @type {string} */
    reference;
    /** @type {boolean} */
    pepError;
    /** @type {boolean} */
    replaced;
    /** @type {?number} */
    replacementSearchId;
    /** @type {boolean} */
    hasCompletedRequest;
    /** @type {boolean} */
    hasCompletedSearch;
    /** @type {ValidIdSearchCriteria} */
    searchCriteria;
}
export class ArrayOfValidIdListItem extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetValidIdsData extends BaseResponse {
    /** @param {{totalSearchRecords?:number,currentPageNum?:number,maxPageNum?:number,searchRecords?:ArrayOfValidIdListItem,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    totalSearchRecords;
    /** @type {number} */
    currentPageNum;
    /** @type {number} */
    maxPageNum;
    /** @type {ArrayOfValidIdListItem} */
    searchRecords;
}
export class GetValidIdsResponse {
    /** @param {{data?:GetValidIdsData}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {GetValidIdsData} */
    data;
}
export class GetValidIdsRequest {
    /** @param {{subUserName?:string,page?:number,sortOrder?:string,nameSearch?:string,filterReference?:string,filterType?:string,filterDateFrom?:string,filterDateTo?:string,filterUserName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @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;
    /** @type {number} */
    page;
    /** @type {string} */
    sortOrder;
    /** @type {string} */
    nameSearch;
    /** @type {string} */
    filterReference;
    /** @type {string} */
    filterType;
    /** @type {?string} */
    filterDateFrom;
    /** @type {?string} */
    filterDateTo;
    /**
     * @type {string}
     * @description If set, will only return searches created by the user */
    filterUserName;
}
export class GetValidIds extends BaseRequest {
    /** @param {{request?:GetValidIdsRequest,authentication?:Authentication}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {GetValidIdsRequest} */
    request;
}

JavaScript GetValidIds 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.

POST /validid/list HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"request":{"subUserName":"String","page":0,"sortOrder":"String","nameSearch":"String","filterReference":"String","filterType":"String","filterDateFrom":"\/Date(-62135596800000-0000)\/","filterDateTo":"\/Date(-62135596800000-0000)\/","filterUserName":"String"},"authentication":{"apiUserId":"String","apiUserKey":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":{"totalSearchRecords":0,"currentPageNum":0,"maxPageNum":0,"searchRecords":[{"id":0,"type":0,"score":0,"status":"String","dateSearched":"\/Date(-62135596800000-0000)\/","reference":"String","pepError":false,"replaced":false,"replacementSearchId":0,"hasCompletedRequest":false,"hasCompletedSearch":false,"searchCriteria":{"fullName":"String","dateOfBirth":"\/Date(-62135596800000-0000)\/","gender":"String","address":"String"}}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}