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
import Foundation
import ServiceStack

public class GetAIUsage : IGet, Codable
{
    /**
    * 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 var accountId:String

    /**
    * 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 var customerId:String

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

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

    required public init(){}
}

public class AIUsage : Codable
{
    public var accountUsage:[AIAccountUsage]
    public var customerUsage:[AICustomerUsage]

    required public init(){}
}

public class AIAccountUsage : Codable
{
    /**
    * The account ID this customer belongs to
    */
    // @ApiMember(Description="The account ID this customer belongs to")
    public var accountId:String

    /**
    * 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 var aiMinutes:Int

    required public init(){}
}

public class AICustomerUsage : Codable
{
    /**
    * The account ID this customer belongs to
    */
    // @ApiMember(Description="The account ID this customer belongs to")
    public var accountId:String

    /**
    * The customer ID for this uage
    */
    // @ApiMember(Description="The customer ID for this uage")
    public var customerId:String

    /**
    * 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 var aiMinutes:Int

    required public init(){}
}


Swift GetAIUsage DTOs

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

HTTP + OTHER

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

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

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