Richemont.Booster2.PublicApi

<back to all web services

CreateUser

Requires Authentication
The following routes are available for this service:
POST/usersCreate a new External User
import 'package:servicestack/servicestack.dart';

class CreateUserResponse implements IConvertible
{
    /**
    * Unique Identifier of the User created in Booster
    */
    // @ApiMember(Description="Unique Identifier of the User created in Booster", IsRequired=true)
    String? userId;

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

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

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

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

class CreateUser implements IConvertible
{
    /**
    * User E-mail
    */
    // @ApiMember(Description="User E-mail", IsRequired=true)
    String? email;

    /**
    * User First Name
    */
    // @ApiMember(Description="User First Name", IsRequired=true)
    String? firstName;

    /**
    * User Last Name
    */
    // @ApiMember(Description="User Last Name", IsRequired=true)
    String? lastName;

    /**
    * User Culture
    */
    // @ApiMember(Description="User Culture", IsRequired=true)
    String? culture;

    /**
    * Country Id
    */
    // @ApiMember(Description="Country Id", IsRequired=true)
    String? countryId;

    CreateUser({this.email,this.firstName,this.lastName,this.culture,this.countryId});
    CreateUser.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        email = json['email'];
        firstName = json['firstName'];
        lastName = json['lastName'];
        culture = json['culture'];
        countryId = json['countryId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'email': email,
        'firstName': firstName,
        'lastName': lastName,
        'culture': culture,
        'countryId': countryId
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'CreateUserResponse': TypeInfo(TypeOf.Class, create:() => CreateUserResponse()),
    'CreateUser': TypeInfo(TypeOf.Class, create:() => CreateUser()),
});

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

POST /users HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"email":"String","firstName":"String","lastName":"String","culture":"String","countryId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"userId":"00000000000000000000000000000000"}