Evo Voice

<back to all web services

ListCrmContacts

The following routes are available for this service:
All Verbs/integrations/{integrationId}/contacts
import 'package:servicestack/servicestack.dart';

class CrmContactInfo implements IConvertible
{
    String? id;
    String? displayName;

    CrmContactInfo({this.id,this.displayName});
    CrmContactInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        displayName = json['displayName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'displayName': displayName
    };

    getTypeName() => "CrmContactInfo";
    TypeContext? context = _ctx;
}

class ListCrmContactsResponse implements IConvertible
{
    List<CrmContactInfo>? contacts;

    ListCrmContactsResponse({this.contacts});
    ListCrmContactsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        contacts = JsonConverters.fromJson(json['contacts'],'List<CrmContactInfo>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'contacts': JsonConverters.toJson(contacts,'List<CrmContactInfo>',context!)
    };

    getTypeName() => "ListCrmContactsResponse";
    TypeContext? context = _ctx;
}

class ListCrmContacts implements IConvertible
{
    String? integrationId;
    String? customerId;
    String? query;

    ListCrmContacts({this.integrationId,this.customerId,this.query});
    ListCrmContacts.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        integrationId = json['integrationId'];
        customerId = json['customerId'];
        query = json['query'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'integrationId': integrationId,
        'customerId': customerId,
        'query': query
    };

    getTypeName() => "ListCrmContacts";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'CrmContactInfo': TypeInfo(TypeOf.Class, create:() => CrmContactInfo()),
    'ListCrmContactsResponse': TypeInfo(TypeOf.Class, create:() => ListCrmContactsResponse()),
    'List<CrmContactInfo>': TypeInfo(TypeOf.Class, create:() => <CrmContactInfo>[]),
    'ListCrmContacts': TypeInfo(TypeOf.Class, create:() => ListCrmContacts()),
});

Dart ListCrmContacts 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 /integrations/{integrationId}/contacts HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	integrationId: String,
	customerId: String,
	query: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	contacts: 
	[
		{
			id: String,
			displayName: String
		}
	]
}