Sanctions Search API: v2

<back to all web services

GetSearches

Get all sanctions searches
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class GetSearches extends BaseRequest
    {
        @DataMember
        public GetSearchesRequest request = null;
        
        public GetSearchesRequest getRequest() { return request; }
        public GetSearches setRequest(GetSearchesRequest value) { this.request = value; return this; }
    }

    @DataContract
    public static class BaseRequest implements IBaseRequest
    {
        /**
        * The authentication credentials
        */
        @DataMember
        @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
        public Authentication authentication = null;
        
        public Authentication getAuthentication() { return authentication; }
        public BaseRequest setAuthentication(Authentication value) { this.authentication = value; return this; }
    }

    @DataContract
    public static class Authentication
    {
        /**
        * 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")
        public String apiUserId = null;

        /**
        * 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")
        public String apiUserKey = null;
        
        public String getApiUserId() { return apiUserId; }
        public Authentication setApiUserId(String value) { this.apiUserId = value; return this; }
        public String getApiUserKey() { return apiUserKey; }
        public Authentication setApiUserKey(String value) { this.apiUserKey = value; return this; }
    }

    public static class GetSearchesRequest
    {
        /**
        * 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")
        public String subUserName = null;

        public Boolean listUnresolvedSearches = null;
        public Boolean listUpdatedSearches = null;
        public Boolean listArchivedSearches = null;
        public Integer page = null;
        public String sortOrder = null;
        public String nameSearch = null;
        public Boolean nameSearchExact = null;
        public String filterReference = null;
        public String filterType = null;
        public Date filterDateFrom = null;
        public Date filterDateTo = null;
        /**
        * If set, will only return searches created by the user
        */
        @ApiMember(Description="If set, will only return searches created by the user")
        public String filterUserName = null;

        public Boolean includeSearchSourcesFull = null;
        
        public String getSubUserName() { return subUserName; }
        public GetSearchesRequest setSubUserName(String value) { this.subUserName = value; return this; }
        public Boolean isListUnresolvedSearches() { return listUnresolvedSearches; }
        public GetSearchesRequest setListUnresolvedSearches(Boolean value) { this.listUnresolvedSearches = value; return this; }
        public Boolean isListUpdatedSearches() { return listUpdatedSearches; }
        public GetSearchesRequest setListUpdatedSearches(Boolean value) { this.listUpdatedSearches = value; return this; }
        public Boolean isListArchivedSearches() { return listArchivedSearches; }
        public GetSearchesRequest setListArchivedSearches(Boolean value) { this.listArchivedSearches = value; return this; }
        public Integer getPage() { return page; }
        public GetSearchesRequest setPage(Integer value) { this.page = value; return this; }
        public String getSortOrder() { return sortOrder; }
        public GetSearchesRequest setSortOrder(String value) { this.sortOrder = value; return this; }
        public String getNameSearch() { return nameSearch; }
        public GetSearchesRequest setNameSearch(String value) { this.nameSearch = value; return this; }
        public Boolean isNameSearchExact() { return nameSearchExact; }
        public GetSearchesRequest setNameSearchExact(Boolean value) { this.nameSearchExact = value; return this; }
        public String getFilterReference() { return filterReference; }
        public GetSearchesRequest setFilterReference(String value) { this.filterReference = value; return this; }
        public String getFilterType() { return filterType; }
        public GetSearchesRequest setFilterType(String value) { this.filterType = value; return this; }
        public Date getFilterDateFrom() { return filterDateFrom; }
        public GetSearchesRequest setFilterDateFrom(Date value) { this.filterDateFrom = value; return this; }
        public Date getFilterDateTo() { return filterDateTo; }
        public GetSearchesRequest setFilterDateTo(Date value) { this.filterDateTo = value; return this; }
        public String getFilterUserName() { return filterUserName; }
        public GetSearchesRequest setFilterUserName(String value) { this.filterUserName = value; return this; }
        public Boolean isIncludeSearchSourcesFull() { return includeSearchSourcesFull; }
        public GetSearchesRequest setIncludeSearchSourcesFull(Boolean value) { this.includeSearchSourcesFull = value; return this; }
    }

    @DataContract
    public static class GetSearchesResponse
    {
        @DataMember
        public GetSearchesData data = null;
        
        public GetSearchesData getData() { return data; }
        public GetSearchesResponse setData(GetSearchesData value) { this.data = value; return this; }
    }

    public static class GetSearchesData extends BaseResponse
    {
        public Integer totalSearchRecords = null;
        public Integer currentPageNum = null;
        public Integer maxPageNum = null;
        public ArrayOfSearchListItem searchRecords = null;
        
        public Integer getTotalSearchRecords() { return totalSearchRecords; }
        public GetSearchesData setTotalSearchRecords(Integer value) { this.totalSearchRecords = value; return this; }
        public Integer getCurrentPageNum() { return currentPageNum; }
        public GetSearchesData setCurrentPageNum(Integer value) { this.currentPageNum = value; return this; }
        public Integer getMaxPageNum() { return maxPageNum; }
        public GetSearchesData setMaxPageNum(Integer value) { this.maxPageNum = value; return this; }
        public ArrayOfSearchListItem getSearchRecords() { return searchRecords; }
        public GetSearchesData setSearchRecords(ArrayOfSearchListItem value) { this.searchRecords = value; return this; }
    }

    public static class BaseResponse implements IBaseDataResponse, IHasResponseStatus
    {
        /**
        * The status of the response
        */
        @ApiMember(Description="The status of the response")
        public ResponseStatus responseStatus = null;
        
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public BaseResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

    public static class ArrayOfResponseError extends ArrayList<ResponseError>
    {
        
    }

    public static class ArrayOfSearchListItem extends ArrayList<SearchListItem>
    {
        
    }

    public static class SearchListItem
    {
        public Long id = null;
        public String searchType = null;
        public Date dateSearched = null;
        public Date dateUpdated = null;
        public Date dateArchived = null;
        public Boolean isArchived = null;
        public Integer numOfResults = null;
        public Boolean clientInResults = null;
        public Boolean clientNotInResults = null;
        public Boolean affectedByUpdate = null;
        public SearchCriteria searchCriteria = null;
        public ArrayList<SearchSource> searchSources = null;
        
        public Long getId() { return id; }
        public SearchListItem setId(Long value) { this.id = value; return this; }
        public String getSearchType() { return searchType; }
        public SearchListItem setSearchType(String value) { this.searchType = value; return this; }
        public Date getDateSearched() { return dateSearched; }
        public SearchListItem setDateSearched(Date value) { this.dateSearched = value; return this; }
        public Date getDateUpdated() { return dateUpdated; }
        public SearchListItem setDateUpdated(Date value) { this.dateUpdated = value; return this; }
        public Date getDateArchived() { return dateArchived; }
        public SearchListItem setDateArchived(Date value) { this.dateArchived = value; return this; }
        public Boolean getIsArchived() { return isArchived; }
        public SearchListItem setIsArchived(Boolean value) { this.isArchived = value; return this; }
        public Integer getNumOfResults() { return numOfResults; }
        public SearchListItem setNumOfResults(Integer value) { this.numOfResults = value; return this; }
        public Boolean isClientInResults() { return clientInResults; }
        public SearchListItem setClientInResults(Boolean value) { this.clientInResults = value; return this; }
        public Boolean isClientNotInResults() { return clientNotInResults; }
        public SearchListItem setClientNotInResults(Boolean value) { this.clientNotInResults = value; return this; }
        public Boolean isAffectedByUpdate() { return affectedByUpdate; }
        public SearchListItem setAffectedByUpdate(Boolean value) { this.affectedByUpdate = value; return this; }
        public SearchCriteria getSearchCriteria() { return searchCriteria; }
        public SearchListItem setSearchCriteria(SearchCriteria value) { this.searchCriteria = value; return this; }
        public ArrayList<SearchSource> getSearchSources() { return searchSources; }
        public SearchListItem setSearchSources(ArrayList<SearchSource> value) { this.searchSources = value; return this; }
    }

    public static class SearchCriteria
    {
        public String name = null;
        public String address = null;
        public String country = null;
        public String dateOfBirth = null;
        public String nationality = null;
        public String reference = null;
        
        public String getName() { return name; }
        public SearchCriteria setName(String value) { this.name = value; return this; }
        public String getAddress() { return address; }
        public SearchCriteria setAddress(String value) { this.address = value; return this; }
        public String getCountry() { return country; }
        public SearchCriteria setCountry(String value) { this.country = value; return this; }
        public String getDateOfBirth() { return dateOfBirth; }
        public SearchCriteria setDateOfBirth(String value) { this.dateOfBirth = value; return this; }
        public String getNationality() { return nationality; }
        public SearchCriteria setNationality(String value) { this.nationality = value; return this; }
        public String getReference() { return reference; }
        public SearchCriteria setReference(String value) { this.reference = value; return this; }
    }

    public static class SearchSource
    {
        public String listId = null;
        public String listName = null;
        public String listShortName = null;
        public Boolean isAffectedByListUpdate = null;
        
        public String getListId() { return listId; }
        public SearchSource setListId(String value) { this.listId = value; return this; }
        public String getListName() { return listName; }
        public SearchSource setListName(String value) { this.listName = value; return this; }
        public String getListShortName() { return listShortName; }
        public SearchSource setListShortName(String value) { this.listShortName = value; return this; }
        public Boolean getIsAffectedByListUpdate() { return isAffectedByListUpdate; }
        public SearchSource setIsAffectedByListUpdate(Boolean value) { this.isAffectedByListUpdate = value; return this; }
    }

}

Java GetSearches DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .soap11 suffix or ?format=soap11

HTTP + SOAP11

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /soap11 HTTP/1.1 
Host: api.sanctionssearch.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: GetSearches

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<GetSearches xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Authentication>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Authentication>
  <Request>
    <FilterDateFrom>0001-01-01T00:00:00</FilterDateFrom>
    <FilterDateTo>0001-01-01T00:00:00</FilterDateTo>
    <FilterReference>String</FilterReference>
    <FilterType>String</FilterType>
    <FilterUserName>String</FilterUserName>
    <IncludeSearchSourcesFull>false</IncludeSearchSourcesFull>
    <ListArchivedSearches>false</ListArchivedSearches>
    <ListUnresolvedSearches>false</ListUnresolvedSearches>
    <ListUpdatedSearches>false</ListUpdatedSearches>
    <NameSearch>String</NameSearch>
    <NameSearchExact>false</NameSearchExact>
    <Page>0</Page>
    <SortOrder>String</SortOrder>
    <SubUserName>String</SubUserName>
  </Request>
</GetSearches>

</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

<GetSearchesResponse 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>
    <CurrentPageNum>0</CurrentPageNum>
    <MaxPageNum>0</MaxPageNum>
    <SearchRecords>
      <SearchRecord>
        <AffectedByUpdate>false</AffectedByUpdate>
        <ClientInResults>false</ClientInResults>
        <ClientNotInResults>false</ClientNotInResults>
        <DateArchived>0001-01-01T00:00:00</DateArchived>
        <DateSearched>0001-01-01T00:00:00</DateSearched>
        <DateUpdated>0001-01-01T00:00:00</DateUpdated>
        <Id>0</Id>
        <IsArchived>false</IsArchived>
        <NumOfResults>0</NumOfResults>
        <SearchCriteria>
          <Address>String</Address>
          <Country>String</Country>
          <DateOfBirth>String</DateOfBirth>
          <Name>String</Name>
          <Nationality>String</Nationality>
          <Reference>String</Reference>
        </SearchCriteria>
        <SearchSources>
          <SearchSource>
            <IsAffectedByListUpdate>false</IsAffectedByListUpdate>
            <ListId>String</ListId>
            <ListName>String</ListName>
            <ListShortName>String</ListShortName>
          </SearchSource>
        </SearchSources>
        <SearchType>String</SearchType>
      </SearchRecord>
    </SearchRecords>
    <TotalSearchRecords>0</TotalSearchRecords>
  </Data>
</GetSearchesResponse>

</soap:Body>
</soap:Envelope>