GeniuslinkAPI

<back to all web services

GetProductMatchesByCriteriaRequest

Requires Authentication
The following routes are available for this service:
POST/v3.5/product/search
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
{

    public static class GetProductMatchesByCriteriaRequest implements IGetProductMatchesByCriteriaRequest
    {
        public ArrayList<ProductData> data = null;
        public ArrayList<MatchCriteria> matchCriteria = null;
        public Long maxTimeoutMs = null;
        public Boolean skipCriteriaCheck = null;
        
        public ArrayList<ProductData> getData() { return data; }
        public GetProductMatchesByCriteriaRequest setData(ArrayList<ProductData> value) { this.data = value; return this; }
        public ArrayList<MatchCriteria> getMatchCriteria() { return matchCriteria; }
        public GetProductMatchesByCriteriaRequest setMatchCriteria(ArrayList<MatchCriteria> value) { this.matchCriteria = value; return this; }
        public Long getMaxTimeoutMs() { return maxTimeoutMs; }
        public GetProductMatchesByCriteriaRequest setMaxTimeoutMs(Long value) { this.maxTimeoutMs = value; return this; }
        public Boolean isSkipCriteriaCheck() { return skipCriteriaCheck; }
        public GetProductMatchesByCriteriaRequest setSkipCriteriaCheck(Boolean value) { this.skipCriteriaCheck = 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 MatchCriteria
    {
        @DataMember(Name="retailerGuid")
        @SerializedName("retailerGuid")
        public UUID retailerGuid = null;

        @DataMember(Name="timeoutMs")
        @SerializedName("timeoutMs")
        public Long timeoutMs = null;

        @DataMember(Name="countryIso2s")
        @SerializedName("countryIso2s")
        public ArrayList<String> countryIso2s = null;

        @DataMember(Name="maxStalenessMs")
        @SerializedName("maxStalenessMs")
        public BigInteger maxStalenessMs = null;

        @DataMember(Name="targetProductCategories")
        @SerializedName("targetProductCategories")
        public ArrayList<String> targetProductCategories = null;
        
        public UUID getRetailerGuid() { return retailerGuid; }
        public MatchCriteria setRetailerGuid(UUID value) { this.retailerGuid = value; return this; }
        public Long getTimeoutMs() { return timeoutMs; }
        public MatchCriteria setTimeoutMs(Long value) { this.timeoutMs = value; return this; }
        public ArrayList<String> getCountryIso2s() { return countryIso2s; }
        public MatchCriteria setCountryIso2s(ArrayList<String> value) { this.countryIso2s = value; return this; }
        public BigInteger getMaxStalenessMs() { return maxStalenessMs; }
        public MatchCriteria setMaxStalenessMs(BigInteger value) { this.maxStalenessMs = value; return this; }
        public ArrayList<String> getTargetProductCategories() { return targetProductCategories; }
        public MatchCriteria setTargetProductCategories(ArrayList<String> value) { this.targetProductCategories = value; return this; }
    }

}

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

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

<GetProductMatchesByCriteriaRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeniuslinkAPI.ServiceModel.V4.Products.Requests">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs" i:nil="true" />
  <MatchCriteria xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs" i:nil="true" />
  <MaxTimeoutMs>0</MaxTimeoutMs>
  <SkipCriteriaCheck>false</SkipCriteriaCheck>
</GetProductMatchesByCriteriaRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetProductMatchesByCriteriaRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeniuslinkAPI.ServiceModel.V4.Products.Requests">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs" i:nil="true" />
  <MatchCriteria xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs" i:nil="true" />
  <MaxTimeoutMs>0</MaxTimeoutMs>
  <SkipCriteriaCheck>false</SkipCriteriaCheck>
</GetProductMatchesByCriteriaRequest>