Trendsic Platform Service

<back to all web services

FormFillSubmitRequest

The following routes are available for this service:
POST/v1/formfill/draft/{Token}/submit
"use strict";
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 FormFillFieldError {
    /** @param {{K?:string,Msg?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    K;
    /** @type {string} */
    Msg;
}
export class FormFillSubmitResponse {
    /** @param {{State?:string,Number?:string,StatusUrl?:string,Receipt?:FormFillReceiptLine[],First?:string,Errors?:FormFillFieldError[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    State;
    /** @type {string} */
    Number;
    /** @type {string} */
    StatusUrl;
    /** @type {FormFillReceiptLine[]} */
    Receipt = [];
    /** @type {string} */
    First;
    /** @type {FormFillFieldError[]} */
    Errors = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class FormFillSubmitRequest {
    /** @param {{Token?:string,AnswersJson?:string,Lang?:string,TurnstileToken?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Token;
    /** @type {string} */
    AnswersJson;
    /** @type {string} */
    Lang;
    /** @type {string} */
    TurnstileToken;
}

JavaScript FormFillSubmitRequest 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/formfill/draft/{Token}/submit HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Token":"String","AnswersJson":"String","Lang":"String","TurnstileToken":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"State":"String","Number":"String","StatusUrl":"String","Receipt":[{"Channel":"String","To":"String","Outcome":"String"}],"First":"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"}}}