| POST,OPTIONS | /v1/dashboard/agreements |
|---|
"use strict";
export class DashboardStatTile {
/** @param {{Key?:string,Label?:string,Value?:number,PreviousValue?:number,Unit?:string,DeltaPct?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Label;
/** @type {number} */
Value;
/** @type {?number} */
PreviousValue;
/** @type {string} */
Unit;
/** @type {?number} */
DeltaPct;
}
export class AgreementKpiBranchRow {
/** @param {{BranchName?:string,ActiveCount?:number,Mrr?:number,ExpiringCount?:number,ChurnCount?:number,SkippedRate?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
BranchName;
/** @type {number} */
ActiveCount;
/** @type {number} */
Mrr;
/** @type {number} */
ExpiringCount;
/** @type {number} */
ChurnCount;
/** @type {number} */
SkippedRate;
}
export class AgreementKpiResponse {
/** @param {{ResponseStatus?:ResponseStatus,Stats?:DashboardStatTile[],ByBranch?:AgreementKpiBranchRow[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {DashboardStatTile[]} */
Stats = [];
/** @type {AgreementKpiBranchRow[]} */
ByBranch = [];
}
export class AgreementKpiRequest {
/** @param {{FromDate?:string,ToDate?:string,LocationIds?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FromDate;
/** @type {string} */
ToDate;
/** @type {string[]} */
LocationIds = [];
}
JavaScript AgreementKpiRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dashboard/agreements HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
FromDate: 0001-01-01,
ToDate: 0001-01-01,
LocationIds:
[
00000000000000000000000000000000
]
}
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
}
},
Stats:
[
{
Key: String,
Label: String,
Value: 0,
PreviousValue: 0,
Unit: String
}
],
ByBranch:
[
{
BranchName: String,
ActiveCount: 0,
Mrr: 0,
ExpiringCount: 0,
ChurnCount: 0,
SkippedRate: 0
}
]
}