Sanctions Search API: v1

<back to all web services

UpdateSearchStatus

Update/resolve a sanctions search

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 ResponseError:
    error_code: Optional[str] = None
    field_name: Optional[str] = None
    message: Optional[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


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateSearchStatusData(IBaseDataResponse, IHasResponseStatus):
    # @ApiMember(DataType="ResponseStatus", Description="Response status object")
    response_status: Optional[ResponseStatus] = None
    """
    Response status object
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateSearchStatusResponse:
    # @ApiMember(DataType="UpdateSearchStatusData", Description="Response object")
    data: Optional[UpdateSearchStatusData] = None
    """
    Response object
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Authentication(IAuthentication):
    # @ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
    api_user_id: Optional[str] = None
    """
    The API User ID that will authenticate your request
    """


    # @ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
    api_user_key: Optional[str] = None
    """
    The API User Key that will authenticate your request
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateSearchStatusRequest:
    # @ApiMember(DataType="integer", Description="The ID of the sanctions search that is being resolved/updated.", Format="int64", IsRequired=true)
    id: int = 0
    """
    The ID of the sanctions search that is being resolved/updated.
    """


    # @ApiMember(DataType="boolean", Description="Whether the search results <b>did</b> contain the client. Set this to \"<b>true</b>\" if the client <b>WAS</b> found in the search results.", IsRequired=true)
    client_in_results: bool = False
    """
    Whether the search results <b>did</b> contain the client. Set this to "<b>true</b>" if the client <b>WAS</b> found in the search results.
    """


    # @ApiMember(DataType="boolean", Description="Whether the search results <b>did not</b> contain the client. Set this to \"<b>true</b>\" if the client <b>WAS NOT</b> found in the search results.", IsRequired=true)
    client_not_in_results: bool = False
    """
    Whether the search results <b>did not</b> contain the client. Set this to "<b>true</b>" if the client <b>WAS NOT</b> found in the search results.
    """


# @Api(Description="Update/resolve a sanctions search")
# @ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateSearchStatus(IBaseRequest):
    """
    Update/resolve a sanctions search
    """

    # @ApiMember(DataType="Authentication", Description="Authentication object", IsRequired=true)
    authentication: Optional[Authentication] = None
    """
    Authentication object
    """


    # @ApiMember(DataType="UpdateSearchStatusRequest", Description="Request object", IsRequired=true)
    request: Optional[UpdateSearchStatusRequest] = None
    """
    Request object
    """

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

<UpdateSearchStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Authentication>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Authentication>
  <Request>
    <ClientInResults>false</ClientInResults>
    <ClientNotInResults>false</ClientNotInResults>
    <Id>0</Id>
  </Request>
</UpdateSearchStatus>

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

<UpdateSearchStatusResponse 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>
        </ResponseError>
      </Errors>
    </ResponseStatus>
  </Data>
</UpdateSearchStatusResponse>

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