Simplified.ID 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 java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@DataContract
open class AddClient : BaseRequest()
{
    @DataMember
    open var request:AddClientRequest? = null
}

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

@DataContract
open class Authentication
{
    /**
    * The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)
    */
    @DataMember
    @ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body")
    open var apiUserId:String? = null

    /**
    * The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)
    */
    @DataMember
    @ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body")
    open var apiUserKey:String? = null

    /**
    * The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).
    */
    @DataMember
    @ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body")
    open var userId:String? = null
}

open class AddClientRequest
{
    /**
    * The full name of the client
    */
    @ApiMember(Description="The full name of the client", IsRequired=true)
    open var name:String? = null

    /**
    * The email address of the client
    */
    @ApiMember(Description="The email address of the client", IsRequired=true)
    open 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)
    open var mobileInternational:String? = null

    /**
    * A reference or postcode that will be sent to the client to help them recognize the communication as genuine
    */
    @ApiMember(Description="A reference or postcode that will be sent to the client to help them recognize the communication as genuine", IsRequired=true)
    open var postCode:String? = null

    /**
    * Specifies the type of ValidateMe (Simplified.ID App) 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 (Simplified.ID App) preset. Possible values are 'ValidateMe' for configuring RequiredDocuments, or 'PassportChipVerification' for setting the Passport as Proof of Name", IsRequired=true)
    open 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'")
    open 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")
    open var linkedTo:ArrayOfLinkedTo? = null

    /**
    * Your reference, if any
    */
    @ApiMember(Description="Your reference, if any")
    open var reference:String? = 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)
    open 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)
    open 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)
    open 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)
    open var id:Int? = null

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

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

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

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

open class AddClientData : BaseResponse(), IBaseSearchResponse
{
    override var linkedTo:ArrayOfLinkedTo? = null
    open var client:Client? = null
    open var validateMePin:String? = null
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

open class OtherDocument
{
    open var clientFileId:Int? = null
    @SerializedName("type") open var Type:String? = null
    open var typeOther:String? = null
    open var description:String? = null
    open var originalImageUrl:String? = null
    open var croppedImageUrl:String? = null
    open 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.simplified.id 
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)\/"}],"reference":"String"},"authentication":{"apiUserId":"String","apiUserKey":"String","userId":"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,"numOfVideos":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","expiryDate":"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"}]}]},"validateMePin":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}