| POST | /{Brand}/scansettings/{TemplateGuid} |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ScannerVision.WebService.ServiceModel
Imports ScannerVision.Template
Imports ScannerVision.Web.Types
Imports ScannerVision.SystemTypes.SvMain.Interfaces
Imports ScannerVision.Template.Interfaces
Imports ScannerVision.CSCommon.Types.Interfaces
Imports ScannerVision.Types
Namespace Global
Namespace ScannerVision.CSCommon.Types.Interfaces
Public Interface IValidator
Property ValidationErrors As IValidationErrors
Property IsValid As Boolean
End Interface
End Namespace
Namespace ScannerVision.SystemTypes.SvMain.Interfaces
Public Interface IClientQuestion
Implements ITemplateQuestion
Property QuestionGuid As String
Property ValueDisplayed As String
Property ValueReturned As String
Property Answered As Boolean
Property RegexMatches As Boolean
Property RegexHint As String
End Interface
Public Interface IClientTemplate
Property Description As String
Property Icon As Byte()
Property ModificationInfo As ITemplateModificationInfo
Property Name As String
Property Questions As IEnumerable(Of IClientQuestion)
Property Template As ITemplate
Property TemplateGuid As String
End Interface
Public Interface ITemplateModificationInfo
Property Guid As String
Property TemplateModificationDateTime As Date
Property IconModificationDateTime As Date
End Interface
End Namespace
Namespace ScannerVision.Template
Public Enum NotificationType
FailureOnly
SuccessOnly
Always
End Enum
Public Enum PdfLoadResolution
[Default]
Dpi100
Dpi150
Dpi200
Dpi300
Dpi400
Dpi500
Dpi600
End Enum
Public Enum ScanColour
BlackAndWhite
Greyscale
Colour
Auto
End Enum
Public Enum ScanOrientation
Portrait
Landscape
End Enum
Public Enum ScanResolution
Dpi100
Dpi200
Dpi300
Dpi400
Dpi600
End Enum
Public Enum ScanSide
Simplex
Duplex
End Enum
Public Enum ScanSize
Auto
A3
A4
A5
B4
B5
Letter
Legal
Executive
Folio
AutoLong
A4R
A5R
A6R
B6R
End Enum
Public Enum ScanSource
Adf
Glass
Auto
End Enum
Public Enum ScanType
Text
Photo
TextAndPhoto
End Enum
Public Enum TemplateScheduleType
Interval
Fixed
End Enum
Public Enum TemplateType
Workflow
FreeForm
End Enum
End Namespace
Namespace ScannerVision.Template.Interfaces
Public Interface IBadDocumentRejection
Implements IStatus
Property RejectionPath As String
Property ShareCredentials As ICredentials
End Interface
Public Interface ICapture
Implements IInterface
Property CaptureSources As ReadOnlyCollection(Of ICaptureSource)
End Interface
Public Interface ICaptureSource
Implements IStatus
End Interface
Public Interface ICredentials
Implements IInterface
Property Username As String
Property Password As String
End Interface
Public Interface IGeneral
Implements IInterface
Property Name As String
Property Description As String
Property Icon As String
Property Schedule As ITemplateSchedule
Property Rejection As IRejection
Property BadDocumentRejection As IBadDocumentRejection
Property PdfLoadResolution As Nullable(Of PdfLoadResolution)
End Interface
Public Interface INotification
Implements IStatus
Property Description As String
Property To As String
Property Subject As String
Property Body As String
Property Cc As String
Property Bcc As String
Property NotificationType As Nullable(Of NotificationType)
End Interface
Public Interface INotifications
Implements IStatus
Property Notifications As ReadOnlyCollection(Of INotification)
End Interface
Public Interface IRejection
Property RejectAfter As Nullable(Of Integer)
Property RejectionPath As String
Property ShareCredentials As ICredentials
End Interface
Public Interface IStringMetadata
Implements IMetadata
Property IsSecure As Nullable(Of Boolean)
Property SampleValue As String
Property Value As String
End Interface
Public Interface ITemplate
Implements IStatus
Property TemplateVersion As String
Property ScannerVisionVersion As String
Property Guid As String
Property BeginScript As String
Property EndScript As String
Property TemplateType As TemplateType
Property General As IGeneral
Property Capture As ICapture
Property XmlMetadataImport As IXmlMetadataImport
Property Notifications As INotifications
Property Validator As IValidator
End Interface
Public Interface ITemplateSchedule
Implements IInterface
Property Time As Nullable(Of TimeSpan)
Property EndTime As Nullable(Of TimeSpan)
Property NoEndTime As Nullable(Of Boolean)
Property Type As Nullable(Of TemplateScheduleType)
End Interface
Public Interface IXmlMetadataImport
Implements IStatus
Property SampleDocumentName As String
Property TagMappings As ReadOnlyCollection(Of IXmlMetadataImportTagMapping)
Property NamespaceMappings As ReadOnlyCollection(Of IXmlMetadataImportNamespaceMapping)
End Interface
Public Interface IXmlMetadataImportNamespaceMapping
Implements IInterface
Property Prefix As String
Property Name As String
End Interface
Public Interface IXmlMetadataImportTagMapping
Implements IInterface
Property XPathExpression As String
Property Metadata As IStringMetadata
End Interface
End Namespace
Namespace ScannerVision.Types
Public Interface IValidationError
Property Property As String
Property ErrorMessage As String
End Interface
Public Interface IValidationErrors
Property Errors As ReadOnlyCollection(Of IValidationError)
End Interface
End Namespace
Namespace ScannerVision.Web.Types
Public Enum BoolSetting
[True]
[False]
End Enum
End Namespace
Namespace ScannerVision.WebService.ServiceModel
Public Enum Brand
Desktop
Hp
Kyocera
NeaScan
Samsung
FujiXerox
Ta
Utax
Epson
ScanFront400
Sharp
Ricoh
FujiFilm
End Enum
Public Partial Class DtoBase
Public Overridable Property Brand As Brand
End Class
Public Partial Class GetTemplateResponse
Inherits ScanResponseBase
Public Overridable Property ServerAddress As String
Public Overridable Property ServerPort As Integer
End Class
Public Partial Class RequestBase
Inherits DtoBase
End Class
Public Partial Class ResponseBase
Inherits DtoBase
Public Overridable Property SelectedUiLanguage As String
Public Overridable Property svSession As String
Public Overridable Property Title As String
Public Overridable Property PageTip As String
Public Overridable Property NewBrowser As Boolean
Public Overridable Property ScanFront400TA As Boolean
Public Overridable Property ScanFront400UTAX As Boolean
End Class
Public Partial Class ScanResponseBase
Inherits ResponseBase
Public Overridable Property Template As IClientTemplate
Public Overridable Property GlobalQuestions As IEnumerable(Of IClientQuestion)
Public Overridable Property CanEnableScanButton As Boolean
End Class
Public Partial Class ScanSettingsRequest
Inherits RequestBase
Public Overridable Property TemplateGuid As String
Public Overridable Property SelectedColour As ScanColour
Public Overridable Property SelectedOrientation As ScanOrientation
Public Overridable Property SelectedResolution As ScanResolution
Public Overridable Property SelectedSides As ScanSide
Public Overridable Property SelectedSize As ScanSize
Public Overridable Property SelectedSource As ScanSource
Public Overridable Property SelectedType As ScanType
Public Overridable Property SelectedScanContinuously As BoolSetting
Public Overridable Property SelectedMixedSizes As BoolSetting
End Class
End Namespace
End Namespace
VB.NET ScanSettingsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Brand}/scansettings/{TemplateGuid} HTTP/1.1
Host: buildmax.org
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"TemplateGuid":"String","SelectedColour":"BlackAndWhite","SelectedOrientation":"Portrait","SelectedResolution":"Dpi100","SelectedSides":"Simplex","SelectedSize":"Auto","SelectedSource":"Adf","SelectedType":"Text","SelectedScanContinuously":"True","SelectedMixedSizes":"True","Brand":"Desktop"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'GetTemplateResponse' using the custom 'csv' filter}No parameterless constructor defined for this object.