| POST | /v1/forms/{FormUID}/invites |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class FormFillReceiptLine implements IConvertible
{
String? Channel;
String? To;
String? Outcome;
FormFillReceiptLine({this.Channel,this.To,this.Outcome});
FormFillReceiptLine.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Channel = json['Channel'];
To = json['To'];
Outcome = json['Outcome'];
return this;
}
Map<String, dynamic> toJson() => {
'Channel': Channel,
'To': To,
'Outcome': Outcome
};
getTypeName() => "FormFillReceiptLine";
TypeContext? context = _ctx;
}
class FormInviteView implements IConvertible
{
String? InviteUID;
String? Name;
String? Email;
String? Phone;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? ExpiresAt;
DateTime? SentAt;
DateTime? LastSentAt;
int? SendCount;
DateTime? OpenedAt;
DateTime? RevokedAt;
String? Number;
String? State;
String? Link;
List<FormFillReceiptLine>? Sends = [];
FormInviteView({this.InviteUID,this.Name,this.Email,this.Phone,this.CreatedBy,this.CreatedAt,this.ExpiresAt,this.SentAt,this.LastSentAt,this.SendCount,this.OpenedAt,this.RevokedAt,this.Number,this.State,this.Link,this.Sends});
FormInviteView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
InviteUID = json['InviteUID'];
Name = json['Name'];
Email = json['Email'];
Phone = json['Phone'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
SentAt = JsonConverters.fromJson(json['SentAt'],'DateTime',context!);
LastSentAt = JsonConverters.fromJson(json['LastSentAt'],'DateTime',context!);
SendCount = json['SendCount'];
OpenedAt = JsonConverters.fromJson(json['OpenedAt'],'DateTime',context!);
RevokedAt = JsonConverters.fromJson(json['RevokedAt'],'DateTime',context!);
Number = json['Number'];
State = json['State'];
Link = json['Link'];
Sends = JsonConverters.fromJson(json['Sends'],'List<FormFillReceiptLine>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'InviteUID': InviteUID,
'Name': Name,
'Email': Email,
'Phone': Phone,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
'SentAt': JsonConverters.toJson(SentAt,'DateTime',context!),
'LastSentAt': JsonConverters.toJson(LastSentAt,'DateTime',context!),
'SendCount': SendCount,
'OpenedAt': JsonConverters.toJson(OpenedAt,'DateTime',context!),
'RevokedAt': JsonConverters.toJson(RevokedAt,'DateTime',context!),
'Number': Number,
'State': State,
'Link': Link,
'Sends': JsonConverters.toJson(Sends,'List<FormFillReceiptLine>',context!)
};
getTypeName() => "FormInviteView";
TypeContext? context = _ctx;
}
class FormInvitesResponse implements IConvertible
{
List<FormInviteView>? Invites = [];
List<FormInviteView>? Created = [];
int? Emails;
int? Texts;
String? Consequence;
ResponseStatus? ResponseStatus;
FormInvitesResponse({this.Invites,this.Created,this.Emails,this.Texts,this.Consequence,this.ResponseStatus});
FormInvitesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Invites = JsonConverters.fromJson(json['Invites'],'List<FormInviteView>',context!);
Created = JsonConverters.fromJson(json['Created'],'List<FormInviteView>',context!);
Emails = json['Emails'];
Texts = json['Texts'];
Consequence = json['Consequence'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Invites': JsonConverters.toJson(Invites,'List<FormInviteView>',context!),
'Created': JsonConverters.toJson(Created,'List<FormInviteView>',context!),
'Emails': Emails,
'Texts': Texts,
'Consequence': Consequence,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormInvitesResponse";
TypeContext? context = _ctx;
}
class FormInvitePerson implements IConvertible
{
String? Name;
String? Email;
String? Phone;
FormInvitePerson({this.Name,this.Email,this.Phone});
FormInvitePerson.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Email = json['Email'];
Phone = json['Phone'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Email': Email,
'Phone': Phone
};
getTypeName() => "FormInvitePerson";
TypeContext? context = _ctx;
}
class FormInviteCreateRequest implements IConvertible
{
String? FormUID;
List<FormInvitePerson>? People = [];
bool? Preview;
FormInviteCreateRequest({this.FormUID,this.People,this.Preview});
FormInviteCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
People = JsonConverters.fromJson(json['People'],'List<FormInvitePerson>',context!);
Preview = json['Preview'];
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID,
'People': JsonConverters.toJson(People,'List<FormInvitePerson>',context!),
'Preview': Preview
};
getTypeName() => "FormInviteCreateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormFillReceiptLine': TypeInfo(TypeOf.Class, create:() => FormFillReceiptLine()),
'FormInviteView': TypeInfo(TypeOf.Class, create:() => FormInviteView()),
'List<FormFillReceiptLine>': TypeInfo(TypeOf.Class, create:() => <FormFillReceiptLine>[]),
'FormInvitesResponse': TypeInfo(TypeOf.Class, create:() => FormInvitesResponse()),
'List<FormInviteView>': TypeInfo(TypeOf.Class, create:() => <FormInviteView>[]),
'FormInvitePerson': TypeInfo(TypeOf.Class, create:() => FormInvitePerson()),
'FormInviteCreateRequest': TypeInfo(TypeOf.Class, create:() => FormInviteCreateRequest()),
'List<FormInvitePerson>': TypeInfo(TypeOf.Class, create:() => <FormInvitePerson>[]),
});
Dart FormInviteCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/{FormUID}/invites HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FormInviteCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<FormUID>00000000-0000-0000-0000-000000000000</FormUID>
<People>
<FormInvitePerson>
<Email>String</Email>
<Name>String</Name>
<Phone>String</Phone>
</FormInvitePerson>
</People>
<Preview>false</Preview>
</FormInviteCreateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormInvitesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Consequence>String</Consequence>
<Created>
<FormInviteView>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<Email>String</Email>
<ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
<InviteUID>00000000-0000-0000-0000-000000000000</InviteUID>
<LastSentAt>0001-01-01T00:00:00</LastSentAt>
<Link>String</Link>
<Name>String</Name>
<Number>String</Number>
<OpenedAt>0001-01-01T00:00:00</OpenedAt>
<Phone>String</Phone>
<RevokedAt>0001-01-01T00:00:00</RevokedAt>
<SendCount>0</SendCount>
<Sends>
<FormFillReceiptLine>
<Channel>String</Channel>
<Outcome>String</Outcome>
<To>String</To>
</FormFillReceiptLine>
</Sends>
<SentAt>0001-01-01T00:00:00</SentAt>
<State>String</State>
</FormInviteView>
</Created>
<Emails>0</Emails>
<Invites>
<FormInviteView>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<Email>String</Email>
<ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
<InviteUID>00000000-0000-0000-0000-000000000000</InviteUID>
<LastSentAt>0001-01-01T00:00:00</LastSentAt>
<Link>String</Link>
<Name>String</Name>
<Number>String</Number>
<OpenedAt>0001-01-01T00:00:00</OpenedAt>
<Phone>String</Phone>
<RevokedAt>0001-01-01T00:00:00</RevokedAt>
<SendCount>0</SendCount>
<Sends>
<FormFillReceiptLine>
<Channel>String</Channel>
<Outcome>String</Outcome>
<To>String</To>
</FormFillReceiptLine>
</Sends>
<SentAt>0001-01-01T00:00:00</SentAt>
<State>String</State>
</FormInviteView>
</Invites>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Texts>0</Texts>
</FormInvitesResponse>