Evo Voice

<back to all web services

FindDuplicates

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
All Verbs/endpoints/duplicates
import 'package:servicestack/servicestack.dart';

class FindDuplicateEntry implements IConvertible
{
    String? fieldValue;
    List<String>? endpoints;

    FindDuplicateEntry({this.fieldValue,this.endpoints});
    FindDuplicateEntry.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class FindDuplicatesResponse implements IConvertible
{
    List<FindDuplicateEntry>? duplicates;

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

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

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

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

class FindDuplicates implements IConvertible
{
    /**
    * The account ID to check
    */
    // @ApiMember(Description="The account ID to check")
    String? accountId;

    /**
    * The field name to search for
    */
    // @ApiMember(Description="The field name to search for")
    String? endpointFieldName;

    FindDuplicates({this.accountId,this.endpointFieldName});
    FindDuplicates.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'accountId': accountId,
        'endpointFieldName': endpointFieldName
    };

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

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

Dart FindDuplicates 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 /endpoints/duplicates HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	endpointFieldName: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	duplicates: 
	[
		{
			fieldValue: String,
			endpoints: 
			[
				String
			]
		}
	]
}