Trendsic Platform Service

<back to all web services

DispatchTrackSessionRequest

The following routes are available for this service:
POST,OPTIONS/v1/dispatch/track/{Token}/session
import 'package:servicestack/servicestack.dart';

class DispatchTrackSessionResponse implements IConvertible
{
    String? ActToken;
    DateTime? ExpiresUtc;
    ResponseStatus? ResponseStatus;

    DispatchTrackSessionResponse({this.ActToken,this.ExpiresUtc,this.ResponseStatus});
    DispatchTrackSessionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class DispatchTrackSessionRequest implements IConvertible
{
    String? Token;

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

    fromMap(Map<String, dynamic> json) {
        Token = json['Token'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Token': Token
    };

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

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

Dart DispatchTrackSessionRequest 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/dispatch/track/{Token}/session HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

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

{"ActToken":"String","ExpiresUtc":"0001-01-01T00:00:00.0000000","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}