Trendsic Platform Service

<back to all web services

GiftCardSurveyRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET/v1/Survey/GiftCard/{UID}
namespace CRM.AgencyPlatform.API.Internal

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type SurveyQuestion() = 
        member val QuestionId:Int32 = new Int32() with get,set
        member val QuestionType:String = null with get,set
        member val HTML:String = null with get,set
        member val DependsOn:String = null with get,set

    [<AllowNullLiteral>]
    type Survey() = 
        member val SurveyId:Int32 = new Int32() with get,set
        member val ContactId:Int32 = new Int32() with get,set
        member val Questions:ResizeArray<SurveyQuestion> = new ResizeArray<SurveyQuestion>() with get,set

    [<AllowNullLiteral>]
    type GiftCardSurvey() = 
        inherit Survey()
        member val GiftCardId:Int32 = new Int32() with get,set
        member val GiftCards:ResizeArray<String> = new ResizeArray<String>() with get,set

    [<AllowNullLiteral>]
    type GiftCardSurveyResponse() = 
        member val Survey:GiftCardSurvey = null with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type GiftCardSurveyRequest() = 
        member val UID:Guid = new Guid() with get,set

F# GiftCardSurveyRequest 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.

GET /v1/Survey/GiftCard/{UID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Survey: 
	{
		GiftCardId: 0,
		GiftCards: 
		[
			String
		],
		SurveyId: 0,
		ContactId: 0,
		Questions: 
		[
			{
				QuestionId: 0,
				QuestionType: String,
				HTML: String,
				DependsOn: String
			}
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}