Sanctions Search API: v1

<back to all web services

UpdateSearchStatus

Update/resolve a sanctions search

import 'package:servicestack/servicestack.dart';

// @DataContract
class ResponseError implements IConvertible
{
    // @DataMember(Order=1)
    String? ErrorCode;

    // @DataMember(Order=2)
    String? FieldName;

    // @DataMember(Order=3)
    String? Message;

    ResponseError({this.ErrorCode,this.FieldName,this.Message});
    ResponseError.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ErrorCode = json['ErrorCode'];
        FieldName = json['FieldName'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ErrorCode': ErrorCode,
        'FieldName': FieldName,
        'Message': Message
    };

    getTypeName() => "ResponseError";
    TypeContext? context = _ctx;
}

class ArrayOfResponseError extends ListBase<ResponseError> implements IConvertible
{
    final List<ResponseError> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    ResponseError operator [](int index) => l[index];
    void operator []=(int index, ResponseError value) { l[index] = value; }
    ArrayOfResponseError();
    ArrayOfResponseError.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfResponseError";
    TypeContext? context = _ctx;
}

// @DataContract
class ResponseStatus implements IConvertible
{
    // @DataMember(Order=1)
    String? ErrorCode;

    // @DataMember(Order=2)
    String? Message;

    // @DataMember(Order=3)
    String? StackTrace;

    // @DataMember(Order=4)
    ArrayOfResponseError? Errors;

    ResponseStatus({this.ErrorCode,this.Message,this.StackTrace,this.Errors});
    ResponseStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ErrorCode = json['ErrorCode'];
        Message = json['Message'];
        StackTrace = json['StackTrace'];
        Errors = JsonConverters.fromJson(json['Errors'],'ArrayOfResponseError',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ErrorCode': ErrorCode,
        'Message': Message,
        'StackTrace': StackTrace,
        'Errors': JsonConverters.toJson(Errors,'ArrayOfResponseError',context!)
    };

    getTypeName() => "ResponseStatus";
    TypeContext? context = _ctx;
}

// @DataContract
class UpdateSearchStatusData implements IBaseDataResponse, IHasResponseStatus, IConvertible
{
    /**
    * Response status object
    */
    // @DataMember
    // @ApiMember(DataType="ResponseStatus", Description="Response status object")
    ResponseStatus? ResponseStatus;

    UpdateSearchStatusData({this.ResponseStatus});
    UpdateSearchStatusData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "UpdateSearchStatusData";
    TypeContext? context = _ctx;
}

// @DataContract
class UpdateSearchStatusResponse implements IConvertible
{
    /**
    * Response object
    */
    // @DataMember
    // @ApiMember(DataType="UpdateSearchStatusData", Description="Response object")
    UpdateSearchStatusData? Data;

    UpdateSearchStatusResponse({this.Data});
    UpdateSearchStatusResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Data = JsonConverters.fromJson(json['Data'],'UpdateSearchStatusData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Data': JsonConverters.toJson(Data,'UpdateSearchStatusData',context!)
    };

    getTypeName() => "UpdateSearchStatusResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class Authentication implements IAuthentication, IConvertible
{
    /**
    * 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)
    String? ApiUserId;

    /**
    * 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)
    String? ApiUserKey;

    Authentication({this.ApiUserId,this.ApiUserKey});
    Authentication.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiUserId = json['ApiUserId'];
        ApiUserKey = json['ApiUserKey'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiUserId': ApiUserId,
        'ApiUserKey': ApiUserKey
    };

    getTypeName() => "Authentication";
    TypeContext? context = _ctx;
}

// @DataContract
class UpdateSearchStatusRequest implements IConvertible
{
    /**
    * The ID of the sanctions search that is being resolved/updated.
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="The ID of the sanctions search that is being resolved/updated.", Format="int64", IsRequired=true)
    int? Id;

    /**
    * 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.
    */
    // @DataMember
    // @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)
    bool? ClientInResults;

    /**
    * 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.
    */
    // @DataMember
    // @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)
    bool? ClientNotInResults;

    UpdateSearchStatusRequest({this.Id,this.ClientInResults,this.ClientNotInResults});
    UpdateSearchStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        ClientInResults = json['ClientInResults'];
        ClientNotInResults = json['ClientNotInResults'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'ClientInResults': ClientInResults,
        'ClientNotInResults': ClientNotInResults
    };

    getTypeName() => "UpdateSearchStatusRequest";
    TypeContext? context = _ctx;
}

/**
* Update/resolve a sanctions search
*/
// @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)
// @DataContract
class UpdateSearchStatus implements IBaseRequest, IConvertible
{
    /**
    * Authentication object
    */
    // @DataMember
    // @ApiMember(DataType="Authentication", Description="Authentication object", IsRequired=true)
    Authentication? Authentication;

    /**
    * Request object
    */
    // @DataMember
    // @ApiMember(DataType="UpdateSearchStatusRequest", Description="Request object", IsRequired=true)
    UpdateSearchStatusRequest? Request;

    UpdateSearchStatus({this.Authentication,this.Request});
    UpdateSearchStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Authentication = JsonConverters.fromJson(json['Authentication'],'Authentication',context!);
        Request = JsonConverters.fromJson(json['Request'],'UpdateSearchStatusRequest',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Authentication': JsonConverters.toJson(Authentication,'Authentication',context!),
        'Request': JsonConverters.toJson(Request,'UpdateSearchStatusRequest',context!)
    };

    getTypeName() => "UpdateSearchStatus";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: <String, TypeInfo> {
    'ArrayOfResponseError': TypeInfo(TypeOf.Class, create:() => ArrayOfResponseError()),
    'UpdateSearchStatusData': TypeInfo(TypeOf.Class, create:() => UpdateSearchStatusData()),
    'UpdateSearchStatusResponse': TypeInfo(TypeOf.Class, create:() => UpdateSearchStatusResponse()),
    'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()),
    'UpdateSearchStatusRequest': TypeInfo(TypeOf.Class, create:() => UpdateSearchStatusRequest()),
    'UpdateSearchStatus': TypeInfo(TypeOf.Class, create:() => UpdateSearchStatus()),
});

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