ShortlinksAPI

<back to all web services

PostAutopilotOptionsRequest

Requires Authentication
The following routes are available for this service:
POST/v4/autopilot-options
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ShortlinksAPI.ServiceModel.V4.Requests;
using Geniuslink.Shortlinks.Contracts.Autopilot;
using ShortlinksAPI.ServiceModel.V4.Responses;

namespace Geniuslink.Shortlinks.Contracts.Autopilot
{
    public enum AutopilotFrequency
    {
        Daily,
        Hourly,
        Once,
    }

    public enum AutopilotLevel
    {
        ShortLink,
        Group,
        Account,
    }

}

namespace ShortlinksAPI.ServiceModel.V4.Requests
{
    [DataContract]
    public partial class PostAutopilotOptionsRequest
        : IPostAutopilotOptionsRequest
    {
        [DataMember(Name="frequency")]
        [ApiMember(IsRequired=true, Name="frequency")]
        public virtual AutopilotFrequency? Frequency { get; set; }

        [DataMember(Name="level")]
        [ApiMember(IsRequired=true, Name="level")]
        public virtual AutopilotLevel? Level { get; set; }

        [DataMember(Name="enabled")]
        [ApiMember(Name="enabled")]
        public virtual bool Enabled { get; set; }

        [DataMember(Name="identifier")]
        [ApiMember(IsRequired=true, Name="identifier")]
        public virtual string Identifier { get; set; }

        [DataMember(Name="choicePageOptions")]
        [ApiMember(IsRequired=true, Name="choicePageOptions")]
        public virtual Dictionary<string, string> ChoicePageOptions { get; set; } = new();
    }

}

namespace ShortlinksAPI.ServiceModel.V4.Responses
{
    [DataContract]
    public partial class PostAutopilotOptionsResponse
        : IPostAutopilotOptionsResponse
    {
        [DataMember(Name="responseStatus")]
        public virtual ResponseStatus ResponseStatus { get; set; }

        [DataMember(Name="success")]
        public virtual bool Success { get; set; }
    }

}

C# 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: shortlinks-api.qa.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
}