| POST | /v1/links/pending |
|---|
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 PostPendingLinkRequest
{
@DataMember(Name="token")
@SerializedName("token")
@ApiMember(IsRequired=true, Name="token")
open var token:String? = null
}
@DataContract
open class PostPendingLinkResponse
{
@DataMember(Name="url")
@SerializedName("url")
open var url:String? = null
@DataMember(Name="productMetadata")
@SerializedName("productMetadata")
open var productMetadata:ProductMetadata? = null
@DataMember(Name="domain")
@SerializedName("domain")
open var domain:String? = null
@DataMember(Name="code")
@SerializedName("code")
open var code:String? = null
@DataMember(Name="baseDomain")
@SerializedName("baseDomain")
open var baseDomain:String? = null
@DataMember(Name="baseCode")
@SerializedName("baseCode")
open var baseCode:String? = 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 PostPendingLinkRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/links/pending HTTP/1.1
Host: api.booklinker.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"token":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"url":"String","productMetadata":{"title":"String","author":"String","description":"String","retailer":"String"},"domain":"String","code":"String","baseDomain":"String","baseCode":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}