ProductMatching.API

<back to all web services

PostProductMatchingCallbackRequest

Requires Authentication
The following routes are available for this service:
POST/v1/product-matching-callback
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ProductMatching.API.ServiceModel.V1.ProductMatching;
using ProductMatching.API.ServiceModel.DTOs;

namespace ProductMatching.API.ServiceModel.DTOs
{
    [DataContract]
    public partial class ProductMatch
        : IProductMatch
    {
        public ProductMatch()
        {
            AuditResultReasons = new List<string>{};
        }

        [DataMember(Name="retailerGuid")]
        public virtual Guid RetailerGuid { get; set; }

        [DataMember(Name="retailerName")]
        public virtual string RetailerName { get; set; }

        [DataMember(Name="brand")]
        public virtual string Brand { get; set; }

        [DataMember(Name="productName")]
        public virtual string ProductName { get; set; }

        [DataMember(Name="description")]
        public virtual string Description { get; set; }

        [DataMember(Name="sku")]
        public virtual string SKU { get; set; }

        [DataMember(Name="gtin")]
        public virtual string GTIN { get; set; }

        [DataMember(Name="ean8")]
        public virtual string EAN8 { get; set; }

        [DataMember(Name="ean13")]
        public virtual string EAN13 { get; set; }

        [DataMember(Name="isbn")]
        public virtual string ISBN { get; set; }

        [DataMember(Name="upc")]
        public virtual string UPC { get; set; }

        [DataMember(Name="productImageUrl")]
        public virtual Uri ProductImageUrl { get; set; }

        [DataMember(Name="productUrl")]
        public virtual Uri ProductUrl { get; set; }

        [DataMember(Name="auditResult")]
        public virtual string AuditResult { get; set; }

        [DataMember(Name="auditResultReasons")]
        public virtual List<string> AuditResultReasons { get; set; }
    }

}

namespace ProductMatching.API.ServiceModel.V1.ProductMatching
{
    public partial class PostProductMatchingCallbackRequest
    {
        public PostProductMatchingCallbackRequest()
        {
            MatchedProducts = new List<ProductMatch>{};
        }

        public virtual List<ProductMatch> MatchedProducts { get; set; }
        public virtual IDictionary<string, string> Request { get; set; }
    }

    public partial class PostProductMatchingCallbackResponse
    {
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# PostProductMatchingCallbackRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + 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
		}
	}
}