| POST | /v4/autopilot-options |
|---|
import Foundation
import ServiceStack
// @DataContract
public class PostAutopilotOptionsRequest : IPostAutopilotOptionsRequest, Codable
{
// @DataMember(Name="frequency")
// @ApiMember(IsRequired=true, Name="frequency")
public var frequency:AutopilotFrequency?
// @DataMember(Name="level")
// @ApiMember(IsRequired=true, Name="level")
public var level:AutopilotLevel?
// @DataMember(Name="enabled")
// @ApiMember(Name="enabled")
public var enabled:Bool
// @DataMember(Name="identifier")
// @ApiMember(IsRequired=true, Name="identifier")
public var identifier:String
// @DataMember(Name="choicePageOptions")
// @ApiMember(IsRequired=true, Name="choicePageOptions")
public var choicePageOptions:[String:String] = [:]
required public init(){}
}
public enum AutopilotFrequency : String, Codable
{
case Daily
case Hourly
case Once
}
public enum AutopilotLevel : String, Codable
{
case ShortLink
case Group
case Account
}
// @DataContract
public class PostAutopilotOptionsResponse : IPostAutopilotOptionsResponse, Codable
{
// @DataMember(Name="responseStatus")
public var responseStatus:ResponseStatus
// @DataMember(Name="success")
public var success:Bool
required public init(){}
}
Swift PostAutopilotOptionsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
Content-Type: application/json
Content-Length: length
{"frequency":"Daily","level":"ShortLink","enabled":false,"identifier":"String","choicePageOptions":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
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}