Trendsic Platform Service

<back to all web services

FormSubmissionDecidePreviewRequest

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

public class FormSubmissionDecidePreviewRequest : Codable
{
    public var submissionUID:String
    public var outcome:String
    public var reason:String
    public var note:String

    required public init(){}
}

public class FormSubmissionDecidePreviewResponse : Codable
{
    public var plan:FormDecisionPlan
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class FormDecisionPlan : Codable
{
    public var who:String
    public var stage:String
    public var choices:[FormDecisionChoice] = []
    public var outcome:String
    public var reasons:[String] = []
    public var reason:String
    public var needSig:Bool
    public var signerName:String
    public var signerRefusal:String
    public var effects:[FormDecisionEffect] = []
    public var block:String
    public var goLabel:String
    public var goCls:String
    public var canDecide:Bool
    public var refusal:String

    required public init(){}
}

public class FormDecisionChoice : Codable
{
    public var id:String
    public var label:String

    required public init(){}
}

public class FormDecisionEffect : Codable
{
    public var kind:String
    public var text:String
    public var tone:String

    required public init(){}
}


Swift FormSubmissionDecidePreviewRequest 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/forms/submissions/{SubmissionUID}/decide/preview HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	SubmissionUID: 00000000000000000000000000000000,
	Outcome: String,
	Reason: String,
	Note: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Plan: 
	{
		Who: String,
		Stage: String,
		Choices: 
		[
			{
				Id: String,
				Label: String
			}
		],
		Outcome: String,
		Reasons: 
		[
			String
		],
		Reason: String,
		NeedSig: False,
		SignerName: String,
		SignerRefusal: String,
		Effects: 
		[
			{
				Kind: String,
				Text: String,
				Tone: String
			}
		],
		Block: String,
		GoLabel: String,
		GoCls: String,
		CanDecide: False,
		Refusal: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}