POST | /v1/product-matching-callback |
---|
import Foundation
import ServiceStack
public class PostProductMatchingCallbackRequest : Codable
{
public var matchedProducts:[ProductMatch] = []
public var request:[String:String] = [:]
required public init(){}
}
// @DataContract
public class ProductMatch : IProductMatch, Codable
{
// @DataMember(Name="retailerGuid")
public var retailerGuid:String?
// @DataMember(Name="retailerName")
public var retailerName:String?
// @DataMember(Name="brand")
public var brand:String?
// @DataMember(Name="productName")
public var productName:String?
// @DataMember(Name="description")
public var Description:String?
// @DataMember(Name="sku")
public var sku:String?
// @DataMember(Name="gtin")
public var gtin:String?
// @DataMember(Name="ean8")
public var eaN8:String?
// @DataMember(Name="ean13")
public var eaN13:String?
// @DataMember(Name="isbn")
public var isbn:String?
// @DataMember(Name="upc")
public var upc:String?
// @DataMember(Name="productImageUrl")
public var productImageUrl:Uri?
// @DataMember(Name="productUrl")
public var productUrl:Uri?
// @DataMember(Name="auditResult")
public var auditResult:String?
// @DataMember(Name="auditResultReasons")
public var auditResultReasons:[String] = []
required public init(){}
}
public class PostProductMatchingCallbackResponse : Codable
{
public var responseStatus:ResponseStatus?
required public init(){}
}
Swift 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"}}}