| POST | /v1/forms/submissions/search |
|---|
import 'package:servicestack/servicestack.dart';
class FormInboxRow implements IConvertible
{
String? SubmissionUID;
String? FormUID;
String? FormName;
int? VersionNo;
String? Number;
String? ApplicantName;
String? Stage;
String? StageLabel;
String? StageTone;
int? AssigneeAgentId;
String? AssigneeName;
String? BranchName;
DateTime? SubmittedAt;
String? SubmittedText;
List<String>? Tags = [];
int? DocsOk;
int? DocsNeed;
bool? IsTest;
String? VersionText;
FormInboxRow({this.SubmissionUID,this.FormUID,this.FormName,this.VersionNo,this.Number,this.ApplicantName,this.Stage,this.StageLabel,this.StageTone,this.AssigneeAgentId,this.AssigneeName,this.BranchName,this.SubmittedAt,this.SubmittedText,this.Tags,this.DocsOk,this.DocsNeed,this.IsTest,this.VersionText});
FormInboxRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SubmissionUID = json['SubmissionUID'];
FormUID = json['FormUID'];
FormName = json['FormName'];
VersionNo = json['VersionNo'];
Number = json['Number'];
ApplicantName = json['ApplicantName'];
Stage = json['Stage'];
StageLabel = json['StageLabel'];
StageTone = json['StageTone'];
AssigneeAgentId = json['AssigneeAgentId'];
AssigneeName = json['AssigneeName'];
BranchName = json['BranchName'];
SubmittedAt = JsonConverters.fromJson(json['SubmittedAt'],'DateTime',context!);
SubmittedText = json['SubmittedText'];
Tags = JsonConverters.fromJson(json['Tags'],'List<String>',context!);
DocsOk = json['DocsOk'];
DocsNeed = json['DocsNeed'];
IsTest = json['IsTest'];
VersionText = json['VersionText'];
return this;
}
Map<String, dynamic> toJson() => {
'SubmissionUID': SubmissionUID,
'FormUID': FormUID,
'FormName': FormName,
'VersionNo': VersionNo,
'Number': Number,
'ApplicantName': ApplicantName,
'Stage': Stage,
'StageLabel': StageLabel,
'StageTone': StageTone,
'AssigneeAgentId': AssigneeAgentId,
'AssigneeName': AssigneeName,
'BranchName': BranchName,
'SubmittedAt': JsonConverters.toJson(SubmittedAt,'DateTime',context!),
'SubmittedText': SubmittedText,
'Tags': JsonConverters.toJson(Tags,'List<String>',context!),
'DocsOk': DocsOk,
'DocsNeed': DocsNeed,
'IsTest': IsTest,
'VersionText': VersionText
};
getTypeName() => "FormInboxRow";
TypeContext? context = _ctx;
}
class FormInboxCount implements IConvertible
{
String? V;
String? L;
int? N;
FormInboxCount({this.V,this.L,this.N});
FormInboxCount.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
V = json['V'];
L = json['L'];
N = json['N'];
return this;
}
Map<String, dynamic> toJson() => {
'V': V,
'L': L,
'N': N
};
getTypeName() => "FormInboxCount";
TypeContext? context = _ctx;
}
class FormInboxCounts implements IConvertible
{
List<FormInboxCount>? Stages = [];
List<FormInboxCount>? Assignees = [];
List<FormInboxCount>? Branches = [];
List<FormInboxCount>? Tags = [];
List<FormInboxCount>? Forms = [];
List<FormInboxCount>? Flags = [];
FormInboxCounts({this.Stages,this.Assignees,this.Branches,this.Tags,this.Forms,this.Flags});
FormInboxCounts.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Stages = JsonConverters.fromJson(json['Stages'],'List<FormInboxCount>',context!);
Assignees = JsonConverters.fromJson(json['Assignees'],'List<FormInboxCount>',context!);
Branches = JsonConverters.fromJson(json['Branches'],'List<FormInboxCount>',context!);
Tags = JsonConverters.fromJson(json['Tags'],'List<FormInboxCount>',context!);
Forms = JsonConverters.fromJson(json['Forms'],'List<FormInboxCount>',context!);
Flags = JsonConverters.fromJson(json['Flags'],'List<FormInboxCount>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Stages': JsonConverters.toJson(Stages,'List<FormInboxCount>',context!),
'Assignees': JsonConverters.toJson(Assignees,'List<FormInboxCount>',context!),
'Branches': JsonConverters.toJson(Branches,'List<FormInboxCount>',context!),
'Tags': JsonConverters.toJson(Tags,'List<FormInboxCount>',context!),
'Forms': JsonConverters.toJson(Forms,'List<FormInboxCount>',context!),
'Flags': JsonConverters.toJson(Flags,'List<FormInboxCount>',context!)
};
getTypeName() => "FormInboxCounts";
TypeContext? context = _ctx;
}
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 FormFilterOpt implements IConvertible
{
String? Id;
String? L;
FormFilterOpt({this.Id,this.L});
FormFilterOpt.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
L = json['L'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'L': L
};
getTypeName() => "FormFilterOpt";
TypeContext? context = _ctx;
}
class FormFilterField implements IConvertible
{
String? K;
String? L;
String? T;
List<FormFilterOpt>? Opts = [];
FormFilterField({this.K,this.L,this.T,this.Opts});
FormFilterField.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
K = json['K'];
L = json['L'];
T = json['T'];
Opts = JsonConverters.fromJson(json['Opts'],'List<FormFilterOpt>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'K': K,
'L': L,
'T': T,
'Opts': JsonConverters.toJson(Opts,'List<FormFilterOpt>',context!)
};
getTypeName() => "FormFilterField";
TypeContext? context = _ctx;
}
class FormSubmissionSearchResponse implements IConvertible
{
List<FormInboxRow>? Rows = [];
int? Matching;
int? ScopeTotal;
List<FormInboxCount>? StageMatching = [];
FormInboxCounts? Counts;
List<FormStageInfo>? Stages = [];
bool? Capped;
List<FormFilterField>? FilterFields = [];
List<String>? TagOptions = [];
ResponseStatus? ResponseStatus;
FormSubmissionSearchResponse({this.Rows,this.Matching,this.ScopeTotal,this.StageMatching,this.Counts,this.Stages,this.Capped,this.FilterFields,this.TagOptions,this.ResponseStatus});
FormSubmissionSearchResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Rows = JsonConverters.fromJson(json['Rows'],'List<FormInboxRow>',context!);
Matching = json['Matching'];
ScopeTotal = json['ScopeTotal'];
StageMatching = JsonConverters.fromJson(json['StageMatching'],'List<FormInboxCount>',context!);
Counts = JsonConverters.fromJson(json['Counts'],'FormInboxCounts',context!);
Stages = JsonConverters.fromJson(json['Stages'],'List<FormStageInfo>',context!);
Capped = json['Capped'];
FilterFields = JsonConverters.fromJson(json['FilterFields'],'List<FormFilterField>',context!);
TagOptions = JsonConverters.fromJson(json['TagOptions'],'List<String>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Rows': JsonConverters.toJson(Rows,'List<FormInboxRow>',context!),
'Matching': Matching,
'ScopeTotal': ScopeTotal,
'StageMatching': JsonConverters.toJson(StageMatching,'List<FormInboxCount>',context!),
'Counts': JsonConverters.toJson(Counts,'FormInboxCounts',context!),
'Stages': JsonConverters.toJson(Stages,'List<FormStageInfo>',context!),
'Capped': Capped,
'FilterFields': JsonConverters.toJson(FilterFields,'List<FormFilterField>',context!),
'TagOptions': JsonConverters.toJson(TagOptions,'List<String>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormSubmissionSearchResponse";
TypeContext? context = _ctx;
}
class FormAnswerCond implements IConvertible
{
String? F;
String? Op;
String? V;
FormAnswerCond({this.F,this.Op,this.V});
FormAnswerCond.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
F = json['F'];
Op = json['Op'];
V = json['V'];
return this;
}
Map<String, dynamic> toJson() => {
'F': F,
'Op': Op,
'V': V
};
getTypeName() => "FormAnswerCond";
TypeContext? context = _ctx;
}
class FormSubmissionSearchRequest implements IConvertible
{
String? FormUID;
String? Mode;
List<String>? Forms = [];
List<String>? Stages = [];
List<int>? Assignees = [];
List<String>? Branches = [];
List<String>? Tags = [];
String? Search;
String? SortKey;
int? SortDir;
int? Skip;
int? Take;
List<FormAnswerCond>? Conds = [];
List<String>? Flags = [];
FormSubmissionSearchRequest({this.FormUID,this.Mode,this.Forms,this.Stages,this.Assignees,this.Branches,this.Tags,this.Search,this.SortKey,this.SortDir,this.Skip,this.Take,this.Conds,this.Flags});
FormSubmissionSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
Mode = json['Mode'];
Forms = JsonConverters.fromJson(json['Forms'],'List<String>',context!);
Stages = JsonConverters.fromJson(json['Stages'],'List<String>',context!);
Assignees = JsonConverters.fromJson(json['Assignees'],'List<int>',context!);
Branches = JsonConverters.fromJson(json['Branches'],'List<String>',context!);
Tags = JsonConverters.fromJson(json['Tags'],'List<String>',context!);
Search = json['Search'];
SortKey = json['SortKey'];
SortDir = json['SortDir'];
Skip = json['Skip'];
Take = json['Take'];
Conds = JsonConverters.fromJson(json['Conds'],'List<FormAnswerCond>',context!);
Flags = JsonConverters.fromJson(json['Flags'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID,
'Mode': Mode,
'Forms': JsonConverters.toJson(Forms,'List<String>',context!),
'Stages': JsonConverters.toJson(Stages,'List<String>',context!),
'Assignees': JsonConverters.toJson(Assignees,'List<int>',context!),
'Branches': JsonConverters.toJson(Branches,'List<String>',context!),
'Tags': JsonConverters.toJson(Tags,'List<String>',context!),
'Search': Search,
'SortKey': SortKey,
'SortDir': SortDir,
'Skip': Skip,
'Take': Take,
'Conds': JsonConverters.toJson(Conds,'List<FormAnswerCond>',context!),
'Flags': JsonConverters.toJson(Flags,'List<String>',context!)
};
getTypeName() => "FormSubmissionSearchRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormInboxRow': TypeInfo(TypeOf.Class, create:() => FormInboxRow()),
'FormInboxCount': TypeInfo(TypeOf.Class, create:() => FormInboxCount()),
'FormInboxCounts': TypeInfo(TypeOf.Class, create:() => FormInboxCounts()),
'List<FormInboxCount>': TypeInfo(TypeOf.Class, create:() => <FormInboxCount>[]),
'FormStageInfo': TypeInfo(TypeOf.Class, create:() => FormStageInfo()),
'FormFilterOpt': TypeInfo(TypeOf.Class, create:() => FormFilterOpt()),
'FormFilterField': TypeInfo(TypeOf.Class, create:() => FormFilterField()),
'List<FormFilterOpt>': TypeInfo(TypeOf.Class, create:() => <FormFilterOpt>[]),
'FormSubmissionSearchResponse': TypeInfo(TypeOf.Class, create:() => FormSubmissionSearchResponse()),
'List<FormInboxRow>': TypeInfo(TypeOf.Class, create:() => <FormInboxRow>[]),
'List<FormStageInfo>': TypeInfo(TypeOf.Class, create:() => <FormStageInfo>[]),
'List<FormFilterField>': TypeInfo(TypeOf.Class, create:() => <FormFilterField>[]),
'FormAnswerCond': TypeInfo(TypeOf.Class, create:() => FormAnswerCond()),
'FormSubmissionSearchRequest': TypeInfo(TypeOf.Class, create:() => FormSubmissionSearchRequest()),
'List<FormAnswerCond>': TypeInfo(TypeOf.Class, create:() => <FormAnswerCond>[]),
});
Dart FormSubmissionSearchRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/submissions/search HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormSubmissionSearchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Assignees xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</Assignees>
<Branches xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Branches>
<Conds>
<FormAnswerCond>
<F>String</F>
<Op>String</Op>
<V>String</V>
</FormAnswerCond>
</Conds>
<Flags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Flags>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<Forms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</Forms>
<Mode>String</Mode>
<Search>String</Search>
<Skip>0</Skip>
<SortDir>0</SortDir>
<SortKey>String</SortKey>
<Stages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Stages>
<Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</Tags>
<Take>0</Take>
</FormSubmissionSearchRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormSubmissionSearchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Capped>false</Capped>
<Counts>
<Assignees>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Assignees>
<Branches>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Branches>
<Flags>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Flags>
<Forms>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Forms>
<Stages>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Stages>
<Tags>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</Tags>
</Counts>
<FilterFields>
<FormFilterField>
<K>String</K>
<L>String</L>
<Opts>
<FormFilterOpt>
<Id>String</Id>
<L>String</L>
</FormFilterOpt>
</Opts>
<T>String</T>
</FormFilterField>
</FilterFields>
<Matching>0</Matching>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Rows>
<FormInboxRow>
<ApplicantName>String</ApplicantName>
<AssigneeAgentId>0</AssigneeAgentId>
<AssigneeName>String</AssigneeName>
<BranchName>String</BranchName>
<DocsNeed>0</DocsNeed>
<DocsOk>0</DocsOk>
<FormName>String</FormName>
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<IsTest>false</IsTest>
<Number>String</Number>
<Stage>String</Stage>
<StageLabel>String</StageLabel>
<StageTone>String</StageTone>
<SubmissionUID>00000000-0000-0000-0000-000000000000</SubmissionUID>
<SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
<SubmittedText>String</SubmittedText>
<Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Tags>
<VersionNo>0</VersionNo>
<VersionText>String</VersionText>
</FormInboxRow>
</Rows>
<ScopeTotal>0</ScopeTotal>
<StageMatching>
<FormInboxCount>
<L>String</L>
<N>0</N>
<V>String</V>
</FormInboxCount>
</StageMatching>
<Stages>
<FormStageInfo>
<Id>String</Id>
<Kind>String</Kind>
<Label>String</Label>
<Tone>String</Tone>
</FormStageInfo>
</Stages>
<TagOptions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TagOptions>
</FormSubmissionSearchResponse>