Booklinker.API

<back to all web services

SignUpRequest

The following routes are available for this service:
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(){}
}


Swift SignUpRequest 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 /v1/signup HTTP/1.1 
Host: api.booklinker.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	email: String,
	url: String,
	domain: String,
	code: String,
	affiliateParameters: 
	{
		String: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
		}
	}
}