Trendsic Platform Service

<back to all web services

FormSubmissionSearchRequest

Requires Authentication
The following routes are available for this service:
POST/v1/forms/submissions/search
"use strict";
export class FormInboxRow {
    /** @param {{SubmissionUID?:string,FormUID?:string,FormName?:string,VersionNo?:number,Number?:string,ApplicantName?:string,Stage?:string,StageLabel?:string,StageTone?:string,AssigneeAgentId?:number,AssigneeName?:string,BranchName?:string,SubmittedAt?:string,SubmittedText?:string,Tags?:string[],DocsOk?:number,DocsNeed?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    SubmissionUID;
    /** @type {string} */
    FormUID;
    /** @type {string} */
    FormName;
    /** @type {number} */
    VersionNo;
    /** @type {string} */
    Number;
    /** @type {string} */
    ApplicantName;
    /** @type {string} */
    Stage;
    /** @type {string} */
    StageLabel;
    /** @type {string} */
    StageTone;
    /** @type {?number} */
    AssigneeAgentId;
    /** @type {string} */
    AssigneeName;
    /** @type {string} */
    BranchName;
    /** @type {?string} */
    SubmittedAt;
    /** @type {string} */
    SubmittedText;
    /** @type {string[]} */
    Tags = [];
    /** @type {number} */
    DocsOk;
    /** @type {number} */
    DocsNeed;
}
export class FormInboxCount {
    /** @param {{V?:string,L?:string,N?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    V;
    /** @type {string} */
    L;
    /** @type {number} */
    N;
}
export class FormInboxCounts {
    /** @param {{Stages?:FormInboxCount[],Assignees?:FormInboxCount[],Branches?:FormInboxCount[],Tags?:FormInboxCount[],Forms?:FormInboxCount[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {FormInboxCount[]} */
    Stages = [];
    /** @type {FormInboxCount[]} */
    Assignees = [];
    /** @type {FormInboxCount[]} */
    Branches = [];
    /** @type {FormInboxCount[]} */
    Tags = [];
    /** @type {FormInboxCount[]} */
    Forms = [];
}
export class FormStageInfo {
    /** @param {{Id?:string,Label?:string,Tone?:string,Kind?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Label;
    /** @type {string} */
    Tone;
    /** @type {string} */
    Kind;
}
export class FormFilterOpt {
    /** @param {{Id?:string,L?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    L;
}
export class FormFilterField {
    /** @param {{K?:string,L?:string,T?:string,Opts?:FormFilterOpt[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    K;
    /** @type {string} */
    L;
    /** @type {string} */
    T;
    /** @type {FormFilterOpt[]} */
    Opts = [];
}
export class FormSubmissionSearchResponse {
    /** @param {{Rows?:FormInboxRow[],Matching?:number,ScopeTotal?:number,StageMatching?:FormInboxCount[],Counts?:FormInboxCounts,Stages?:FormStageInfo[],Capped?:boolean,FilterFields?:FormFilterField[],TagOptions?:string[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {FormInboxRow[]} */
    Rows = [];
    /** @type {number} */
    Matching;
    /** @type {number} */
    ScopeTotal;
    /** @type {FormInboxCount[]} */
    StageMatching = [];
    /** @type {FormInboxCounts} */
    Counts;
    /** @type {FormStageInfo[]} */
    Stages = [];
    /** @type {boolean} */
    Capped;
    /** @type {FormFilterField[]} */
    FilterFields = [];
    /** @type {string[]} */
    TagOptions = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class FormAnswerCond {
    /** @param {{F?:string,Op?:string,V?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    F;
    /** @type {string} */
    Op;
    /** @type {string} */
    V;
}
export class FormSubmissionSearchRequest {
    /** @param {{FormUID?:string,Mode?:string,Forms?:string[],Stages?:string[],Assignees?:number[],Branches?:string[],Tags?:string[],Search?:string,SortKey?:string,SortDir?:number,Skip?:number,Take?:number,Conds?:FormAnswerCond[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    FormUID;
    /** @type {string} */
    Mode;
    /** @type {string[]} */
    Forms = [];
    /** @type {string[]} */
    Stages = [];
    /** @type {number[]} */
    Assignees = [];
    /** @type {string[]} */
    Branches = [];
    /** @type {string[]} */
    Tags = [];
    /** @type {string} */
    Search;
    /** @type {string} */
    SortKey;
    /** @type {number} */
    SortDir;
    /** @type {number} */
    Skip;
    /** @type {number} */
    Take;
    /** @type {FormAnswerCond[]} */
    Conds = [];
}

JavaScript 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"}}}