| POST | /v1/signup |
|---|
import Foundation
import ServiceStack
// @DataContract
public class SignUpRequest : Codable
{
// @DataMember(Name="email")
// @ApiMember(IsRequired=true, Name="email")
public var email:String
// @DataMember(Name="url")
// @ApiMember(IsRequired=true, Name="url")
public var url:String
// @DataMember(Name="domain")
public var domain:String
// @DataMember(Name="code")
public var code:String
// @DataMember(Name="affiliateProgramGuid")
public var affiliateProgramGuid:String
// @DataMember(Name="affiliateParameters")
public var affiliateParameters:[String:String]
required public init(){}
}
// @DataContract
public class SignUpResponse : Codable
{
// @DataMember(Name="success")
public var success:Bool
// @DataMember(Name="hasAccount")
public var hasAccount:Bool
// @DataMember(Name="accountConfirmed")
public var accountConfirmed:Bool
// @DataMember(Name="responseStatus")
public var responseStatus:ResponseStatus
required public init(){}
}
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 /v1/signup HTTP/1.1
Host: api.booklinker.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"email":"String","url":"String","domain":"String","code":"String","affiliateParameters":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"success":false,"hasAccount":false,"accountConfirmed":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}