GeniuslinkAPI

<back to all web services

ProductMetadataLookupRequest

Requires Authentication
The following routes are available for this service:
GET/v3.5/product-metadata/lookup
import 'package:servicestack/servicestack.dart';

// @DataContract
class ProductIdentifiers implements IConvertible
{
    // @DataMember(Name="productGuid", EmitDefaultValue=false)
    String? productGuid;

    // @DataMember(Name="gtins", EmitDefaultValue=false)
    List<String>? gtins;

    // @DataMember(Name="mpns", EmitDefaultValue=false)
    List<String>? mpns;

    // @DataMember(Name="ean8", EmitDefaultValue=false)
    List<String>? ean8;

    // @DataMember(Name="ean13", EmitDefaultValue=false)
    List<String>? ean13;

    // @DataMember(Name="isbn9", EmitDefaultValue=false)
    List<String>? isbn9;

    // @DataMember(Name="isbn10", EmitDefaultValue=false)
    List<String>? isbn10;

    // @DataMember(Name="isbn13", EmitDefaultValue=false)
    List<String>? isbn13;

    // @DataMember(Name="itf14", EmitDefaultValue=false)
    List<String>? itf14;

    // @DataMember(Name="upc12", EmitDefaultValue=false)
    List<String>? upc12;

    ProductIdentifiers({this.productGuid,this.gtins,this.mpns,this.ean8,this.ean13,this.isbn9,this.isbn10,this.isbn13,this.itf14,this.upc12});
    ProductIdentifiers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        productGuid = json['productGuid'];
        gtins = JsonConverters.fromJson(json['gtins'],'List<String>',context!);
        mpns = JsonConverters.fromJson(json['mpns'],'List<String>',context!);
        ean8 = JsonConverters.fromJson(json['ean8'],'List<String>',context!);
        ean13 = JsonConverters.fromJson(json['ean13'],'List<String>',context!);
        isbn9 = JsonConverters.fromJson(json['isbn9'],'List<String>',context!);
        isbn10 = JsonConverters.fromJson(json['isbn10'],'List<String>',context!);
        isbn13 = JsonConverters.fromJson(json['isbn13'],'List<String>',context!);
        itf14 = JsonConverters.fromJson(json['itF14'],'List<String>',context!);
        upc12 = JsonConverters.fromJson(json['upc12'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'productGuid': productGuid,
        'gtins': JsonConverters.toJson(gtins,'List<String>',context!),
        'mpns': JsonConverters.toJson(mpns,'List<String>',context!),
        'ean8': JsonConverters.toJson(ean8,'List<String>',context!),
        'ean13': JsonConverters.toJson(ean13,'List<String>',context!),
        'isbn9': JsonConverters.toJson(isbn9,'List<String>',context!),
        'isbn10': JsonConverters.toJson(isbn10,'List<String>',context!),
        'isbn13': JsonConverters.toJson(isbn13,'List<String>',context!),
        'itf14': JsonConverters.toJson(itf14,'List<String>',context!),
        'upc12': JsonConverters.toJson(upc12,'List<String>',context!)
    };

    getTypeName() => "ProductIdentifiers";
    TypeContext? context = _ctx;
}

// @DataContract
class BookAttributes implements IConvertible
{
    // @DataMember(Name="authors", EmitDefaultValue=false)
    List<String>? authors;

    BookAttributes({this.authors});
    BookAttributes.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        authors = JsonConverters.fromJson(json['authors'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'authors': JsonConverters.toJson(authors,'List<String>',context!)
    };

    getTypeName() => "BookAttributes";
    TypeContext? context = _ctx;
}

// @DataContract
class AudiobookAttributes extends BookAttributes implements IConvertible
{
    AudiobookAttributes();
    AudiobookAttributes.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "AudiobookAttributes";
    TypeContext? context = _ctx;
}

// @DataContract
class EBookAttributes extends BookAttributes implements IConvertible
{
    EBookAttributes();
    EBookAttributes.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "EBookAttributes";
    TypeContext? context = _ctx;
}

// @DataContract
class ItemAttributes implements IConvertible
{
    // @DataMember(Name="book", EmitDefaultValue=false)
    BookAttributes? book;

    // @DataMember(Name="audiobook", EmitDefaultValue=false)
    AudiobookAttributes? audiobook;

    // @DataMember(Name="ebook", EmitDefaultValue=false)
    EBookAttributes? ebook;

    ItemAttributes({this.book,this.audiobook,this.ebook});
    ItemAttributes.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        book = JsonConverters.fromJson(json['book'],'BookAttributes',context!);
        audiobook = JsonConverters.fromJson(json['audiobook'],'AudiobookAttributes',context!);
        ebook = JsonConverters.fromJson(json['eBook'],'EBookAttributes',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'book': JsonConverters.toJson(book,'BookAttributes',context!),
        'audiobook': JsonConverters.toJson(audiobook,'AudiobookAttributes',context!),
        'ebook': JsonConverters.toJson(ebook,'EBookAttributes',context!)
    };

    getTypeName() => "ItemAttributes";
    TypeContext? context = _ctx;
}

// @DataContract
class ProductAttributes implements IConvertible
{
    // @DataMember(Name="retailer", EmitDefaultValue=false)
    String? retailer;

    // @DataMember(Name="retailerGuid", EmitDefaultValue=false)
    String? retailerGuid;

    // @DataMember(Name="storefront", EmitDefaultValue=false)
    String? storefront;

    // @DataMember(Name="storefrontIso2", EmitDefaultValue=false)
    String? storefrontIso2;

    // @DataMember(Name="storefrontGuid", EmitDefaultValue=false)
    String? storefrontGuid;

    // @DataMember(Name="category", EmitDefaultValue=false)
    String? category;

    // @DataMember(Name="categoryGuid", EmitDefaultValue=false)
    String? categoryGuid;

    // @DataMember(Name="brand", EmitDefaultValue=false)
    String? brand;

    // @DataMember(Name="brandGuid", EmitDefaultValue=false)
    String? brandGuid;

    // @DataMember(Name="manufacturer", EmitDefaultValue=false)
    String? manufacturer;

    // @DataMember(Name="manufacturerGuid", EmitDefaultValue=false)
    String? manufacturerGuid;

    // @DataMember(Name="identifiers", EmitDefaultValue=false)
    ProductIdentifiers? identifiers;

    // @DataMember(Name="itemAttributes", EmitDefaultValue=false)
    ItemAttributes? itemAttributes;

    ProductAttributes({this.retailer,this.retailerGuid,this.storefront,this.storefrontIso2,this.storefrontGuid,this.category,this.categoryGuid,this.brand,this.brandGuid,this.manufacturer,this.manufacturerGuid,this.identifiers,this.itemAttributes});
    ProductAttributes.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        retailer = json['retailer'];
        retailerGuid = json['retailerGuid'];
        storefront = json['storefront'];
        storefrontIso2 = json['storefrontIso2'];
        storefrontGuid = json['storefrontGuid'];
        category = json['category'];
        categoryGuid = json['categoryGuid'];
        brand = json['brand'];
        brandGuid = json['brandGuid'];
        manufacturer = json['manufacturer'];
        manufacturerGuid = json['manufacturerGuid'];
        identifiers = JsonConverters.fromJson(json['identifiers'],'ProductIdentifiers',context!);
        itemAttributes = JsonConverters.fromJson(json['itemAttributes'],'ItemAttributes',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'retailer': retailer,
        'retailerGuid': retailerGuid,
        'storefront': storefront,
        'storefrontIso2': storefrontIso2,
        'storefrontGuid': storefrontGuid,
        'category': category,
        'categoryGuid': categoryGuid,
        'brand': brand,
        'brandGuid': brandGuid,
        'manufacturer': manufacturer,
        'manufacturerGuid': manufacturerGuid,
        'identifiers': JsonConverters.toJson(identifiers,'ProductIdentifiers',context!),
        'itemAttributes': JsonConverters.toJson(itemAttributes,'ItemAttributes',context!)
    };

    getTypeName() => "ProductAttributes";
    TypeContext? context = _ctx;
}

// @DataContract
class RetailerSpecificAttributes implements IConvertible
{
    // @DataMember(Name="name", EmitDefaultValue=false)
    String? name;

    // @DataMember(Name="description", EmitDefaultValue=false)
    String? description;

    // @DataMember(Name="skus", EmitDefaultValue=false)
    List<String>? skus;

    // @DataMember(Name="asin", EmitDefaultValue=false)
    String? asin;

    // @DataMember(Name="url", EmitDefaultValue=false)
    Uri? url;

    // @DataMember(Name="productImages", EmitDefaultValue=false)
    Map<String,Uri?>? productImages;

    // @DataMember(Name="additionalData", EmitDefaultValue=false)
    Map<String,String?>? additionalData;

    RetailerSpecificAttributes({this.name,this.description,this.skus,this.asin,this.url,this.productImages,this.additionalData});
    RetailerSpecificAttributes.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        description = json['description'];
        skus = JsonConverters.fromJson(json['skus'],'List<String>',context!);
        asin = json['asin'];
        url = JsonConverters.fromJson(json['url'],'Uri',context!);
        productImages = JsonConverters.fromJson(json['productImages'],'Map<String,Uri?>',context!);
        additionalData = JsonConverters.toStringMap(json['additionalData']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'description': description,
        'skus': JsonConverters.toJson(skus,'List<String>',context!),
        'asin': asin,
        'url': JsonConverters.toJson(url,'Uri',context!),
        'productImages': JsonConverters.toJson(productImages,'Map<String,Uri?>',context!),
        'additionalData': additionalData
    };

    getTypeName() => "RetailerSpecificAttributes";
    TypeContext? context = _ctx;
}

// @DataContract
class ProductData implements IConvertible
{
    // @DataMember(Name="attributes", EmitDefaultValue=false)
    ProductAttributes? attributes;

    // @DataMember(Name="retailerSpecificAttributes", EmitDefaultValue=false)
    RetailerSpecificAttributes? retailerSpecificAttributes;

    // @DataMember(Name="rawSourceData", EmitDefaultValue=false)
    String? rawSourceData;

    ProductData({this.attributes,this.retailerSpecificAttributes,this.rawSourceData});
    ProductData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        attributes = JsonConverters.fromJson(json['attributes'],'ProductAttributes',context!);
        retailerSpecificAttributes = JsonConverters.fromJson(json['retailerSpecificAttributes'],'RetailerSpecificAttributes',context!);
        rawSourceData = json['rawSourceData'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'attributes': JsonConverters.toJson(attributes,'ProductAttributes',context!),
        'retailerSpecificAttributes': JsonConverters.toJson(retailerSpecificAttributes,'RetailerSpecificAttributes',context!),
        'rawSourceData': rawSourceData
    };

    getTypeName() => "ProductData";
    TypeContext? context = _ctx;
}

class ProductMetadataLookupResponse implements IProductMetadataLookupResponse, IConvertible
{
    // @DataMember(Name="productMetadata")
    ProductData? productMetadata;

    // @DataMember(Name="responseStatus")
    ResponseStatus? responseStatus;

    ProductMetadataLookupResponse({this.productMetadata,this.responseStatus});
    ProductMetadataLookupResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        productMetadata = JsonConverters.fromJson(json['productMetadata'],'ProductData',context!);
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'productMetadata': JsonConverters.toJson(productMetadata,'ProductData',context!),
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "ProductMetadataLookupResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class ProductMetadataLookupRequest implements IProductMetadataLookupRequest, IConvertible
{
    // @DataMember(Name="url")
    String? url;

    ProductMetadataLookupRequest({this.url});
    ProductMetadataLookupRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        url = json['url'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'url': url
    };

    getTypeName() => "ProductMetadataLookupRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'geniuslink_api_zane.dev.platform.georiot.com', types: <String, TypeInfo> {
    'ProductIdentifiers': TypeInfo(TypeOf.Class, create:() => ProductIdentifiers()),
    'BookAttributes': TypeInfo(TypeOf.Class, create:() => BookAttributes()),
    'AudiobookAttributes': TypeInfo(TypeOf.Class, create:() => AudiobookAttributes()),
    'EBookAttributes': TypeInfo(TypeOf.Class, create:() => EBookAttributes()),
    'ItemAttributes': TypeInfo(TypeOf.Class, create:() => ItemAttributes()),
    'ProductAttributes': TypeInfo(TypeOf.Class, create:() => ProductAttributes()),
    'RetailerSpecificAttributes': TypeInfo(TypeOf.Class, create:() => RetailerSpecificAttributes()),
    'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
    'Map<String,Uri?>': TypeInfo(TypeOf.Class, create:() => Map<String,Uri?>()),
    'ProductData': TypeInfo(TypeOf.Class, create:() => ProductData()),
    'ProductMetadataLookupResponse': TypeInfo(TypeOf.Class, create:() => ProductMetadataLookupResponse()),
    'ProductMetadataLookupRequest': TypeInfo(TypeOf.Class, create:() => ProductMetadataLookupRequest()),
});

Dart ProductMetadataLookupRequest 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-metadata/lookup 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

<ProductMetadataLookupResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GeniuslinkAPI.ServiceModel.V4.Products.Responses">
  <ProductMetadata xmlns:d2p1="http://schemas.datacontract.org/2004/07/Geniuslink.Products.QueuedService.Contracts.V1.DTOs">
    <d2p1:attributes>
      <d2p1:brand>String</d2p1:brand>
      <d2p1:category>String</d2p1:category>
      <d2p1:identifiers>
        <d2p1:ean13 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:ean13>
        <d2p1:ean8 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:ean8>
        <d2p1:gtins xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:gtins>
        <d2p1:isbn10 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:isbn10>
        <d2p1:isbn13 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:isbn13>
        <d2p1:isbn9 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:isbn9>
        <d2p1:itf14 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:itf14>
        <d2p1:mpns xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:mpns>
        <d2p1:upc12 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </d2p1:upc12>
      </d2p1:identifiers>
      <d2p1:itemAttributes>
        <d2p1:audiobook>
          <d2p1:authors xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </d2p1:authors>
        </d2p1:audiobook>
        <d2p1:book>
          <d2p1:authors xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </d2p1:authors>
        </d2p1:book>
        <d2p1:ebook>
          <d2p1:authors xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </d2p1:authors>
        </d2p1:ebook>
      </d2p1:itemAttributes>
      <d2p1:manufacturer>String</d2p1:manufacturer>
      <d2p1:retailer>String</d2p1:retailer>
      <d2p1:storefront>String</d2p1:storefront>
      <d2p1:storefrontIso2>String</d2p1:storefrontIso2>
    </d2p1:attributes>
    <d2p1:rawSourceData>String</d2p1:rawSourceData>
    <d2p1:retailerSpecificAttributes>
      <d2p1:additionalData xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d2p1:additionalData>
      <d2p1:asin>String</d2p1:asin>
      <d2p1:description>String</d2p1:description>
      <d2p1:name>String</d2p1:name>
      <d2p1:productImages xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringanyURI>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value i:nil="true" />
        </d4p1:KeyValueOfstringanyURI>
      </d2p1:productImages>
      <d2p1:skus xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:skus>
    </d2p1:retailerSpecificAttributes>
  </ProductMetadata>
  <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>
</ProductMetadataLookupResponse>