I want to update the ShippingWeight in some of our products.
I think the Product feed should do this for me.
The feed below seems to work fine, the data is updated in amazon, but I get an error response.
What's wrong with the feed, why do I get an error response even though the updates are done ?
I tried Update and PartialUpdate.
The error response looks like an error on creating new products.
And why do I have to specify the "Title" element when updating the ShippingWeight (Title does not have minOccurs="0" in xsd) :-(
Here's my feed:
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.02</DocumentVersion>
<MerchantIdentifier>xxxx</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1375606841671</MessageID>
<OperationType>PartialUpdate</OperationType>
<Product>
<SKU>1894</SKU>
<DescriptionData>
<Title><![CDATA[abcdefghi....]]></Title>
<ItemDimensions>
<Length unitOfMeasure="CM">44.0</Length>
<Width unitOfMeasure="CM">33.0</Width>
<Height unitOfMeasure="CM">42.0</Height>
<Weight unitOfMeasure="GR">1030.0</Weight>
</ItemDimensions>
<ShippingWeight unitOfMeasure="GR">1040.0</ShippingWeight>
</DescriptionData>
</Product>
</Message>
Here's amazon's response:
<?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.02</DocumentVersion>
<MerchantIdentifier>xxxxxx</MerchantIdentifier>
</Header>
<MessageType>ProcessingReport</MessageType>
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>yyyyy</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<Result>
<MessageID>1375606841671</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>8560</ResultMessageCode>
<ResultDescription>SKU 1894, Fehlende Attribute product_type. SKU 1894 keine eindeutige ASIN gefunden. Zur Erstellung einer neuen ASIN fehlen noch folgende Attribute: product_type. Feed ID: 0. Weitere Informationen dazu http://sellercentral.amazon.de/gp/errorcode/200692370</ResultDescription>
<AdditionalInfo>
<SKU>1894</SKU>
</AdditionalInfo>
</Result>
</ProcessingReport>
</Message>
Thanx a lot in advance.
You have a bad SKU number. You can not send in request fiction SKU number. I found some and tried to use RO7WA11930KB1CA1A - hat.
Related
I have create xml for proudct image upload but it give me error
XML Parsing Error at Line 11, Column 128: cvc-complex-type.2.4.d: Invalid content was found starting with element 'ImageType'. No child element is expected at this point.
here my xml file
Please check where to change to solve the error
<?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>ASHAXSDLATFYG</MerchantIdentifier>
</Header>
<MessageType>ProductImage</MessageType><Message>
<MessageID>1</MessageID>
<ProductImage>
<SKU>BG4303</SKU>
<ImageType>Main</ImageType>
<ImageLocation>http://exmple.com/15203203915886PhotoC3551960-1.jpeg</ImageLocation>
<ImageType>PT1</ImageType>
<ImageLocation>http://exmple.com/15203203915886PhotoC3551960-1.jpeg</ImageLocation>
<ImageType>PT2</ImageType>
<ImageLocation>http://exmple.com/15203203915886PhotoC3551960-1.jpeg</ImageLocation>
</ProductImage>
</Message>
</AmazonEnvelope>
The following xml worked for me, not sure if its proper way or not. I am new to amazon mws as well.
<MessageType>ProductImage</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<ProductImage>
<SKU>BG4303</SKU>
<ImageType>Main</ImageType>
<ImageLocation>http://exmple.com/15203203915886PhotoC3551960-1.jpeg</ImageLocation>
</ProductImage>
</Message>
<Message>
<MessageID>2</MessageID>
<OperationType>Update</OperationType>
<ProductImage>
<SKU>BG4303</SKU>
<ImageType>Swatch</ImageType>
<ImageLocation>http://exmple.com/15203203915886PhotoC3551960-1.jpeg</ImageLocation>
</ProductImage>
</Message>
Download the Amazon XSDs and validate using xmllint.
xmllint --schema {$schema} {$xmlFile} --noout
XSD List:
https://github.com/crazyfactory/amazon-xsd
I am trying to update shipping information through the feed API and here is my xml 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>Merchant id</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<MerchantOrderID>AmazonOrderId</MerchantOrderID>
<FulfillmentDate>2015-05-23T04:57:09+00:00</FulfillmentDate>
<FulfillmentData>
<CarrierCode>Fedex</CarrierCode>
<ShipperTrackingNumber>78066505</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<MerchantOrderItemID>OrderItemId</MerchantOrderItemID>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
When I submit the feed getting response as We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed. But both the order id and order item id is valid one.
In the sample feed provided by amazon I can see <MerchantFulfillmentID>1234567</MerchantFulfillmentID> and <MerchantFulfillmentItemID>1234567</MerchantFulfillmentItemID> but where can I find these ids.
As stated here Selling on Amazon Guide to XML:
You can send your own unique order and item identifiers
(MerchantOrderID and MerchantOrderItemID) rather than Amazon's order
and item identifiers, if you established your own in the
OrderAcknowledgement feed.
MerchantOrderID:
Optional seller supplied order ID. The first step is to establish the
MerchantOrderID in the acknowledgem ent feed. Amazon will map the
MerchantOrderID to the AmazonOrderID, and you can then use your own
order ID (MerchantOrderID) for subsequent feeds relating to that
order. See the base XSD for the definition.
MerchantFulfillmentID:
Seller supplied unique identifier for the shipment (not used by Amazon)
If you did not established your own ID´s in the OrderAcknowledgement feed, you can not use this fields in the Order Fulfillment feed.
Instead you have to speficy AmazonOrderID and Item.AmazonOrderItemCode. The AmazonOrderItemCode is an code for this specific product in this specific order. It has nothing todo with the famous ASIN or something.
Working example for an _POST_ORDER_FULFILLMENT_DATA_ feed would like like:
<AmazonEnvelope>
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_TESTSHOP_1337</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>110-64133780-1337563</AmazonOrderID>
<FulfillmentDate>2015-11-02T13:02:14</FulfillmentDate>
<FulfillmentData>
<CarrierName>DHL</CarrierName>
<ShippingMethod>Paket</ShippingMethod>
<ShipperTrackingNumber>1337</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<AmazonOrderItemCode>033521337643</AmazonOrderItemCode>
<Quantity>1</Quantity>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
The XML I am submitting for customer refund request:
<?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>A24MUCS*****</MerchantIdentifier>
</Header>
<MessageType>OrderAdjustment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAdjustment>
<AmazonOrderID>105-3616276-******</AmazonOrderID>
<AdjustedItem>
<AdjustmentReason>CustomerCancel</AdjustmentReason>
<ItemPriceAdjustments>
<Component>
<Type>Principal</Type>
<Amount currency="USD">0.09</Amount>
</Component>
<Component>
<Type>Shipping</Type>
<Amount currency="USD">4.87</Amount>
</Component>
</ItemPriceAdjustments>
</AdjustedItem>
</OrderAdjustment>
</Message>
</AmazonEnvelope>
On submitting the XML the error returned by Amazon is:
Error 5000:This is a malformed or invalid XML document.
Your XML does not seem malformed or invalid. However it is missing the AmazonOrderItemCode or MerchantOrderItemID which needs to be stated before AdjustmentReason, which is why it doesn't validate.
I am trying to cancel the order on the amazon, initially was having some of the format issues, now all the format issues are removed but feed result is keep showing one or more item is invalid. i am using the correct xml format to cancel the order and also the correct amazon order id and amazon order item id, both id are valid but the result keep showing the invalid item.
Order Acknowledgement Feed Format:
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_xxxxx_108291953</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgement</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>111-1111111-7313343</AmazonOrderID>
<StatusCode>Failure</StatusCode>
<Item>
<AmazonOrderItemCode>232327843324</AmazonOrderItemCode>
<CancelReason>BuyerCanceled</CancelReason>
</Item>
</OrderAcknowledgement>
</Message>
</AmazonEnvelope>
Response On feed submission result: as i try to get the feed result it shows this error 'We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.', below is the feed submission result.
<?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.02</DocumentVersion>
<MerchantIdentifier>M_xxxxx_108291953</MerchantIdentifier>
</Header>
<MessageType>ProcessingReport</MessageType>
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>7801114004</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>25</ResultMessageCode>
<ResultDescription>We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.</ResultDescription>
</Result>
</ProcessingReport>
</Message>
</AmazonEnvelope>
Can any one one help me on this to make it work.
i am able to cancel the entire order in amazon.
xml i am using
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>'.$storeDetails["merchantIdentifier"].'</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgement</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>'.$amazonOrderId.'</AmazonOrderID>
<StatusCode>Failure</StatusCode>
<Item>
<AmazonOrderItemCode>'.$item['store_product_code'].'</AmazonOrderItemCode>
<CancelReason>'.$reason.'</CancelReason>
</Item>
</OrderAcknowledgement>
</Message>
</AmazonEnvelope
====
Let me know if it helps.
I am using the Order Acknowledgment feed to cancel the order for Amazon. Below is the xml feed format that I am using to cancel the Amazon order.
I have successfully been able to submit this feed to MWS, but every time when I check the feed submission result it always gives this error
'The XML you submitted is ill-formed at the Amazon Envelope XML level
at (or near) line 1, column 485'.
I created the xml format according to this Selling on Amazon: Guide to XML.
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_xxxxxx_108291953</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>123-1234567-1234567</AmazonOrderID>
<StatusCode>Failure</StatusCode>
<CancelReason>BuyerCanceled</CancelReason>
</OrderAcknowledgment>
</Message>
</AmazonEnvelope>
Can any one help me what i am missing here in the xml format?
There are two problems with your XML code:
Amazon uses "OrderAcknowledgement", not "OrderAcknowledgment". While that choice may be debatable, the XSDs do not leave any room for a different spelling. (this applies to the MessageType and both opening and closing XML tag, your spelling is correct for the opening tag only)
CancelReason is only valid inside <Item> substructures.
The following XML validates:
<?xml version="1.0"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_xxxxxx_108291953</MerchantIdentifier>
</Header>
<MessageType>OrderAcknowledgement</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderAcknowledgement>
<AmazonOrderID>123-1234567-1234567</AmazonOrderID>
<StatusCode>Failure</StatusCode>
<Item>
<AmazonOrderItemCode>12345678901234</AmazonOrderItemCode>
<CancelReason>BuyerCanceled</CancelReason>
</Item>
<Item>
<AmazonOrderItemCode>12345678901235</AmazonOrderItemCode>
<CancelReason>BuyerCanceled</CancelReason>
</Item>
<Item>
<AmazonOrderItemCode>12345678901237</AmazonOrderItemCode>
<CancelReason>BuyerCanceled</CancelReason>
</Item>
</OrderAcknowledgement>
</Message>
</AmazonEnvelope>