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 .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.

GET /unique-email HTTP/1.1 
Host: extensions.avon.ca 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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
		}
	}
}