| POST | /peps/list | Get all PEP searches |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
@DataContract
open class GetPepSearches : BaseRequest()
{
@DataMember
open var request:GetPepSearchesRequest? = null
}
@DataContract
open class BaseRequest : IBaseRequest
{
/**
* The authentication credentials
*/
@DataMember
@ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
override var authentication:Authentication? = null
}
@DataContract
open class Authentication
{
/**
* The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)
*/
@DataMember
@ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body")
open var apiUserId:String? = null
/**
* The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)
*/
@DataMember
@ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body")
open var apiUserKey:String? = null
/**
* The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).
*/
@DataMember
@ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body")
open var userId:String? = null
}
open class GetPepSearchesRequest
{
/**
* If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view
*/
@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")
open var subUserName:String? = null
open var listUnresolvedSearches:Boolean? = null
open var listUpdatedSearches:Boolean? = null
open var listExpiringSearches:Boolean? = null
open var listArchivedSearches:Boolean? = null
open var page:Int? = null
open var sortOrder:String? = null
open var nameSearch:String? = null
open var nameSearchExact:Boolean? = null
open var filterNameExcludes:String? = null
open var filterReference:String? = null
open var filterReferenceExcludes:String? = null
open var filterPepType:String? = null
open var filterType:String? = null
open var filterDateFrom:Date? = null
open var filterDateTo:Date? = null
open var filterDateRenewal:Date? = null
/**
* If set, will only return searches created by the user
*/
@ApiMember(Description="If set, will only return searches created by the user")
open var filterUserName:String? = null
}
@DataContract
open class GetPepSearchesResponse
{
@DataMember
@SerializedName("data") open var Data:GetPepSearchesData? = null
}
open class GetPepSearchesData : BaseResponse()
{
open var totalSearchRecords:Int? = null
open var currentPageNum:Int? = null
open var maxPageNum:Int? = null
open var searchRecords:ArrayOfPepSearchListItem? = null
}
open class BaseResponse : IBaseDataResponse, IHasResponseStatus
{
/**
* The status of the response
*/
@ApiMember(Description="The status of the response")
override var responseStatus:ResponseStatus? = null
}
open class ArrayOfResponseError : ArrayList<ResponseError>()
{
}
open class ArrayOfPepSearchListItem : ArrayList<PepSearchListItem>()
{
}
open class PepSearchListItem
{
open var id:Long? = null
open var searchType:String? = null
open var dateSearched:Date? = null
open var dateUpdated:Date? = null
open var dateRenewal:Date? = null
open var dateArchived:Date? = null
open var isArchived:Boolean? = null
open var numOfResults:Int? = null
open var clientInResults:Boolean? = null
open var clientNotInResults:Boolean? = null
open var affectedByUpdate:Boolean? = null
open var isDayOneSearch:Boolean? = null
open var searchCriteria:SearchCriteria? = null
}
open class SearchCriteria
{
open var name:String? = null
open var address:String? = null
open var country:String? = null
open var dateOfBirth:String? = null
open var nationality:String? = null
open var reference:String? = null
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /peps/list HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"request":{"subUserName":"String","listUnresolvedSearches":false,"listUpdatedSearches":false,"listExpiringSearches":false,"listArchivedSearches":false,"page":0,"sortOrder":"String","nameSearch":"String","nameSearchExact":false,"filterNameExcludes":"String","filterReference":"String","filterReferenceExcludes":"String","filterPepType":"String","filterType":"String","filterDateFrom":"\/Date(-62135596800000-0000)\/","filterDateTo":"\/Date(-62135596800000-0000)\/","filterDateRenewal":"\/Date(-62135596800000-0000)\/","filterUserName":"String"},"authentication":{"apiUserId":"String","apiUserKey":"String","userId":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"data":{"totalSearchRecords":0,"currentPageNum":0,"maxPageNum":0,"searchRecords":[{"id":0,"searchType":"String","dateSearched":"\/Date(-62135596800000-0000)\/","dateUpdated":"\/Date(-62135596800000-0000)\/","dateRenewal":"\/Date(-62135596800000-0000)\/","dateArchived":"\/Date(-62135596800000-0000)\/","isArchived":false,"numOfResults":0,"clientInResults":false,"clientNotInResults":false,"affectedByUpdate":false,"isDayOneSearch":false,"searchCriteria":{"name":"String","address":"String","country":"String","dateOfBirth":"String","nationality":"String","reference":"String"}}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}