GeniuslinkAPI

<back to all web services

PostAutopilotOptionsRequest

Requires Authentication
The following routes are available for this service:
POST/v4/autopilot-options
POST/v3.5/autopilot-options
import 'package:servicestack/servicestack.dart';

// @DataContract
class PostAutopilotOptionsResponse implements IConvertible
{
    // @DataMember(Name="responseStatus")
    ResponseStatus? responseStatus;

    // @DataMember(Name="success")
    bool? success;

    PostAutopilotOptionsResponse({this.responseStatus,this.success});
    PostAutopilotOptionsResponse.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() => "PostAutopilotOptionsResponse";
    TypeContext? context = _ctx;
}

enum AutopilotFrequency
{
    Daily,
    Hourly,
    Once,
}

enum AutopilotLevel
{
    ShortLink,
    Group,
    Account,
}

// @DataContract
class PostAutopilotOptionsRequest implements IConvertible
{
    // @DataMember(Name="frequency")
    AutopilotFrequency? frequency;

    // @DataMember(Name="level")
    AutopilotLevel? level;

    // @DataMember(Name="enabled")
    bool? enabled;

    // @DataMember(Name="identifier")
    String? identifier;

    // @DataMember(Name="choicePageOptions")
    Map<String,String?>? choicePageOptions;

    PostAutopilotOptionsRequest({this.frequency,this.level,this.enabled,this.identifier,this.choicePageOptions});
    PostAutopilotOptionsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        frequency = JsonConverters.fromJson(json['frequency'],'AutopilotFrequency',context!);
        level = JsonConverters.fromJson(json['level'],'AutopilotLevel',context!);
        enabled = json['enabled'];
        identifier = json['identifier'];
        choicePageOptions = JsonConverters.toStringMap(json['choicePageOptions']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'frequency': JsonConverters.toJson(frequency,'AutopilotFrequency',context!),
        'level': JsonConverters.toJson(level,'AutopilotLevel',context!),
        'enabled': enabled,
        'identifier': identifier,
        'choicePageOptions': choicePageOptions
    };

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

TypeContext _ctx = TypeContext(library: 'geniuslink_api_zane.dev.platform.georiot.com', types: <String, TypeInfo> {
    'PostAutopilotOptionsResponse': TypeInfo(TypeOf.Class, create:() => PostAutopilotOptionsResponse()),
    'AutopilotFrequency': TypeInfo(TypeOf.Enum, enumValues:AutopilotFrequency.values),
    'AutopilotLevel': TypeInfo(TypeOf.Enum, enumValues:AutopilotLevel.values),
    'PostAutopilotOptionsRequest': TypeInfo(TypeOf.Class, create:() => PostAutopilotOptionsRequest()),
});

Dart PostAutopilotOptionsRequest 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 /v4/autopilot-options HTTP/1.1 
Host: geniuslink-api-zane.dev.platform.georiot.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	frequency: Daily,
	level: ShortLink,
	enabled: False,
	identifier: String,
	choicePageOptions: 
	{
		String: String
	}
}
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
}