| GET | /v1/shortlink/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 GetShortLinkMetadataRequest
{
@DataMember(Name="domain")
@SerializedName("domain")
open var aliasDomain:String? = null
@DataMember(Name="code")
@SerializedName("code")
open var aliasCode:String? = null
}
@DataContract
open class GetShortLinkMetadataResponse
{
@DataMember(Name="baseCode")
@SerializedName("baseCode")
open var baseCode:String? = null
@DataMember(Name="domain")
@SerializedName("domain")
open var domain:String? = null
@DataMember(Name="code")
@SerializedName("code")
open var code:String? = null
@DataMember(Name="productMetadata")
@SerializedName("productMetadata")
open var productMetadata:ProductMetadata? = null
@DataMember(Name="destinations")
@SerializedName("destinations")
open var destinations:ArrayList<Destination>? = 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
}
@DataContract
open class Destination
{
@DataMember(Name="isSuggestion")
@SerializedName("isSuggestion")
open var isSuggestion:Boolean? = null
@DataMember(Name="isAutoSuggestion")
@SerializedName("isAutoSuggestion")
open var isAutoSuggestion:Boolean? = null
@DataMember(Name="destinationUrl")
@SerializedName("destinationUrl")
open var destinationUrl:String? = null
@DataMember(Name="replacementButton")
@SerializedName("replacementButton")
open var replacementButton:String? = null
}
Kotlin GetShortLinkMetadataRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/shortlink/metadata HTTP/1.1 Host: api.booklinker.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"baseCode":"String","domain":"String","code":"String","productMetadata":{"title":"String","author":"String","description":"String","retailer":"String"},"destinations":[{"isSuggestion":false,"isAutoSuggestion":false,"destinationUrl":"String","replacementButton":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}