Trendsic Platform Service

<back to all web services

ConversationHeaderRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/ConversationHeader
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ConversationHeader implements IConvertible
{
    String? ConversationHeaderId;
    String? TableName;
    String? FieldName;
    int? RecordId;
    bool? AgentHasRead;
    bool? AdminHasRead;

    ConversationHeader({this.ConversationHeaderId,this.TableName,this.FieldName,this.RecordId,this.AgentHasRead,this.AdminHasRead});
    ConversationHeader.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ConversationHeaderId = json['ConversationHeaderId'];
        TableName = json['TableName'];
        FieldName = json['FieldName'];
        RecordId = json['RecordId'];
        AgentHasRead = json['AgentHasRead'];
        AdminHasRead = json['AdminHasRead'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ConversationHeaderId': ConversationHeaderId,
        'TableName': TableName,
        'FieldName': FieldName,
        'RecordId': RecordId,
        'AgentHasRead': AgentHasRead,
        'AdminHasRead': AdminHasRead
    };

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

class ConversationHeaderResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    ConversationHeader? ConversationHeader;

    ConversationHeaderResponse({this.ResponseStatus,this.ConversationHeader});
    ConversationHeaderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        ConversationHeader = JsonConverters.fromJson(json['ConversationHeader'],'ConversationHeader',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'ConversationHeader': JsonConverters.toJson(ConversationHeader,'ConversationHeader',context!)
    };

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

class ConversationHeaderRequest implements IConvertible
{
    ConversationHeader? ConversationHeader;

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

    fromMap(Map<String, dynamic> json) {
        ConversationHeader = JsonConverters.fromJson(json['ConversationHeader'],'ConversationHeader',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ConversationHeader': JsonConverters.toJson(ConversationHeader,'ConversationHeader',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'ConversationHeader': TypeInfo(TypeOf.Class, create:() => ConversationHeader()),
    'ConversationHeaderResponse': TypeInfo(TypeOf.Class, create:() => ConversationHeaderResponse()),
    'ConversationHeaderRequest': TypeInfo(TypeOf.Class, create:() => ConversationHeaderRequest()),
});

Dart ConversationHeaderRequest DTOs

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

HTTP + JSV

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

POST /v1/ConversationHeader HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ConversationHeader: 
	{
		ConversationHeaderId: 00000000000000000000000000000000,
		TableName: String,
		FieldName: String,
		RecordId: 0,
		AgentHasRead: False,
		AdminHasRead: False
	}
}
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
		}
	},
	ConversationHeader: 
	{
		ConversationHeaderId: 00000000000000000000000000000000,
		TableName: String,
		FieldName: String,
		RecordId: 0,
		AgentHasRead: False,
		AdminHasRead: False
	}
}