Sanctions Search API: v2

<back to all web services

AddClient

Clients
The following routes are available for this service:
POST/clientsAdd a client
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@DataContract
open class AddClient : BaseRequest()
{
    @DataMember
    var request:AddClientRequest? = 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 AddClientRequest
{
    /**
    * The full name of the client
    */
    @ApiMember(Description="The full name of the client", IsRequired=true)
    var name:String? = null

    /**
    * The email address of the client
    */
    @ApiMember(Description="The email address of the client", IsRequired=true)
    var email:String? = null

    /**
    * The client's mobile phone number in international format (e.g. '+447123456789')
    */
    @ApiMember(Description="The client's mobile phone number in international format (e.g. '+447123456789')", IsRequired=true)
    var mobileInternational:String? = null

    /**
    * The postal code of the client's address. Used in emails sent to the client to help them recognize the communication as genuine
    */
    @ApiMember(Description="The postal code of the client's address. Used in emails sent to the client to help them recognize the communication as genuine", IsRequired=true)
    var postCode:String? = null

    /**
    * Specifies the type of ValidateMe preset. Possible values are 'ValidateMe' for configuring RequiredDocuments, or 'PassportChipVerification' for setting the Passport as Proof of Name
    */
    @ApiMember(Description="Specifies the type of ValidateMe preset. Possible values are 'ValidateMe' for configuring RequiredDocuments, or 'PassportChipVerification' for setting the Passport as Proof of Name", IsRequired=true)
    var proofOfPreset:CreateMobileClientType? = null

    /**
    * The categories of proof and selected documents that the client can use to provide proof. Required if ClientType is set to 'ValidateMe'
    */
    @ApiMember(Description="The categories of proof and selected documents that the client can use to provide proof. Required if ClientType is set to 'ValidateMe'")
    var proofOfDocumentCategories:ArrayOfProofOfDocumentCategories? = null

    /**
    * If the client should be linked to other searches, specify the them here
    */
    @ApiMember(Description="If the client should be linked to other searches, specify the them here")
    var linkedTo:ArrayOfLinkedTo? = null
}

@DataContract(Name="CreateMobileClientType", Namespace="http://schemas.servicestack.net/types")
enum class CreateMobileClientType
{
    Undefined,
    ValidateMe,
    PassportChipVerification,
}

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
}

open class ArrayOfLinkedTo : ArrayList<LinkedTo>()
{
}

open class LinkedTo
{
    var clientId:Int? = null
    var id:Long? = null
    @SerializedName("type") var Type:String? = null
    var subtype:String? = null
    var status:String? = null
    var description:String? = null
    var isArchived:Boolean? = null
    var name:String? = null
    var date:Date? = null
}

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

open class AddClientData : BaseResponse(), IBaseSearchResponse
{
    var linkedTo:ArrayOfLinkedTo? = null
    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>()
{
}

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
}

Kotlin AddClient DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /clients HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"request":{"name":"String","email":"String","mobileInternational":"String","postCode":"String","proofOfPreset":"Undefined","proofOfDocumentCategories":[{"id":0,"proofOf":"String","proofOfDocuments":[{"id":0,"name":"String"}]}],"linkedTo":[{"clientId":0,"id":0,"type":"String","subtype":"String","status":"String","description":"String","isArchived":false,"name":"String","date":"\/Date(-62135596800000-0000)\/"}]},"authentication":{"apiUserId":"String","apiUserKey":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":{"linkedTo":[{"clientId":0,"id":0,"type":"String","subtype":"String","status":"String","description":"String","isArchived":false,"name":"String","date":"\/Date(-62135596800000-0000)\/"}],"client":{"id":0,"dateCreated":"\/Date(-62135596800000-0000)\/","name":"String","email":"String","reference":"String","state":"Undefined","mobileInternational":"String","postCode":"String","isValidateMe":false,"face":{"age":0,"gender":"String","emotion":"String","smile":0,"hairColour":"String","facialHair":"String","makeup":"String","glasses":"String","accessories":"String"},"video":{"id":0,"videoUrl":"String","imageUrl":"String","videoTimestamps":[{"tagName":"String","milli":0,"imageUrl":"String"}]},"location":{"latitude":0,"longitude":0},"numOfDocuments":0,"passports":[{"clientFileId":0,"firstName":"String","middleName":"String","lastName":"String","dateOfBirth":"String","gender":"String","mrzLineOne":"String","mrzLineTwo1":"String","mrzLineTwo2":"String","mrzLineTwo3":"String","mrzLineTwo4":"String","mrzLineTwo5":"String","mrzLineTwo6":"String","mrzLineTwo7":"String","mrzLineTwo8":"String","images":[{"id":0,"name":"String","ocrId":0,"url":"String"}],"isVerified":false,"isFaceMatch":false,"faceMatchConfidence":0,"hasPcvSearch":false,"hasDfaSearch":false,"isPassportChipVerified":false,"passportChipData":{"isIssuerVerified":false,"issuerCommonName":"String","issuerOrganisationName":"String","issuerCountry":"String","mrzLine1":"String","mrzLine2":"String","isMrzLine1Verified":false,"isMrzLine2Verified":false,"dataGroupsVerified":[0],"dataGroupsFailed":[0],"isFaceMatch":false,"faceMatchConfidence":0},"isEligibleForPcv":false,"isEligibleForDfa":false}],"drivingLicences":[{"clientFileId":0,"firstName":"String","middleName":"String","lastName":"String","dateOfBirth":"String","address":"String","drivingLicenceNumber":"String","images":[{"id":0,"name":"String","ocrId":0,"url":"String"}],"isVerified":false,"isFaceMatch":false,"faceMatchConfidence":0,"hasDfaSearch":false}],"otherDocuments":[{"clientFileId":0,"type":"String","typeOther":"String","description":"String","originalImageUrl":"String","croppedImageUrl":"String","isVerified":false}],"proofOfDocumentCategories":[{"id":0,"proofOf":"String","proofOfDocuments":[{"id":0,"name":"String"}]}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}