Amazon Feed Transformer
  • Installation
  • Getting started
  • Feed Types
    • XML feeds
      • Inventory Availability
      • Product Pricing
      • Product Images
      • Product Relationships
      • Products
    • Flat file feeds
      • Inventory Loader
      • Price and Quantity Update
      • Flat File Listings
      • Convergence Listings
      • Flat File Bookloader
      • UIEE Bookloader
  • Validation
Powered by GitBook
On this page
  • Parameters
  • productType
  • Usage
  1. Feed Types
  2. XML feeds

Product Relationships

Parameters

productType

Required

This must be a valid Amazon product type, corresponding to the product type that you're defining relationships between in the feed. It cannot be the base product type, PRODUCT.

Usage

To convert a POST_PRODUCT_RELATIONSHIP_DATA feed to the newer JSON_LISTINGS_FEED format:

use SellingPartnerApi\FeedTransformer\Transformer;
use SellingPartnerApi\FeedTransformer\FeedTypes\ProductRelationship;

$feedPath = 'path/to/feed.xml';
$json = Transformer::fromFile(
    ProductRelationship::$feedType,
    $feedPath,
    'ATVPDKIKX0DER',  // -> US Selling Partner API marketplace ID
    ['productType' => 'LUGGAGE']
);

$jsonFeedPath = 'path/to/new/feed.json';
file_put_contents($jsonFeedPath, json_encode($json));
PreviousProduct ImagesNextProducts

Last updated 8 months ago