My ServiceStack Backend

<back to all web services

ProfileRequest

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

class ProfileResponse implements IConvertible
{
    String? firstName;
    String? lastName;
    String? email;
    String? country;
    String? language;
    String? birthDate;
    String? address;
    String? address2;
    String? city;
    String? state;
    String? zipCode;
    String? phoneNumber;
    String? memberId;
    int? responseCode;
    String? responseMessage;

    ProfileResponse({this.firstName,this.lastName,this.email,this.country,this.language,this.birthDate,this.address,this.address2,this.city,this.state,this.zipCode,this.phoneNumber,this.memberId,this.responseCode,this.responseMessage});
    ProfileResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        firstName = json['firstName'];
        lastName = json['lastName'];
        email = json['email'];
        country = json['country'];
        language = json['language'];
        birthDate = json['birthDate'];
        address = json['address'];
        address2 = json['address2'];
        city = json['city'];
        state = json['state'];
        zipCode = json['zipCode'];
        phoneNumber = json['phoneNumber'];
        memberId = json['memberId'];
        responseCode = json['responseCode'];
        responseMessage = json['responseMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'firstName': firstName,
        'lastName': lastName,
        'email': email,
        'country': country,
        'language': language,
        'birthDate': birthDate,
        'address': address,
        'address2': address2,
        'city': city,
        'state': state,
        'zipCode': zipCode,
        'phoneNumber': phoneNumber,
        'memberId': memberId,
        'responseCode': responseCode,
        'responseMessage': responseMessage
    };

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

class ProfileRequest implements IConvertible
{
    ProfileRequest();
    ProfileRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ProfileRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'portal_api.migrantleap.com', types: <String, TypeInfo> {
    'ProfileResponse': TypeInfo(TypeOf.Class, create:() => ProfileResponse()),
    'ProfileRequest': TypeInfo(TypeOf.Class, create:() => ProfileRequest()),
});

Dart ProfileRequest 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 /profile HTTP/1.1 
Host: portal-api.migrantleap.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"firstName":"String","lastName":"String","email":"String","country":"String","language":"String","birthDate":"String","address":"String","address2":"String","city":"String","state":"String","zipCode":"String","phoneNumber":"String","memberId":"String","responseCode":0,"responseMessage":"String"}