GeniuslinkAPI

<back to all web services

GetProductMatchesByUrlRequest

Requires Authentication
The following routes are available for this service:
GET/v3.5/product/matches
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 GetProductMatchesByUrlRequest : IGetProductMatchesByUrlRequest
{
    @DataMember(Name="url")
    @SerializedName("url")
    override var url:String? = null

    @DataMember(Name="includeRaw")
    @SerializedName("includeRaw")
    override var includeRaw:Boolean? = null
}

open class GetProductMatchesByUrlResponse : IGetProductMatchesByUrlResponse
{
    override var products:ArrayList<ProductMetadata>? = null
    open var responseStatus:ResponseStatus? = null
}

@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

    @DataMember(Name="rawAttributes")
    @SerializedName("rawAttributes")
    open var rawAttributes:MatchResult? = null
}

@DataContract
open class MatchResult
{
    @DataMember(Name="retailer")
    @SerializedName("retailer")
    open var retailer:String? = null

    @DataMember(Name="retailerGuid")
    @SerializedName("retailerGuid")
    open var retailerGuid:UUID? = null

    @DataMember(Name="storefront")
    @SerializedName("storefront")
    open var storefront:String? = null

    @DataMember(Name="storefrontIso2")
    @SerializedName("storefrontIso2")
    open var storefrontIso2:String? = null

    @DataMember(Name="storefrontGuid")
    @SerializedName("storefrontGuid")
    open var storefrontGuid:UUID? = null

    @DataMember(Name="data")
    @SerializedName("data")
    open var Data:ProductData? = null

    @DataMember(Name="errors")
    @SerializedName("errors")
    open var errors:ArrayList<MatchError>? = null

    @DataMember(Name="matchAccuracy")
    @SerializedName("matchAccuracy")
    open var matchAccuracy:String? = null

    @DataMember(Name="matchingRuleName")
    @SerializedName("matchingRuleName")
    open var matchingRuleName:String? = null

    @DataMember(Name="dataSource")
    @SerializedName("dataSource")
    open var dataSource:String? = null
}

@DataContract
open class ProductData
{
    @DataMember(Name="attributes", EmitDefaultValue=false)
    @SerializedName("attributes")
    open var attributes:ProductAttributes? = null

    @DataMember(Name="retailerSpecificAttributes", EmitDefaultValue=false)
    @SerializedName("retailerSpecificAttributes")
    open var retailerSpecificAttributes:RetailerSpecificAttributes? = null

    @DataMember(Name="rawSourceData", EmitDefaultValue=false)
    @SerializedName("rawSourceData")
    open var rawSourceData:String? = null
}

@DataContract
open class ProductAttributes
{
    @DataMember(Name="retailer", EmitDefaultValue=false)
    @SerializedName("retailer")
    open var retailer:String? = null

    @DataMember(Name="retailerGuid", EmitDefaultValue=false)
    @SerializedName("retailerGuid")
    open var retailerGuid:UUID? = null

    @DataMember(Name="storefront", EmitDefaultValue=false)
    @SerializedName("storefront")
    open var storefront:String? = null

    @DataMember(Name="storefrontIso2", EmitDefaultValue=false)
    @SerializedName("storefrontIso2")
    open var storefrontIso2:String? = null

    @DataMember(Name="storefrontGuid", EmitDefaultValue=false)
    @SerializedName("storefrontGuid")
    open var storefrontGuid:UUID? = null

    @DataMember(Name="category", EmitDefaultValue=false)
    @SerializedName("category")
    open var category:String? = null

    @DataMember(Name="categoryGuid", EmitDefaultValue=false)
    @SerializedName("categoryGuid")
    open var categoryGuid:UUID? = null

    @DataMember(Name="brand", EmitDefaultValue=false)
    @SerializedName("brand")
    open var brand:String? = null

    @DataMember(Name="brandGuid", EmitDefaultValue=false)
    @SerializedName("brandGuid")
    open var brandGuid:UUID? = null

    @DataMember(Name="manufacturer", EmitDefaultValue=false)
    @SerializedName("manufacturer")
    open var manufacturer:String? = null

    @DataMember(Name="manufacturerGuid", EmitDefaultValue=false)
    @SerializedName("manufacturerGuid")
    open var manufacturerGuid:UUID? = null

    @DataMember(Name="identifiers", EmitDefaultValue=false)
    @SerializedName("identifiers")
    open var identifiers:ProductIdentifiers? = null

    @DataMember(Name="itemAttributes", EmitDefaultValue=false)
    @SerializedName("itemAttributes")
    open var itemAttributes:ItemAttributes? = null
}

@DataContract
open class ProductIdentifiers
{
    @DataMember(Name="productGuid", EmitDefaultValue=false)
    @SerializedName("productGuid")
    open var productGuid:UUID? = null

    @DataMember(Name="gtins", EmitDefaultValue=false)
    @SerializedName("gtins")
    open var gtins:ArrayList<String>? = null

    @DataMember(Name="mpns", EmitDefaultValue=false)
    @SerializedName("mpns")
    open var mpns:ArrayList<String>? = null

    @DataMember(Name="ean8", EmitDefaultValue=false)
    @SerializedName("ean8")
    open var ean8:ArrayList<String>? = null

    @DataMember(Name="ean13", EmitDefaultValue=false)
    @SerializedName("ean13")
    open var ean13:ArrayList<String>? = null

    @DataMember(Name="isbn9", EmitDefaultValue=false)
    @SerializedName("isbn9")
    open var isbn9:ArrayList<String>? = null

    @DataMember(Name="isbn10", EmitDefaultValue=false)
    @SerializedName("isbn10")
    open var isbn10:ArrayList<String>? = null

    @DataMember(Name="isbn13", EmitDefaultValue=false)
    @SerializedName("isbn13")
    open var isbn13:ArrayList<String>? = null

    @DataMember(Name="itf14", EmitDefaultValue=false)
    @SerializedName("itf14")
    open var itF14:ArrayList<String>? = null

    @DataMember(Name="upc12", EmitDefaultValue=false)
    @SerializedName("upc12")
    open var upc12:ArrayList<String>? = null
}

@DataContract
open class ItemAttributes
{
    @DataMember(Name="book", EmitDefaultValue=false)
    @SerializedName("book")
    open var book:BookAttributes? = null

    @DataMember(Name="audiobook", EmitDefaultValue=false)
    @SerializedName("audiobook")
    open var audiobook:AudiobookAttributes? = null

    @DataMember(Name="ebook", EmitDefaultValue=false)
    @SerializedName("ebook")
    open var eBook:EBookAttributes? = null
}

@DataContract
open class BookAttributes
{
    @DataMember(Name="authors", EmitDefaultValue=false)
    @SerializedName("authors")
    open var authors:ArrayList<String>? = null
}

@DataContract
open class AudiobookAttributes : BookAttributes()
{
}

@DataContract
open class EBookAttributes : BookAttributes()
{
}

@DataContract
open class RetailerSpecificAttributes
{
    @DataMember(Name="name", EmitDefaultValue=false)
    @SerializedName("name")
    open var name:String? = null

    @DataMember(Name="description", EmitDefaultValue=false)
    @SerializedName("description")
    open var description:String? = null

    @DataMember(Name="skus", EmitDefaultValue=false)
    @SerializedName("skus")
    open var skus:ArrayList<String>? = null

    @DataMember(Name="asin", EmitDefaultValue=false)
    @SerializedName("asin")
    open var asin:String? = null

    @DataMember(Name="url", EmitDefaultValue=false)
    @SerializedName("url")
    open var url:Uri? = null

    @DataMember(Name="productImages", EmitDefaultValue=false)
    @SerializedName("productImages")
    open var productImages:HashMap<String,Uri>? = null

    @DataMember(Name="additionalData", EmitDefaultValue=false)
    @SerializedName("additionalData")
    open var additionalData:HashMap<String,String>? = null
}

@DataContract
open class MatchError
{
    @DataMember(Name="message")
    @SerializedName("message")
    open var message:String? = null

    @DataMember(Name="error")
    @SerializedName("error")
    open var code:ErrorCode? = null
}

enum class ErrorCode
{
    Throttled,
    TargetRetailerProductNotFound,
    Unknown,
    NullMatchResult,
    NullSourceData,
    SourceDataProcessingFailure,
    LocalizationFailure,
}

Kotlin GetProductMatchesByUrlRequest DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v3.5/product/matches HTTP/1.1 
Host: geniuslink-api-zane.dev.platform.georiot.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetProductMatchesByUrlResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeniuslinkAPI.ServiceModel.V4.Products.Responses">
  <Products xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs" i:nil="true" />
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GetProductMatchesByUrlResponse>