GET | /dbs | Get 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 .xml suffix or ?format=xml
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/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetDbsSearchesResponse 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> <Searches> <SearchRecord> <DateSearched>0001-01-01T00:00:00</DateSearched> <DateUpdated>0001-01-01T00:00:00</DateUpdated> <DisclosureLevel>String</DisclosureLevel> <DisclosureStatus>String</DisclosureStatus> <Id>0</Id> <IsApplicantInfoCompleted>false</IsApplicantInfoCompleted> <IsApplicationCompleted>false</IsApplicationCompleted> <IsApplicationDisclosed>false</IsApplicationDisclosed> <IsApplicationSubmitted>false</IsApplicationSubmitted> <IsIdCheckCompleted>false</IsIdCheckCompleted> <Name>String</Name> <Reference>String</Reference> <Status>String</Status> </SearchRecord> </Searches> </Data> </GetDbsSearchesResponse>