Booklinker.API

<back to all web services

GetAffiliateTokensRequest

Requires Authentication
The following routes are available for this service:
GET/v1/affiliate-tokens
import Foundation
import ServiceStack

// @DataContract
public class GetAffiliateTokensRequest : Codable
{
    required public init(){}
}

// @DataContract
public class GetAffiliateTokensResponse : Codable
{
    // @DataMember(Name="affiliatePrograms")
    public var affiliatePrograms:[AffiliateTokens]

    // @DataMember(Name="responseStatus")
    public var responseStatus:ResponseStatus

    required public init(){}
}

// @DataContract
public class AffiliateTokens : Codable
{
    // @DataMember(Name="guid")
    public var guid:String

    // @DataMember(Name="programGuid")
    public var programGuid:String

    // @DataMember(Name="affiliateTokens")
    public var affiliateTokens:[String:String]

    required public init(){}
}


Swift GetAffiliateTokensRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}}}