Trendsic Platform Service

<back to all web services

FormNoticePreviewRequest

Requires Authentication
The following routes are available for this service:
POST/v1/forms/{FormUID}/notices/preview
import Foundation
import ServiceStack

public class FormNoticePreviewRequest : Codable
{
    public var formUID:String
    public var id:String
    public var lang:String
    public var channel:String
    public var subject:String
    public var body:String
    public var text:String
    public var closing:String
    public var submissionUID:String?

    required public init(){}
}

public class FormNoticePreviewResponse : Codable
{
    public var subject:String
    public var body:String
    public var meta:String
    public var submissionUID:String
    public var sample:Bool
    public var sampleNote:String
    public var textLength:Int
    public var segments:Int
    public var wide:Bool
    public var problems:[String] = []
    public var samples:[FormInboxCount] = []
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class FormInboxCount : Codable
{
    public var v:String
    public var l:String
    public var n:Int

    required public init(){}
}


Swift FormNoticePreviewRequest DTOs

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

HTTP + CSV

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

POST /v1/forms/{FormUID}/notices/preview HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"FormUID":"00000000000000000000000000000000","Id":"String","Lang":"String","Channel":"String","Subject":"String","Body":"String","Text":"String","Closing":"String","SubmissionUID":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Subject":"String","Body":"String","Meta":"String","SubmissionUID":"String","Sample":false,"SampleNote":"String","TextLength":0,"Segments":0,"Wide":false,"Problems":["String"],"Samples":[{"V":"String","L":"String","N":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}