Sanctions Search API: v2

<back to all web services

UpdateClient

Clients
The following routes are available for this service:
PUT/clients/{Id}Update a client when it is PendingVerification
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@DataContract
open class UpdateClient : BaseRequest()
{
    @DataMember
    @ApiMember(IsRequired=true, ParameterType="path")
    var id:Int? = null

    @DataMember
    var request:Client? = null
}

@DataContract
open class BaseRequest : IBaseRequest
{
    /**
    * The authentication credentials
    */
    @DataMember
    @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
    var authentication:Authentication? = null
}

@DataContract
open class Authentication
{
    /**
    * The API User ID provided by us when you signed up to use our API
    */
    @DataMember
    @ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
    var apiUserId:String? = null

    /**
    * The API User Key provided by us when you signed up to use our API
    */
    @DataMember
    @ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
    var apiUserKey:String? = null
}

open class Client
{
    var id:Int? = null
    var dateCreated:Date? = null
    var name:String? = null
    var email:String? = null
    var reference:String? = null
    var state:ClientState? = null
    var mobileInternational:String? = null
    var postCode:String? = null
    var isValidateMe:Boolean? = null
    var face:Face? = null
    var video:Video? = null
    var location:Location? = null
    var numOfDocuments:Int? = null
    var passports:ArrayOfPassports? = null
    var drivingLicences:ArrayOfDrivingLicences? = null
    var otherDocuments:ArrayOfOtherDocuments? = null
    var proofOfDocumentCategories:ArrayOfProofOfDocumentCategories? = null
}

@DataContract(Name="ClientState", Namespace="http://schemas.servicestack.net/types")
enum class ClientState
{
    Undefined,
    PendingCompletion,
    PendingOcr,
    PendingVerification,
    Verified,
}

open class Face
{
    var age:Double? = null
    var gender:String? = null
    var emotion:String? = null
    var smile:Double? = null
    var hairColour:String? = null
    var facialHair:String? = null
    var makeup:String? = null
    var glasses:String? = null
    var accessories:String? = null
}

open class Video
{
    var id:Int? = null
    var videoUrl:String? = null
    var imageUrl:String? = null
    var videoTimestamps:ArrayList<VideoTimestamp> = ArrayList<VideoTimestamp>()
}

open class VideoTimestamp
{
    var tagName:String? = null
    var milli:Int? = null
    var imageUrl:String? = null
}

open class Location
{
    var latitude:Double? = null
    var longitude:Double? = null
}

open class ArrayOfPassports : ArrayList<Passport>()
{
}

open class Passport
{
    var clientFileId:Int? = null
    var firstName:String? = null
    var middleName:String? = null
    var lastName:String? = null
    var dateOfBirth:String? = null
    var gender:String? = null
    var mrzLineOne:String? = null
    var mrzLineTwo1:String? = null
    var mrzLineTwo2:String? = null
    var mrzLineTwo3:String? = null
    var mrzLineTwo4:String? = null
    var mrzLineTwo5:String? = null
    var mrzLineTwo6:String? = null
    var mrzLineTwo7:String? = null
    var mrzLineTwo8:String? = null
    var images:ArrayOfImages? = null
    var isVerified:Boolean? = null
    var isFaceMatch:Boolean? = null
    var faceMatchConfidence:BigDecimal? = null
    var hasPcvSearch:Boolean? = null
    var hasDfaSearch:Boolean? = null
    var isPassportChipVerified:Boolean? = null
    var passportChipData:PassportChipData? = null
    var isEligibleForPcv:Boolean? = null
    var isEligibleForDfa:Boolean? = null
}

open class ArrayOfImages : ArrayList<Image>()
{
}

open class Image
{
    var id:Int? = null
    var name:String? = null
    var ocrId:Int? = null
    var url:String? = null
}

open class PassportChipData
{
    var isIssuerVerified:Boolean? = null
    var issuerCommonName:String? = null
    var issuerOrganisationName:String? = null
    var issuerCountry:String? = null
    var mrzLine1:String? = null
    var mrzLine2:String? = null
    var isMrzLine1Verified:Boolean? = null
    var isMrzLine2Verified:Boolean? = null
    var dataGroupsVerified:ArrayList<Int>? = null
    var dataGroupsFailed:ArrayList<Int>? = null
    var isFaceMatch:Boolean? = null
    var faceMatchConfidence:BigDecimal? = null
}

open class ArrayOfDrivingLicences : ArrayList<DrivingLicence>()
{
}

open class DrivingLicence
{
    var clientFileId:Int? = null
    var firstName:String? = null
    var middleName:String? = null
    var lastName:String? = null
    var dateOfBirth:String? = null
    var address:String? = null
    var drivingLicenceNumber:String? = null
    var images:ArrayOfImages? = null
    var isVerified:Boolean? = null
    var isFaceMatch:Boolean? = null
    var faceMatchConfidence:BigDecimal? = null
    var hasDfaSearch:Boolean? = null
}

open class ArrayOfOtherDocuments : ArrayList<OtherDocument>()
{
}

open class OtherDocument
{
    var clientFileId:Int? = null
    @SerializedName("type") var Type:String? = null
    var typeOther:String? = null
    var description:String? = null
    var originalImageUrl:String? = null
    var croppedImageUrl:String? = null
    var isVerified:Boolean? = null
}

open class ArrayOfProofOfDocumentCategories : ArrayList<ProofOfDocumentCategory>()
{
}

open class ProofOfDocumentCategory
{
    /**
    * The ID of the ProofOfDocumentCategory
    */
    @ApiMember(Description="The ID of the ProofOfDocumentCategory", IsRequired=true)
    var id:Int? = null

    /**
    * The category or subject that requires proof (e.g., 'Name', 'Address', 'Right to work')
    */
    @ApiMember(Description="The category or subject that requires proof (e.g., 'Name', 'Address', 'Right to work')", IsRequired=true)
    var proofOf:String? = null

    /**
    * The documents that can be used to provide proof for the specified category.
    */
    @ApiMember(Description="The documents that can be used to provide proof for the specified category.", IsRequired=true)
    var proofOfDocuments:ArrayOfProofOfDocuments? = null
}

open class ArrayOfProofOfDocuments : ArrayList<ProofOfDocument>()
{
}

open class ProofOfDocument
{
    /**
    * The ID of the ProofOfDocument
    */
    @ApiMember(Description="The ID of the ProofOfDocument", IsRequired=true)
    var id:Int? = null

    /**
    * The name of the ProofOfDocument
    */
    @ApiMember(Description="The name of the ProofOfDocument", IsRequired=true)
    var name:String? = null
}

@DataContract
open class UpdateClientResponse
{
    @DataMember
    @SerializedName("data") var Data:UpdateClientData? = null
}

open class UpdateClientData : BaseResponse()
{
    var client:Client? = null
}

open class BaseResponse : IBaseDataResponse, IHasResponseStatus
{
    /**
    * The status of the response
    */
    @ApiMember(Description="The status of the response")
    var responseStatus:ResponseStatus? = null
}

open class ArrayOfResponseError : ArrayList<ResponseError>()
{
}

Kotlin UpdateClient DTOs

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

HTTP + XML

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

PUT /clients/{Id} HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateClient 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>
  <Request>
    <DateCreated>0001-01-01T00:00:00</DateCreated>
    <DrivingLicences>
      <Passport>
        <Address>String</Address>
        <ClientFileId>0</ClientFileId>
        <DateOfBirth>String</DateOfBirth>
        <DrivingLicenceNumber>String</DrivingLicenceNumber>
        <FaceMatchConfidence>0</FaceMatchConfidence>
        <FirstName>String</FirstName>
        <HasDfaSearch>false</HasDfaSearch>
        <Images>
          <CategoryId>
            <Id>0</Id>
            <Name>String</Name>
            <OcrId>0</OcrId>
            <Url>String</Url>
          </CategoryId>
        </Images>
        <IsFaceMatch>false</IsFaceMatch>
        <IsVerified>false</IsVerified>
        <LastName>String</LastName>
        <MiddleName>String</MiddleName>
      </Passport>
    </DrivingLicences>
    <Email>String</Email>
    <Face>
      <Accessories>String</Accessories>
      <Age>0</Age>
      <Emotion>String</Emotion>
      <FacialHair>String</FacialHair>
      <Gender>String</Gender>
      <Glasses>String</Glasses>
      <HairColour>String</HairColour>
      <Makeup>String</Makeup>
      <Smile>0</Smile>
    </Face>
    <Id>0</Id>
    <IsValidateMe>false</IsValidateMe>
    <Location>
      <Latitude>0</Latitude>
      <Longitude>0</Longitude>
    </Location>
    <MobileInternational>String</MobileInternational>
    <Name>String</Name>
    <NumOfDocuments>0</NumOfDocuments>
    <OtherDocuments>
      <OtherDocument>
        <ClientFileId>0</ClientFileId>
        <CroppedImageUrl>String</CroppedImageUrl>
        <Description>String</Description>
        <IsVerified>false</IsVerified>
        <OriginalImageUrl>String</OriginalImageUrl>
        <Type>String</Type>
        <TypeOther>String</TypeOther>
      </OtherDocument>
    </OtherDocuments>
    <Passports>
      <Passport>
        <ClientFileId>0</ClientFileId>
        <DateOfBirth>String</DateOfBirth>
        <FaceMatchConfidence>0</FaceMatchConfidence>
        <FirstName>String</FirstName>
        <Gender>String</Gender>
        <HasDfaSearch>false</HasDfaSearch>
        <HasPcvSearch>false</HasPcvSearch>
        <Images>
          <CategoryId>
            <Id>0</Id>
            <Name>String</Name>
            <OcrId>0</OcrId>
            <Url>String</Url>
          </CategoryId>
        </Images>
        <IsEligibleForDfa>false</IsEligibleForDfa>
        <IsEligibleForPcv>false</IsEligibleForPcv>
        <IsFaceMatch>false</IsFaceMatch>
        <IsPassportChipVerified>false</IsPassportChipVerified>
        <IsVerified>false</IsVerified>
        <LastName>String</LastName>
        <MiddleName>String</MiddleName>
        <MrzLineOne>String</MrzLineOne>
        <MrzLineTwo1>String</MrzLineTwo1>
        <MrzLineTwo2>String</MrzLineTwo2>
        <MrzLineTwo3>String</MrzLineTwo3>
        <MrzLineTwo4>String</MrzLineTwo4>
        <MrzLineTwo5>String</MrzLineTwo5>
        <MrzLineTwo6>String</MrzLineTwo6>
        <MrzLineTwo7>String</MrzLineTwo7>
        <MrzLineTwo8>String</MrzLineTwo8>
        <PassportChipData>
          <DataGroupsFailed xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:int>0</d6p1:int>
          </DataGroupsFailed>
          <DataGroupsVerified xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:int>0</d6p1:int>
          </DataGroupsVerified>
          <FaceMatchConfidence>0</FaceMatchConfidence>
          <IsFaceMatch>false</IsFaceMatch>
          <IsIssuerVerified>false</IsIssuerVerified>
          <IsMrzLine1Verified>false</IsMrzLine1Verified>
          <IsMrzLine2Verified>false</IsMrzLine2Verified>
          <IssuerCommonName>String</IssuerCommonName>
          <IssuerCountry>String</IssuerCountry>
          <IssuerOrganisationName>String</IssuerOrganisationName>
          <MRZLine1>String</MRZLine1>
          <MRZLine2>String</MRZLine2>
        </PassportChipData>
      </Passport>
    </Passports>
    <PostCode>String</PostCode>
    <ProofOfDocumentCategories>
      <CategoryId>
        <Id>0</Id>
        <ProofOf>String</ProofOf>
        <ProofOfDocuments>
          <DocumentId>
            <Id>0</Id>
            <Name>String</Name>
          </DocumentId>
        </ProofOfDocuments>
      </CategoryId>
    </ProofOfDocumentCategories>
    <Reference>String</Reference>
    <State>Undefined</State>
    <Video>
      <Id>0</Id>
      <ImageUrl>String</ImageUrl>
      <VideoTimestamps>
        <VideoTimestamp>
          <ImageUrl>String</ImageUrl>
          <Milli>0</Milli>
          <TagName>String</TagName>
        </VideoTimestamp>
      </VideoTimestamps>
      <VideoUrl>String</VideoUrl>
    </Video>
  </Request>
</UpdateClient>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UpdateClientResponse 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>
    <Client>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DrivingLicences>
        <Passport>
          <Address>String</Address>
          <ClientFileId>0</ClientFileId>
          <DateOfBirth>String</DateOfBirth>
          <DrivingLicenceNumber>String</DrivingLicenceNumber>
          <FaceMatchConfidence>0</FaceMatchConfidence>
          <FirstName>String</FirstName>
          <HasDfaSearch>false</HasDfaSearch>
          <Images>
            <CategoryId>
              <Id>0</Id>
              <Name>String</Name>
              <OcrId>0</OcrId>
              <Url>String</Url>
            </CategoryId>
          </Images>
          <IsFaceMatch>false</IsFaceMatch>
          <IsVerified>false</IsVerified>
          <LastName>String</LastName>
          <MiddleName>String</MiddleName>
        </Passport>
      </DrivingLicences>
      <Email>String</Email>
      <Face>
        <Accessories>String</Accessories>
        <Age>0</Age>
        <Emotion>String</Emotion>
        <FacialHair>String</FacialHair>
        <Gender>String</Gender>
        <Glasses>String</Glasses>
        <HairColour>String</HairColour>
        <Makeup>String</Makeup>
        <Smile>0</Smile>
      </Face>
      <Id>0</Id>
      <IsValidateMe>false</IsValidateMe>
      <Location>
        <Latitude>0</Latitude>
        <Longitude>0</Longitude>
      </Location>
      <MobileInternational>String</MobileInternational>
      <Name>String</Name>
      <NumOfDocuments>0</NumOfDocuments>
      <OtherDocuments>
        <OtherDocument>
          <ClientFileId>0</ClientFileId>
          <CroppedImageUrl>String</CroppedImageUrl>
          <Description>String</Description>
          <IsVerified>false</IsVerified>
          <OriginalImageUrl>String</OriginalImageUrl>
          <Type>String</Type>
          <TypeOther>String</TypeOther>
        </OtherDocument>
      </OtherDocuments>
      <Passports>
        <Passport>
          <ClientFileId>0</ClientFileId>
          <DateOfBirth>String</DateOfBirth>
          <FaceMatchConfidence>0</FaceMatchConfidence>
          <FirstName>String</FirstName>
          <Gender>String</Gender>
          <HasDfaSearch>false</HasDfaSearch>
          <HasPcvSearch>false</HasPcvSearch>
          <Images>
            <CategoryId>
              <Id>0</Id>
              <Name>String</Name>
              <OcrId>0</OcrId>
              <Url>String</Url>
            </CategoryId>
          </Images>
          <IsEligibleForDfa>false</IsEligibleForDfa>
          <IsEligibleForPcv>false</IsEligibleForPcv>
          <IsFaceMatch>false</IsFaceMatch>
          <IsPassportChipVerified>false</IsPassportChipVerified>
          <IsVerified>false</IsVerified>
          <LastName>String</LastName>
          <MiddleName>String</MiddleName>
          <MrzLineOne>String</MrzLineOne>
          <MrzLineTwo1>String</MrzLineTwo1>
          <MrzLineTwo2>String</MrzLineTwo2>
          <MrzLineTwo3>String</MrzLineTwo3>
          <MrzLineTwo4>String</MrzLineTwo4>
          <MrzLineTwo5>String</MrzLineTwo5>
          <MrzLineTwo6>String</MrzLineTwo6>
          <MrzLineTwo7>String</MrzLineTwo7>
          <MrzLineTwo8>String</MrzLineTwo8>
          <PassportChipData>
            <DataGroupsFailed xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </DataGroupsFailed>
            <DataGroupsVerified xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </DataGroupsVerified>
            <FaceMatchConfidence>0</FaceMatchConfidence>
            <IsFaceMatch>false</IsFaceMatch>
            <IsIssuerVerified>false</IsIssuerVerified>
            <IsMrzLine1Verified>false</IsMrzLine1Verified>
            <IsMrzLine2Verified>false</IsMrzLine2Verified>
            <IssuerCommonName>String</IssuerCommonName>
            <IssuerCountry>String</IssuerCountry>
            <IssuerOrganisationName>String</IssuerOrganisationName>
            <MRZLine1>String</MRZLine1>
            <MRZLine2>String</MRZLine2>
          </PassportChipData>
        </Passport>
      </Passports>
      <PostCode>String</PostCode>
      <ProofOfDocumentCategories>
        <CategoryId>
          <Id>0</Id>
          <ProofOf>String</ProofOf>
          <ProofOfDocuments>
            <DocumentId>
              <Id>0</Id>
              <Name>String</Name>
            </DocumentId>
          </ProofOfDocuments>
        </CategoryId>
      </ProofOfDocumentCategories>
      <Reference>String</Reference>
      <State>Undefined</State>
      <Video>
        <Id>0</Id>
        <ImageUrl>String</ImageUrl>
        <VideoTimestamps>
          <VideoTimestamp>
            <ImageUrl>String</ImageUrl>
            <Milli>0</Milli>
            <TagName>String</TagName>
          </VideoTimestamp>
        </VideoTimestamps>
        <VideoUrl>String</VideoUrl>
      </Video>
    </Client>
  </Data>
</UpdateClientResponse>