Trendsic Platform Service

<back to all web services

ReportRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/ReportFilters/{ReportType}
GET,OPTIONS/v1/Report/{ReportType}
GET,OPTIONS/v1/Report/{ReportType}/{Argument}
GET,OPTIONS/v1/Report/{ReportType}/{StartDate}/{EndDate}/{AgentID}
GET,OPTIONS/v1/Report/{ReportType}/{StartDate}/{EndDate}
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 ReportRequest
            Public Overridable Property ReportType As String
            Public Overridable Property Argument As String
            Public Overridable Property StartDate As Date
            Public Overridable Property EndDate As Date
            Public Overridable Property Filter As String
            Public Overridable Property AgentId As Integer
            Public Overridable Property ReportMonth As Integer
            Public Overridable Property ReportYear As Integer
        End Class

        Public Partial Class ReportResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property ReportData As List(Of Object) = New List(Of Object)
            Public Overridable Property Filters As List(Of String) = New List(Of String)
        End Class
    End Namespace
End Namespace

VB.NET ReportRequest 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.

GET /v1/ReportFilters/{ReportType} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ReportData":[{}],"Filters":["String"]}