GET | /dbs | Get all DBS Searches |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @DataContract
class Authentication implements IConvertible
{
/**
* The API User ID provided by us when you signed up to use our API
*/
// @DataMember
// @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
String? apiUserId;
/**
* The API User Key provided by us when you signed up to use our API
*/
// @DataMember
// @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
String? apiUserKey;
Authentication({this.apiUserId,this.apiUserKey});
Authentication.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
apiUserId = json['apiUserId'];
apiUserKey = json['apiUserKey'];
return this;
}
Map<String, dynamic> toJson() => {
'apiUserId': apiUserId,
'apiUserKey': apiUserKey
};
getTypeName() => "Authentication";
TypeContext? context = _ctx;
}
// @DataContract
class BaseRequest implements IBaseRequest, IConvertible
{
/**
* The authentication credentials
*/
// @DataMember
// @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
Authentication? authentication;
BaseRequest({this.authentication});
BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
authentication = JsonConverters.fromJson(json['authentication'],'Authentication',context!);
return this;
}
Map<String, dynamic> toJson() => {
'authentication': JsonConverters.toJson(authentication,'Authentication',context!)
};
getTypeName() => "BaseRequest";
TypeContext? context = _ctx;
}
// @DataContract
class PagedRequest extends BaseRequest implements IConvertible
{
/**
* The maximum number of records to be returned in one page
*/
// @DataMember(Name="page[limit]")
// @ApiMember(Description="The maximum number of records to be returned in one page", ParameterType="query")
int? page_limit_;
/**
* The starting point in the list of records from where the data should be fetched. Zero based index.
*/
// @DataMember(Name="page[offset]")
// @ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.", ParameterType="query")
int? page_offset_;
/**
* The term to determine the order in which the data is returned
*/
// @DataMember
// @ApiMember(Description="The term to determine the order in which the data is returned", ParameterType="query")
String? sort;
PagedRequest({this.page_limit_,this.page_offset_,this.sort});
PagedRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
page_limit_ = json['pageLimit'];
page_offset_ = json['pageOffset'];
sort = json['sort'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'page_limit_': page_limit_,
'page_offset_': page_offset_,
'sort': sort
});
getTypeName() => "PagedRequest";
TypeContext? context = _ctx;
}
// @DataContract
class GetDbsSearches extends PagedRequest implements IConvertible
{
/**
* Filter the results to those that have a Name including the specified value
*/
// @DataMember
// @ApiMember(Description="Filter the results to those that have a Name including the specified value", ParameterType="query")
String? name;
/**
* Filter the results to those that were created after (or on) this date
*/
// @DataMember
// @ApiMember(Description="Filter the results to those that were created after (or on) this date", ParameterType="query")
DateTime? dateFrom;
/**
* Filter the results to those that were created before this date
*/
// @DataMember
// @ApiMember(Description="Filter the results to those that were created before this date", ParameterType="query")
DateTime? dateTo;
/**
* Filter the results to those where the applicant has provided their information (true), or not (false), or either (null)
*/
// @DataMember
// @ApiMember(Description="Filter the results to those where the applicant has provided their information (true), or not (false), or either (null)", ParameterType="query")
bool? isApplicantInfoCompleted;
/**
* Filter the results to those where the ID Checker has verified the applicant's ID (true), or not (false), or either (null)
*/
// @DataMember
// @ApiMember(Description="Filter the results to those where the ID Checker has verified the applicant's ID (true), or not (false), or either (null)", ParameterType="query")
bool? isIdCheckCompleted;
/**
* Filter the results to those where the application is complete and ready to be submitted (true), or not (false), or either (null)
*/
// @DataMember
// @ApiMember(Description="Filter the results to those where the application is complete and ready to be submitted (true), or not (false), or either (null)", ParameterType="query")
bool? isApplicationCompleted;
/**
* Filter the results to those where the application has been submitted (true), or not (false), or either (null)
*/
// @DataMember
// @ApiMember(Description="Filter the results to those where the application has been submitted (true), or not (false), or either (null)", ParameterType="query")
bool? isApplicationSubmitted;
/**
* Filter the results to those where the application has been disclosed (true), or not (false), or either (null)
*/
// @DataMember
// @ApiMember(Description="Filter the results to those where the application has been disclosed (true), or not (false), or either (null)", ParameterType="query")
bool? isApplicationDisclosed;
/**
* If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view
*/
// @DataMember
// @ApiMember(Description="If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view", ParameterType="query")
String? subUserName;
GetDbsSearches({this.name,this.dateFrom,this.dateTo,this.isApplicantInfoCompleted,this.isIdCheckCompleted,this.isApplicationCompleted,this.isApplicationSubmitted,this.isApplicationDisclosed,this.subUserName});
GetDbsSearches.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
name = json['name'];
dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!);
dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!);
isApplicantInfoCompleted = json['isApplicantInfoCompleted'];
isIdCheckCompleted = json['isIdCheckCompleted'];
isApplicationCompleted = json['isApplicationCompleted'];
isApplicationSubmitted = json['isApplicationSubmitted'];
isApplicationDisclosed = json['isApplicationDisclosed'];
subUserName = json['subUserName'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'name': name,
'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!),
'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!),
'isApplicantInfoCompleted': isApplicantInfoCompleted,
'isIdCheckCompleted': isIdCheckCompleted,
'isApplicationCompleted': isApplicationCompleted,
'isApplicationSubmitted': isApplicationSubmitted,
'isApplicationDisclosed': isApplicationDisclosed,
'subUserName': subUserName
});
getTypeName() => "GetDbsSearches";
TypeContext? context = _ctx;
}
class DbsSearchShort implements IConvertible
{
int? id;
DateTime? dateSearched;
DateTime? dateUpdated;
String? status;
String? disclosureStatus;
bool? isApplicantInfoCompleted;
bool? isIdCheckCompleted;
bool? isApplicationCompleted;
bool? isApplicationSubmitted;
bool? isApplicationDisclosed;
String? disclosureLevel;
String? name;
String? reference;
DbsSearchShort({this.id,this.dateSearched,this.dateUpdated,this.status,this.disclosureStatus,this.isApplicantInfoCompleted,this.isIdCheckCompleted,this.isApplicationCompleted,this.isApplicationSubmitted,this.isApplicationDisclosed,this.disclosureLevel,this.name,this.reference});
DbsSearchShort.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
dateSearched = JsonConverters.fromJson(json['dateSearched'],'DateTime',context!);
dateUpdated = JsonConverters.fromJson(json['dateUpdated'],'DateTime',context!);
status = json['status'];
disclosureStatus = json['disclosureStatus'];
isApplicantInfoCompleted = json['isApplicantInfoCompleted'];
isIdCheckCompleted = json['isIdCheckCompleted'];
isApplicationCompleted = json['isApplicationCompleted'];
isApplicationSubmitted = json['isApplicationSubmitted'];
isApplicationDisclosed = json['isApplicationDisclosed'];
disclosureLevel = json['disclosureLevel'];
name = json['name'];
reference = json['reference'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'dateSearched': JsonConverters.toJson(dateSearched,'DateTime',context!),
'dateUpdated': JsonConverters.toJson(dateUpdated,'DateTime',context!),
'status': status,
'disclosureStatus': disclosureStatus,
'isApplicantInfoCompleted': isApplicantInfoCompleted,
'isIdCheckCompleted': isIdCheckCompleted,
'isApplicationCompleted': isApplicationCompleted,
'isApplicationSubmitted': isApplicationSubmitted,
'isApplicationDisclosed': isApplicationDisclosed,
'disclosureLevel': disclosureLevel,
'name': name,
'reference': reference
};
getTypeName() => "DbsSearchShort";
TypeContext? context = _ctx;
}
class ArrayOfDbsSearchShort extends ListBase<DbsSearchShort> implements IConvertible
{
final List<DbsSearchShort> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
DbsSearchShort operator [](int index) => l[index];
void operator []=(int index, DbsSearchShort value) { l[index] = value; }
ArrayOfDbsSearchShort();
ArrayOfDbsSearchShort.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ArrayOfDbsSearchShort";
TypeContext? context = _ctx;
}
class GetDbsSearchesData extends PagedResponse<GetDbsSearches> implements IConvertible
{
ArrayOfDbsSearchShort? searches;
GetDbsSearchesData({this.searches});
GetDbsSearchesData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
searches = JsonConverters.fromJson(json['searches'],'ArrayOfDbsSearchShort',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'searches': JsonConverters.toJson(searches,'ArrayOfDbsSearchShort',context!)
});
getTypeName() => "GetDbsSearchesData";
TypeContext? context = _ctx;
}
// @DataContract
class GetDbsSearchesResponse implements IConvertible
{
// @DataMember
GetDbsSearchesData? data;
GetDbsSearchesResponse({this.data});
GetDbsSearchesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
data = JsonConverters.fromJson(json['data'],'GetDbsSearchesData',context!);
return this;
}
Map<String, dynamic> toJson() => {
'data': JsonConverters.toJson(data,'GetDbsSearchesData',context!)
};
getTypeName() => "GetDbsSearchesResponse";
TypeContext? context = _ctx;
}
// @DataContract
class ResponseError implements IConvertible
{
// @DataMember(Order=1)
String? errorCode;
// @DataMember(Order=2)
String? fieldName;
// @DataMember(Order=3)
String? message;
// @DataMember(Order=4)
Map<String,String?>? meta;
ResponseError({this.errorCode,this.fieldName,this.message,this.meta});
ResponseError.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
errorCode = json['errorCode'];
fieldName = json['fieldName'];
message = json['message'];
meta = JsonConverters.toStringMap(json['meta']);
return this;
}
Map<String, dynamic> toJson() => {
'errorCode': errorCode,
'fieldName': fieldName,
'message': message,
'meta': meta
};
getTypeName() => "ResponseError";
TypeContext? context = _ctx;
}
class ArrayOfResponseError extends ListBase<ResponseError> implements IConvertible
{
final List<ResponseError> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
ResponseError operator [](int index) => l[index];
void operator []=(int index, ResponseError value) { l[index] = value; }
ArrayOfResponseError();
ArrayOfResponseError.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ArrayOfResponseError";
TypeContext? context = _ctx;
}
// @DataContract
class ResponseStatus implements IConvertible
{
// @DataMember(Order=1)
String? errorCode;
// @DataMember(Order=2)
String? message;
// @DataMember(Order=3)
String? stackTrace;
// @DataMember(Order=4)
ArrayOfResponseError? errors;
// @DataMember(Order=5)
Map<String,String?>? meta;
ResponseStatus({this.errorCode,this.message,this.stackTrace,this.errors,this.meta});
ResponseStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
errorCode = json['errorCode'];
message = json['message'];
stackTrace = json['stackTrace'];
errors = JsonConverters.fromJson(json['errors'],'ArrayOfResponseError',context!);
meta = JsonConverters.toStringMap(json['meta']);
return this;
}
Map<String, dynamic> toJson() => {
'errorCode': errorCode,
'message': message,
'stackTrace': stackTrace,
'errors': JsonConverters.toJson(errors,'ArrayOfResponseError',context!),
'meta': meta
};
getTypeName() => "ResponseStatus";
TypeContext? context = _ctx;
}
class BaseResponse implements IBaseDataResponse, IHasResponseStatus, IConvertible
{
/**
* The status of the response
*/
// @ApiMember(Description="The status of the response")
ResponseStatus? responseStatus;
BaseResponse({this.responseStatus});
BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "BaseResponse";
TypeContext? context = _ctx;
}
class PagedResponse<T> extends BaseResponse implements IConvertible
{
/**
* The response Metadata
*/
// @ApiMember(Description="The response Metadata")
Meta<T>? meta;
PagedResponse({this.meta});
PagedResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
meta = JsonConverters.fromJson(json['meta'],'Meta<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'meta': JsonConverters.toJson(meta,'Meta<T>',context!)
});
getTypeName() => "PagedResponse<$T>";
TypeContext? context = _ctx;
}
class Links implements IConvertible
{
// @apiMember()
String? self;
Links({this.self});
Links.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
self = json['self'];
return this;
}
Map<String, dynamic> toJson() => {
'self': self
};
getTypeName() => "Links";
TypeContext? context = _ctx;
}
class MetaLinks extends Links implements IConvertible
{
/**
* The link to the first page of records
*/
// @ApiMember(Description="The link to the first page of records")
String? first;
/**
* The link to the last page of records
*/
// @ApiMember(Description="The link to the last page of records")
String? last;
/**
* The link to the next page of records, if applicable
*/
// @ApiMember(Description="The link to the next page of records, if applicable")
String? next;
/**
* The link to the last page of records, if applicable
*/
// @ApiMember(Description="The link to the last page of records, if applicable")
String? prev;
MetaLinks({this.first,this.last,this.next,this.prev});
MetaLinks.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
first = json['first'];
last = json['last'];
next = json['next'];
prev = json['prev'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'first': first,
'last': last,
'next': next,
'prev': prev
});
getTypeName() => "MetaLinks";
TypeContext? context = _ctx;
}
class Meta<T> implements IConvertible
{
/**
* Pagination links
*/
// @ApiMember(Description="Pagination links")
MetaLinks? links;
/**
* The total number of records for the query
*/
// @ApiMember(Description="The total number of records for the query")
int? totalCount;
/**
* The maximum number of records to be returned in one page
*/
// @ApiMember(Description="The maximum number of records to be returned in one page")
int? pageLimit;
/**
* The starting point in the list of records from where the data should be fetched. Zero based index.
*/
// @ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.")
int? pageOffset;
Meta({this.links,this.totalCount,this.pageLimit,this.pageOffset});
Meta.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
links = JsonConverters.fromJson(json['links'],'MetaLinks',context!);
totalCount = json['totalCount'];
pageLimit = json['pageLimit'];
pageOffset = json['pageOffset'];
return this;
}
Map<String, dynamic> toJson() => {
'links': JsonConverters.toJson(links,'MetaLinks',context!),
'totalCount': totalCount,
'pageLimit': pageLimit,
'pageOffset': pageOffset
};
getTypeName() => "Meta<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: <String, TypeInfo> {
'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()),
'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
'PagedRequest': TypeInfo(TypeOf.Class, create:() => PagedRequest()),
'GetDbsSearches': TypeInfo(TypeOf.Class, create:() => GetDbsSearches()),
'DbsSearchShort': TypeInfo(TypeOf.Class, create:() => DbsSearchShort()),
'ArrayOfDbsSearchShort': TypeInfo(TypeOf.Class, create:() => ArrayOfDbsSearchShort()),
'GetDbsSearchesData': TypeInfo(TypeOf.Class, create:() => GetDbsSearchesData()),
'GetDbsSearchesResponse': TypeInfo(TypeOf.Class, create:() => GetDbsSearchesResponse()),
'ArrayOfResponseError': TypeInfo(TypeOf.Class, create:() => ArrayOfResponseError()),
'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
'PagedResponse<T>': TypeInfo(TypeOf.Class, create:() => PagedResponse<T>()),
'Links': TypeInfo(TypeOf.Class, create:() => Links()),
'MetaLinks': TypeInfo(TypeOf.Class, create:() => MetaLinks()),
'Meta<T>': TypeInfo(TypeOf.Class, create:() => Meta<T>()),
});
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>