NAV

<back to all web services

UniqueEmailCheck

The following routes are available for this service:
GET/unique-email
import 'package:servicestack/servicestack.dart';

class UniqueEmailCheckResponse implements IConvertible
{
    bool? isUnique;
    ResponseStatus? responseStatus;

    UniqueEmailCheckResponse({this.isUnique,this.responseStatus});
    UniqueEmailCheckResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'isUnique': isUnique,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

class UniqueEmailCheck implements IPost, IConvertible
{
    String? emailAddress;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'extensions.avon.ca', types: <String, TypeInfo> {
    'UniqueEmailCheckResponse': TypeInfo(TypeOf.Class, create:() => UniqueEmailCheckResponse()),
    'UniqueEmailCheck': TypeInfo(TypeOf.Class, create:() => UniqueEmailCheck()),
});

Dart UniqueEmailCheck DTOs

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

HTTP + CSV

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

GET /unique-email HTTP/1.1 
Host: extensions.avon.ca 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"isUnique":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}