Sanctions Search API: v2

<back to all web services

GetCompanyLookups

CompanyLookup
The following routes are available for this service:
POST/companylookups/listGet all company lookups
"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 SearchCriteria {
    /** @param {{name?:string,address?:string,country?:string,dateOfBirth?:string,nationality?:string,reference?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {string} */
    address;
    /** @type {string} */
    country;
    /** @type {string} */
    dateOfBirth;
    /** @type {string} */
    nationality;
    /** @type {string} */
    reference;
}
export class ArrayOfLists extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class CompanyLookupListItem {
    /** @param {{id?:number,searchCriteria?:SearchCriteria,selectedLists?:ArrayOfLists,date?:string,hasCompanyId?:boolean,hasCompanyDetails?:boolean,hasStartedSearches?:boolean,hasCompletedSearches?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {SearchCriteria} */
    searchCriteria;
    /** @type {ArrayOfLists} */
    selectedLists;
    /** @type {string} */
    date;
    /** @type {boolean} */
    hasCompanyId;
    /** @type {boolean} */
    hasCompanyDetails;
    /** @type {boolean} */
    hasStartedSearches;
    /** @type {boolean} */
    hasCompletedSearches;
}
export class ArrayOfCompanyLookupListItem extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetCompanyLookupsData extends BaseResponse {
    /** @param {{totalRecords?:number,currentPageNum?:number,maxPageNum?:number,companyLookupRecords?:ArrayOfCompanyLookupListItem,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    totalRecords;
    /** @type {number} */
    currentPageNum;
    /** @type {number} */
    maxPageNum;
    /** @type {ArrayOfCompanyLookupListItem} */
    companyLookupRecords;
}
export class GetCompanyLookupsResponse {
    /** @param {{data?:GetCompanyLookupsData}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {GetCompanyLookupsData} */
    data;
}
export class GetCompanyLookupsRequest {
    /** @param {{subUserName?:string,listIncompleteSearches?:boolean,page?:number,sortOrder?:string,nameSearch?:string,filterReference?: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 {boolean} */
    listIncompleteSearches;
    /** @type {number} */
    page;
    /** @type {string} */
    sortOrder;
    /** @type {string} */
    nameSearch;
    /** @type {string} */
    filterReference;
    /** @type {?string} */
    filterDateFrom;
    /** @type {?string} */
    filterDateTo;
    /**
     * @type {string}
     * @description If set, will only return searches created by the user */
    filterUserName;
}
export class GetCompanyLookups extends BaseRequest {
    /** @param {{request?:GetCompanyLookupsRequest,authentication?:Authentication}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {GetCompanyLookupsRequest} */
    request;
}

JavaScript GetCompanyLookups 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 /companylookups/list HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"request":{"subUserName":"String","listIncompleteSearches":false,"page":0,"sortOrder":"String","nameSearch":"String","filterReference":"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":{"totalRecords":0,"currentPageNum":0,"maxPageNum":0,"companyLookupRecords":[{"id":0,"searchCriteria":{"name":"String","address":"String","country":"String","dateOfBirth":"String","nationality":"String","reference":"String"},"selectedLists":["String"],"date":"\/Date(-62135596800000-0000)\/","hasCompanyId":false,"hasCompanyDetails":false,"hasStartedSearches":false,"hasCompletedSearches":false}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}