Evo Voice

<back to all web services

ListAutoCompleteValues

Requires Authentication
The following routes are available for this service:
All Verbs/ui/autocomplete/values
import Foundation
import ServiceStack

public class ListAutoCompleteValues : Codable
{
    /**
    * Account ID
    */
    // @ApiMember(Description="Account ID")
    public var accountId:String?

    /**
    * Filter by customer ID
    */
    // @ApiMember(Description="Filter by customer ID")
    public var customerId:String?

    /**
    * The type of value
    */
    // @ApiMember(Description="The type of value")
    public var type:ValueTypes?

    /**
    * The query text to search for
    */
    // @ApiMember(Description="The query text to search for")
    public var query:String?

    /**
    * Type specific filter
    */
    // @ApiMember(Description="Type specific filter")
    public var typeSpecificFilter:String?

    /**
    * The value to search for (will only return one result)
    */
    // @ApiMember(Description="The value to search for (will only return one result)")
    public var value:String?

    /**
    * Should the results be sent back in plain text or with embedded HTML?
    */
    // @ApiMember(Description="Should the results be sent back in plain text or with embedded HTML?")
    public var plainText:Bool?

    /**
    * Include full info?
    */
    // @ApiMember(Description="Include full info?")
    public var fullInfo:Bool?

    /**
    * List all values, only use for small lists.
    */
    // @ApiMember(Description="List all values, only use for small lists.")
    public var all:Bool?

    required public init(){}
}

public enum ValueTypes : String, Codable
{
    case NotSpecified
    case String
    case Boolean
    case Number
    case List
    case Struct
    case Transition
    case Custom
    case Date
    case AudioFile
    case TimeZoneId
    case PhoneNumber
    case User
    case Endpoint
    case Time
    case File
    case FaxNumber
    case EmailAccount
    case Customer
    case Flow
    case Team
    case FlowReference
    case Integration
}

public class ListAutoCompleteValuesResponse : Codable
{
    public var values:[AutoCompleteValue] = []

    required public init(){}
}

public class AutoCompleteValue : Codable
{
    /**
    * Display name
    */
    // @ApiMember(Description="Display name")
    public var displayName:String?

    /**
    * Value
    */
    // @ApiMember(Description="Value")
    public var value:String?

    required public init(){}
}


Swift ListAutoCompleteValues DTOs

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

HTTP + JSV

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

POST /ui/autocomplete/values HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	customerId: String,
	type: NotSpecified,
	query: String,
	typeSpecificFilter: String,
	value: String,
	plainText: False,
	fullInfo: False,
	all: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	values: 
	[
		{
			displayName: String,
			value: String
		}
	]
}