| GET | /v3.5/product-metadata/lookup |
|---|
"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;
}
export class ProductMetadataLookupResponse {
/** @param {{productMetadata?:ProductData,responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ProductData} */
productMetadata;
/** @type {ResponseStatus} */
responseStatus;
}
export class ProductMetadataLookupRequest {
/** @param {{url?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
url;
}
JavaScript ProductMetadataLookupRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v3.5/product-metadata/lookup HTTP/1.1 Host: geniuslink-api-zane.dev.platform.georiot.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
productMetadata:
{
attributes:
{
retailer: String,
storefront: String,
storefrontIso2: String,
category: String,
brand: String,
manufacturer: String,
identifiers:
{
gtins:
[
String
],
mpns:
[
String
],
ean8:
[
String
],
ean13:
[
String
],
isbn9:
[
String
],
isbn10:
[
String
],
isbn13:
[
String
],
itf14:
[
String
],
upc12:
[
String
]
},
itemAttributes:
{
book:
{
authors:
[
String
]
},
audiobook:
{
authors:
[
String
]
},
ebook:
{
authors:
[
String
]
}
}
},
retailerSpecificAttributes:
{
name: String,
description: String,
skus:
[
String
],
asin: String,
productImages: {},
additionalData:
{
String: String
}
},
rawSourceData: String
},
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}