Price and Quantity Update

Parameters

merchantId

Required

There is documentation on how to retrieve your merchantId in the Common required parameters section of the Flat file feeds page.

shippingGroupMap

Required if the merchant_shipping_group_name field is present in the feed file being converted.

This is a mapping of your account's shipping group names to their internal Amazon identifiers. Instructions on how to generate this mapping are here: shippingGroupMap

Usage

To convert a POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA feed to the newer JSON_LISTINGS_FEED format:

use SellingPartnerApi\FeedTransformer\Transformer;
use SellingPartnerApi\FeedTransformer\FeedTypes\PriceAndQuantityUpdateOnly;

// See the documentation referenced in the Parameters section for more information
// about what's going on in this line
$shippingGroupMap = Transformer::parseShippingGroups($jsonSchemaUrl);

$feedFile = 'path/to/your/feed.tab';
$json = Transformer::fromFile(
    PriceAndQuantityUpdateOnly::$feedType,
    $feedFile,
    'ATVPDKIKX0DER',
    [
        'merchantId' => 'A2DI..........',
        'shippingGroupMap' => $shippingGroupMap
    ]
);

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

Known columns

This is an exhaustive list of the columns we support for this feed type. If you are successfully passing feed files with additional columns, let us know and we'll add support for the ones we're missing.

  • sku

  • price

  • quantity

  • handling-time

Last updated