Closed minifreak closed 9 months ago
Hello,
Is it possible for you to give me a sample of AmazonEnvelope to upload feeds and get my products online ready to be sell? EAN/ASIN - Quantity - Price - Condition .. ?
Thanks for your help
Hi, I can, bare in mind though that I still can't upload the document because I got stuck with a Forbidden error every time I try. Basically, I can go through the 1st and 2nd steps described in the official guide but not the 3rd. Note that I'm using production endpoints here 'cause the static sandbox just sucks big time. The example I can give you belongs to POST_PRODUCT_DATA feed type, but I'm in a position to generate all feed types quite easily (due to JAXB code generation I described in the post) although not sure they will functional as AmazonSP Feed API, as well as the others, behave like black boxes in lots of cases and documentation is far from being great.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AmazonEnvelope>
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>XXXXXXXXXXXX</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>PRODUCT_A</SKU>
<DescriptionData>
<Title>Product A Title</Title>
</DescriptionData>
<ProductData/>
</Product>
</Message>
<Message>
<MessageID>2</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>PRODUCT_B</SKU>
<DescriptionData>
<Title>Product B Title</Title>
</DescriptionData>
<ProductData/>
</Product>
</Message>
....
</AmazonEnvelope>
As you can see, it is very similar to what you can find in the official guide. However, I'm aware that stuff like ASIN is missing, that's why I'm currently working on integrating Catalog Items API in order to sync stuff and get things like ASINs and whatnot. Also, I assumed that you can send multiple Messages within an AmazonEnvelope but that's just an assumption based on how the xsd is defined, couldn't find anywhere in the doc about that matter.
For me the documentation is not quite clear,
I tried with an amz envelop like following :
<?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>Product</MessageType>
<PurgeAndReplace>true</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>sku</SKU>
<Condition>
<ConditionType>New</ConditionType>
</Condition>
<StandardProductID>
<Type>ASIN</Type>
<Value>B082PQXYLM</Value>
</StandardProductID>
<Price>
<StandardPrice currency="EUR">81.07</StandardPrice>
</Price>
<Quantity>1</Quantity>
</Product>
</Message>
</AmazonEnvelope>
Here is the processing report summary :
0 90012 Fatal The required sku field is missing from the file. To correct this error, download the template again and use the new copy, or insert the required field into your existing file.
You was not able to upload to seller central ?
I'm uploading like that:
So, you can actually upload the document, meaning you are good for the 1-3 steps but fails in the 4th step, correct? If so, you are ahead of me, I still can't upload the document. I'm trying with a different feed type though (POST_PRODUCT_DATA). That probably makes a difference
@minifreak do you have any update ?
@minifreak do you have any update ?
Yes, sorta. I can upload the document now, it was a silly mistake with the content type, which is clearly stated in the documentation. However, since I'm using production endpoints, I don't want to create a feed with my entire inventory, hence I'm currently trimming it down just to one dummy product (message). Once I get it, I will try all feed product types and see how it goes. Will get back to you later. today with the results.
Hello @minifreak is it possible to contact me on my email ? contact@a2bsoft.net I would appreciate you share me how did you proceed to do all that.
Thanks a lot
This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.
closed for inactivity
This is basically a guide about how to map
amzn-envelope.xsd
and all its included XSDs into java classes using the JAXB-XJC tool. I will describe as much as possible the whole process, the issues I've been encountering and current caveats. Bare in mind that the purpose of this post is to improve the metodology, fix issues and obviously help others whom may been stuck with this rather complex task. Worth to mention that there might be better ways to achieve this, or handle it differently (no JAXB for instance) so, it would be great to share it here in order to have alternatives. That said, I am aware that mapping the whole schema might not be necessary in most cases. In my scenario it is, as I am supposed to deliver a generic entreprise integration (to be used for different types of businesses with different needs). Anyhow, I will work on a way to use the schemas based on the Feed Types required, trying to avoid more changes on them while keeping consistency, ofc. However, since all of the schemas included inamzn-envelope.xsd
are in the same namespace (empty ns, btw), I haven't figured yet how to achieve that.Requirements
xjc ... -catalog catalog.xml
. More info below, under known issues.Command line
/<path-to-jaxb>/xjc.sh -d ../src -p com.example.feeds.pojo ./xsd_4_1/amzn-envelope.xsd -catalog catalog.xml -b bindings.xml -extension -nv
Ant
ant crashes when I use xjc ant task, likely because the schema is huge so it requires forking. Hence the direct java call which allows that precisely.
Maven
TBD
Bindings
XSD changes
In order to map properly all the schemas, I had to make several changes in some XSDs:
amzn-envelope.xsd
</xsd:schema>
<?xml version="1.0"?>