Sanctions Search API: v2

<back to all web services

AddClient

Clients
The following routes are available for this service:
POST/clientsAdd a client
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports SanctionsSearch.Api2.ServiceModel.Operations.Clients
Imports SanctionsSearch.Api2.ServiceModel.Operations.Base
Imports SanctionsSearch.Api2.ServiceModel.Types

Namespace Global

    Namespace SanctionsSearch.Api2.ServiceModel.Operations.Base

        Public Partial Class ArrayOfResponseError
            Inherits List(Of ResponseError)
        End Class

        <DataContract>
        Public Partial Class BaseRequest
            Implements IBaseRequest
            '''<Summary>
            '''The authentication credentials
            '''</Summary>
            <DataMember>
            <ApiMember(Description:="The authentication credentials", IsRequired:=true, ParameterType:="header, body")>
            Public Overridable Property Authentication As Authentication
        End Class

        Public Partial Class BaseResponse
            Implements IBaseDataResponse
            Implements IHasResponseStatus
            '''<Summary>
            '''The status of the response
            '''</Summary>
            <ApiMember(Description:="The status of the response")>
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        <DataContract>
        Public Partial Class ResponseError
            Public Sub New()
                Meta = New Dictionary(Of String, String)
            End Sub

            <DataMember(Order:=1)>
            Public Overridable Property ErrorCode As String

            <DataMember(Order:=2)>
            Public Overridable Property FieldName As String

            <DataMember(Order:=3)>
            Public Overridable Property Message As String

            <DataMember(Order:=4)>
            Public Overridable Property Meta As Dictionary(Of String, String)
        End Class

        <DataContract>
        Public Partial Class ResponseStatus
            Public Sub New()
                Meta = New Dictionary(Of String, String)
            End Sub

            <DataMember(Order:=1)>
            Public Overridable Property ErrorCode As String

            <DataMember(Order:=2)>
            Public Overridable Property Message As String

            <DataMember(Order:=3)>
            Public Overridable Property StackTrace As String

            <DataMember(Order:=4)>
            Public Overridable Property Errors As ArrayOfResponseError

            <DataMember(Order:=5)>
            Public Overridable Property Meta As Dictionary(Of String, String)
        End Class
    End Namespace

    Namespace SanctionsSearch.Api2.ServiceModel.Operations.Clients

        <DataContract>
        Public Partial Class AddClient
            Inherits BaseRequest
            <DataMember>
            Public Overridable Property Request As AddClientRequest
        End Class

        Public Partial Class AddClientData
            Inherits BaseResponse
            Implements IBaseSearchResponse
            Public Overridable Property LinkedTo As ArrayOfLinkedTo
            Public Overridable Property Client As Client
        End Class

        Public Partial Class AddClientRequest
            '''<Summary>
            '''The full name of the client
            '''</Summary>
            <ApiMember(Description:="The full name of the client", IsRequired:=true)>
            Public Overridable Property Name As String

            '''<Summary>
            '''The email address of the client
            '''</Summary>
            <ApiMember(Description:="The email address of the client", IsRequired:=true)>
            Public Overridable Property Email As String

            '''<Summary>
            '''The client's mobile phone number in international format (e.g. '+447123456789')
            '''</Summary>
            <ApiMember(Description:="The client's mobile phone number in international format (e.g. '+447123456789')", IsRequired:=true)>
            Public Overridable Property MobileInternational As String

            '''<Summary>
            '''The postal code of the client's address. Used in emails sent to the client to help them recognize the communication as genuine
            '''</Summary>
            <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)>
            Public Overridable Property PostCode As String

            '''<Summary>
            '''Specifies the type of ValidateMe preset. Possible values are 'ValidateMe' for configuring RequiredDocuments, or 'PassportChipVerification' for setting the Passport as Proof of Name
            '''</Summary>
            <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)>
            Public Overridable Property ProofOfPreset As CreateMobileClientType

            '''<Summary>
            '''The categories of proof and selected documents that the client can use to provide proof. Required if ClientType is set to 'ValidateMe'
            '''</Summary>
            <ApiMember(Description:="The categories of proof and selected documents that the client can use to provide proof. Required if ClientType is set to 'ValidateMe'")>
            Public Overridable Property ProofOfDocumentCategories As ArrayOfProofOfDocumentCategories

            '''<Summary>
            '''If the client should be linked to other searches, specify the them here
            '''</Summary>
            <ApiMember(Description:="If the client should be linked to other searches, specify the them here")>
            Public Overridable Property LinkedTo As ArrayOfLinkedTo
        End Class

        <DataContract>
        Public Partial Class AddClientResponse
            <DataMember>
            Public Overridable Property Data As AddClientData
        End Class
    End Namespace

    Namespace SanctionsSearch.Api2.ServiceModel.Types

        Public Partial Class ArrayOfDrivingLicences
            Inherits List(Of DrivingLicence)
        End Class

        Public Partial Class ArrayOfImages
            Inherits List(Of Image)
        End Class

        Public Partial Class ArrayOfLinkedTo
            Inherits List(Of LinkedTo)
        End Class

        Public Partial Class ArrayOfOtherDocuments
            Inherits List(Of OtherDocument)
        End Class

        Public Partial Class ArrayOfPassports
            Inherits List(Of Passport)
        End Class

        Public Partial Class ArrayOfProofOfDocumentCategories
            Inherits List(Of ProofOfDocumentCategory)
        End Class

        Public Partial Class ArrayOfProofOfDocuments
            Inherits List(Of ProofOfDocument)
        End Class

        <DataContract>
        Public Partial Class Authentication
            '''<Summary>
            '''The API User ID provided by us when you signed up to use our API
            '''</Summary>
            <DataMember>
            <ApiMember(Description:="The API User ID provided by us when you signed up to use our API", IsRequired:=true, ParameterType:="header, body")>
            Public Overridable Property ApiUserId As String

            '''<Summary>
            '''The API User Key provided by us when you signed up to use our API
            '''</Summary>
            <DataMember>
            <ApiMember(Description:="The API User Key provided by us when you signed up to use our API", IsRequired:=true, ParameterType:="header, body")>
            Public Overridable Property ApiUserKey As String
        End Class

        Public Partial Class Client
            Public Overridable Property Id As Integer
            Public Overridable Property DateCreated As Date
            Public Overridable Property Name As String
            Public Overridable Property Email As String
            Public Overridable Property Reference As String
            Public Overridable Property State As ClientState
            Public Overridable Property MobileInternational As String
            Public Overridable Property PostCode As String
            Public Overridable Property IsValidateMe As Boolean
            Public Overridable Property Face As Face
            Public Overridable Property Video As Video
            Public Overridable Property Location As Location
            Public Overridable Property NumOfDocuments As Integer
            Public Overridable Property Passports As ArrayOfPassports
            Public Overridable Property DrivingLicences As ArrayOfDrivingLicences
            Public Overridable Property OtherDocuments As ArrayOfOtherDocuments
            Public Overridable Property ProofOfDocumentCategories As ArrayOfProofOfDocumentCategories
        End Class

        <DataContract(Name:="ClientState", Namespace:="http://schemas.servicestack.net/types")>
        Public Enum ClientState
            Undefined
            PendingCompletion
            PendingOcr
            PendingVerification
            Verified
        End Enum

        <DataContract(Name:="CreateMobileClientType", Namespace:="http://schemas.servicestack.net/types")>
        Public Enum CreateMobileClientType
            Undefined
            ValidateMe
            PassportChipVerification
        End Enum

        Public Partial Class DrivingLicence
            Public Overridable Property ClientFileId As Integer
            Public Overridable Property FirstName As String
            Public Overridable Property MiddleName As String
            Public Overridable Property LastName As String
            Public Overridable Property DateOfBirth As String
            Public Overridable Property Address As String
            Public Overridable Property DrivingLicenceNumber As String
            Public Overridable Property Images As ArrayOfImages
            Public Overridable Property IsVerified As Boolean
            Public Overridable Property IsFaceMatch As Nullable(Of Boolean)
            Public Overridable Property FaceMatchConfidence As Nullable(Of Decimal)
            Public Overridable Property HasDfaSearch As Boolean
        End Class

        Public Partial Class Face
            Public Overridable Property Age As Nullable(Of Double)
            Public Overridable Property Gender As String
            Public Overridable Property Emotion As String
            Public Overridable Property Smile As Nullable(Of Double)
            Public Overridable Property HairColour As String
            Public Overridable Property FacialHair As String
            Public Overridable Property Makeup As String
            Public Overridable Property Glasses As String
            Public Overridable Property Accessories As String
        End Class

        Public Partial Class Image
            Public Overridable Property Id As Integer
            Public Overridable Property Name As String
            Public Overridable Property OcrId As Nullable(Of Integer)
            Public Overridable Property Url As String
        End Class

        Public Partial Class LinkedTo
            Public Overridable Property ClientId As Nullable(Of Integer)
            Public Overridable Property Id As Nullable(Of Long)
            Public Overridable Property Type As String
            Public Overridable Property Subtype As String
            Public Overridable Property Status As String
            Public Overridable Property Description As String
            Public Overridable Property IsArchived As Nullable(Of Boolean)
            Public Overridable Property Name As String
            Public Overridable Property [Date] As Nullable(Of Date)
        End Class

        Public Partial Class Location
            Public Overridable Property Latitude As Double
            Public Overridable Property Longitude As Double
        End Class

        Public Partial Class OtherDocument
            Public Overridable Property ClientFileId As Integer
            Public Overridable Property Type As String
            Public Overridable Property TypeOther As String
            Public Overridable Property Description As String
            Public Overridable Property OriginalImageUrl As String
            Public Overridable Property CroppedImageUrl As String
            Public Overridable Property IsVerified As Boolean
        End Class

        Public Partial Class Passport
            Public Overridable Property ClientFileId As Integer
            Public Overridable Property FirstName As String
            Public Overridable Property MiddleName As String
            Public Overridable Property LastName As String
            Public Overridable Property DateOfBirth As String
            Public Overridable Property Gender As String
            Public Overridable Property MrzLineOne As String
            Public Overridable Property MrzLineTwo1 As String
            Public Overridable Property MrzLineTwo2 As String
            Public Overridable Property MrzLineTwo3 As String
            Public Overridable Property MrzLineTwo4 As String
            Public Overridable Property MrzLineTwo5 As String
            Public Overridable Property MrzLineTwo6 As String
            Public Overridable Property MrzLineTwo7 As String
            Public Overridable Property MrzLineTwo8 As String
            Public Overridable Property Images As ArrayOfImages
            Public Overridable Property IsVerified As Boolean
            Public Overridable Property IsFaceMatch As Nullable(Of Boolean)
            Public Overridable Property FaceMatchConfidence As Nullable(Of Decimal)
            Public Overridable Property HasPcvSearch As Boolean
            Public Overridable Property HasDfaSearch As Boolean
            Public Overridable Property IsPassportChipVerified As Nullable(Of Boolean)
            Public Overridable Property PassportChipData As PassportChipData
            Public Overridable Property IsEligibleForPcv As Boolean
            Public Overridable Property IsEligibleForDfa As Boolean
        End Class

        Public Partial Class PassportChipData
            Public Sub New()
                DataGroupsVerified = New Integer(){}
                DataGroupsFailed = New Integer(){}
            End Sub

            Public Overridable Property IsIssuerVerified As Boolean
            Public Overridable Property IssuerCommonName As String
            Public Overridable Property IssuerOrganisationName As String
            Public Overridable Property IssuerCountry As String
            Public Overridable Property MRZLine1 As String
            Public Overridable Property MRZLine2 As String
            Public Overridable Property IsMrzLine1Verified As Boolean
            Public Overridable Property IsMrzLine2Verified As Boolean
            Public Overridable Property DataGroupsVerified As Integer()
            Public Overridable Property DataGroupsFailed As Integer()
            Public Overridable Property IsFaceMatch As Boolean
            Public Overridable Property FaceMatchConfidence As Nullable(Of Decimal)
        End Class

        Public Partial Class ProofOfDocument
            '''<Summary>
            '''The ID of the ProofOfDocument
            '''</Summary>
            <ApiMember(Description:="The ID of the ProofOfDocument", IsRequired:=true)>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The name of the ProofOfDocument
            '''</Summary>
            <ApiMember(Description:="The name of the ProofOfDocument", IsRequired:=true)>
            Public Overridable Property Name As String
        End Class

        Public Partial Class ProofOfDocumentCategory
            '''<Summary>
            '''The ID of the ProofOfDocumentCategory
            '''</Summary>
            <ApiMember(Description:="The ID of the ProofOfDocumentCategory", IsRequired:=true)>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The category or subject that requires proof (e.g., 'Name', 'Address', 'Right to work')
            '''</Summary>
            <ApiMember(Description:="The category or subject that requires proof (e.g., 'Name', 'Address', 'Right to work')", IsRequired:=true)>
            Public Overridable Property ProofOf As String

            '''<Summary>
            '''The documents that can be used to provide proof for the specified category.
            '''</Summary>
            <ApiMember(Description:="The documents that can be used to provide proof for the specified category.", IsRequired:=true)>
            Public Overridable Property ProofOfDocuments As ArrayOfProofOfDocuments
        End Class

        Public Partial Class Video
            Public Sub New()
                VideoTimestamps = New List(Of VideoTimestamp)
            End Sub

            Public Overridable Property Id As Integer
            Public Overridable Property VideoUrl As String
            Public Overridable Property ImageUrl As String
            Public Overridable Property VideoTimestamps As List(Of VideoTimestamp)
        End Class

        Public Partial Class VideoTimestamp
            Public Overridable Property TagName As String
            Public Overridable Property Milli As Nullable(Of Integer)
            Public Overridable Property ImageUrl As String
        End Class
    End Namespace
End Namespace

VB.NET 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"}}}}