| POST, PUT | /v1/DocumentOCRNotification |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class DocumentOCRNotificationResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
bool? Success;
DocumentOCRNotificationResponse({this.ResponseStatus,this.Success});
DocumentOCRNotificationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Success = json['Success'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Success': Success
};
getTypeName() => "DocumentOCRNotificationResponse";
TypeContext? context = _ctx;
}
class DocumentOCRNotificationRequest implements IConvertible
{
String? jobId;
String? status;
String? sourceDocument;
DocumentOCRNotificationRequest({this.jobId,this.status,this.sourceDocument});
DocumentOCRNotificationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
jobId = json['jobId'];
status = json['status'];
sourceDocument = json['sourceDocument'];
return this;
}
Map<String, dynamic> toJson() => {
'jobId': jobId,
'status': status,
'sourceDocument': sourceDocument
};
getTypeName() => "DocumentOCRNotificationRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DocumentOCRNotificationResponse': TypeInfo(TypeOf.Class, create:() => DocumentOCRNotificationResponse()),
'DocumentOCRNotificationRequest': TypeInfo(TypeOf.Class, create:() => DocumentOCRNotificationRequest()),
});
Dart DocumentOCRNotificationRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/DocumentOCRNotification HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
jobId: String,
status: String,
sourceDocument: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Success: False
}