ScannerVision Web Server

<back to all web services

ScanSettingsRequest

Requires Authentication
The following routes are available for this service:
POST/{Brand}/scansettings/{TemplateGuid}

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 enum ScanColour
{
    BlackAndWhite = 'BlackAndWhite',
    Greyscale = 'Greyscale',
    Colour = 'Colour',
    Auto = 'Auto',
}

export enum ScanOrientation
{
    Portrait = 'Portrait',
    Landscape = 'Landscape',
}

export enum ScanResolution
{
    Dpi100 = 'Dpi100',
    Dpi200 = 'Dpi200',
    Dpi300 = 'Dpi300',
    Dpi400 = 'Dpi400',
    Dpi600 = 'Dpi600',
}

export enum ScanSide
{
    Simplex = 'Simplex',
    Duplex = 'Duplex',
}

export enum ScanSize
{
    Auto = 'Auto',
    A3 = 'A3',
    A4 = 'A4',
    A5 = 'A5',
    B4 = 'B4',
    B5 = 'B5',
    Letter = 'Letter',
    Legal = 'Legal',
    Executive = 'Executive',
    Folio = 'Folio',
    AutoLong = 'AutoLong',
    A4R = 'A4R',
    A5R = 'A5R',
    A6R = 'A6R',
    B6R = 'B6R',
}

export enum ScanSource
{
    Adf = 'Adf',
    Glass = 'Glass',
    Auto = 'Auto',
}

export enum ScanType
{
    Text = 'Text',
    Photo = 'Photo',
    TextAndPhoto = 'TextAndPhoto',
}

export enum BoolSetting
{
    True = 'True',
    False = 'False',
}

export class ScanSettingsRequest extends RequestBase
{
    public TemplateGuid: string;
    public SelectedColour: ScanColour;
    public SelectedOrientation: ScanOrientation;
    public SelectedResolution: ScanResolution;
    public SelectedSides: ScanSide;
    public SelectedSize: ScanSize;
    public SelectedSource: ScanSource;
    public SelectedType: ScanType;
    public SelectedScanContinuously: BoolSetting;
    public SelectedMixedSizes: BoolSetting;

    public constructor(init?: Partial<ScanSettingsRequest>) { 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 ScanResponseBase extends ResponseBase
{
    public Template: IClientTemplate;
    public GlobalQuestions: IClientQuestion[];
    public CanEnableScanButton: boolean;

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

export class GetTemplateResponse extends ScanResponseBase
{
    public ServerAddress: string;
    public ServerPort: number;

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

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

{"ServerAddress":"String","ServerPort":0,"CanEnableScanButton":true,"SelectedUiLanguage":"String","svSession":"String","Title":"String","PageTip":"String","NewBrowser":false,"ScanFront400TA":false,"ScanFront400UTAX":false,"Brand":"Desktop"}