Trendsic Platform Service

<back to all web services

FormZipStartRequest

Requires Authentication
The following routes are available for this service:
POST/v1/forms/submissions/zip
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class FormAnswerCond
            Public Overridable Property F As String
            Public Overridable Property Op As String
            Public Overridable Property V As String
        End Class

        Public Partial Class FormSubmissionSearchRequest
            Public Overridable Property FormUID As Guid?
            Public Overridable Property Mode As String
            Public Overridable Property Forms As List(Of Guid) = New List(Of Guid)
            Public Overridable Property Stages As List(Of String) = New List(Of String)
            Public Overridable Property Assignees As List(Of Integer) = New List(Of Integer)
            Public Overridable Property Branches As List(Of String) = New List(Of String)
            Public Overridable Property Tags As List(Of String) = New List(Of String)
            Public Overridable Property Search As String
            Public Overridable Property SortKey As String
            Public Overridable Property SortDir As Integer
            Public Overridable Property Skip As Integer
            Public Overridable Property Take As Integer
            Public Overridable Property Conds As List(Of FormAnswerCond) = New List(Of FormAnswerCond)
            Public Overridable Property Flags As List(Of String) = New List(Of String)
        End Class

        Public Partial Class FormZipJobView
            Public Overridable Property ZipUID As Guid
            Public Overridable Property FormUID As Guid
            Public Overridable Property FormName As String
            Public Overridable Property Status As String
            Public Overridable Property StatusText As String
            Public Overridable Property Message As String
            Public Overridable Property FileName As String
            Public Overridable Property Submissions As Integer
            Public Overridable Property Files As Integer
            Public Overridable Property Bytes As Long
            Public Overridable Property LeftOut As Integer
            Public Overridable Property FilesIn As Integer?
            Public Overridable Property BytesIn As Long?
            Public Overridable Property LeftOutIn As Integer?
            Public Overridable Property ZipBytes As Long?
            Public Overridable Property SizeText As String
            Public Overridable Property CreatedAt As Date?
            Public Overridable Property CreatedText As String
            Public Overridable Property CompletedAt As Date?
            Public Overridable Property ExpiresAt As Date?
            Public Overridable Property ExpiresText As String
            Public Overridable Property Downloads As Integer
            Public Overridable Property LastDownloadText As String
        End Class

        Public Partial Class FormZipStartRequest
            Public Overridable Property Query As FormSubmissionSearchRequest
            Public Overridable Property SubmissionUIDs As List(Of Guid) = New List(Of Guid)
        End Class

        Public Partial Class FormZipStartResponse
            Public Overridable Property Started As Boolean
            Public Overridable Property Message As String
            Public Overridable Property Job As FormZipJobView
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET FormZipStartRequest 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/zip HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Query: 
	{
		FormUID: 00000000000000000000000000000000,
		Mode: String,
		Forms: 
		[
			00000000000000000000000000000000
		],
		Stages: 
		[
			String
		],
		Assignees: 
		[
			0
		],
		Branches: 
		[
			String
		],
		Tags: 
		[
			String
		],
		Search: String,
		SortKey: String,
		SortDir: 0,
		Skip: 0,
		Take: 0,
		Conds: 
		[
			{
				F: String,
				Op: String,
				V: String
			}
		],
		Flags: 
		[
			String
		]
	},
	SubmissionUIDs: 
	[
		00000000000000000000000000000000
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Started: False,
	Message: String,
	Job: 
	{
		ZipUID: 00000000000000000000000000000000,
		FormUID: 00000000000000000000000000000000,
		FormName: String,
		Status: String,
		StatusText: String,
		Message: String,
		FileName: String,
		Submissions: 0,
		Files: 0,
		Bytes: 0,
		LeftOut: 0,
		FilesIn: 0,
		BytesIn: 0,
		LeftOutIn: 0,
		ZipBytes: 0,
		SizeText: String,
		CreatedAt: 0001-01-01,
		CreatedText: String,
		CompletedAt: 0001-01-01,
		ExpiresAt: 0001-01-01,
		ExpiresText: String,
		Downloads: 0,
		LastDownloadText: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}