| POST | /v1/forms/submissions/{SubmissionUID}/stage |
|---|
import 'package:servicestack/servicestack.dart';
class FormStageInfo implements IConvertible
{
String? Id;
String? Label;
String? Tone;
String? Kind;
FormStageInfo({this.Id,this.Label,this.Tone,this.Kind});
FormStageInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Label = json['Label'];
Tone = json['Tone'];
Kind = json['Kind'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Label': Label,
'Tone': Tone,
'Kind': Kind
};
getTypeName() => "FormStageInfo";
TypeContext? context = _ctx;
}
class FormPerson implements IConvertible
{
int? AgentId;
String? AgentName;
FormPerson({this.AgentId,this.AgentName});
FormPerson.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentId = json['AgentId'];
AgentName = json['AgentName'];
return this;
}
Map<String, dynamic> toJson() => {
'AgentId': AgentId,
'AgentName': AgentName
};
getTypeName() => "FormPerson";
TypeContext? context = _ctx;
}
class FormRecordFile implements IConvertible
{
String? AttachmentId;
String? Name;
String? Kind;
String? Size;
bool? Sensitive;
bool? Locked;
FormRecordFile({this.AttachmentId,this.Name,this.Kind,this.Size,this.Sensitive,this.Locked});
FormRecordFile.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AttachmentId = json['AttachmentId'];
Name = json['Name'];
Kind = json['Kind'];
Size = json['Size'];
Sensitive = json['Sensitive'];
Locked = json['Locked'];
return this;
}
Map<String, dynamic> toJson() => {
'AttachmentId': AttachmentId,
'Name': Name,
'Kind': Kind,
'Size': Size,
'Sensitive': Sensitive,
'Locked': Locked
};
getTypeName() => "FormRecordFile";
TypeContext? context = _ctx;
}
class FormRecordSig implements IConvertible
{
bool? Pending;
String? Mode;
String? SignerName;
String? Role;
int? RecordId;
String? ImageHash;
String? DocumentDigest;
String? Ip;
String? Browser;
bool? ConsentStored;
String? SignedText;
bool? HasImage;
FormRecordSig({this.Pending,this.Mode,this.SignerName,this.Role,this.RecordId,this.ImageHash,this.DocumentDigest,this.Ip,this.Browser,this.ConsentStored,this.SignedText,this.HasImage});
FormRecordSig.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Pending = json['Pending'];
Mode = json['Mode'];
SignerName = json['SignerName'];
Role = json['Role'];
RecordId = json['RecordId'];
ImageHash = json['ImageHash'];
DocumentDigest = json['DocumentDigest'];
Ip = json['Ip'];
Browser = json['Browser'];
ConsentStored = json['ConsentStored'];
SignedText = json['SignedText'];
HasImage = json['HasImage'];
return this;
}
Map<String, dynamic> toJson() => {
'Pending': Pending,
'Mode': Mode,
'SignerName': SignerName,
'Role': Role,
'RecordId': RecordId,
'ImageHash': ImageHash,
'DocumentDigest': DocumentDigest,
'Ip': Ip,
'Browser': Browser,
'ConsentStored': ConsentStored,
'SignedText': SignedText,
'HasImage': HasImage
};
getTypeName() => "FormRecordSig";
TypeContext? context = _ctx;
}
class FormRecordRow implements IConvertible
{
String? K;
String? L;
String? T;
String? Kind;
String? V;
bool? Sensitive;
bool? CanReveal;
bool? Locked;
List<FormRecordFile>? Files = [];
bool? NoFiles;
FormRecordSig? Sig;
FormRecordRow({this.K,this.L,this.T,this.Kind,this.V,this.Sensitive,this.CanReveal,this.Locked,this.Files,this.NoFiles,this.Sig});
FormRecordRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
K = json['K'];
L = json['L'];
T = json['T'];
Kind = json['Kind'];
V = json['V'];
Sensitive = json['Sensitive'];
CanReveal = json['CanReveal'];
Locked = json['Locked'];
Files = JsonConverters.fromJson(json['Files'],'List<FormRecordFile>',context!);
NoFiles = json['NoFiles'];
Sig = JsonConverters.fromJson(json['Sig'],'FormRecordSig',context!);
return this;
}
Map<String, dynamic> toJson() => {
'K': K,
'L': L,
'T': T,
'Kind': Kind,
'V': V,
'Sensitive': Sensitive,
'CanReveal': CanReveal,
'Locked': Locked,
'Files': JsonConverters.toJson(Files,'List<FormRecordFile>',context!),
'NoFiles': NoFiles,
'Sig': JsonConverters.toJson(Sig,'FormRecordSig',context!)
};
getTypeName() => "FormRecordRow";
TypeContext? context = _ctx;
}
class FormRecordSection implements IConvertible
{
String? Title;
List<FormRecordRow>? Rows = [];
FormRecordSection({this.Title,this.Rows});
FormRecordSection.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Title = json['Title'];
Rows = JsonConverters.fromJson(json['Rows'],'List<FormRecordRow>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Title': Title,
'Rows': JsonConverters.toJson(Rows,'List<FormRecordRow>',context!)
};
getTypeName() => "FormRecordSection";
TypeContext? context = _ctx;
}
class FormRecordDoc implements IConvertible
{
String? Name;
bool? Ok;
String? Tag;
String? Tone;
FormRecordDoc({this.Name,this.Ok,this.Tag,this.Tone});
FormRecordDoc.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Ok = json['Ok'];
Tag = json['Tag'];
Tone = json['Tone'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Ok': Ok,
'Tag': Tag,
'Tone': Tone
};
getTypeName() => "FormRecordDoc";
TypeContext? context = _ctx;
}
class FormRecordComputed implements IConvertible
{
String? L;
String? V;
FormRecordComputed({this.L,this.V});
FormRecordComputed.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
L = json['L'];
V = json['V'];
return this;
}
Map<String, dynamic> toJson() => {
'L': L,
'V': V
};
getTypeName() => "FormRecordComputed";
TypeContext? context = _ctx;
}
class FormRecordEvent implements IConvertible
{
String? Who;
String? X;
String? T;
DateTime? At;
String? Dot;
FormRecordEvent({this.Who,this.X,this.T,this.At,this.Dot});
FormRecordEvent.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Who = json['Who'];
X = json['X'];
T = json['T'];
At = JsonConverters.fromJson(json['At'],'DateTime',context!);
Dot = json['Dot'];
return this;
}
Map<String, dynamic> toJson() => {
'Who': Who,
'X': X,
'T': T,
'At': JsonConverters.toJson(At,'DateTime',context!),
'Dot': Dot
};
getTypeName() => "FormRecordEvent";
TypeContext? context = _ctx;
}
class FormSubmissionRecord implements IConvertible
{
String? SubmissionUID;
String? FormUID;
String? FormName;
String? Noun;
String? Number;
String? ApplicantName;
FormStageInfo? Stage;
List<String>? Tags = [];
int? AssigneeAgentId;
String? AssigneeName;
String? BranchName;
DateTime? SubmittedAt;
int? VersionNo;
int? CurrentVersionNo;
String? Email;
String? Phone;
String? ContactName;
String? Meta;
List<FormStageInfo>? Stages = [];
List<FormStageInfo>? Moves = [];
List<FormPerson>? People = [];
bool? CanEdit;
bool? CanSensitive;
List<FormRecordSection>? Sections = [];
List<FormRecordDoc>? Docs = [];
String? DocCount;
List<FormRecordComputed>? Computed = [];
List<FormRecordEvent>? Timeline = [];
List<FormRecordEvent>? Notes = [];
List<FormRecordEvent>? Audit = [];
FormSubmissionRecord({this.SubmissionUID,this.FormUID,this.FormName,this.Noun,this.Number,this.ApplicantName,this.Stage,this.Tags,this.AssigneeAgentId,this.AssigneeName,this.BranchName,this.SubmittedAt,this.VersionNo,this.CurrentVersionNo,this.Email,this.Phone,this.ContactName,this.Meta,this.Stages,this.Moves,this.People,this.CanEdit,this.CanSensitive,this.Sections,this.Docs,this.DocCount,this.Computed,this.Timeline,this.Notes,this.Audit});
FormSubmissionRecord.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SubmissionUID = json['SubmissionUID'];
FormUID = json['FormUID'];
FormName = json['FormName'];
Noun = json['Noun'];
Number = json['Number'];
ApplicantName = json['ApplicantName'];
Stage = JsonConverters.fromJson(json['Stage'],'FormStageInfo',context!);
Tags = JsonConverters.fromJson(json['Tags'],'List<String>',context!);
AssigneeAgentId = json['AssigneeAgentId'];
AssigneeName = json['AssigneeName'];
BranchName = json['BranchName'];
SubmittedAt = JsonConverters.fromJson(json['SubmittedAt'],'DateTime',context!);
VersionNo = json['VersionNo'];
CurrentVersionNo = json['CurrentVersionNo'];
Email = json['Email'];
Phone = json['Phone'];
ContactName = json['ContactName'];
Meta = json['Meta'];
Stages = JsonConverters.fromJson(json['Stages'],'List<FormStageInfo>',context!);
Moves = JsonConverters.fromJson(json['Moves'],'List<FormStageInfo>',context!);
People = JsonConverters.fromJson(json['People'],'List<FormPerson>',context!);
CanEdit = json['CanEdit'];
CanSensitive = json['CanSensitive'];
Sections = JsonConverters.fromJson(json['Sections'],'List<FormRecordSection>',context!);
Docs = JsonConverters.fromJson(json['Docs'],'List<FormRecordDoc>',context!);
DocCount = json['DocCount'];
Computed = JsonConverters.fromJson(json['Computed'],'List<FormRecordComputed>',context!);
Timeline = JsonConverters.fromJson(json['Timeline'],'List<FormRecordEvent>',context!);
Notes = JsonConverters.fromJson(json['Notes'],'List<FormRecordEvent>',context!);
Audit = JsonConverters.fromJson(json['Audit'],'List<FormRecordEvent>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'SubmissionUID': SubmissionUID,
'FormUID': FormUID,
'FormName': FormName,
'Noun': Noun,
'Number': Number,
'ApplicantName': ApplicantName,
'Stage': JsonConverters.toJson(Stage,'FormStageInfo',context!),
'Tags': JsonConverters.toJson(Tags,'List<String>',context!),
'AssigneeAgentId': AssigneeAgentId,
'AssigneeName': AssigneeName,
'BranchName': BranchName,
'SubmittedAt': JsonConverters.toJson(SubmittedAt,'DateTime',context!),
'VersionNo': VersionNo,
'CurrentVersionNo': CurrentVersionNo,
'Email': Email,
'Phone': Phone,
'ContactName': ContactName,
'Meta': Meta,
'Stages': JsonConverters.toJson(Stages,'List<FormStageInfo>',context!),
'Moves': JsonConverters.toJson(Moves,'List<FormStageInfo>',context!),
'People': JsonConverters.toJson(People,'List<FormPerson>',context!),
'CanEdit': CanEdit,
'CanSensitive': CanSensitive,
'Sections': JsonConverters.toJson(Sections,'List<FormRecordSection>',context!),
'Docs': JsonConverters.toJson(Docs,'List<FormRecordDoc>',context!),
'DocCount': DocCount,
'Computed': JsonConverters.toJson(Computed,'List<FormRecordComputed>',context!),
'Timeline': JsonConverters.toJson(Timeline,'List<FormRecordEvent>',context!),
'Notes': JsonConverters.toJson(Notes,'List<FormRecordEvent>',context!),
'Audit': JsonConverters.toJson(Audit,'List<FormRecordEvent>',context!)
};
getTypeName() => "FormSubmissionRecord";
TypeContext? context = _ctx;
}
class FormSubmissionRecordResponse implements IConvertible
{
FormSubmissionRecord? Record;
ResponseStatus? ResponseStatus;
FormSubmissionRecordResponse({this.Record,this.ResponseStatus});
FormSubmissionRecordResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Record = JsonConverters.fromJson(json['Record'],'FormSubmissionRecord',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Record': JsonConverters.toJson(Record,'FormSubmissionRecord',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormSubmissionRecordResponse";
TypeContext? context = _ctx;
}
class FormSubmissionStageRequest implements IConvertible
{
String? SubmissionUID;
String? Stage;
String? From;
FormSubmissionStageRequest({this.SubmissionUID,this.Stage,this.From});
FormSubmissionStageRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SubmissionUID = json['SubmissionUID'];
Stage = json['Stage'];
From = json['From'];
return this;
}
Map<String, dynamic> toJson() => {
'SubmissionUID': SubmissionUID,
'Stage': Stage,
'From': From
};
getTypeName() => "FormSubmissionStageRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormStageInfo': TypeInfo(TypeOf.Class, create:() => FormStageInfo()),
'FormPerson': TypeInfo(TypeOf.Class, create:() => FormPerson()),
'FormRecordFile': TypeInfo(TypeOf.Class, create:() => FormRecordFile()),
'FormRecordSig': TypeInfo(TypeOf.Class, create:() => FormRecordSig()),
'FormRecordRow': TypeInfo(TypeOf.Class, create:() => FormRecordRow()),
'List<FormRecordFile>': TypeInfo(TypeOf.Class, create:() => <FormRecordFile>[]),
'FormRecordSection': TypeInfo(TypeOf.Class, create:() => FormRecordSection()),
'List<FormRecordRow>': TypeInfo(TypeOf.Class, create:() => <FormRecordRow>[]),
'FormRecordDoc': TypeInfo(TypeOf.Class, create:() => FormRecordDoc()),
'FormRecordComputed': TypeInfo(TypeOf.Class, create:() => FormRecordComputed()),
'FormRecordEvent': TypeInfo(TypeOf.Class, create:() => FormRecordEvent()),
'FormSubmissionRecord': TypeInfo(TypeOf.Class, create:() => FormSubmissionRecord()),
'List<FormStageInfo>': TypeInfo(TypeOf.Class, create:() => <FormStageInfo>[]),
'List<FormPerson>': TypeInfo(TypeOf.Class, create:() => <FormPerson>[]),
'List<FormRecordSection>': TypeInfo(TypeOf.Class, create:() => <FormRecordSection>[]),
'List<FormRecordDoc>': TypeInfo(TypeOf.Class, create:() => <FormRecordDoc>[]),
'List<FormRecordComputed>': TypeInfo(TypeOf.Class, create:() => <FormRecordComputed>[]),
'List<FormRecordEvent>': TypeInfo(TypeOf.Class, create:() => <FormRecordEvent>[]),
'FormSubmissionRecordResponse': TypeInfo(TypeOf.Class, create:() => FormSubmissionRecordResponse()),
'FormSubmissionStageRequest': TypeInfo(TypeOf.Class, create:() => FormSubmissionStageRequest()),
});
Dart FormSubmissionStageRequest DTOs
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.
POST /v1/forms/submissions/{SubmissionUID}/stage HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"SubmissionUID":"00000000000000000000000000000000","Stage":"String","From":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Record":{"SubmissionUID":"00000000000000000000000000000000","FormUID":"00000000000000000000000000000000","FormName":"String","Noun":"String","Number":"String","ApplicantName":"String","Stage":{"Id":"String","Label":"String","Tone":"String","Kind":"String"},"Tags":["String"],"AssigneeAgentId":0,"AssigneeName":"String","BranchName":"String","SubmittedAt":"0001-01-01T00:00:00.0000000","VersionNo":0,"CurrentVersionNo":0,"Email":"String","Phone":"String","ContactName":"String","Meta":"String","Stages":[{"Id":"String","Label":"String","Tone":"String","Kind":"String"}],"Moves":[{"Id":"String","Label":"String","Tone":"String","Kind":"String"}],"People":[{"AgentId":0,"AgentName":"String"}],"CanEdit":false,"CanSensitive":false,"Sections":[{"Title":"String","Rows":[{"K":"String","L":"String","T":"String","Kind":"String","V":"String","Sensitive":false,"CanReveal":false,"Locked":false,"Files":[{"AttachmentId":"00000000000000000000000000000000","Name":"String","Kind":"String","Size":"String","Sensitive":false,"Locked":false}],"NoFiles":false,"Sig":{"Pending":false,"Mode":"String","SignerName":"String","Role":"String","RecordId":0,"ImageHash":"String","DocumentDigest":"String","Ip":"String","Browser":"String","ConsentStored":false,"SignedText":"String","HasImage":false}}]}],"Docs":[{"Name":"String","Ok":false,"Tag":"String","Tone":"String"}],"DocCount":"String","Computed":[{"L":"String","V":"String"}],"Timeline":[{"Who":"String","X":"String","T":"String","At":"0001-01-01T00:00:00.0000000","Dot":"String"}],"Notes":[{"Who":"String","X":"String","T":"String","At":"0001-01-01T00:00:00.0000000","Dot":"String"}],"Audit":[{"Who":"String","X":"String","T":"String","At":"0001-01-01T00:00:00.0000000","Dot":"String"}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}