Trendsic Platform Service

<back to all web services

FormFillReplyRequest

The following routes are available for this service:
POST/v1/formfill/status/{Token}/request/send
"use strict";
export class FormFillStage {
    /** @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 FormFillStageSeen {
    /** @param {{Id?:string,At?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    At;
}
export class FormFillReceiptLine {
    /** @param {{Channel?:string,To?:string,Outcome?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Channel;
    /** @type {string} */
    To;
    /** @type {string} */
    Outcome;
}
export class FormFillStatusResponse {
    /** @param {{Number?:string,FormName?:string,Noun?:string,TenantName?:string,Stage?:string,StageKind?:string,Stages?:FormFillStage[],Seen?:FormFillStageSeen[],SubmittedAt?:string,Receipt?:FormFillReceiptLine[],CanWithdraw?:boolean,Lang?:string,NounEs?:string,HasRequest?:boolean,RequestNote?:string,Outcome?:string,DecisionReason?:string,DecisionNote?:string,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Number;
    /** @type {string} */
    FormName;
    /** @type {string} */
    Noun;
    /** @type {string} */
    TenantName;
    /** @type {string} */
    Stage;
    /** @type {string} */
    StageKind;
    /** @type {FormFillStage[]} */
    Stages = [];
    /** @type {FormFillStageSeen[]} */
    Seen = [];
    /** @type {?string} */
    SubmittedAt;
    /** @type {FormFillReceiptLine[]} */
    Receipt = [];
    /** @type {boolean} */
    CanWithdraw;
    /** @type {string} */
    Lang;
    /** @type {string} */
    NounEs;
    /** @type {boolean} */
    HasRequest;
    /** @type {string} */
    RequestNote;
    /** @type {string} */
    Outcome;
    /** @type {string} */
    DecisionReason;
    /** @type {string} */
    DecisionNote;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class FormFillFieldError {
    /** @param {{K?:string,Msg?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    K;
    /** @type {string} */
    Msg;
}
export class FormFillReplyResponse {
    /** @param {{Sent?:boolean,Status?:FormFillStatusResponse,Errors?:FormFillFieldError[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    Sent;
    /** @type {FormFillStatusResponse} */
    Status;
    /** @type {FormFillFieldError[]} */
    Errors = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class FormFillReplyRequest {
    /** @param {{Token?:string,RequestUID?:string,AnswersJson?:string,Lang?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Token;
    /** @type {string} */
    RequestUID;
    /** @type {string} */
    AnswersJson;
    /** @type {string} */
    Lang;
}

JavaScript FormFillReplyRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/formfill/status/{Token}/request/send HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Token: String,
	RequestUID: String,
	AnswersJson: String,
	Lang: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Sent: False,
	Status: 
	{
		Number: String,
		FormName: String,
		Noun: String,
		TenantName: String,
		Stage: String,
		StageKind: String,
		Stages: 
		[
			{
				Id: String,
				Label: String,
				Tone: String,
				Kind: String
			}
		],
		Seen: 
		[
			{
				Id: String,
				At: 0001-01-01
			}
		],
		SubmittedAt: 0001-01-01,
		Receipt: 
		[
			{
				Channel: String,
				To: String,
				Outcome: String
			}
		],
		CanWithdraw: False,
		Lang: String,
		NounEs: String,
		HasRequest: False,
		RequestNote: String,
		Outcome: String,
		DecisionReason: String,
		DecisionNote: String,
		ResponseStatus: 
		{
			ErrorCode: String,
			Message: String,
			StackTrace: String,
			Errors: 
			[
				{
					ErrorCode: String,
					FieldName: String,
					Message: String,
					Meta: 
					{
						String: String
					}
				}
			],
			Meta: 
			{
				String: String
			}
		}
	},
	Errors: 
	[
		{
			K: String,
			Msg: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}