Booklinker.API

<back to all web services

GetAffiliateTokensRequest

Requires Authentication
The following routes are available for this service:
GET/v1/affiliate-tokens
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    @DataContract
    public static class GetAffiliateTokensRequest
    {
        
    }

    @DataContract
    public static class GetAffiliateTokensResponse
    {
        @DataMember(Name="affiliatePrograms")
        @SerializedName("affiliatePrograms")
        public ArrayList<AffiliateTokens> affiliatePrograms = null;

        @DataMember(Name="responseStatus")
        @SerializedName("responseStatus")
        public ResponseStatus responseStatus = null;
        
        public ArrayList<AffiliateTokens> getAffiliatePrograms() { return affiliatePrograms; }
        public GetAffiliateTokensResponse setAffiliatePrograms(ArrayList<AffiliateTokens> value) { this.affiliatePrograms = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public GetAffiliateTokensResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

    @DataContract
    public static class AffiliateTokens
    {
        @DataMember(Name="guid")
        @SerializedName("guid")
        public UUID guid = null;

        @DataMember(Name="programGuid")
        @SerializedName("programGuid")
        public UUID programGuid = null;

        @DataMember(Name="affiliateTokens")
        @SerializedName("affiliateTokens")
        public HashMap<String,String> tokens = null;
        
        public UUID getGuid() { return guid; }
        public AffiliateTokens setGuid(UUID value) { this.guid = value; return this; }
        public UUID getProgramGuid() { return programGuid; }
        public AffiliateTokens setProgramGuid(UUID value) { this.programGuid = value; return this; }
        public HashMap<String,String> getTokens() { return tokens; }
        public AffiliateTokens setTokens(HashMap<String,String> value) { this.tokens = value; return this; }
    }

}

Java GetAffiliateTokensRequest 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.

GET /v1/affiliate-tokens HTTP/1.1 
Host: api.booklinker.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	affiliatePrograms: 
	[
		{
			affiliateTokens: 
			{
				String: String
			}
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}