| GET | /v3.5/product/matches |
|---|
"use strict";
export class ProductIdentifiers {
/** @param {{productGuid?:string,gtins?:string[],mpns?:string[],ean8?:string[],ean13?:string[],isbn9?:string[],isbn10?:string[],isbn13?:string[],itf14?:string[],upc12?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
productGuid;
/** @type {string[]} */
gtins;
/** @type {string[]} */
mpns;
/** @type {string[]} */
ean8;
/** @type {string[]} */
ean13;
/** @type {string[]} */
isbn9;
/** @type {string[]} */
isbn10;
/** @type {string[]} */
isbn13;
/** @type {string[]} */
itf14;
/** @type {string[]} */
upc12;
}
export class BookAttributes {
/** @param {{authors?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string[]} */
authors;
}
export class AudiobookAttributes extends BookAttributes {
/** @param {{authors?:string[]}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
export class EBookAttributes extends BookAttributes {
/** @param {{authors?:string[]}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
export class ItemAttributes {
/** @param {{book?:BookAttributes,audiobook?:AudiobookAttributes,ebook?:EBookAttributes}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BookAttributes} */
book;
/** @type {AudiobookAttributes} */
audiobook;
/** @type {EBookAttributes} */
ebook;
}
export class ProductAttributes {
/** @param {{retailer?:string,retailerGuid?:string,storefront?:string,storefrontIso2?:string,storefrontGuid?:string,category?:string,categoryGuid?:string,brand?:string,brandGuid?:string,manufacturer?:string,manufacturerGuid?:string,identifiers?:ProductIdentifiers,itemAttributes?:ItemAttributes}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
retailer;
/** @type {string} */
retailerGuid;
/** @type {string} */
storefront;
/** @type {string} */
storefrontIso2;
/** @type {string} */
storefrontGuid;
/** @type {string} */
category;
/** @type {string} */
categoryGuid;
/** @type {string} */
brand;
/** @type {string} */
brandGuid;
/** @type {string} */
manufacturer;
/** @type {string} */
manufacturerGuid;
/** @type {ProductIdentifiers} */
identifiers;
/** @type {ItemAttributes} */
itemAttributes;
}
export class RetailerSpecificAttributes {
/** @param {{name?:string,description?:string,skus?:string[],asin?:string,url?:string,productImages?:{ [index:string]: string; },additionalData?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
description;
/** @type {string[]} */
skus;
/** @type {string} */
asin;
/** @type {string} */
url;
/** @type {{ [index:string]: string; }} */
productImages;
/** @type {{ [index:string]: string; }} */
additionalData;
}
export class ProductData {
/** @param {{attributes?:ProductAttributes,retailerSpecificAttributes?:RetailerSpecificAttributes,rawSourceData?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ProductAttributes} */
attributes;
/** @type {RetailerSpecificAttributes} */
retailerSpecificAttributes;
/** @type {string} */
rawSourceData;
}
/** @typedef {'Throttled'|'TargetRetailerProductNotFound'|'Unknown'|'NullMatchResult'|'NullSourceData'|'SourceDataProcessingFailure'|'LocalizationFailure'} */
export var ErrorCode;
(function (ErrorCode) {
ErrorCode["Throttled"] = "Throttled"
ErrorCode["TargetRetailerProductNotFound"] = "TargetRetailerProductNotFound"
ErrorCode["Unknown"] = "Unknown"
ErrorCode["NullMatchResult"] = "NullMatchResult"
ErrorCode["NullSourceData"] = "NullSourceData"
ErrorCode["SourceDataProcessingFailure"] = "SourceDataProcessingFailure"
ErrorCode["LocalizationFailure"] = "LocalizationFailure"
})(ErrorCode || (ErrorCode = {}));
export class MatchError {
/** @param {{message?:string,error?:ErrorCode}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
message;
/** @type {ErrorCode} */
error;
}
export class MatchResult {
/** @param {{retailer?:string,retailerGuid?:string,storefront?:string,storefrontIso2?:string,storefrontGuid?:string,data?:ProductData,errors?:MatchError[],matchAccuracy?:string,matchingRuleName?:string,dataSource?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
retailer;
/** @type {string} */
retailerGuid;
/** @type {string} */
storefront;
/** @type {string} */
storefrontIso2;
/** @type {string} */
storefrontGuid;
/** @type {ProductData} */
data;
/** @type {MatchError[]} */
errors;
/** @type {string} */
matchAccuracy;
/** @type {string} */
matchingRuleName;
/** @type {string} */
dataSource;
}
export class ProductMetadata {
/** @param {{title?:string,author?:string,url?:string,description?:string,retailer?:string,productImages?:{ [index:string]: string; },rawAttributes?:MatchResult}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
title;
/** @type {string} */
author;
/** @type {string} */
url;
/** @type {string} */
description;
/** @type {string} */
retailer;
/** @type {{ [index:string]: string; }} */
productImages;
/** @type {MatchResult} */
rawAttributes;
}
export class GetProductMatchesByUrlResponse {
/** @param {{products?:ProductMetadata[],responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ProductMetadata[]} */
products;
/** @type {ResponseStatus} */
responseStatus;
}
export class GetProductMatchesByUrlRequest {
/** @param {{url?:string,includeRaw?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
url;
/** @type {boolean} */
includeRaw;
}
JavaScript GetProductMatchesByUrlRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>