i working amazon mws php marketplacewebservice php api submit inventory feed data amazon.
https://docs.developer.amazonservices.com/en_us/feeds/feeds_submitfeed.html
i can submit generated inventory loader flat file manually via seller central upload inventory gui without errors.
submitting same flat file using submitfeed sample api always "incorrect template type error".
my authentication , marketplace data correct.
feed data in $_feed , creating feed datastream api with
$feedhandle = fopen('php://temp', 'rw+'); fwrite($feedhandle, $_feed); rewind($feedhandle);
and submitting example code amazon
$marketplaceidarray = array("id" => array(marketplace_id)); $parameters = array ( 'merchant' => merchant_id, 'marketplaceidlist' => $marketplaceidarray, 'feedtype' => '_post_flat_file_invloader_data_', 'feedcontent' => $feedhandle, 'purgeandreplace' => false, 'contentmd5' => base64_encode(md5(stream_get_contents($feedhandle), true)), ); rewind($feedhandle); $request = new \marketplacewebservice_model_submitfeedrequest($parameters); $_result=$this->invokesubmitfeed($service, $request);
the feed submits without errors, incorrect template type error amazon when check submission status.
if write feed data seperate file, or take copy of stream , write test file e.g.
// test copy submitted file temp file $copystream = fopen('/copystream.txt', 'w'); stream_copy_to_stream($streamhandle, $copystream);
i can confirm data used amazon mws api curl upload (in client.php) correct, i can manually upload test file (copystream.txt) via seller central without errors.
this problem similar 1 posted here https://sellercentral.amazon.com/forums/message.jspa?messageid=2914605 2014 suggests flat file headers used when posting via api not same used when uploading flat file via amazon seller central.
i using headers default sample template amazon beauty category:
templatetype=beauty version=2016.0324 top 3 rows amazon.com use only. not modify or delete top 3 rows. offer-offer information - these attributes required make item buyable customers on site. dimensions-product dimensions - these attributes specify size , weight of product. discovery-item discovery information - these attributes have effect on how customers can find product on site using browse or search. images-image information - see image instructions tab details. fulfillment-use these columns provide fulfilment-related information orders fulfilled either amazon (fba) or seller. variation-variation information - populate these attributes if product available in different variations (for example colour or wattage). ungrouped - these attributes create rich product listings buyers. seller sku item name (aka title) product type product id product id type brand name manufacturer manufacturer part number product description update delete standard price quantity fulfillment latency package quantity number of items launch date release date discontinued manufacturer sale price sale date sale end date max order quantity max aggregate ship quantity can gift messaged gift wrap available? product tax code merchant shipping group item display weight unit of measure display weight item display volume unit of measure display volume display length item display length unit of measure item weight unit of measure item weight item length unit of measure item length item width item height website shipping weight unit of measure shipping weight recommended browse nodes key product features key product features key product features key product features key product features search terms main image url swatch image url other image url other image url other image url fulfillment centre id parentage parent sku relationship type variation theme ingredients material type item form adult product target gender skin type hair type indications directions size colour colour map scent sun protection factor medicine classification item_sku item_name feed_product_type external_product_id external_product_id_type brand_name manufacturer part_number product_description update_delete standard_price quantity fulfillment_latency item_package_quantity number_of_items product_site_launch_date merchant_release_date is_discontinued_by_manufacturer sale_price sale_from_date sale_end_date max_order_quantity max_aggregate_ship_quantity offering_can_be_gift_messaged offering_can_be_giftwrapped product_tax_code merchant_shipping_group_name item_display_weight_unit_of_measure item_display_weight item_display_volume_unit_of_measure item_display_volume item_display_length item_display_length_unit_of_measure item_weight_unit_of_measure item_weight item_length_unit_of_measure item_length item_width item_height website_shipping_weight_unit_of_measure website_shipping_weight recommended_browse_nodes bullet_point1 bullet_point2 bullet_point3 bullet_point4 bullet_point5 generic_keywords main_image_url swatch_image_url other_image_url1 other_image_url2 other_image_url3 fulfillment_center_id parent_child parent_sku relationship_type variation_theme ingredients material_type item_form is_adult_product target_gender skin_type hair_type indications directions size_name color_name color_map scent_name sun_protection medicine_classification
according to
the template file feed type _post_flat_file_invloader_data_ not same templates available download amazon seller central though api reports _post_flat_file_invloader_data_ feed type used manual seller central inventory file upload. using 1 of these templates _post_flat_file_invloader_data_ results in template errors returned amazon api.
the solution use feed type _post_flat_file_listings_data_ accepts standard seller central templates.
Comments
Post a Comment