ScannerVision Web Server

<back to all web services

JsonRegisterClientRequest

Requires Authentication
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ScannerVision.WebService.Json.Dto

Namespace Global

    Namespace ScannerVision.WebService.Json.Dto

        Public Partial Class JsonDto
        End Class

        Public Partial Class JsonRegisterClientRequest
            Inherits JsonRequestDto
        End Class

        Public Partial Class JsonRegisterClientResponse
            Inherits JsonDto
            Public Overridable Property Result As RegistrationResult
            Public Overridable Property ErrorMessage As String
            Public Overridable Property ClientRegistrationCode As String

            Public Enum RegistrationResult
                Success
                ClientCodeNotFound
                ClientAlreadyRegistered
                [Error]
            End Enum
        End Class

        Public Partial Class JsonRequestDto
            Inherits JsonDto
            Public Overridable Property ClientCode As String
            Public Overridable Property ClientRegistrationCode As String
            Public Overridable Property Token As String
        End Class
    End Namespace
End Namespace

VB.NET JsonRegisterClientRequest 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 /json/reply/JsonRegisterClientRequest HTTP/1.1 
Host: buildmax.org 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ClientCode":"String","ClientRegistrationCode":"String","Token":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Result":"Success","ErrorMessage":"String","ClientRegistrationCode":"String"}