Trendsic Platform Service

<back to all web services

RetellWebhookRequest

The following routes are available for this service:
POST,OPTIONS/v1/receptionist/retell-webhook
import 'package:servicestack/servicestack.dart';

class ReceptionistCallLogResponse implements IConvertible
{
    int? CallSessionId;
    ResponseStatus? ResponseStatus;

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

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

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

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

class RetellWebhookRequest implements IConvertible
{
    String? Slug;
    String? Key;
    Uint8List? RequestStream;

    RetellWebhookRequest({this.Slug,this.Key,this.RequestStream});
    RetellWebhookRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Slug': Slug,
        'Key': Key,
        'RequestStream': JsonConverters.toJson(RequestStream,'Uint8List',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'ReceptionistCallLogResponse': TypeInfo(TypeOf.Class, create:() => ReceptionistCallLogResponse()),
    'RetellWebhookRequest': TypeInfo(TypeOf.Class, create:() => RetellWebhookRequest()),
    'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
});

Dart RetellWebhookRequest 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 /v1/receptionist/retell-webhook HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Slug":"String","Key":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"CallSessionId":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}