| POST,OPTIONS | /v1/dashboard/kpiv2/visits |
|---|
"use strict";
export class SvcVisitRow {
/** @param {{CheckinId?:string,TicketLabel?:string,LocalDate?:string,LineId?:string,ServiceName?:string,StationId?:string,StationName?:string,EmployeeId?:string,EmployeeName?:string,CustomerName?:string,ContactId?:number,ContactAgentId?:number,CustomerId?:string,IsAppointment?:boolean,LocalHere?:string,LocalCalled?:string,LocalStart?:string,LocalEnd?:string,WaitSec?:number,ServeSec?:number,Outcome?:string,Fee?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
CheckinId;
/** @type {string} */
TicketLabel;
/** @type {string} */
LocalDate;
/** @type {string} */
LineId;
/** @type {string} */
ServiceName;
/** @type {?string} */
StationId;
/** @type {string} */
StationName;
/** @type {?string} */
EmployeeId;
/** @type {string} */
EmployeeName;
/** @type {string} */
CustomerName;
/** @type {?number} */
ContactId;
/** @type {?number} */
ContactAgentId;
/** @type {string} */
CustomerId;
/** @type {boolean} */
IsAppointment;
/** @type {?string} */
LocalHere;
/** @type {?string} */
LocalCalled;
/** @type {?string} */
LocalStart;
/** @type {?string} */
LocalEnd;
/** @type {?number} */
WaitSec;
/** @type {?number} */
ServeSec;
/** @type {string} */
Outcome;
/** @type {?number} */
Fee;
}
export class SvcChip {
/** @param {{LineId?:string,Name?:string,N?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
LineId;
/** @type {string} */
Name;
/** @type {number} */
N;
}
export class SvcVisitPage {
/** @param {{Rows?:SvcVisitRow[],TotalRows?:number,Page?:number,PageSize?:number,OutcomeCounts?:{ [index:string]: number; },Services?:SvcChip[],CanSeeStaff?:boolean,CanSeeFinancial?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {SvcVisitRow[]} */
Rows = [];
/** @type {number} */
TotalRows;
/** @type {number} */
Page;
/** @type {number} */
PageSize;
/** @type {{ [index:string]: number; }} */
OutcomeCounts = {};
/** @type {SvcChip[]} */
Services = [];
/** @type {boolean} */
CanSeeStaff;
/** @type {boolean} */
CanSeeFinancial;
}
export class KpiV2VisitsResponse {
/** @param {{ResponseStatus?:ResponseStatus,Visits?:SvcVisitPage}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {SvcVisitPage} */
Visits;
}
export class KpiV2VisitsRequest {
/** @param {{BranchId?:string,FromDate?:string,ToDate?:string,StationId?:string,EmployeeId?:string,Outcome?:string,LineId?:string,Page?:number,PageSize?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
BranchId;
/** @type {string} */
FromDate;
/** @type {string} */
ToDate;
/** @type {?string} */
StationId;
/** @type {?string} */
EmployeeId;
/** @type {string} */
Outcome;
/** @type {?string} */
LineId;
/** @type {number} */
Page;
/** @type {number} */
PageSize;
}
JavaScript KpiV2VisitsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
Content-Length: length
{"BranchId":"00000000000000000000000000000000","FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000","StationId":"00000000000000000000000000000000","EmployeeId":"00000000000000000000000000000000","Outcome":"String","LineId":"00000000000000000000000000000000","Page":0,"PageSize":0}
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"}},"Visits":{"Rows":[{"CheckinId":"00000000000000000000000000000000","TicketLabel":"String","LocalDate":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","LocalCalled":"0001-01-01T00:00:00.0000000","LocalStart":"0001-01-01T00:00:00.0000000","LocalEnd":"0001-01-01T00:00:00.0000000","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}}