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


export class NodeParameterMap
{
    [key:string] : NodeParameter;

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


export class AIAccountUsage
{
    /** @description The account ID this customer belongs to */
    // @ApiMember(Description="The account ID this customer belongs to")
    public accountId: string;

    /** @description The total number of AI minutes used in the date range */
    // @ApiMember(Description="The total number of AI minutes used in the date range")
    public aiMinutes: number;

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

export class AICustomerUsage
{
    /** @description The account ID this customer belongs to */
    // @ApiMember(Description="The account ID this customer belongs to")
    public accountId: string;

    /** @description The customer ID for this uage */
    // @ApiMember(Description="The customer ID for this uage")
    public customerId: string;

    /** @description The total number of AI minutes used in the date range */
    // @ApiMember(Description="The total number of AI minutes used in the date range")
    public aiMinutes: number;

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

export class AIUsage
{
    public accountUsage: AIAccountUsage[];
    public customerUsage: AICustomerUsage[];

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

export class GetAIUsage implements IGet
{
    /** @description Filter by account ID. If not specified will return entries for all customers in all accounts in the date range */
    // @ApiMember(Description="Filter by account ID. If not specified will return entries for all customers in all accounts in the date range")
    public accountId: string;

    /** @description Filter by customer ID. If not specified, will return all customers for the accounts considered */
    // @ApiMember(Description="Filter by customer ID. If not specified, will return all customers for the accounts considered")
    public customerId: string;

    /** @description The start of the date range to consider */
    // @ApiMember(Description="The start of the date range to consider")
    public startDate: string;

    /** @description The end of the date range to consider */
    // @ApiMember(Description="The end of the date range to consider")
    public endDate: string;

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

TypeScript GetAIUsage DTOs

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

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

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

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