Amazon MWS submitFeed API Failure - amazon-web-services

I am trying to add product on amazon using MWS submitFeed. When i make API call it returns following error
SKU RGDSP*********, Missing Attributes product_type. SKU RGDSP********* does not match any ASIN. Creation of a new ASIN requires the following missing attributes: product_type. Feed ID: 0. For details, see http://sellercentral.amazon.in/gp/errorcode/200692370
If i add ProductType to the script with some value it thorws Invalid content was found starting with element 'ProductType' error.
Below is my XML code
<?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>A28XP9******</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>SKU RGDSP*********</SKU>
<ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
<DescriptionData>
<Title>Full Sleeves Kurta Pyjama Set For Men</Title>
<Brand> Brand </Brand>
<Description>Look your ethnic best when you adorn this kurta phyjama by RG Designers. Made from Cotton Fabric , it would lend you a glamorous look that is just perfect for any Occassion. self textured design kurta with White churidaar bottom.</Description>
<BulletPoint>Made out of 100% Cotton fabric, Regular Fit, Full Sleeve, Chinese Collar Kurta For Men , Regular Fit white colored Pyjama with drawstring closure,</BulletPoint>
<MSRP currency="INR">25.19</MSRP>
<Manufacturer>Brand</Manufacturer>
<ItemType>Ethnicwear</ItemType>
</DescriptionData>
</Product>
</Message>
</AmazonEnvelope>
Kindly provide some help in fixing this issue.
Thanks.

Your XML is valid (except it has the final </Message></AmazonEnvelope> missing)
To add a product to Amazon which is not currently there, you will need to provide the ProductType structure. The following is a minimal valid XML containing one: only changes are after </DescriptionData>
<?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>A28XP9******</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>SKU RGDSP*********</SKU>
<ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
<DescriptionData>
<Title>Full Sleeves Kurta Pyjama Set For Men</Title>
<Brand> Brand </Brand>
<Description>Look your ethnic best when you adorn this kurta phyjama by RG Designers. Made from Cotton Fabric , it would lend you a glamorous look that is just perfect for any Occassion. self textured design kurta with White churidaar bottom.</Description>
<BulletPoint>Made out of 100% Cotton fabric, Regular Fit, Full Sleeve, Chinese Collar Kurta For Men , Regular Fit white colored Pyjama with drawstring closure,</BulletPoint>
<MSRP currency="INR">25.19</MSRP>
<Manufacturer>Brand</Manufacturer>
<ItemType>Ethnicwear</ItemType>
</DescriptionData>
<ProductData>
<Clothing>
<ClassificationData>
<ClothingType>Sleepwear</ClothingType>
<Department>x</Department>
<StyleKeywords>x</StyleKeywords>
</ClassificationData>
</Clothing>
</ProductData>
</Product>
</Message>
</AmazonEnvelope>

Related

extract value from an bad xml string

First of all i would like to big thanks to everyone in this forum.
I was trying to extract one xml tag value in the below given xml string.
Input String was :-
<?xml version="1.0" encoding="UTF-8"?>
<nonpublicExecutionReportAcknowledgement xmlns="http://www.fpml.org/FpML-5/recordkeeping" fpmlVersion="5-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping /../xmls/SDR/recordkeeping/fpml-main-5-5.xsd">
<header>
<inReplyTo messageIdScheme="www.abc.com/msg_id">sit:GDS:1644644:1442512894123:SRD0IFR119094084</inReplyTo>
<sentBy>DTCCEU</sentBy>
<sendTo>RRasdfjasdfasdkllkd4</sendTo>
<creationTimestamp>2015-10-14T16:47:30Z</creationTimestamp>
</header>
<originalMessage>
<nonpublicExecutionReport fpmlVersion="5-5" xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<header>
<messageId messageIdScheme="www.abc.com/msg_id">sit:GDS:1644644:1442512894123:SRD0IFR119094084</messageId>
<sentBy messageAddressScheme="http://www.fpml.org/coding-scheme/external/cftc/interim-compliant-identifier">RRasdfjasdfasdkllkd4</sentBy>
<sendTo>DTCCEU</sendTo>
<creationTimestamp>2015-10-14T05:54:38Z</creationTimestamp>
</header>
</nonpublicExecutionReport>
</originalMessage>
</nonpublicExecutionReportAcknowledgement>
Regex i was used to extract messageId was "(?<=>).*?.(?=\</messageId)" which is working fine. But when it comes as single xml string it was not working as expected.
Failing for the below input string.
<?xml version="1.0" encoding="UTF-8"?><nonpublicExecutionReportAcknowledgement xmlns="http://www.fpml.org/FpML-5/recordkeeping" fpmlVersion="5-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.fpml.org/FpML-5/recordkeeping /../xmls/SDR/recordkeeping/fpml-main-5-5.xsd"><header><inReplyTo messageIdScheme="www.abc.com/msg_id">sit:GDS:1644644:1442512894123:SRD0IFR119094084</inReplyTo><sentBy>DTCCEU</sentBy><sendTo>RRasdfjasdfasdkllkd4</sendTo> <creationTimestamp>2015-10-14T16:47:30Z</creationTimestamp></header><originalMessage><nonpublicExecutionReport fpmlVersion="5-5" xmlns="http://www.fpml.org/FpML-5/recordkeeping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><header> <messageId messageIdScheme="www.abc.com/msg_id">sit:GDS:1644644:1442512894123:SRD0IFR119094084</messageId><sentBy messageAddressScheme="http://www.fpml.org/coding-scheme/external/cftc/interim-compliant-identifier">RRasdfjasdfasdkllkd4</sentBy><sendTo>DTCCEU</sendTo><creationTimestamp>2015-10-14T05:54:38Z</creationTimestamp></header></nonpublicExecutionReport> </originalMessage></nonpublicExecutionReportAcknowledgement>
Output required was :- "sit:GDS:1644644:1442512894123:SRD0IFR119094084"
the value should get extracted between
<messageId messageIdScheme="www.abc.com/msg_id"> and </messageId>
Could you please help me to build the regex string for the above problem it will be a great help.
Cheers,
KS
How about:
<inReplyTo messageIdScheme="www.abc.com/msg_id">([a-zA-Z0-9:]+)</inReplyTo>

Amazon mws - Update MerchantOrderID

I'm trying to update the Amazon Merchant Order ID through the Feed API.
It was succesfully submitted and I've checked the response from Amazon MWS Scratchpad by check with the GetFeedSubmissionResult call. it returned that the process was completed without any erro.
But when I open my order in Amazon (sellercentral.amazon.com) it says "none saved": Your Merchant Order ID: # none saved
Nothing have been changed.
Your XML feed (provided in your comment) is missing the <Item> elements. Amazon wants you to acknowledge that you have not only received the order, but also all contained items. A complete XML feed should look like this:
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_xxxxx_114513393</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgement</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>114-8862878-1197857</AmazonOrderID>
<MerchantOrderID>abc-402637</MerchantOrderID>
<StatusCode>Success</StatusCode>
<Item> <-- you need to repeat the "Item" element for each order line
<AmazonOrderItemCode>abc</AmazonOrderItemCode>
<MerchantOrderItemID>def</MerchantOrderItemID> <-- I'm not sure this is required, but haven't tried without
</Item>
</OrderAcknowledgement>
</Message>
</AmazonEnvelope>
( the <-- ... comments are not part of the actual feed)
You may also wish to look at this related StackOverflow answer.

IBM Connections API - Adding Members to Wiki

I've been trying to add members to the wiki to no avail. Here's the link to the instructions on how to do so:
http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Updating_a_wiki_ic45&content=pdcontent
Basically, what I need to do is to retrieve the wiki first using this URL:
connectionsURL/wikis/basic/api/wiki/{wiki-label}/entry
And then append the information there and then send it back using a PUT request, Content-Type: application/atom+xml. The content passed should look like the one below based on the example:
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>ignore</id>
<td:label xmlns:td="urn:ibm.com/td">Lake Champlain</td:label>
<category term="wiki" scheme="tag:ibm.com,2006:td/type" label="wiki">
</category>
<author>
<name>Bill Jones</name>
<snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
bf9117c0-f8f2-102c-97c4-ceb7f24c5708
</snx:userid>
<email>bjones#us.example.com</email>
</author>
<td:sharedWith xmlns:td="urn:ibm.com/td">
<ca:member
xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
ca:id="new_user_id"
ca:type="user"
ca:role="editor" >
</ca:member>
<ca:member
xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
ca:id="anonymous-user"
ca:type="virtual"
ca:role="reader" >
</ca:member>
</td:sharedWith>
<title type="text">Long Lake</title>
<summary type="text">
modification none
</summary>
</entry>
I tried that and I always keep getting this 400 Bad Request response:
<?xml version="1.0" encoding="UTF-8" ?>
<td:error>
<td:errorCode>InvalidRequest</td:errorCode>
<td:errorMessage>Atom entry is null</td:errorMessage>
</td:error>
Try this API - https://conServer.com/wikis/basic/api/wiki/{WIKI_LABEL}/members
Then do a PUT on that resource to change the entries (I think type should be atom/xml or atom+cat/xml
Thanks
paul

How to pass the color and size in SubmitFeed Amazon MarketPlace

I have tried lot of the time in Submit Feed (product) in Amazon Marketplace. There is a lack of clear information and the reference document is also not good as much. It is have only the basic feed submission.
I need to create new product with size and color information. Please the code below,
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>5000-***-**-*</SKU>
<StandardProductID>
<Type>UPC</Type>
<Value>YSjsjs899ss</Value>
</StandardProductID>
<Condition>
<ConditionType>New</ConditionType>
</Condition>
<DescriptionData>
<Title>Backout T-Shirt Light Pink Medium</Title>
<Brand>Blackout T-Shirt</Brand>
<Description>This is an sample product added by bala.</Description>
<BulletPoint>Made in Italy</BulletPoint>
<MSRP currency="USD">2.19</MSRP>
<Manufacturer>Peacock Alley</Manufacturer>
<ItemType>Novelty T-Shirts</ItemType>
</DescriptionData>
<ProductData>
<Clothing>
<VariationData>
<Parentage>child</Parentage>
<VariationTheme>SizeColor</VariationTheme>
<Size>M</Size>
</VariationData>
<SizeMap>Medium</SizeMap>
<ColorName>Light Pink</ColorName>
<ColorMap>pink</ColorMap>
<ClassificationData>
<ClothingType>Underwear</ClothingType>
<Department>mens</Department>
<ModelNumber>CM203</ModelNumber>
</ClassificationData>
</Clothing>
</ProductData>
</Product>
</Message>
But it is not working. Please guide me to do this.
Regards,
Balaganesh
I'm aware that this answer is late, but I just had another question today that led me here, and while this didn't help me, I believe I can answer this question anyway. So here goes:
You can find the XSD -- which is the xml schema file -- here: https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/ProductClothing.xsd
The special thing about this, which is different from JSON is that this has the :sequence attribut. This means that it is important which order the elements go into the xml file.
In the ColorSize variation theme, the VariationTheme block should look like this:
<VariationData>
<Parentage>child</Parentage>
<Size>S</Size>
<Color>White</Color>
<VariationTheme>SizeColor</VariationTheme>
</VariationData>

creating relationship feeds through Amazon MWS

One of my client wants me to upload and maintain the variations of the products on Amazon. I am stuck in creating relationship(Variations) feed. I have googled it for many hours but with no luck.
I can easily generate and upload simple product, inventory, image and price feeds successfully through MWS, but my concept regarding variation feeds is not clear.
To simplify, my client has a product say "ABC" with two different colors (Black,Red). The ABC is not yet Registered on Amazon. The client has EAN for this product to list on amazon and also show the two different variations.
Now if any body can help me out as how to make the feeds to reflect the variations.
Please explain with practical code example.
Thanks
you can use following XML to create relationship.Use "_POST_PRODUCT_RELATIONSHIP_DATA_" as type of feed
<?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>xxxxxxxxxxxxxxx</MerchantIdentifier>
</Header>
<MessageType>Relationship</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Relationship>
<ParentSKU>skt_parent1234</ParentSKU>
<Relation>
<SKU>skt_white123</SKU>
<Type>Variation</Type>
</Relation>
<Relation>
<SKU>skt_orange1234</SKU>
<Type>Variation</Type>
</Relation>
</Relationship>
</Message>
</AmazonEnvelope>