Sanctions Search API: v2

<back to all web services

GetDbsSearches

using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using SanctionsSearch.Api2.ServiceModel.Operations.DbsSearches;
using SanctionsSearch.Api2.ServiceModel.Operations.Base;
using SanctionsSearch.Api2.ServiceModel.Types;

namespace SanctionsSearch.Api2.ServiceModel.Operations.Base
{
    public partial class ArrayOfResponseError
        : List<ResponseError>
    {
    }

    [DataContract]
    public partial class BaseRequest
        : IBaseRequest
    {
        ///<summary>
        ///The authentication credentials
        ///</summary>
        [DataMember]
        [ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")]
        public virtual Authentication Authentication { get; set; }
    }

    public partial class BaseResponse
        : IBaseDataResponse, IHasResponseStatus
    {
        ///<summary>
        ///The status of the response
        ///</summary>
        [ApiMember(Description="The status of the response")]
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

    [DataContract]
    public partial class PagedRequest
        : BaseRequest
    {
        ///<summary>
        ///The maximum number of records to be returned in one page
        ///</summary>
        [DataMember(Name="page[limit]")]
        [ApiMember(Description="The maximum number of records to be returned in one page", ParameterType="query")]
        public virtual int PageLimit { get; set; }

        ///<summary>
        ///The starting point in the list of records from where the data should be fetched. Zero based index.
        ///</summary>
        [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")]
        public virtual int PageOffset { get; set; }

        ///<summary>
        ///The term to determine the order in which the data is returned
        ///</summary>
        [DataMember]
        [ApiMember(Description="The term to determine the order in which the data is returned", ParameterType="query")]
        public virtual string Sort { get; set; }
    }

    public partial class PagedResponse<T>
        : BaseResponse
    {
        ///<summary>
        ///The response Metadata
        ///</summary>
        [ApiMember(Description="The response Metadata")]
        public virtual Meta<T> Meta { get; set; }
    }

    [DataContract]
    public partial class ResponseError
    {
        public ResponseError()
        {
            Meta = new Dictionary<string, string>{};
        }

        [DataMember(Order=1)]
        public virtual string ErrorCode { get; set; }

        [DataMember(Order=2)]
        public virtual string FieldName { get; set; }

        [DataMember(Order=3)]
        public virtual string Message { get; set; }

        [DataMember(Order=4)]
        public virtual Dictionary<string, string> Meta { get; set; }
    }

    [DataContract]
    public partial class ResponseStatus
    {
        public ResponseStatus()
        {
            Meta = new Dictionary<string, string>{};
        }

        [DataMember(Order=1)]
        public virtual string ErrorCode { get; set; }

        [DataMember(Order=2)]
        public virtual string Message { get; set; }

        [DataMember(Order=3)]
        public virtual string StackTrace { get; set; }

        [DataMember(Order=4)]
        public virtual ArrayOfResponseError Errors { get; set; }

        [DataMember(Order=5)]
        public virtual Dictionary<string, string> Meta { get; set; }
    }

}

namespace SanctionsSearch.Api2.ServiceModel.Operations.DbsSearches
{
    [DataContract]
    public partial class GetDbsSearches
        : PagedRequest
    {
        ///<summary>
        ///Filter the results to those that have a Name including the specified value
        ///</summary>
        [DataMember]
        [ApiMember(Description="Filter the results to those that have a Name including the specified value", ParameterType="query")]
        public virtual string Name { get; set; }

        ///<summary>
        ///Filter the results to those that were created after (or on) this date
        ///</summary>
        [DataMember]
        [ApiMember(Description="Filter the results to those that were created after (or on) this date", ParameterType="query")]
        public virtual DateTime? DateFrom { get; set; }

        ///<summary>
        ///Filter the results to those that were created before this date
        ///</summary>
        [DataMember]
        [ApiMember(Description="Filter the results to those that were created before this date", ParameterType="query")]
        public virtual DateTime? DateTo { get; set; }

        ///<summary>
        ///Filter the results to those where the applicant has provided their information (true), or not (false), or either (null)
        ///</summary>
        [DataMember]
        [ApiMember(Description="Filter the results to those where the applicant has provided their information (true), or not (false), or either (null)", ParameterType="query")]
        public virtual bool? IsApplicantInfoCompleted { get; set; }

        ///<summary>
        ///Filter the results to those where the ID Checker has verified the applicant's ID (true), or not (false), or either (null)
        ///</summary>
        [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")]
        public virtual bool? IsIdCheckCompleted { get; set; }

        ///<summary>
        ///Filter the results to those where the application is complete and ready to be submitted (true), or not (false), or either (null)
        ///</summary>
        [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")]
        public virtual bool? IsApplicationCompleted { get; set; }

        ///<summary>
        ///Filter the results to those where the application has been submitted (true), or not (false), or either (null)
        ///</summary>
        [DataMember]
        [ApiMember(Description="Filter the results to those where the application has been submitted (true), or not (false), or either (null)", ParameterType="query")]
        public virtual bool? IsApplicationSubmitted { get; set; }

        ///<summary>
        ///Filter the results to those where the application has been disclosed (true), or not (false), or either (null)
        ///</summary>
        [DataMember]
        [ApiMember(Description="Filter the results to those where the application has been disclosed (true), or not (false), or either (null)", ParameterType="query")]
        public virtual bool? IsApplicationDisclosed { get; set; }

        ///<summary>
        ///If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view
        ///</summary>
        [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")]
        public virtual string SubUserName { get; set; }
    }

    public partial class GetDbsSearchesData
        : PagedResponse<GetDbsSearches>
    {
        public virtual ArrayOfDbsSearchShort Searches { get; set; }
    }

    [DataContract]
    public partial class GetDbsSearchesResponse
    {
        [DataMember]
        public virtual GetDbsSearchesData Data { get; set; }
    }

}

namespace SanctionsSearch.Api2.ServiceModel.Types
{
    public partial class ArrayOfDbsSearchShort
        : List<DbsSearchShort>
    {
    }

    [DataContract]
    public partial class Authentication
    {
        ///<summary>
        ///The API User ID provided by us when you signed up to use our API
        ///</summary>
        [DataMember]
        [ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")]
        public virtual string ApiUserId { get; set; }

        ///<summary>
        ///The API User Key provided by us when you signed up to use our API
        ///</summary>
        [DataMember]
        [ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")]
        public virtual string ApiUserKey { get; set; }
    }

    public partial class DbsSearchShort
    {
        public virtual long Id { get; set; }
        public virtual DateTime DateSearched { get; set; }
        public virtual DateTime DateUpdated { get; set; }
        public virtual string Status { get; set; }
        public virtual string DisclosureStatus { get; set; }
        public virtual bool IsApplicantInfoCompleted { get; set; }
        public virtual bool IsIdCheckCompleted { get; set; }
        public virtual bool IsApplicationCompleted { get; set; }
        public virtual bool IsApplicationSubmitted { get; set; }
        public virtual bool IsApplicationDisclosed { get; set; }
        public virtual string DisclosureLevel { get; set; }
        public virtual string Name { get; set; }
        public virtual string Reference { get; set; }
    }

    public partial class Links
    {
        [ApiMember]
        public virtual string Self { get; set; }
    }

    public partial class Meta<T>
    {
        ///<summary>
        ///Pagination links
        ///</summary>
        [ApiMember(Description="Pagination links")]
        public virtual MetaLinks Links { get; set; }

        ///<summary>
        ///The total number of records for the query
        ///</summary>
        [ApiMember(Description="The total number of records for the query")]
        public virtual int? TotalCount { get; set; }

        ///<summary>
        ///The maximum number of records to be returned in one page
        ///</summary>
        [ApiMember(Description="The maximum number of records to be returned in one page")]
        public virtual int? PageLimit { get; set; }

        ///<summary>
        ///The starting point in the list of records from where the data should be fetched. Zero based index.
        ///</summary>
        [ApiMember(Description="The starting point in the list of records from where the data should be fetched. Zero based index.")]
        public virtual int? PageOffset { get; set; }
    }

    public partial class MetaLinks
        : Links
    {
        ///<summary>
        ///The link to the first page of records
        ///</summary>
        [ApiMember(Description="The link to the first page of records")]
        public virtual string First { get; set; }

        ///<summary>
        ///The link to the last page of records
        ///</summary>
        [ApiMember(Description="The link to the last page of records")]
        public virtual string Last { get; set; }

        ///<summary>
        ///The link to the next page of records, if applicable
        ///</summary>
        [ApiMember(Description="The link to the next page of records, if applicable")]
        public virtual string Next { get; set; }

        ///<summary>
        ///The link to the last page of records, if applicable
        ///</summary>
        [ApiMember(Description="The link to the last page of records, if applicable")]
        public virtual string Prev { get; set; }
    }

}

C# GetDbsSearches 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: GetDbsSearches

<?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>

<GetDbsSearches xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Authentication>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Authentication>
  <Sort>String</Sort>
  <page_x005B_limit_x005D_>0</page_x005B_limit_x005D_>
  <page_x005B_offset_x005D_>0</page_x005B_offset_x005D_>
  <DateFrom>0001-01-01T00:00:00</DateFrom>
  <DateTo>0001-01-01T00:00:00</DateTo>
  <IsApplicantInfoCompleted>false</IsApplicantInfoCompleted>
  <IsApplicationCompleted>false</IsApplicationCompleted>
  <IsApplicationDisclosed>false</IsApplicationDisclosed>
  <IsApplicationSubmitted>false</IsApplicationSubmitted>
  <IsIdCheckCompleted>false</IsIdCheckCompleted>
  <Name>String</Name>
  <SubUserName>String</SubUserName>
</GetDbsSearches>

</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>

<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>

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