POST | /v1/product-matching-callback |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ProductMatching.API.ServiceModel.V1.ProductMatching
Imports ProductMatching.API.ServiceModel.DTOs
Namespace Global
Namespace ProductMatching.API.ServiceModel.DTOs
<DataContract>
Public Partial Class ProductMatch
Implements IProductMatch
Public Sub New()
AuditResultReasons = New List(Of String)
End Sub
<DataMember(Name:="retailerGuid")>
Public Overridable Property RetailerGuid As Guid
<DataMember(Name:="retailerName")>
Public Overridable Property RetailerName As String
<DataMember(Name:="brand")>
Public Overridable Property Brand As String
<DataMember(Name:="productName")>
Public Overridable Property ProductName As String
<DataMember(Name:="description")>
Public Overridable Property Description As String
<DataMember(Name:="sku")>
Public Overridable Property SKU As String
<DataMember(Name:="gtin")>
Public Overridable Property GTIN As String
<DataMember(Name:="ean8")>
Public Overridable Property EAN8 As String
<DataMember(Name:="ean13")>
Public Overridable Property EAN13 As String
<DataMember(Name:="isbn")>
Public Overridable Property ISBN As String
<DataMember(Name:="upc")>
Public Overridable Property UPC As String
<DataMember(Name:="productImageUrl")>
Public Overridable Property ProductImageUrl As Uri
<DataMember(Name:="productUrl")>
Public Overridable Property ProductUrl As Uri
<DataMember(Name:="auditResult")>
Public Overridable Property AuditResult As String
<DataMember(Name:="auditResultReasons")>
Public Overridable Property AuditResultReasons As List(Of String)
End Class
End Namespace
Namespace ProductMatching.API.ServiceModel.V1.ProductMatching
Public Partial Class PostProductMatchingCallbackRequest
Public Sub New()
MatchedProducts = New List(Of ProductMatch)
End Sub
Public Overridable Property MatchedProducts As List(Of ProductMatch)
Public Overridable Property Request As IDictionary(Of String, String)
End Class
Public Partial Class PostProductMatchingCallbackResponse
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET PostProductMatchingCallbackRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
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/jsv Content-Length: length { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }