Trendsic Platform Service

<back to all web services

KpiV2VisitsRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dashboard/kpiv2/visits
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 SvcVisitRow() = 
        member val CheckinId:Guid = new Guid() with get,set
        member val TicketLabel:String = null with get,set
        member val LocalDate:DateTime = new DateTime() with get,set
        member val LineId:Guid = new Guid() with get,set
        member val ServiceName:String = null with get,set
        member val StationId:Nullable<Guid> = new Nullable<Guid>() with get,set
        member val StationName:String = null with get,set
        member val EmployeeId:Nullable<Guid> = new Nullable<Guid>() with get,set
        member val EmployeeName:String = null with get,set
        member val CustomerName:String = null with get,set
        member val ContactId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ContactAgentId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val CustomerId:Guid = new Guid() with get,set
        member val IsAppointment:Boolean = new Boolean() with get,set
        member val LocalHere:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val LocalCalled:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val LocalStart:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val LocalEnd:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val WaitSec:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ServeSec:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Outcome:String = null with get,set
        member val Fee:Nullable<Decimal> = new Nullable<Decimal>() with get,set

    [<AllowNullLiteral>]
    type SvcChip() = 
        member val LineId:Guid = new Guid() with get,set
        member val Name:String = null with get,set
        member val N:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SvcVisitPage() = 
        member val Rows:ResizeArray<SvcVisitRow> = new ResizeArray<SvcVisitRow>() with get,set
        member val TotalRows:Int32 = new Int32() with get,set
        member val Page:Int32 = new Int32() with get,set
        member val PageSize:Int32 = new Int32() with get,set
        member val OutcomeCounts:Dictionary<String, Int32> = new Dictionary<String, Int32>() with get,set
        member val Services:ResizeArray<SvcChip> = new ResizeArray<SvcChip>() with get,set
        member val CanSeeStaff:Boolean = new Boolean() with get,set
        member val CanSeeFinancial:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type KpiV2VisitsResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set
        member val Visits:SvcVisitPage = null with get,set

    [<AllowNullLiteral>]
    type KpiV2VisitsRequest() = 
        member val BranchId:Guid = new Guid() with get,set
        member val FromDate:DateTime = new DateTime() with get,set
        member val ToDate:DateTime = new DateTime() with get,set
        member val StationId:Nullable<Guid> = new Nullable<Guid>() with get,set
        member val EmployeeId:Nullable<Guid> = new Nullable<Guid>() with get,set
        member val Outcome:String = null with get,set
        member val LineId:Nullable<Guid> = new Nullable<Guid>() with get,set
        member val Page:Int32 = new Int32() with get,set
        member val PageSize:Int32 = new Int32() with get,set

F# KpiV2VisitsRequest 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/dashboard/kpiv2/visits HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	BranchId: 00000000000000000000000000000000,
	FromDate: 0001-01-01,
	ToDate: 0001-01-01,
	StationId: 00000000000000000000000000000000,
	EmployeeId: 00000000000000000000000000000000,
	Outcome: String,
	LineId: 00000000000000000000000000000000,
	Page: 0,
	PageSize: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Visits: 
	{
		Rows: 
		[
			{
				CheckinId: 00000000000000000000000000000000,
				TicketLabel: String,
				LocalDate: 0001-01-01,
				LineId: 00000000000000000000000000000000,
				ServiceName: String,
				StationId: 00000000000000000000000000000000,
				StationName: String,
				EmployeeId: 00000000000000000000000000000000,
				EmployeeName: String,
				CustomerName: String,
				ContactId: 0,
				ContactAgentId: 0,
				CustomerId: 00000000000000000000000000000000,
				IsAppointment: False,
				LocalHere: 0001-01-01,
				LocalCalled: 0001-01-01,
				LocalStart: 0001-01-01,
				LocalEnd: 0001-01-01,
				WaitSec: 0,
				ServeSec: 0,
				Outcome: String,
				Fee: 0
			}
		],
		TotalRows: 0,
		Page: 0,
		PageSize: 0,
		OutcomeCounts: 
		{
			String: 0
		},
		Services: 
		[
			{
				LineId: 00000000000000000000000000000000,
				Name: String,
				N: 0
			}
		],
		CanSeeStaff: False,
		CanSeeFinancial: False
	}
}