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.*;

public class dtos
{

    @DataContract
    public static class GetProductMatchesByUrlRequest implements IGetProductMatchesByUrlRequest
    {
        @DataMember(Name="url")
        @SerializedName("url")
        public String url = null;

        @DataMember(Name="includeRaw")
        @SerializedName("includeRaw")
        public Boolean includeRaw = null;
        
        public String getUrl() { return url; }
        public GetProductMatchesByUrlRequest setUrl(String value) { this.url = value; return this; }
        public Boolean isIncludeRaw() { return includeRaw; }
        public GetProductMatchesByUrlRequest setIncludeRaw(Boolean value) { this.includeRaw = value; return this; }
    }

    public static class GetProductMatchesByUrlResponse implements IGetProductMatchesByUrlResponse
    {
        public ArrayList<ProductMetadata> products = null;
        public ResponseStatus responseStatus = null;
        
        public ArrayList<ProductMetadata> getProducts() { return products; }
        public GetProductMatchesByUrlResponse setProducts(ArrayList<ProductMetadata> value) { this.products = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public GetProductMatchesByUrlResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

    @DataContract
    public static class ProductMetadata
    {
        @DataMember(Name="title")
        @SerializedName("title")
        public String title = null;

        @DataMember(Name="author")
        @SerializedName("author")
        public String author = null;

        @DataMember(Name="url")
        @SerializedName("url")
        public Uri url = null;

        @DataMember(Name="description")
        @SerializedName("description")
        public String description = null;

        @DataMember(Name="retailer")
        @SerializedName("retailer")
        public String retailer = null;

        @DataMember(Name="productImages")
        @SerializedName("productImages")
        public HashMap<String,Uri> productImages = null;

        @DataMember(Name="rawAttributes")
        @SerializedName("rawAttributes")
        public MatchResult rawAttributes = null;
        
        public String getTitle() { return title; }
        public ProductMetadata setTitle(String value) { this.title = value; return this; }
        public String getAuthor() { return author; }
        public ProductMetadata setAuthor(String value) { this.author = value; return this; }
        public Uri getUrl() { return url; }
        public ProductMetadata setUrl(Uri value) { this.url = value; return this; }
        public String getDescription() { return description; }
        public ProductMetadata setDescription(String value) { this.description = value; return this; }
        public String getRetailer() { return retailer; }
        public ProductMetadata setRetailer(String value) { this.retailer = value; return this; }
        public HashMap<String,Uri> getProductImages() { return productImages; }
        public ProductMetadata setProductImages(HashMap<String,Uri> value) { this.productImages = value; return this; }
        public MatchResult getRawAttributes() { return rawAttributes; }
        public ProductMetadata setRawAttributes(MatchResult value) { this.rawAttributes = value; return this; }
    }

    @DataContract
    public static class MatchResult
    {
        @DataMember(Name="retailer")
        @SerializedName("retailer")
        public String retailer = null;

        @DataMember(Name="retailerGuid")
        @SerializedName("retailerGuid")
        public UUID retailerGuid = null;

        @DataMember(Name="storefront")
        @SerializedName("storefront")
        public String storefront = null;

        @DataMember(Name="storefrontIso2")
        @SerializedName("storefrontIso2")
        public String storefrontIso2 = null;

        @DataMember(Name="storefrontGuid")
        @SerializedName("storefrontGuid")
        public UUID storefrontGuid = null;

        @DataMember(Name="data")
        @SerializedName("data")
        public ProductData data = null;

        @DataMember(Name="errors")
        @SerializedName("errors")
        public ArrayList<MatchError> errors = null;

        @DataMember(Name="matchAccuracy")
        @SerializedName("matchAccuracy")
        public String matchAccuracy = null;

        @DataMember(Name="matchingRuleName")
        @SerializedName("matchingRuleName")
        public String matchingRuleName = null;

        @DataMember(Name="dataSource")
        @SerializedName("dataSource")
        public String dataSource = null;
        
        public String getRetailer() { return retailer; }
        public MatchResult setRetailer(String value) { this.retailer = value; return this; }
        public UUID getRetailerGuid() { return retailerGuid; }
        public MatchResult setRetailerGuid(UUID value) { this.retailerGuid = value; return this; }
        public String getStorefront() { return storefront; }
        public MatchResult setStorefront(String value) { this.storefront = value; return this; }
        public String getStorefrontIso2() { return storefrontIso2; }
        public MatchResult setStorefrontIso2(String value) { this.storefrontIso2 = value; return this; }
        public UUID getStorefrontGuid() { return storefrontGuid; }
        public MatchResult setStorefrontGuid(UUID value) { this.storefrontGuid = value; return this; }
        public ProductData getData() { return data; }
        public MatchResult setData(ProductData value) { this.data = value; return this; }
        public ArrayList<MatchError> getErrors() { return errors; }
        public MatchResult setErrors(ArrayList<MatchError> value) { this.errors = value; return this; }
        public String getMatchAccuracy() { return matchAccuracy; }
        public MatchResult setMatchAccuracy(String value) { this.matchAccuracy = value; return this; }
        public String getMatchingRuleName() { return matchingRuleName; }
        public MatchResult setMatchingRuleName(String value) { this.matchingRuleName = value; return this; }
        public String getDataSource() { return dataSource; }
        public MatchResult setDataSource(String value) { this.dataSource = value; return this; }
    }

    @DataContract
    public static class ProductData
    {
        @DataMember(Name="attributes", EmitDefaultValue=false)
        @SerializedName("attributes")
        public ProductAttributes attributes = null;

        @DataMember(Name="retailerSpecificAttributes", EmitDefaultValue=false)
        @SerializedName("retailerSpecificAttributes")
        public RetailerSpecificAttributes retailerSpecificAttributes = null;

        @DataMember(Name="rawSourceData", EmitDefaultValue=false)
        @SerializedName("rawSourceData")
        public String rawSourceData = null;
        
        public ProductAttributes getAttributes() { return attributes; }
        public ProductData setAttributes(ProductAttributes value) { this.attributes = value; return this; }
        public RetailerSpecificAttributes getRetailerSpecificAttributes() { return retailerSpecificAttributes; }
        public ProductData setRetailerSpecificAttributes(RetailerSpecificAttributes value) { this.retailerSpecificAttributes = value; return this; }
        public String getRawSourceData() { return rawSourceData; }
        public ProductData setRawSourceData(String value) { this.rawSourceData = value; return this; }
    }

    @DataContract
    public static class ProductAttributes
    {
        @DataMember(Name="retailer", EmitDefaultValue=false)
        @SerializedName("retailer")
        public String retailer = null;

        @DataMember(Name="retailerGuid", EmitDefaultValue=false)
        @SerializedName("retailerGuid")
        public UUID retailerGuid = null;

        @DataMember(Name="storefront", EmitDefaultValue=false)
        @SerializedName("storefront")
        public String storefront = null;

        @DataMember(Name="storefrontIso2", EmitDefaultValue=false)
        @SerializedName("storefrontIso2")
        public String storefrontIso2 = null;

        @DataMember(Name="storefrontGuid", EmitDefaultValue=false)
        @SerializedName("storefrontGuid")
        public UUID storefrontGuid = null;

        @DataMember(Name="category", EmitDefaultValue=false)
        @SerializedName("category")
        public String category = null;

        @DataMember(Name="categoryGuid", EmitDefaultValue=false)
        @SerializedName("categoryGuid")
        public UUID categoryGuid = null;

        @DataMember(Name="brand", EmitDefaultValue=false)
        @SerializedName("brand")
        public String brand = null;

        @DataMember(Name="brandGuid", EmitDefaultValue=false)
        @SerializedName("brandGuid")
        public UUID brandGuid = null;

        @DataMember(Name="manufacturer", EmitDefaultValue=false)
        @SerializedName("manufacturer")
        public String manufacturer = null;

        @DataMember(Name="manufacturerGuid", EmitDefaultValue=false)
        @SerializedName("manufacturerGuid")
        public UUID manufacturerGuid = null;

        @DataMember(Name="identifiers", EmitDefaultValue=false)
        @SerializedName("identifiers")
        public ProductIdentifiers identifiers = null;

        @DataMember(Name="itemAttributes", EmitDefaultValue=false)
        @SerializedName("itemAttributes")
        public ItemAttributes itemAttributes = null;
        
        public String getRetailer() { return retailer; }
        public ProductAttributes setRetailer(String value) { this.retailer = value; return this; }
        public UUID getRetailerGuid() { return retailerGuid; }
        public ProductAttributes setRetailerGuid(UUID value) { this.retailerGuid = value; return this; }
        public String getStorefront() { return storefront; }
        public ProductAttributes setStorefront(String value) { this.storefront = value; return this; }
        public String getStorefrontIso2() { return storefrontIso2; }
        public ProductAttributes setStorefrontIso2(String value) { this.storefrontIso2 = value; return this; }
        public UUID getStorefrontGuid() { return storefrontGuid; }
        public ProductAttributes setStorefrontGuid(UUID value) { this.storefrontGuid = value; return this; }
        public String getCategory() { return category; }
        public ProductAttributes setCategory(String value) { this.category = value; return this; }
        public UUID getCategoryGuid() { return categoryGuid; }
        public ProductAttributes setCategoryGuid(UUID value) { this.categoryGuid = value; return this; }
        public String getBrand() { return brand; }
        public ProductAttributes setBrand(String value) { this.brand = value; return this; }
        public UUID getBrandGuid() { return brandGuid; }
        public ProductAttributes setBrandGuid(UUID value) { this.brandGuid = value; return this; }
        public String getManufacturer() { return manufacturer; }
        public ProductAttributes setManufacturer(String value) { this.manufacturer = value; return this; }
        public UUID getManufacturerGuid() { return manufacturerGuid; }
        public ProductAttributes setManufacturerGuid(UUID value) { this.manufacturerGuid = value; return this; }
        public ProductIdentifiers getIdentifiers() { return identifiers; }
        public ProductAttributes setIdentifiers(ProductIdentifiers value) { this.identifiers = value; return this; }
        public ItemAttributes getItemAttributes() { return itemAttributes; }
        public ProductAttributes setItemAttributes(ItemAttributes value) { this.itemAttributes = value; return this; }
    }

    @DataContract
    public static class ProductIdentifiers
    {
        @DataMember(Name="productGuid", EmitDefaultValue=false)
        @SerializedName("productGuid")
        public UUID productGuid = null;

        @DataMember(Name="gtins", EmitDefaultValue=false)
        @SerializedName("gtins")
        public ArrayList<String> gtins = null;

        @DataMember(Name="mpns", EmitDefaultValue=false)
        @SerializedName("mpns")
        public ArrayList<String> mpns = null;

        @DataMember(Name="ean8", EmitDefaultValue=false)
        @SerializedName("ean8")
        public ArrayList<String> ean8 = null;

        @DataMember(Name="ean13", EmitDefaultValue=false)
        @SerializedName("ean13")
        public ArrayList<String> ean13 = null;

        @DataMember(Name="isbn9", EmitDefaultValue=false)
        @SerializedName("isbn9")
        public ArrayList<String> isbn9 = null;

        @DataMember(Name="isbn10", EmitDefaultValue=false)
        @SerializedName("isbn10")
        public ArrayList<String> isbn10 = null;

        @DataMember(Name="isbn13", EmitDefaultValue=false)
        @SerializedName("isbn13")
        public ArrayList<String> isbn13 = null;

        @DataMember(Name="itf14", EmitDefaultValue=false)
        @SerializedName("itf14")
        public ArrayList<String> itF14 = null;

        @DataMember(Name="upc12", EmitDefaultValue=false)
        @SerializedName("upc12")
        public ArrayList<String> upc12 = null;
        
        public UUID getProductGuid() { return productGuid; }
        public ProductIdentifiers setProductGuid(UUID value) { this.productGuid = value; return this; }
        public ArrayList<String> getGtins() { return gtins; }
        public ProductIdentifiers setGtins(ArrayList<String> value) { this.gtins = value; return this; }
        public ArrayList<String> getMpns() { return mpns; }
        public ProductIdentifiers setMpns(ArrayList<String> value) { this.mpns = value; return this; }
        public ArrayList<String> getEan8() { return ean8; }
        public ProductIdentifiers setEan8(ArrayList<String> value) { this.ean8 = value; return this; }
        public ArrayList<String> getEan13() { return ean13; }
        public ProductIdentifiers setEan13(ArrayList<String> value) { this.ean13 = value; return this; }
        public ArrayList<String> getIsbn9() { return isbn9; }
        public ProductIdentifiers setIsbn9(ArrayList<String> value) { this.isbn9 = value; return this; }
        public ArrayList<String> getIsbn10() { return isbn10; }
        public ProductIdentifiers setIsbn10(ArrayList<String> value) { this.isbn10 = value; return this; }
        public ArrayList<String> getIsbn13() { return isbn13; }
        public ProductIdentifiers setIsbn13(ArrayList<String> value) { this.isbn13 = value; return this; }
        public ArrayList<String> getItF14() { return itF14; }
        public ProductIdentifiers setItF14(ArrayList<String> value) { this.itF14 = value; return this; }
        public ArrayList<String> getUpc12() { return upc12; }
        public ProductIdentifiers setUpc12(ArrayList<String> value) { this.upc12 = value; return this; }
    }

    @DataContract
    public static class ItemAttributes
    {
        @DataMember(Name="book", EmitDefaultValue=false)
        @SerializedName("book")
        public BookAttributes book = null;

        @DataMember(Name="audiobook", EmitDefaultValue=false)
        @SerializedName("audiobook")
        public AudiobookAttributes audiobook = null;

        @DataMember(Name="ebook", EmitDefaultValue=false)
        @SerializedName("ebook")
        public EBookAttributes eBook = null;
        
        public BookAttributes getBook() { return book; }
        public ItemAttributes setBook(BookAttributes value) { this.book = value; return this; }
        public AudiobookAttributes getAudiobook() { return audiobook; }
        public ItemAttributes setAudiobook(AudiobookAttributes value) { this.audiobook = value; return this; }
        public EBookAttributes getEBook() { return eBook; }
        public ItemAttributes setEBook(EBookAttributes value) { this.eBook = value; return this; }
    }

    @DataContract
    public static class BookAttributes
    {
        @DataMember(Name="authors", EmitDefaultValue=false)
        @SerializedName("authors")
        public ArrayList<String> authors = null;
        
        public ArrayList<String> getAuthors() { return authors; }
        public BookAttributes setAuthors(ArrayList<String> value) { this.authors = value; return this; }
    }

    @DataContract
    public static class AudiobookAttributes extends BookAttributes
    {
        
    }

    @DataContract
    public static class EBookAttributes extends BookAttributes
    {
        
    }

    @DataContract
    public static class RetailerSpecificAttributes
    {
        @DataMember(Name="name", EmitDefaultValue=false)
        @SerializedName("name")
        public String name = null;

        @DataMember(Name="description", EmitDefaultValue=false)
        @SerializedName("description")
        public String description = null;

        @DataMember(Name="skus", EmitDefaultValue=false)
        @SerializedName("skus")
        public ArrayList<String> skus = null;

        @DataMember(Name="asin", EmitDefaultValue=false)
        @SerializedName("asin")
        public String asin = null;

        @DataMember(Name="url", EmitDefaultValue=false)
        @SerializedName("url")
        public Uri url = null;

        @DataMember(Name="productImages", EmitDefaultValue=false)
        @SerializedName("productImages")
        public HashMap<String,Uri> productImages = null;

        @DataMember(Name="additionalData", EmitDefaultValue=false)
        @SerializedName("additionalData")
        public HashMap<String,String> additionalData = null;
        
        public String getName() { return name; }
        public RetailerSpecificAttributes setName(String value) { this.name = value; return this; }
        public String getDescription() { return description; }
        public RetailerSpecificAttributes setDescription(String value) { this.description = value; return this; }
        public ArrayList<String> getSkus() { return skus; }
        public RetailerSpecificAttributes setSkus(ArrayList<String> value) { this.skus = value; return this; }
        public String getAsin() { return asin; }
        public RetailerSpecificAttributes setAsin(String value) { this.asin = value; return this; }
        public Uri getUrl() { return url; }
        public RetailerSpecificAttributes setUrl(Uri value) { this.url = value; return this; }
        public HashMap<String,Uri> getProductImages() { return productImages; }
        public RetailerSpecificAttributes setProductImages(HashMap<String,Uri> value) { this.productImages = value; return this; }
        public HashMap<String,String> getAdditionalData() { return additionalData; }
        public RetailerSpecificAttributes setAdditionalData(HashMap<String,String> value) { this.additionalData = value; return this; }
    }

    @DataContract
    public static class MatchError
    {
        @DataMember(Name="message")
        @SerializedName("message")
        public String message = null;

        @DataMember(Name="error")
        @SerializedName("error")
        public ErrorCode code = null;
        
        public String getMessage() { return message; }
        public MatchError setMessage(String value) { this.message = value; return this; }
        public ErrorCode getCode() { return code; }
        public MatchError setCode(ErrorCode value) { this.code = value; return this; }
    }

    public static enum ErrorCode
    {
        Throttled,
        TargetRetailerProductNotFound,
        Unknown,
        NullMatchResult,
        NullSourceData,
        SourceDataProcessingFailure,
        LocalizationFailure;
    }

}

Java 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>