Evo Voice

<back to all web services

GetAIUsage

Requires Authentication
Required role:SystemAdministrator
The following routes are available for this service:
All Verbs/ai/usage
"use strict";
export class AIAccountUsage {
    /** @param {{accountId?:string,aiMinutes?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The account ID this customer belongs to */
    accountId;
    /**
     * @type {number}
     * @description The total number of AI minutes used in the date range */
    aiMinutes;
}
export class AICustomerUsage {
    /** @param {{accountId?:string,customerId?:string,aiMinutes?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The account ID this customer belongs to */
    accountId;
    /**
     * @type {string}
     * @description The customer ID for this uage */
    customerId;
    /**
     * @type {number}
     * @description The total number of AI minutes used in the date range */
    aiMinutes;
}
export class AIUsage {
    /** @param {{accountUsage?:AIAccountUsage[],customerUsage?:AICustomerUsage[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {AIAccountUsage[]} */
    accountUsage;
    /** @type {AICustomerUsage[]} */
    customerUsage;
}
export class GetAIUsage {
    /** @param {{accountId?:string,customerId?:string,startDate?:string,endDate?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Filter by account ID. If not specified will return entries for all customers in all accounts in the date range */
    accountId;
    /**
     * @type {string}
     * @description Filter by customer ID. If not specified, will return all customers for the accounts considered */
    customerId;
    /**
     * @type {string}
     * @description The start of the date range to consider */
    startDate;
    /**
     * @type {string}
     * @description The end of the date range to consider */
    endDate;
}

JavaScript GetAIUsage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /ai/usage HTTP/1.1 
Host: team.evovoice.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"accountId":"String","customerId":"String","startDate":"String","endDate":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"accountUsage":[{"accountId":"String","aiMinutes":0}],"customerUsage":[{"accountId":"String","customerId":"String","aiMinutes":0}]}