| GET | /{Brand}/templates/{TemplateGuid} | ||
|---|---|---|---|
| GET | /{Brand}/templates/{TemplateGuid}/{RetainMetadata} |
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 GetTemplate extends RequestBase
{
public TemplateGuid: string;
public RetainMetadata: boolean;
public constructor(init?: Partial<GetTemplate>) { 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); }
}
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.
GET /{Brand}/templates/{TemplateGuid} HTTP/1.1
Host: buildmax.org
Accept: text/csv
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.