Trendsic Platform Service

<back to all web services

FormSubmissionSearchRequest

Requires Authentication
The following routes are available for this service:
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;

    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});
    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'];
        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
    };

    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 = [];

    FormInboxCounts({this.Stages,this.Assignees,this.Branches,this.Tags,this.Forms});
    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!);
        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!)
    };

    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 = [];

    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});
    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!);
        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!)
    };

    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 .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 /v1/forms/submissions/search HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"FormUID":"00000000000000000000000000000000","Mode":"String","Forms":["00000000000000000000000000000000"],"Stages":["String"],"Assignees":[0],"Branches":["String"],"Tags":["String"],"Search":"String","SortKey":"String","SortDir":0,"Skip":0,"Take":0,"Conds":[{"F":"String","Op":"String","V":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Rows":[{"SubmissionUID":"00000000000000000000000000000000","FormUID":"00000000000000000000000000000000","FormName":"String","VersionNo":0,"Number":"String","ApplicantName":"String","Stage":"String","StageLabel":"String","StageTone":"String","AssigneeAgentId":0,"AssigneeName":"String","BranchName":"String","SubmittedAt":"0001-01-01T00:00:00.0000000","SubmittedText":"String","Tags":["String"],"DocsOk":0,"DocsNeed":0}],"Matching":0,"ScopeTotal":0,"StageMatching":[{"V":"String","L":"String","N":0}],"Counts":{"Stages":[{"V":"String","L":"String","N":0}],"Assignees":[{"V":"String","L":"String","N":0}],"Branches":[{"V":"String","L":"String","N":0}],"Tags":[{"V":"String","L":"String","N":0}],"Forms":[{"V":"String","L":"String","N":0}]},"Stages":[{"Id":"String","Label":"String","Tone":"String","Kind":"String"}],"Capped":false,"FilterFields":[{"K":"String","L":"String","T":"String","Opts":[{"Id":"String","L":"String"}]}],"TagOptions":["String"],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}