POST | /v1/product-matching-callback |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class PostProductMatchingCallbackRequest
{
var matchedProducts:ArrayList<ProductMatch> = ArrayList<ProductMatch>()
var request:HashMap<String,String> = HashMap<String,String>()
}
@DataContract
open class ProductMatch : IProductMatch
{
@DataMember(Name="retailerGuid")
@SerializedName("retailerGuid")
var retailerGuid:UUID? = null
@DataMember(Name="retailerName")
@SerializedName("retailerName")
var retailerName:String? = null
@DataMember(Name="brand")
@SerializedName("brand")
var brand:String? = null
@DataMember(Name="productName")
@SerializedName("productName")
var productName:String? = null
@DataMember(Name="description")
@SerializedName("description")
var description:String? = null
@DataMember(Name="sku")
@SerializedName("sku")
var sku:String? = null
@DataMember(Name="gtin")
@SerializedName("gtin")
var gtin:String? = null
@DataMember(Name="ean8")
@SerializedName("ean8")
var eaN8:String? = null
@DataMember(Name="ean13")
@SerializedName("ean13")
var eaN13:String? = null
@DataMember(Name="isbn")
@SerializedName("isbn")
var isbn:String? = null
@DataMember(Name="upc")
@SerializedName("upc")
var upc:String? = null
@DataMember(Name="productImageUrl")
@SerializedName("productImageUrl")
var productImageUrl:Uri? = null
@DataMember(Name="productUrl")
@SerializedName("productUrl")
var productUrl:Uri? = null
@DataMember(Name="auditResult")
@SerializedName("auditResult")
var auditResult:String? = null
@DataMember(Name="auditResultReasons")
@SerializedName("auditResultReasons")
var auditResultReasons:ArrayList<String> = ArrayList<String>()
}
open class PostProductMatchingCallbackResponse
{
var responseStatus:ResponseStatus? = null
}
Kotlin PostProductMatchingCallbackRequest 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/product-matching-callback HTTP/1.1
Host: product-matching-api.kit.co
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"matchedProducts":[{"retailerGuid":"00000000000000000000000000000000","retailerName":"String","brand":"String","productName":"String","description":"String","sku":"String","gtin":"String","ean8":"String","ean13":"String","isbn":"String","upc":"String","auditResult":"String","auditResultReasons":["String"]}]}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}