Sanctions Search API: v2

<back to all web services

GetDbsSearch

import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Authentication:
    # @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
    api_user_id: Optional[str] = None
    """
    The API User ID provided by us when you signed up to use our API
    """


    # @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
    api_user_key: Optional[str] = None
    """
    The API User Key provided by us when you signed up to use our API
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseRequest(IBaseRequest):
    # @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
    authentication: Optional[Authentication] = None
    """
    The authentication credentials
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseError:
    error_code: Optional[str] = None
    field_name: Optional[str] = None
    message: Optional[str] = None
    meta: Optional[Dict[str, str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ArrayOfResponseError(List[ResponseError]):
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseStatus:
    error_code: Optional[str] = None
    message: Optional[str] = None
    stack_trace: Optional[str] = None
    errors: Optional[ArrayOfResponseError] = None
    meta: Optional[Dict[str, str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse(IBaseDataResponse, IHasResponseStatus):
    # @ApiMember(Description="The status of the response")
    response_status: Optional[ResponseStatus] = None
    """
    The status of the response
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LinkedTo:
    client_id: Optional[int] = None
    id: Optional[int] = None
    type: Optional[str] = None
    subtype: Optional[str] = None
    status: Optional[str] = None
    description: Optional[str] = None
    is_archived: Optional[bool] = None
    name: Optional[str] = None
    date: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ArrayOfLinkedTo(List[LinkedTo]):
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApplicantInformation:
    name: Optional[str] = None
    date_of_birth: Optional[str] = None
    email: Optional[str] = None
    mobile_international: Optional[str] = None
    job_location: Optional[str] = None
    reference: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DbsSearchSummary:
    id: int = 0
    date_searched: datetime.datetime = datetime.datetime(1, 1, 1)
    date_updated: datetime.datetime = datetime.datetime(1, 1, 1)
    status: Optional[str] = None
    disclosure_status: Optional[str] = None
    is_applicant_info_completed: bool = False
    is_id_check_completed: bool = False
    is_application_completed: bool = False
    is_application_submitted: bool = False
    is_application_disclosed: bool = False
    disclosure_level: Optional[str] = None
    applicant_information: Optional[ApplicantInformation] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDbsSearchData(BaseResponse, IBaseSearchResponse):
    linked_to: Optional[ArrayOfLinkedTo] = None
    summary: Optional[DbsSearchSummary] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDbsSearchResponse:
    data: Optional[GetDbsSearchData] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDbsSearch(BaseRequest):
    # @ApiMember(Description="The ID of the DBS Search", IsRequired=true, ParameterType="path")
    id: int = 0
    """
    The ID of the DBS Search
    """


    # @ApiMember(Description="Provide a value to only return a search that the specified sub user has permission to access. If this is null or empty, then sub user permissions will not be enforced and the search will be returned", ParameterType="query")
    sub_user_name: Optional[str] = None
    """
    Provide a value to only return a search that the specified sub user has permission to access. If this is null or empty, then sub user permissions will not be enforced and the search will be returned
    """

Python GetDbsSearch DTOs

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

HTTP + SOAP12

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

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

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

<GetDbsSearch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Authentication>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Authentication>
  <Id>0</Id>
  <SubUserName>String</SubUserName>
</GetDbsSearch>

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

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

<GetDbsSearchResponse 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>
    <LinkedTo>
      <LinkedTo>
        <ClientId>0</ClientId>
        <Date>0001-01-01T00:00:00</Date>
        <Description>String</Description>
        <Id>0</Id>
        <IsArchived>false</IsArchived>
        <Name>String</Name>
        <Status>String</Status>
        <Subtype>String</Subtype>
        <Type>String</Type>
      </LinkedTo>
    </LinkedTo>
    <Summary>
      <ApplicantInformation>
        <DateOfBirth>String</DateOfBirth>
        <Email>String</Email>
        <JobLocation>String</JobLocation>
        <MobileInternational>String</MobileInternational>
        <Name>String</Name>
        <Reference>String</Reference>
      </ApplicantInformation>
      <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>
      <Status>String</Status>
    </Summary>
  </Data>
</GetDbsSearchResponse>

</soap12:Body>
</soap12:Envelope>