Booklinker.API

<back to all web services

GetProductMetadataRequest

The following routes are available for this service:
GET/v1/product/metadata
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@DataContract
open class GetProductMetadataRequest
{
    @DataMember(Name="url")
    @SerializedName("url")
    @ApiMember(IsRequired=true)
    open var url:String? = null
}

@DataContract
open class GetProductMetadataResponse
{
    @DataMember(Name="productMetadata")
    @SerializedName("productMetadata")
    open var productMetadata:ProductMetadata? = null

    @DataMember(Name="isSupported")
    @SerializedName("isSupported")
    open var isSupported:Boolean? = null

    @DataMember(Name="responseStatus")
    @SerializedName("responseStatus")
    open var responseStatus:ResponseStatus? = null
}

@DataContract
open class ProductMetadata : ProductMetadata()
{
}

@DataContract
open class ProductMetadata
{
    @DataMember(Name="title")
    @SerializedName("title")
    open var title:String? = null

    @DataMember(Name="author")
    @SerializedName("author")
    open var author:String? = null

    @DataMember(Name="url")
    @SerializedName("url")
    open var url:Uri? = null

    @DataMember(Name="description")
    @SerializedName("description")
    open var description:String? = null

    @DataMember(Name="retailer")
    @SerializedName("retailer")
    open var retailer:String? = null

    @DataMember(Name="productImages")
    @SerializedName("productImages")
    open var productImages:HashMap<String,Uri>? = null
}

Kotlin GetProductMetadataRequest 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/product/metadata HTTP/1.1 
Host: api.booklinker.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	productMetadata: 
	{
		title: String,
		author: String,
		description: String,
		retailer: String
	},
	isSupported: False,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}