Simplified.ID 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 java.io.InputStream
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")
    open var id:Int? = null

    @DataMember
    open var request:Client? = 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 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
}

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
}

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

open class UpdateClientData : BaseResponse()
{
    open var client:Client? = 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>()
{
}

Kotlin UpdateClient 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.

PUT /clients/{Id} HTTP/1.1 
Host: api.simplified.id 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":0,"request":{"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"}]}]},"authentication":{"apiUserId":"String","apiUserKey":"String","userId":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":{"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"}]}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}