ScannerVision Web Server

<back to all web services

GetTemplates

Requires Authentication
The following routes are available for this service:
GET, POST/{Brand}/templates
All Verbs/kyocera/{Template*}
All Verbs/ta/{Template*}
All Verbs/utax/{Template*}
namespace ScannerVision.WebService.ServiceModel

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type Brand =
        | Desktop = 0
        | Hp = 1
        | Kyocera = 2
        | NeaScan = 3
        | Samsung = 4
        | FujiXerox = 5
        | Ta = 6
        | Utax = 7
        | Epson = 8
        | ScanFront400 = 9
        | Sharp = 10
        | Ricoh = 11
        | FujiFilm = 12

    [<AllowNullLiteral>]
    type DtoBase() = 
        member val Brand:Brand = new Brand() with get,set

    [<AllowNullLiteral>]
    type RequestBase() = 
        inherit DtoBase()

    [<AllowNullLiteral>]
    type GetTemplates() = 
        inherit RequestBase()
        member val Template:String = null with get,set

    [<AllowNullLiteral>]
    type ResponseBase() = 
        inherit DtoBase()
        member val SelectedUiLanguage:String = null with get,set
        member val svSession:String = null with get,set
        member val Title:String = null with get,set
        member val PageTip:String = null with get,set
        member val NewBrowser:Boolean = new Boolean() with get,set
        member val ScanFront400TA:Boolean = new Boolean() with get,set
        member val ScanFront400UTAX:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type ITemplateModificationInfo = 
        abstract Guid:String with get,set
        abstract TemplateModificationDateTime:DateTime with get,set
        abstract IconModificationDateTime:DateTime with get,set

    [<AllowNullLiteral>]
    type IClientQuestion = 
        abstract QuestionGuid:String with get,set
        abstract ValueDisplayed:String with get,set
        abstract ValueReturned:String with get,set
        abstract Answered:Boolean with get,set
        abstract RegexMatches:Boolean with get,set
        abstract RegexHint:String with get,set

    type TemplateType =
        | Workflow = 0
        | FreeForm = 1

    type TemplateScheduleType =
        | Interval = 0
        | Fixed = 1

    [<AllowNullLiteral>]
    type ITemplateSchedule = 
        abstract Time:Nullable<TimeSpan> with get,set
        abstract EndTime:Nullable<TimeSpan> with get,set
        abstract NoEndTime:Nullable<Boolean> with get,set
        abstract Type:Nullable<TemplateScheduleType> with get,set

    [<AllowNullLiteral>]
    type ICredentials = 
        abstract Username:String with get,set
        abstract Password:String with get,set

    [<AllowNullLiteral>]
    type IRejection = 
        abstract RejectAfter:Nullable<Int32> with get,set
        abstract RejectionPath:String with get,set
        abstract ShareCredentials:ICredentials with get,set

    [<AllowNullLiteral>]
    type IBadDocumentRejection = 
        abstract RejectionPath:String with get,set
        abstract ShareCredentials:ICredentials with get,set

    type PdfLoadResolution =
        | Default = 0
        | Dpi100 = 1
        | Dpi150 = 2
        | Dpi200 = 3
        | Dpi300 = 4
        | Dpi400 = 5
        | Dpi500 = 6
        | Dpi600 = 7

    [<AllowNullLiteral>]
    type IGeneral = 
        abstract Name:String with get,set
        abstract Description:String with get,set
        abstract Icon:String with get,set
        abstract Schedule:ITemplateSchedule with get,set
        abstract Rejection:IRejection with get,set
        abstract BadDocumentRejection:IBadDocumentRejection with get,set
        abstract PdfLoadResolution:Nullable<PdfLoadResolution> with get,set

    [<AllowNullLiteral>]
    type ICaptureSource = 
        interface end

    [<AllowNullLiteral>]
    type ICapture = 
        abstract CaptureSources:ReadOnlyCollection<ICaptureSource> with get,set

    [<AllowNullLiteral>]
    type IStringMetadata = 
        abstract IsSecure:Nullable<Boolean> with get,set
        abstract SampleValue:String with get,set
        abstract Value:String with get,set

    [<AllowNullLiteral>]
    type IXmlMetadataImportTagMapping = 
        abstract XPathExpression:String with get,set
        abstract Metadata:IStringMetadata with get,set

    [<AllowNullLiteral>]
    type IXmlMetadataImportNamespaceMapping = 
        abstract Prefix:String with get,set
        abstract Name:String with get,set

    [<AllowNullLiteral>]
    type IXmlMetadataImport = 
        abstract SampleDocumentName:String with get,set
        abstract TagMappings:ReadOnlyCollection<IXmlMetadataImportTagMapping> with get,set
        abstract NamespaceMappings:ReadOnlyCollection<IXmlMetadataImportNamespaceMapping> with get,set

    type NotificationType =
        | FailureOnly = 0
        | SuccessOnly = 1
        | Always = 2

    [<AllowNullLiteral>]
    type INotification = 
        abstract Description:String with get,set
        abstract To:String with get,set
        abstract Subject:String with get,set
        abstract Body:String with get,set
        abstract Cc:String with get,set
        abstract Bcc:String with get,set
        abstract NotificationType:Nullable<NotificationType> with get,set

    [<AllowNullLiteral>]
    type INotifications = 
        abstract Notifications:ReadOnlyCollection<INotification> with get,set

    [<AllowNullLiteral>]
    type IValidationError = 
        abstract Property:String with get,set
        abstract ErrorMessage:String with get,set

    [<AllowNullLiteral>]
    type IValidationErrors = 
        abstract Errors:ReadOnlyCollection<IValidationError> with get,set

    [<AllowNullLiteral>]
    type IValidator = 
        abstract ValidationErrors:IValidationErrors with get,set
        abstract IsValid:Boolean with get,set

    [<AllowNullLiteral>]
    type ITemplate = 
        abstract TemplateVersion:String with get,set
        abstract ScannerVisionVersion:String with get,set
        abstract Guid:String with get,set
        abstract BeginScript:String with get,set
        abstract EndScript:String with get,set
        abstract TemplateType:TemplateType with get,set
        abstract General:IGeneral with get,set
        abstract Capture:ICapture with get,set
        abstract XmlMetadataImport:IXmlMetadataImport with get,set
        abstract Notifications:INotifications with get,set
        abstract Validator:IValidator with get,set

    [<AllowNullLiteral>]
    type IClientTemplate = 
        abstract Description:String with get,set
        abstract Icon:Byte[] with get,set
        abstract ModificationInfo:ITemplateModificationInfo with get,set
        abstract Name:String with get,set
        abstract Questions:IEnumerable<IClientQuestion> with get,set
        abstract Template:ITemplate with get,set
        abstract TemplateGuid:String with get,set

    [<AllowNullLiteral>]
    type GetTemplatesResponse() = 
        inherit ResponseBase()
        member val Templates:IList<IClientTemplate> = null with get,set

F# GetTemplates DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Brand}/templates HTTP/1.1 
Host: buildmax.org 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Template":"String","Brand":"Desktop"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'GetTemplatesResponse' using the custom 'csv' filter}No parameterless constructor defined for this object.