POST | /sanctions/entity/get | Create a get a sanctions search for an entity | This will get a new sanctions search for an entity, such as a company, vessel, organisation, or group. |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
@DataContract
public static class GetCompanySearch implements IBaseRequest
{
@DataMember
public Authentication Authentication = null;
@DataMember
public Long Id = null;
public Authentication getAuthentication() { return Authentication; }
public GetCompanySearch setAuthentication(Authentication value) { this.Authentication = value; return this; }
public Long getId() { return Id; }
public GetCompanySearch setId(Long value) { this.Id = value; return this; }
}
@DataContract
public static class Authentication implements IAuthentication
{
/**
* The API User ID that will authenticate your request
*/
@DataMember
@ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
public String ApiUserId = null;
/**
* The API User Key that will authenticate your request
*/
@DataMember
@ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
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; }
}
@DataContract
public static class GetCompanySearchResponse
{
@DataMember
public GetCompanySearchData Data = null;
public GetCompanySearchData getData() { return Data; }
public GetCompanySearchResponse setData(GetCompanySearchData value) { this.Data = value; return this; }
}
@DataContract
public static class GetCompanySearchData implements IBaseDataResponse, IHasResponseStatus
{
@DataMember
public ResponseStatus ResponseStatus = null;
@DataMember
public SearchRecord SearchRecord = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public GetCompanySearchData setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public SearchRecord getSearchRecord() { return SearchRecord; }
public GetCompanySearchData setSearchRecord(SearchRecord value) { this.SearchRecord = value; return this; }
}
public static class ArrayOfResponseError extends ArrayList<ResponseError>
{
}
public static class SearchRecord
{
public Long Id = null;
public String SearchType = null;
public Date DateSearched = null;
public Date DateUpdated = null;
public Integer NumOfResults = null;
public Boolean ClientInResults = null;
public Boolean ClientNotInResults = null;
public Boolean AffectedByUpdate = null;
public SearchCriteria SearchCriteria = null;
public SearchResults SearchResults = null;
public Long getId() { return Id; }
public SearchRecord setId(Long value) { this.Id = value; return this; }
public String getSearchType() { return SearchType; }
public SearchRecord setSearchType(String value) { this.SearchType = value; return this; }
public Date getDateSearched() { return DateSearched; }
public SearchRecord setDateSearched(Date value) { this.DateSearched = value; return this; }
public Date getDateUpdated() { return DateUpdated; }
public SearchRecord setDateUpdated(Date value) { this.DateUpdated = value; return this; }
public Integer getNumOfResults() { return NumOfResults; }
public SearchRecord setNumOfResults(Integer value) { this.NumOfResults = value; return this; }
public Boolean isClientInResults() { return ClientInResults; }
public SearchRecord setClientInResults(Boolean value) { this.ClientInResults = value; return this; }
public Boolean isClientNotInResults() { return ClientNotInResults; }
public SearchRecord setClientNotInResults(Boolean value) { this.ClientNotInResults = value; return this; }
public Boolean isAffectedByUpdate() { return AffectedByUpdate; }
public SearchRecord setAffectedByUpdate(Boolean value) { this.AffectedByUpdate = value; return this; }
public SearchCriteria getSearchCriteria() { return SearchCriteria; }
public SearchRecord setSearchCriteria(SearchCriteria value) { this.SearchCriteria = value; return this; }
public SearchResults getSearchResults() { return SearchResults; }
public SearchRecord setSearchResults(SearchResults value) { this.SearchResults = value; return this; }
}
public static class SearchCriteria
{
public String Name = null;
public String DateOfBirth = null;
public String CountryOfBirth = null;
public String Nationality = null;
public String Address = null;
public String getName() { return Name; }
public SearchCriteria setName(String value) { this.Name = value; return this; }
public String getDateOfBirth() { return DateOfBirth; }
public SearchCriteria setDateOfBirth(String value) { this.DateOfBirth = value; return this; }
public String getCountryOfBirth() { return CountryOfBirth; }
public SearchCriteria setCountryOfBirth(String value) { this.CountryOfBirth = value; return this; }
public String getNationality() { return Nationality; }
public SearchCriteria setNationality(String value) { this.Nationality = value; return this; }
public String getAddress() { return Address; }
public SearchCriteria setAddress(String value) { this.Address = value; return this; }
}
public static class SearchResults
{
public ArrayList<SearchResultHmTreasury> HMTResults = null;
public ArrayList<SearchResultOfac> OfacResults = null;
public ArrayList<SearchResultHmTreasury> getHmtResults() { return HMTResults; }
public SearchResults setHmtResults(ArrayList<SearchResultHmTreasury> value) { this.HMTResults = value; return this; }
public ArrayList<SearchResultOfac> getOfacResults() { return OfacResults; }
public SearchResults setOfacResults(ArrayList<SearchResultOfac> value) { this.OfacResults = value; return this; }
}
public static class SearchResultHmTreasury
{
public Integer ResultStrength = null;
public BigDecimal ResultSimilarity = null;
public Boolean ResultResolved = null;
public String ResultType = null;
public Date DateListed = null;
public Date DateUpdated = null;
public String Name1 = null;
public String Name2 = null;
public String Name3 = null;
public String Name4 = null;
public String Name5 = null;
public String Name6 = null;
public String DateOfBirth = null;
public String CountryOfBirth = null;
public String Nationality = null;
public String Address1 = null;
public String Address2 = null;
public String Address3 = null;
public String Address4 = null;
public String Address5 = null;
public String Address6 = null;
public String PostCode = null;
public String Country = null;
public Integer getResultStrength() { return ResultStrength; }
public SearchResultHmTreasury setResultStrength(Integer value) { this.ResultStrength = value; return this; }
public BigDecimal getResultSimilarity() { return ResultSimilarity; }
public SearchResultHmTreasury setResultSimilarity(BigDecimal value) { this.ResultSimilarity = value; return this; }
public Boolean isResultResolved() { return ResultResolved; }
public SearchResultHmTreasury setResultResolved(Boolean value) { this.ResultResolved = value; return this; }
public String getResultType() { return ResultType; }
public SearchResultHmTreasury setResultType(String value) { this.ResultType = value; return this; }
public Date getDateListed() { return DateListed; }
public SearchResultHmTreasury setDateListed(Date value) { this.DateListed = value; return this; }
public Date getDateUpdated() { return DateUpdated; }
public SearchResultHmTreasury setDateUpdated(Date value) { this.DateUpdated = value; return this; }
public String getName1() { return Name1; }
public SearchResultHmTreasury setName1(String value) { this.Name1 = value; return this; }
public String getName2() { return Name2; }
public SearchResultHmTreasury setName2(String value) { this.Name2 = value; return this; }
public String getName3() { return Name3; }
public SearchResultHmTreasury setName3(String value) { this.Name3 = value; return this; }
public String getName4() { return Name4; }
public SearchResultHmTreasury setName4(String value) { this.Name4 = value; return this; }
public String getName5() { return Name5; }
public SearchResultHmTreasury setName5(String value) { this.Name5 = value; return this; }
public String getName6() { return Name6; }
public SearchResultHmTreasury setName6(String value) { this.Name6 = value; return this; }
public String getDateOfBirth() { return DateOfBirth; }
public SearchResultHmTreasury setDateOfBirth(String value) { this.DateOfBirth = value; return this; }
public String getCountryOfBirth() { return CountryOfBirth; }
public SearchResultHmTreasury setCountryOfBirth(String value) { this.CountryOfBirth = value; return this; }
public String getNationality() { return Nationality; }
public SearchResultHmTreasury setNationality(String value) { this.Nationality = value; return this; }
public String getAddress1() { return Address1; }
public SearchResultHmTreasury setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public SearchResultHmTreasury setAddress2(String value) { this.Address2 = value; return this; }
public String getAddress3() { return Address3; }
public SearchResultHmTreasury setAddress3(String value) { this.Address3 = value; return this; }
public String getAddress4() { return Address4; }
public SearchResultHmTreasury setAddress4(String value) { this.Address4 = value; return this; }
public String getAddress5() { return Address5; }
public SearchResultHmTreasury setAddress5(String value) { this.Address5 = value; return this; }
public String getAddress6() { return Address6; }
public SearchResultHmTreasury setAddress6(String value) { this.Address6 = value; return this; }
public String getPostCode() { return PostCode; }
public SearchResultHmTreasury setPostCode(String value) { this.PostCode = value; return this; }
public String getCountry() { return Country; }
public SearchResultHmTreasury setCountry(String value) { this.Country = value; return this; }
}
public static class SearchResultOfac
{
public Integer ResultStrength = null;
public BigDecimal ResultSimilarity = null;
public Boolean ResultResolved = null;
public String ResultType = null;
public Date DateUpdated = null;
public String FirstName = null;
public String LastName = null;
public ArrayList<SearchResultOfacAddress> Addresses = null;
public ArrayList<SearchResultOfacAka> Akas = null;
public ArrayList<SearchResultOfacDateOfBirth> DateOfBirths = null;
public ArrayList<SearchResultOfacNationality> Nationalities = null;
public ArrayList<SearchResultOfacPlaceOfBirth> PlaceOfBirths = null;
public Integer getResultStrength() { return ResultStrength; }
public SearchResultOfac setResultStrength(Integer value) { this.ResultStrength = value; return this; }
public BigDecimal getResultSimilarity() { return ResultSimilarity; }
public SearchResultOfac setResultSimilarity(BigDecimal value) { this.ResultSimilarity = value; return this; }
public Boolean isResultResolved() { return ResultResolved; }
public SearchResultOfac setResultResolved(Boolean value) { this.ResultResolved = value; return this; }
public String getResultType() { return ResultType; }
public SearchResultOfac setResultType(String value) { this.ResultType = value; return this; }
public Date getDateUpdated() { return DateUpdated; }
public SearchResultOfac setDateUpdated(Date value) { this.DateUpdated = value; return this; }
public String getFirstName() { return FirstName; }
public SearchResultOfac setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public SearchResultOfac setLastName(String value) { this.LastName = value; return this; }
public ArrayList<SearchResultOfacAddress> getAddresses() { return Addresses; }
public SearchResultOfac setAddresses(ArrayList<SearchResultOfacAddress> value) { this.Addresses = value; return this; }
public ArrayList<SearchResultOfacAka> getAkas() { return Akas; }
public SearchResultOfac setAkas(ArrayList<SearchResultOfacAka> value) { this.Akas = value; return this; }
public ArrayList<SearchResultOfacDateOfBirth> getDateOfBirths() { return DateOfBirths; }
public SearchResultOfac setDateOfBirths(ArrayList<SearchResultOfacDateOfBirth> value) { this.DateOfBirths = value; return this; }
public ArrayList<SearchResultOfacNationality> getNationalities() { return Nationalities; }
public SearchResultOfac setNationalities(ArrayList<SearchResultOfacNationality> value) { this.Nationalities = value; return this; }
public ArrayList<SearchResultOfacPlaceOfBirth> getPlaceOfBirths() { return PlaceOfBirths; }
public SearchResultOfac setPlaceOfBirths(ArrayList<SearchResultOfacPlaceOfBirth> value) { this.PlaceOfBirths = value; return this; }
}
public static class SearchResultOfacAddress
{
public String Address1 = null;
public String Address2 = null;
public String Address3 = null;
public String City = null;
public String State = null;
public String PostCode = null;
public String Country = null;
public String getAddress1() { return Address1; }
public SearchResultOfacAddress setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public SearchResultOfacAddress setAddress2(String value) { this.Address2 = value; return this; }
public String getAddress3() { return Address3; }
public SearchResultOfacAddress setAddress3(String value) { this.Address3 = value; return this; }
public String getCity() { return City; }
public SearchResultOfacAddress setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public SearchResultOfacAddress setState(String value) { this.State = value; return this; }
public String getPostCode() { return PostCode; }
public SearchResultOfacAddress setPostCode(String value) { this.PostCode = value; return this; }
public String getCountry() { return Country; }
public SearchResultOfacAddress setCountry(String value) { this.Country = value; return this; }
}
public static class SearchResultOfacAka
{
public String FirstName = null;
public String LastName = null;
public String Type = null;
public String Strength = null;
public String getFirstName() { return FirstName; }
public SearchResultOfacAka setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public SearchResultOfacAka setLastName(String value) { this.LastName = value; return this; }
public String getType() { return Type; }
public SearchResultOfacAka setType(String value) { this.Type = value; return this; }
public String getStrength() { return Strength; }
public SearchResultOfacAka setStrength(String value) { this.Strength = value; return this; }
}
public static class SearchResultOfacDateOfBirth
{
public String DateOfBirth = null;
public String getDateOfBirth() { return DateOfBirth; }
public SearchResultOfacDateOfBirth setDateOfBirth(String value) { this.DateOfBirth = value; return this; }
}
public static class SearchResultOfacNationality
{
public String Country = null;
public String getCountry() { return Country; }
public SearchResultOfacNationality setCountry(String value) { this.Country = value; return this; }
}
public static class SearchResultOfacPlaceOfBirth
{
public String PlaceOfBirth = null;
public String getPlaceOfBirth() { return PlaceOfBirth; }
public SearchResultOfacPlaceOfBirth setPlaceOfBirth(String value) { this.PlaceOfBirth = value; return this; }
}
}
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 /sanctions/entity/get HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Authentication":{"ApiUserId":"String","ApiUserKey":"String"},"Id":0}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Data":{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]},"SearchRecord":{"Id":0,"SearchType":"String","DateSearched":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","NumOfResults":0,"ClientInResults":false,"ClientNotInResults":false,"AffectedByUpdate":false,"SearchCriteria":{"Name":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address":"String"},"SearchResults":{"HMTResults":[{"ResultStrength":0,"ResultSimilarity":0,"ResultResolved":false,"ResultType":"String","DateListed":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","Name1":"String","Name2":"String","Name3":"String","Name4":"String","Name5":"String","Name6":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address1":"String","Address2":"String","Address3":"String","Address4":"String","Address5":"String","Address6":"String","PostCode":"String","Country":"String"}],"OfacResults":[{"ResultStrength":0,"ResultSimilarity":0,"ResultResolved":false,"ResultType":"String","DateUpdated":"\/Date(-62135596800000-0000)\/","FirstName":"String","LastName":"String","Addresses":[{"Address1":"String","Address2":"String","Address3":"String","City":"String","State":"String","PostCode":"String","Country":"String"}],"Akas":[{"FirstName":"String","LastName":"String","Type":"String","Strength":"String"}],"DateOfBirths":[{"DateOfBirth":"String"}],"Nationalities":[{"Country":"String"}],"PlaceOfBirths":[{"PlaceOfBirth":"String"}]}]}}}}