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

export class SvcVisitRow
{
    public CheckinId: string;
    public TicketLabel: string;
    public LocalDate: string;
    public LineId: string;
    public ServiceName: string;
    public StationId?: string;
    public StationName: string;
    public EmployeeId?: string;
    public EmployeeName: string;
    public CustomerName: string;
    public ContactId?: number;
    public ContactAgentId?: number;
    public CustomerId: string;
    public IsAppointment: boolean;
    public LocalHere?: string;
    public LocalCalled?: string;
    public LocalStart?: string;
    public LocalEnd?: string;
    public WaitSec?: number;
    public ServeSec?: number;
    public Outcome: string;
    public Fee?: number;

    public constructor(init?: Partial<SvcVisitRow>) { (Object as any).assign(this, init); }
}

export class SvcChip
{
    public LineId: string;
    public Name: string;
    public N: number;

    public constructor(init?: Partial<SvcChip>) { (Object as any).assign(this, init); }
}

export class SvcVisitPage
{
    public Rows: SvcVisitRow[] = [];
    public TotalRows: number;
    public Page: number;
    public PageSize: number;
    public OutcomeCounts: { [index:string]: number; } = {};
    public Services: SvcChip[] = [];
    public CanSeeStaff: boolean;
    public CanSeeFinancial: boolean;

    public constructor(init?: Partial<SvcVisitPage>) { (Object as any).assign(this, init); }
}

export class KpiV2VisitsResponse
{
    public ResponseStatus: ResponseStatus;
    public Visits: SvcVisitPage;

    public constructor(init?: Partial<KpiV2VisitsResponse>) { (Object as any).assign(this, init); }
}

export class KpiV2VisitsRequest
{
    public BranchId: string;
    public FromDate: string;
    public ToDate: string;
    public StationId?: string;
    public EmployeeId?: string;
    public Outcome: string;
    public LineId?: string;
    public Page: number;
    public PageSize: number;

    public constructor(init?: Partial<KpiV2VisitsRequest>) { (Object as any).assign(this, init); }
}

TypeScript 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
	}
}