| Requires any of the roles: | Worker, Agent, Administrator |
| POST,OPTIONS | /v1/ContactConnectionAdd |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class ContactConnectionEditResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
bool? success;
ContactConnectionEditResponse({this.ResponseStatus,this.success});
ContactConnectionEditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
success = json['success'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'success': success
};
getTypeName() => "ContactConnectionEditResponse";
TypeContext? context = _ctx;
}
class ContactConnectionAddRequest implements IConvertible
{
bool? success;
int? ContactId1;
int? ContactId2;
ContactConnectionAddRequest({this.success,this.ContactId1,this.ContactId2});
ContactConnectionAddRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
success = json['success'];
ContactId1 = json['ContactId1'];
ContactId2 = json['ContactId2'];
return this;
}
Map<String, dynamic> toJson() => {
'success': success,
'ContactId1': ContactId1,
'ContactId2': ContactId2
};
getTypeName() => "ContactConnectionAddRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'ContactConnectionEditResponse': TypeInfo(TypeOf.Class, create:() => ContactConnectionEditResponse()),
'ContactConnectionAddRequest': TypeInfo(TypeOf.Class, create:() => ContactConnectionAddRequest()),
});
Dart ContactConnectionAddRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/ContactConnectionAdd HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
success: False,
ContactId1: 0,
ContactId2: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
success: False
}