We are using MWS service to create/update items on Amazon marketplace. Everything is working fine except we are not able to send hazardous item info for an item through XML.
Which XML fields should we use for hazardous materials information?
Example Feed:
<?xml version="1.0" ?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema
-
instance" xsi:noNamespaceSchemaLocation="amzn
-
envelop
e.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_SELLER_354577</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>true</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<Op
erationType>Update</OperationType>
<Product>
<SKU>1Z
-
500ABR
-
FLAT</SKU>
<ProductTaxCode>A_GEN_TAX</ProductTaxCode>
<LaunchDate>2005
-
07
-
26T00:00:01</LaunchDate>
<DescriptionData>
<Title>Lyric 500 tc Queen Flat Sheet, Ivory</Title>
<Brand>Peaco
ck Alley</Brand>
<Description>Lyric sheeting by Peacock Alley is the epitome of simple and classic</Description>
<BulletPoint>made in Italy</BulletPoint>
<BulletPoint>500 thr
ead count</BulletPoint>
<BulletPoint>plain weave (percale)</BulletPoint>
<BulletPoint>100% Egyptian cotton</BulletPoint>
<Manufacturer>Peacock Alley</Manufacturer>
<SearchTerms>bedding</SearchTerms>
<SearchTerms>Sheets</SearchTerms>
<Item
Type>flat
-
sheets</ItemType>
<IsGiftWrapAvailable>false</IsGiftWrapAvailable>
<IsGiftMessageAvailable>false</IsGiftMessageAvailable>
<RecommendedBrowseNode>60583031</RecommendedBrowseNode>
<RecommendedBrowseNode>60576021<
/RecommendedBrowseNode>
</DescriptionData>
<ProductData>
<Home>
<Parentage>variation
-
parent</Parentage>
<VariationData>
<VariationTheme>Size
-
Color</VariationTheme>
</VariationData>
<Material>cotton</Material>
<
ThreadCount>500</ThreadCount>
</Home>
</ProductData>
</Product>
</Message>
<Message>
</AmazonEnvelope>
There are a few fields in the XSD that deal with hazardous materials
There is the <EUcompliance> tag, but according to the XSD, that could only be used instead of <Home> which does not make any sense to me. For details look at Products.xsd and EUcompliance.xsd
There are <HazmatItem>s in <FBA> and <ToysBaby> but they share the same fate as the above. For details look at amzn-base.xsd for its definition and FBA.xsd and ToysBaby for its use.
I have no clue why neither is valid alongside other product types, but hey, that's what their XSDs say, and it's not the first time I'm puzzled what the schema designers at Amazon were thinking... so you're left with
Put it in <OtherItemAttributes> which is valid for all product types. It would go between </ItemType> and <IsGiftWrapAvailable>. For details look at products.xsd
I don't know why you'd want to include hazmat information in the feed, but that's where I'd put it.
(BTW, you have an extra tag at the end which shouldn't be there)
Related
I've been trying to cancel single item from an amazon order using their order adjustment feed, but every time I submit request I get:
ERROR 18028: The data you submitted with this item is incomplete or invalid. Please resubmit the item with all required fields completed with valid data.
I've used this xml in my requests:
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>XXXXXXXXX</MerchantIdentifier>
</Header>
<MessageType>OrderAdjustment</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<OrderAdjustment>
<AmazonOrderID>305-XXXXXXX-XXXXXXX</AmazonOrderID>
<ActionType>Cancel</ActionType>
<AdjustedItem>
<AmazonOrderItemCode>209XXXXXXXXXXX</AmazonOrderItemCode>
<AdjustmentReason>NoInventory</AdjustmentReason>
<QuantityCancelled>1</QuantityCancelled>
</AdjustedItem>
</OrderAdjustment>
</Message>
</AmazonEnvelope>
I have double checked my xml and it seems to be valid according to amazon's xsd schema.
I would appreciate if someone with similar problem could share their experience.
TLDR: Try setting the ActionType to Refund instead of Cancel.
This concerns merchant that do their own fulfillment.
Two scenarios come to mind, an order with:
two items, each with quantity 1
one item with quantity 2
Logically, a partial cancel involves fulfilling one item and canceling the second.
Since the MWS API does not have a single operation for a partial cancel, the application has to first fulfill the second item and then refund it.
That means first sending an OrderFulfillment message for the second item and then sending an OrderAdjustment for it.
I've found that the ActionType of Cancel gives the same error message as seen in the original post while a value of Refund is successfully processed.
I'm using SSMS 2014. I am able to insert a snippet but they don't seem to respond to shortcuts (ie crproc[tab])
Is this feature known to work?
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>prod1</Title>
<Description>testing</Description>
<Author> dale </Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Shortcut>crproc</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>DatabaseName</ID>
<ToolTip>Name of database.</ToolTip>
<Default>DB</Default>
</Literal>
</Declarations>
<Code Language="SQL">
<![CDATA[
------------------------------------------------------
-- FILENAME: Template-Expansion.snippet
-- PURPOSE: Template for Expansion (Insert) snippets.
-- AUTHOR: Ken O. Bonn
-- DATE: May 15, 2013
------------------------------------------------------
SET NOCOUNT ON;
EXEC SP_HELPDB $DatabaseName$;
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
No, for some reason Microsoft seem to have no interest in actually implementing this feature, despite code snippets being totally useless without it (because of the number of mouse clicks and key presses you need to insert a snippet).
How many times a day do you type "SELECT * FROM..." or "SELECT TOP 10 * FROM "... etc..??!
Very frustrating!
Even SSMS 2016 Release Candidate still does not support it.
"ApexSQL Complete" (a free tool) apparently will do it, but this does not support SSMS 2016 yet!
Add your snippet to the "Functions" folder where other SurroundsWith snippets are found. Then press press CTRL + K, CTRL + S (shortcut for SurroundsWith Snippets) and type a few letters from your snippet name and press enter. If only the "Functions" folder has SurroundsWith snippets then no other folders will show in the context menu. Otherwise you can type a few letters from the appropriate folder name and press tab. This process is much like this answer.
For my environment the Begin, If and While snippets are located:
C:\Program Files (x86)\Microsoft SQL
Server\130\Tools\Binn\ManagementStudio\SQL\Snippets\1033\Function
Here is an example snippet for SELECT * FROM:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Select</Title>
<Shortcut>sel</Shortcut>
<Description>SELECT * FROM _ WHERE 1=1 AND</Description>
<Author/>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="SQL">
<![CDATA[
SELECT * FROM dbo.$selected$$end$
WHERE 1=1
--AND
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
In ApexSQL Complete you have possibility to do this and of course that support SSMS 2016 and even new SSMS 17 RC, except that it is totally free
Don't worry about giving it a specific shortcut.
Just add it under the my snippets folder.
Make sure to save as .snippet
Hit ctrl+K, Ctrl+S
down arrow to my snippets enter
down arrow to the snippet you want enter
your snippet will surround the code you wanted it to.
Just tried to find out, how easy (or maybe difficult) it is to update prices of products of a amazon marketplace shop.
After some search I found docs about "Amazon Marketplace Web Service (Amazon MWS)". I have also checked the API docs and one of the client implementation, but I am not able (or blind, stupid, whatever) to find any docs about setting a price for a specific product.
Or do I need another API?
EDIT: Thanks to #ScottG and #Keyur I found the 'missing link' Feeds. http://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html#
For PHP there is a nice example in the PHP-Client library under src\MarketplaceWebService\Samples\SubmitFeedSample.php.
See #Keyur's answer for the _POST_PRODUCT_PRICING_DATA_ FeedType example.
You need to send following Feed to amazon mws feed api, you send price feed of 15 different SKU in one request by looping through element for each SKU
$feed = <<< EOD
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>$merchant_token</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
<MessageID>$i</MessageID>
<Price>
<SKU>$sku</SKU>
<StandardPrice currency="$currency">$new_price</StandardPrice>
</Price>
</Message>
</AmazonEnvelope>
EOD;
$feedHandle = #fopen('php://temp', 'rw+');
fwrite($feedHandle, $feed);
rewind($feedHandle);
$parameters = array(
'Merchant' => $MERCHANT_ID,
'MarketplaceIdList' => $marketplaceIdArray,
'FeedType' => '_POST_PRODUCT_PRICING_DATA_',
'FeedContent' => $feedHandle,
'PurgeAndReplace' => false, //Leave this PurgeAndReplace to false so that it want replace whole product in amazon inventory
'ContentMd5' => base64_encode(md5(stream_get_contents($feedHandle), true))
);
$request = new MarketplaceWebService_Model_SubmitFeedRequest($parameters);
$return_feed = invokeSubmitFeed($service, $request);
fclose($feedHandle);
Products are sent to Amazon using Feeds. We use a third party to handle ours for us, but you can do so yourself using the Feeds API and the pricing FeedType. There are templates you can download to help you out. You can then use one of the client libraries to send this feed to Amazon.
We are using the following details for updating the quantity of a product in amazon. Wile using scratch pad, option Feeds->SubmitFeed
Set the required parameters and pass the following XML
<?xml version="1.0" encoding="utf-8" ?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>$merchantID</MerchantIdentifier>
</Header>
<MessageType>Inventory</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Inventory>
<SKU>$SKU</SKU>
<Quantity>8</Quantity>
</Inventory>
</Message>
</AmazonEnvelope>
feed type : _POST_INVENTORY_AVAILABILITY_DATA_
we are getting in response for the same - submissionid. I know it takes sometime to update. But i waited and waited .. 4 atleast 15 hrs (not minutes) but it still was in process and the quantity was never updated.
Am getting in the following response
<?xml version="1.0"?>
<SubmitFeedResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<SubmitFeedResult>
<FeedSubmissionInfo>
<FeedSubmissionId>6791310806</FeedSubmissionId>
<FeedType>_POST_INVENTORY_AVAILABILITY_DATA_</FeedType>
<SubmittedDate>2013-03-21T19:48:37+00:00</SubmittedDate>
<FeedProcessingStatus>_SUBMITTED_</FeedProcessingStatus>
</FeedSubmissionInfo>
</SubmitFeedResult>
<ResponseMetadata>
<RequestId>fd07bf18-4f6a-4786-bdf9-9d4db50956d0</RequestId>
</ResponseMetadata>
</SubmitFeedResponse>
and getting in following response on checking the status of the feed
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<Error>
<Type>Sender</Type>
<Code>FeedProcessingResultNotReady</Code>
<Message>Feed Submission Result is not ready for Feed Submission Id: 6791310806</Message>
<Detail/>
</Error>
<RequestID>2c86128d-b53a-4fc3-80d1-6b41b53a8977</RequestID>
</ErrorResponse>
Can any1 guide me.. where did i go wrong .. in here? or if there is any better way to look on for the same.
The time it seems to be taking isn't normal. Submitted feeds usually switch to _IN_PROGRESS_ within a few minutes and then take another few minutes to complete, when the status switches to _DONE_. Short feeds like your example feed should take less than a minute to process.
In the past, I've seen one feed upload blocking another though. It seems that sometimes the MWS won't start processing one feed until a previous feed of the same user has gone trough (or for that matter: failed). Please check if you have other request that might block yours (GetFeedSubmissionList)
Apart from this, the answers you are getting from Amazon MWS are perfectly normal. Your feed was accepted and put into the processing queue. The queue status was set to _SUBMITTED_, and as long as it hasn't switched to DONE, you will get the FeedProcessingResultNotReady answer you were seeing.
I am testing API Sample of Amazon MWS API in C# for submit feeds however after setting AWS Secret key , access key etc. in code i am getting error of RequestThrottled , so there is details what is that but could not find any code sample how to resolved that.
I would like to upload feed.xml to amazon seller account
<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_EXAMPLE_123456</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>true</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Insert</OperationType>
<Product>
<SKU>56789</SKU>
<StandardProductID>
<Type>ASIN</Type>
<Value>B0EXAMPLEG</Value>
</StandardProductID>
<ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
<DescriptionData>
<Title>Example Product Title</Title>
<Brand>Example Product Brand</Brand>
<Description>This is an example product description.</Description>
<BulletPoint>Example Bullet Point 1</BulletPoint>
<BulletPoint>Example Bullet Point 2</BulletPoint>
<MSRP currency="USD">25.19</MSRP>
<Manufacturer>Example Product Manufacturer</Manufacturer>
<ItemType>example-item-type</ItemType>
</DescriptionData>
<ProductData>
<Health>
<ProductType>
<HealthMisc>
<Ingredients>Example Ingredients</Ingredients>
<Directions>Example Directions</Directions>
</HealthMisc>
</ProductType>
</Health>
</ProductData>
</Product>
</Message>
</AmazonEnvelope>
Error getting as per below
Caught Exception: Request from SubmitFeed:AKIAJI4PSK4HXY6UCNMA;A2DNAGZJ1EWQLW is
throttled.
Response Status Code: ServiceUnavailable
Error Code: RequestThrottled
Error Type: Sender
Request ID: fc59c802-04da-4dd3-89a8-db5f525cac39
XML: <ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/"><Error><Typ
e>Sender</Type><Code>RequestThrottled</Code><Message>Request from SubmitFeed:AKI
AJI4PSK4HXY6UCNMA;A2DNAGZJ1EWQLW is throttled.</Message><Detail>System.Object</D
etail></Error><RequestId>fc59c802-04da-4dd3-89a8-db5f525cac39</RequestId></Error
Response>
How can this be resolved?
As per Amazon's API reference the SubmitFeed operation has a maximum request quota of 15 and a restore rate of a request every 2 minutes. This means that you're allowed to make calls to this operation in burst of 15, but after this you're throttled for 2 minutes, until Amazon allows you to make another request.
You can find this better explained in their developer guide where they describe better how they make use of the leaky bucket algorithm.
Probably there isn't anything wrong with your feed, but because you made too many requests (probably more than 15) you got throttled. My advice is to build your code in such a way that you take into consideration Amazon throttlening and have a back-off algorithm when you're being throttled (like come back after a "restore rate" period, specific to the type of call you're doing). Also, keep in mind that another limitation MWS has is of 10000 requests per hour across all type of calls.