BokaMera.API.Host

<back to all web services

CheckCompanyUserExists

The following routes are available for this service:
GET/administrators/existsCheck if administrator account existsThis service is used to check if email is already an administrator.
import 'package:servicestack/servicestack.dart';

class CheckCompanyUserExistsResponse implements IConvertible
{
    bool? Exists;
    String? Message;

    CheckCompanyUserExistsResponse({this.Exists,this.Message});
    CheckCompanyUserExistsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CheckCompanyUserExists implements IConvertible
{
    /**
    * The email to the administrator.
    */
    // @ApiMember(Description="The email to the administrator.")
    String? Email;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'CheckCompanyUserExistsResponse': TypeInfo(TypeOf.Class, create:() => CheckCompanyUserExistsResponse()),
    'CheckCompanyUserExists': TypeInfo(TypeOf.Class, create:() => CheckCompanyUserExists()),
});

Dart CheckCompanyUserExists DTOs

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

HTTP + OTHER

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

GET /administrators/exists HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Exists":false,"Message":"String"}