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*}

export enum Brand
{
    Desktop = 'Desktop',
    Hp = 'Hp',
    Kyocera = 'Kyocera',
    NeaScan = 'NeaScan',
    Samsung = 'Samsung',
    FujiXerox = 'FujiXerox',
    Ta = 'Ta',
    Utax = 'Utax',
    Epson = 'Epson',
    ScanFront400 = 'ScanFront400',
    Sharp = 'Sharp',
    Ricoh = 'Ricoh',
    FujiFilm = 'FujiFilm',
}

export class DtoBase
{
    public Brand: Brand;

    public constructor(init?: Partial<DtoBase>) { (Object as any).assign(this, init); }
}

export class RequestBase extends DtoBase
{

    public constructor(init?: Partial<RequestBase>) { super(init); (Object as any).assign(this, init); }
}

export class GetTemplates extends RequestBase
{
    public Template: string;

    public constructor(init?: Partial<GetTemplates>) { super(init); (Object as any).assign(this, init); }
}

export class ResponseBase extends DtoBase
{
    public SelectedUiLanguage: string;
    public svSession: string;
    public Title: string;
    public PageTip: string;
    public NewBrowser: boolean;
    public ScanFront400TA: boolean;
    public ScanFront400UTAX: boolean;

    public constructor(init?: Partial<ResponseBase>) { super(init); (Object as any).assign(this, init); }
}

export interface ITemplateModificationInfo
{
    Guid: string;
    TemplateModificationDateTime: string;
    IconModificationDateTime: string;
}

export interface IClientQuestion extends ITemplateQuestion
{
    QuestionGuid: string;
    ValueDisplayed: string;
    ValueReturned: string;
    Answered: boolean;
    RegexMatches: boolean;
    RegexHint: string;
}

export enum TemplateType
{
    Workflow = 'Workflow',
    FreeForm = 'FreeForm',
}

export enum TemplateScheduleType
{
    Interval = 'Interval',
    Fixed = 'Fixed',
}

export interface ITemplateSchedule extends IInterface
{
    Time?: string;
    EndTime?: string;
    NoEndTime?: boolean;
    Type?: TemplateScheduleType;
}

export interface ICredentials extends IInterface
{
    Username: string;
    Password: string;
}

export interface IRejection
{
    RejectAfter?: number;
    RejectionPath: string;
    ShareCredentials: ICredentials;
}

export interface IBadDocumentRejection extends IStatus
{
    RejectionPath: string;
    ShareCredentials: ICredentials;
}

export enum PdfLoadResolution
{
    Default = 'Default',
    Dpi100 = 'Dpi100',
    Dpi150 = 'Dpi150',
    Dpi200 = 'Dpi200',
    Dpi300 = 'Dpi300',
    Dpi400 = 'Dpi400',
    Dpi500 = 'Dpi500',
    Dpi600 = 'Dpi600',
}

export interface IGeneral extends IInterface
{
    Name: string;
    Description: string;
    Icon: string;
    Schedule: ITemplateSchedule;
    Rejection: IRejection;
    BadDocumentRejection: IBadDocumentRejection;
    PdfLoadResolution?: PdfLoadResolution;
}

export interface ICaptureSource extends IStatus
{
}

export interface ICapture extends IInterface
{
    CaptureSources: ReadOnlyCollection<ICaptureSource>;
}

export interface IStringMetadata extends IMetadata
{
    IsSecure?: boolean;
    SampleValue: string;
    Value: string;
}

export interface IXmlMetadataImportTagMapping extends IInterface
{
    XPathExpression: string;
    Metadata: IStringMetadata;
}

export interface IXmlMetadataImportNamespaceMapping extends IInterface
{
    Prefix: string;
    Name: string;
}

export interface IXmlMetadataImport extends IStatus
{
    SampleDocumentName: string;
    TagMappings: ReadOnlyCollection<IXmlMetadataImportTagMapping>;
    NamespaceMappings: ReadOnlyCollection<IXmlMetadataImportNamespaceMapping>;
}

export enum NotificationType
{
    FailureOnly = 'FailureOnly',
    SuccessOnly = 'SuccessOnly',
    Always = 'Always',
}

export interface INotification extends IStatus
{
    Description: string;
    To: string;
    Subject: string;
    Body: string;
    Cc: string;
    Bcc: string;
    NotificationType?: NotificationType;
}

export interface INotifications extends IStatus
{
    Notifications: ReadOnlyCollection<INotification>;
}

export interface IValidationError
{
    Property: string;
    ErrorMessage: string;
}

export interface IValidationErrors
{
    Errors: ReadOnlyCollection<IValidationError>;
}

export interface IValidator
{
    ValidationErrors: IValidationErrors;
    IsValid: boolean;
}

export interface ITemplate extends IStatus
{
    TemplateVersion: string;
    ScannerVisionVersion: string;
    Guid: string;
    BeginScript: string;
    EndScript: string;
    TemplateType: TemplateType;
    General: IGeneral;
    Capture: ICapture;
    XmlMetadataImport: IXmlMetadataImport;
    Notifications: INotifications;
    Validator: IValidator;
}

export interface IClientTemplate
{
    Description: string;
    Icon: string;
    ModificationInfo: ITemplateModificationInfo;
    Name: string;
    Questions: IClientQuestion[];
    Template: ITemplate;
    TemplateGuid: string;
}

export class GetTemplatesResponse extends ResponseBase
{
    public Templates: IList<IClientTemplate>;

    public constructor(init?: Partial<GetTemplatesResponse>) { super(init); (Object as any).assign(this, init); }
}

TypeScript GetTemplates 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 /{Brand}/templates HTTP/1.1 
Host: buildmax.org 
Accept: application/json
Content-Type: application/json
Content-Length: length

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

{"SelectedUiLanguage":"String","svSession":"String","Title":"String","PageTip":"String","NewBrowser":false,"ScanFront400TA":false,"ScanFront400UTAX":false,"Brand":"Desktop"}