Evo Voice

<back to all web services

ListCustomers

Retrieve customers

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
GET/customers
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


/**
* Retrieve customers
*/
@Api(Description="Retrieve customers")
open class ListCustomers : ListRequest<CustomerInfo>()
{
    /**
    * Filter by accounts
    */
    @ApiMember(Description="Filter by accounts")
    open var accountIds:ArrayList<String>? = null

    /**
    * Filter by name
    */
    @ApiMember(Description="Filter by name")
    open var nameFilter:String? = null

    /**
    * The IDs of the parent customers you want to filter by
    */
    @ApiMember(Description="The IDs of the parent customers you want to filter by")
    open var parentCustomerIds:ArrayList<String>? = null

    /**
    * If you want a shall parent customer filter (e.g. no deep children)
    */
    @ApiMember(Description="If you want a shall parent customer filter (e.g. no deep children)")
    open var shallowParent:Boolean? = null

    /**
    * The list of tag IDs to filter by (must contain all)
    */
    @ApiMember(Description="The list of tag IDs to filter by (must contain all)")
    open var tagIds:ArrayList<String>? = null
}

open class ListRequest<T> : IGet
{
    /**
    * The page of data to retrieve
    */
    @ApiMember(Description="The page of data to retrieve")
    open var page:Int? = null

    /**
    * If you want all objects to be returned. This should be used with care
    */
    @ApiMember(Description="If you want all objects to be returned. This should be used with care")
    open var all:Boolean? = null

    /**
    * The number per page to retrieve
    */
    @ApiMember(Description="The number per page to retrieve")
    open var countPerPage:Int? = null

    /**
    * Specific IDs
    */
    @ApiMember(Description="Specific IDs")
    open var specificIds:ArrayList<String>? = null

    /**
    * Specify a sort field
    */
    @ApiMember(Description="Specify a sort field")
    open var sortField:String? = null

    /**
    * Specify a sort order
    */
    @ApiMember(Description="Specify a sort order")
    open var sortOrder:SortOrders? = null

    /**
    * Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array
    */
    @ApiMember(Description="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array")
    open var simplifiedPaging:Boolean? = null
}

enum class SortOrders
{
    Ascend,
    Descend,
}

open class CustomerInfo : EntityInfo()
{
    /**
    * The ID of the account associated with this customer
    */
    @ApiMember(Description="The ID of the account associated with this customer")
    open var accountId:String? = null

    /**
    * The parent customer ID for this customer
    */
    @ApiMember(Description="The parent customer ID for this customer")
    open var parentCustomerId:String? = null

    /**
    * The breadcrumb to this customer
    */
    @ApiMember(Description="The breadcrumb to this customer")
    open var breadcrumb:ArrayList<CustomerBreadcrumb>? = null

    /**
    * The name of the account associated with this customer
    */
    @ApiMember(Description="The name of the account associated with this customer")
    open var accountName:String? = null

    /**
    * Is this customer staging or production?
    */
    @ApiMember(Description="Is this customer staging or production?")
    open var isStaging:Boolean? = null

    /**
    * The name of the company
    */
    @ApiMember(Description="The name of the company")
    open var name:String? = null

    /**
    * The reference ID for this company
    */
    @ApiMember(Description="The reference ID for this company")
    open var referenceId:String? = null

    /**
    * This customer's data values
    */
    @ApiMember(Description="This customer's data values")
    @SerializedName("data") open var Data:Struct? = null

    /**
    * The list of tags for this customer
    */
    @ApiMember(Description="The list of tags for this customer")
    open var tags:ArrayList<Tag>? = null

    /**
    * This customer's schedule
    */
    @ApiMember(Description="This customer's schedule")
    open var schedule:Schedule? = null

    /**
    * Integration data for this customer
    */
    @ApiMember(Description="Integration data for this customer")
    open var integrationData:EntityIntegrationData? = null

    /**
    * Override this customer's billing settings? Otherwise inherits from parent
    */
    @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent")
    open var overrideBillingSettings:Boolean? = null

    /**
    * Billing settings for this customer
    */
    @ApiMember(Description="Billing settings for this customer")
    open var billingSettings:BillingSettings? = null

    /**
    * Should this customer override the parent customer's app settings
    */
    @ApiMember(Description="Should this customer override the parent customer's app settings")
    open var overrideAppSettings:Boolean? = null

    /**
    * App / Portal settings for this customer
    */
    @ApiMember(Description="App / Portal settings for this customer")
    open var appSettings:AppSettings? = null
}

open class EntityInfo
{
    /**
    * The ID of the object
    */
    @ApiMember(Description="The ID of the object")
    open var id:String? = null

    /**
    * The date the object was created
    */
    @ApiMember(Description="The date the object was created")
    open var dateCreated:String? = null

    /**
    * The date the object was last modified
    */
    @ApiMember(Description="The date the object was last modified")
    open var dateLastModified:String? = null

    /**
    * The user that created this object
    */
    @ApiMember(Description="The user that created this object")
    open var createdBy:String? = null

    /**
    * The user that last modified this object
    */
    @ApiMember(Description="The user that last modified this object")
    open var lastModifiedBy:String? = null
}

open class CustomerBreadcrumb
{
    open var id:String? = null
    open var name:String? = null
}

open class Struct : HashMap<String,Value>()
{
}

open class Value
{
    open var boolValue:Boolean? = null
    open var stringValue:String? = null
    open var numberValue:Double? = null
    open var listValue:ArrayList<Struct>? = null
    open var structValue:Struct? = null
}

open class Tag
{
    open var id:String? = null
    open var name:String? = null
    open var color:TagColors? = null
}

enum class TagColors
{
    Magenta,
    Red,
    Volcano,
    Orange,
    Gold,
    Lime,
    Green,
    Cyan,
    Blue,
    GeekBlue,
    Purple,
}

open class Schedule
{
    open var timeZoneId:String? = null
    open var inherit:Boolean? = null
    open var forceClosed:Boolean? = null
    open var rules:ArrayList<SchedulingRule>? = null
    open var defaultState:String? = null
}

open class SchedulingRule
{
    open var id:String? = null
    open var name:String? = null
    open var priority:Int? = null
    open var state:String? = null
    open var source:String? = null
    open var condition:String? = null
    open var simpleRuleType:SimpleSchedulingRuleTypes? = null
    open var customerState:String? = null
    open var flowId:String? = null
    open var flowParams:Struct? = null
    open var isAllDay:Boolean? = null
    open var startDate:String? = null
    open var startTime:String? = null
    open var endTime:String? = null
    open var bySetPosition:ArrayList<Int>? = null
    open var byMonth:ArrayList<Int>? = null
    open var byWeekNo:ArrayList<Int>? = null
    open var byYearDay:ArrayList<Int>? = null
    open var byMonthDay:ArrayList<Int>? = null
    open var byDay:ArrayList<ScheduleDay>? = null
    open var byHour:ArrayList<Int>? = null
    open var byMinute:ArrayList<Int>? = null
    open var interval:Int? = null
    open var count:Int? = null
    open var untilDate:String? = null
    open var frequency:SchedulingRuleFrequency? = null
}

enum class SimpleSchedulingRuleTypes
{
    Always,
    CustomerState,
    Time,
}

open class ScheduleDay
{
    open var offset:Int? = null
    open var dayOfWeek:DayOfWeek? = null
}

enum class SchedulingRuleFrequency
{
    None,
    Secondly,
    Minutely,
    Hourly,
    Daily,
    Weekly,
    Monthly,
    Yearly,
}

open class EntityIntegrationData : HashMap<String,IntegrationData>()
{
}

open class IntegrationData
{
    open var thirdPartyId:String? = null
}

open class BillingSettings
{
    open var base:BillingItem? = null
    open var localNumbers:BillingItem? = null
    open var tollFreeNumbers:BillingItem? = null
    open var inboundVoiceCalls:BillingItem? = null
    open var outboundVoiceCalls:BillingItem? = null
    open var inboundFaxes:BillingItem? = null
    open var outboundFaxes:BillingItem? = null
    open var inboundSmsMessages:BillingItem? = null
    open var outboundSmsMessages:BillingItem? = null
    open var aiInsights:BillingItem? = null
    open var aiLiveMinutes:BillingItem? = null
    open var aiMessages:BillingItem? = null
}

open class BillingItem
{
    open var baseCost:Double? = null
    open var rawUnitMultiplier:Double? = null
    open var unitCost:Double? = null
    open var allowance:Int? = null
}

open class AppSettings
{
    open var enablePhoneNumberManagement:Boolean? = null
    open var enableDeviceManagement:Boolean? = null
    open var enableDialer:Boolean? = null
    open var enableCallHistory:Boolean? = null
    open var enableAssistants:Boolean? = null
    open var showFileNameInMessageCenter:Boolean? = null
    open var chakraTheme:String? = null
    open var customCss:String? = null
    open var pageTitle:String? = null
    open var stringMappings:String? = null
    open var logoutUrl:String? = null
    open var portMyNumberUrl:String? = null
}

open class ListResponse<T>
{
    /**
    * The items
    */
    @ApiMember(Description="The items")
    open var items:ArrayList<AccountInfo>? = null

    /**
    * The total number of items
    */
    @ApiMember(Description="The total number of items")
    open var totalCount:Int? = null

    /**
    * The total number of pages
    */
    @ApiMember(Description="The total number of pages")
    open var totalPages:Int? = null

    /**
    * Are there more pages of items? Used with simplified paging
    */
    @ApiMember(Description="Are there more pages of items? Used with simplified paging")
    open var hasMorePages:Boolean? = null
}

open class AccountInfo : EntityInfo()
{
    /**
    * The name of this account
    */
    @ApiMember(Description="The name of this account")
    open var name:String? = null

    /**
    * The ID of this account's parent
    */
    @ApiMember(Description="The ID of this account's parent")
    open var parentAccountId:String? = null

    /**
    * The twilio account SID
    */
    @ApiMember(Description="The twilio account SID")
    open var twilioAccountSid:String? = null

    /**
    * The ancestors of this account. Useful for breadcrumbs
    */
    @ApiMember(Description="The ancestors of this account. Useful for breadcrumbs")
    open var ancestorIds:ArrayList<String>? = null

    /**
    * The max number of phone numbers this account can have
    */
    @ApiMember(Description="The max number of phone numbers this account can have")
    open var maxPhoneNumbers:Int? = null

    /**
    * This account is BYOA
    */
    @ApiMember(Description="This account is BYOA")
    open var isBYOA:Boolean? = null

    /**
    * TrustHub Profile Sid
    */
    @ApiMember(Description="TrustHub Profile Sid")
    open var trustHubProfileSid:String? = null

    /**
    * The ID of the logo file
    */
    @ApiMember(Description="The ID of the logo file")
    open var logoId:String? = null

    /**
    * The URI of the logo file
    */
    @ApiMember(Description="The URI of the logo file")
    open var logoUri:String? = null

    /**
    * The billing settings for this account
    */
    @ApiMember(Description="The billing settings for this account")
    open var billingSettings:BillingSettings? = null
}

Kotlin ListCustomers DTOs

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

HTTP + XML

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

GET /customers HTTP/1.1 
Host: team.evovoice.io 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ListResponseOfCustomerInfoznfKbIMc xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api">
  <HasMorePages>false</HasMorePages>
  <Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
    <d2p1:CustomerInfo>
      <CreatedBy>String</CreatedBy>
      <DateCreated>String</DateCreated>
      <DateLastModified>String</DateLastModified>
      <Id>String</Id>
      <LastModifiedBy>String</LastModifiedBy>
      <d2p1:AccountId>String</d2p1:AccountId>
      <d2p1:AccountName>String</d2p1:AccountName>
      <d2p1:AppSettings>
        <d2p1:ChakraTheme>String</d2p1:ChakraTheme>
        <d2p1:CustomCss>String</d2p1:CustomCss>
        <d2p1:EnableAssistants>false</d2p1:EnableAssistants>
        <d2p1:EnableCallHistory>false</d2p1:EnableCallHistory>
        <d2p1:EnableDeviceManagement>false</d2p1:EnableDeviceManagement>
        <d2p1:EnableDialer>false</d2p1:EnableDialer>
        <d2p1:EnablePhoneNumberManagement>false</d2p1:EnablePhoneNumberManagement>
        <d2p1:LogoutUrl>String</d2p1:LogoutUrl>
        <d2p1:PageTitle>String</d2p1:PageTitle>
        <d2p1:PortMyNumberUrl>String</d2p1:PortMyNumberUrl>
        <d2p1:ShowFileNameInMessageCenter>false</d2p1:ShowFileNameInMessageCenter>
        <d2p1:StringMappings>String</d2p1:StringMappings>
      </d2p1:AppSettings>
      <d2p1:BillingSettings xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Accounts">
        <d4p1:AIInsights>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:AIInsights>
        <d4p1:AILiveMinutes>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:AILiveMinutes>
        <d4p1:AIMessages>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:AIMessages>
        <d4p1:Base>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:Base>
        <d4p1:InboundFaxes>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:InboundFaxes>
        <d4p1:InboundSmsMessages>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:InboundSmsMessages>
        <d4p1:InboundVoiceCalls>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:InboundVoiceCalls>
        <d4p1:LocalNumbers>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:LocalNumbers>
        <d4p1:OutboundFaxes>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:OutboundFaxes>
        <d4p1:OutboundSmsMessages>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:OutboundSmsMessages>
        <d4p1:OutboundVoiceCalls>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:OutboundVoiceCalls>
        <d4p1:TollFreeNumbers>
          <d4p1:Allowance>0</d4p1:Allowance>
          <d4p1:BaseCost>0</d4p1:BaseCost>
          <d4p1:RawUnitMultiplier>0</d4p1:RawUnitMultiplier>
          <d4p1:UnitCost>0</d4p1:UnitCost>
        </d4p1:TollFreeNumbers>
      </d2p1:BillingSettings>
      <d2p1:Breadcrumb>
        <d2p1:CustomerBreadcrumb>
          <d2p1:Id>String</d2p1:Id>
          <d2p1:Name>String</d2p1:Name>
        </d2p1:CustomerBreadcrumb>
      </d2p1:Breadcrumb>
      <d2p1:Data xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
      <d2p1:IntegrationData xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringIntegrationDataY_SkqLnhh>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value xmlns:d6p1="http://schemas.datacontract.org/2004/07/Voice.Api.Integrations">
            <d6p1:ThirdPartyId>String</d6p1:ThirdPartyId>
          </d4p1:Value>
        </d4p1:KeyValueOfstringIntegrationDataY_SkqLnhh>
      </d2p1:IntegrationData>
      <d2p1:IsStaging>false</d2p1:IsStaging>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:OverrideAppSettings>false</d2p1:OverrideAppSettings>
      <d2p1:OverrideBillingSettings>false</d2p1:OverrideBillingSettings>
      <d2p1:ParentCustomerId>String</d2p1:ParentCustomerId>
      <d2p1:ReferenceId>String</d2p1:ReferenceId>
      <d2p1:Schedule xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Scheduling">
        <d4p1:DefaultState>String</d4p1:DefaultState>
        <d4p1:ForceClosed>false</d4p1:ForceClosed>
        <d4p1:Inherit>false</d4p1:Inherit>
        <d4p1:Rules>
          <d4p1:SchedulingRule>
            <d4p1:ByDay>
              <d4p1:ScheduleDay>
                <d4p1:DayOfWeek>Sunday</d4p1:DayOfWeek>
                <d4p1:Offset>0</d4p1:Offset>
              </d4p1:ScheduleDay>
            </d4p1:ByDay>
            <d4p1:ByHour xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:ByHour>
            <d4p1:ByMinute xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:ByMinute>
            <d4p1:ByMonth xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:ByMonth>
            <d4p1:ByMonthDay xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:ByMonthDay>
            <d4p1:BySetPosition xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:BySetPosition>
            <d4p1:ByWeekNo xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:ByWeekNo>
            <d4p1:ByYearDay xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </d4p1:ByYearDay>
            <d4p1:Condition>String</d4p1:Condition>
            <d4p1:Count>0</d4p1:Count>
            <d4p1:CustomerState>String</d4p1:CustomerState>
            <d4p1:EndTime>String</d4p1:EndTime>
            <d4p1:FlowId>String</d4p1:FlowId>
            <d4p1:FlowParams xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
            <d4p1:Frequency>None</d4p1:Frequency>
            <d4p1:Id>String</d4p1:Id>
            <d4p1:Interval>0</d4p1:Interval>
            <d4p1:IsAllDay>false</d4p1:IsAllDay>
            <d4p1:Name>String</d4p1:Name>
            <d4p1:Priority>0</d4p1:Priority>
            <d4p1:SimpleRuleType>Always</d4p1:SimpleRuleType>
            <d4p1:Source>String</d4p1:Source>
            <d4p1:StartDate>String</d4p1:StartDate>
            <d4p1:StartTime>String</d4p1:StartTime>
            <d4p1:State>String</d4p1:State>
            <d4p1:UntilDate>String</d4p1:UntilDate>
          </d4p1:SchedulingRule>
        </d4p1:Rules>
        <d4p1:TimeZoneId>String</d4p1:TimeZoneId>
      </d2p1:Schedule>
      <d2p1:Tags xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Settings">
        <d4p1:Tag>
          <d4p1:Color>Magenta</d4p1:Color>
          <d4p1:Id>String</d4p1:Id>
          <d4p1:Name>String</d4p1:Name>
        </d4p1:Tag>
      </d2p1:Tags>
    </d2p1:CustomerInfo>
  </Items>
  <TotalCount>0</TotalCount>
  <TotalPages>0</TotalPages>
</ListResponseOfCustomerInfoznfKbIMc>