Search code examples
phpsoapnusoapamazonsellercentral

Has anyone succeeded at downloading orders from Amazon Seller Central using PHP?


It looks like this question has been asked before, here and in other places on the web, but I have yet to find any solid documentation on how it's done.

We need a way to pragmatically "suck" orders out of Amazon Seller Central on a regular basis, and insert the data into a database on our server for processing. There's hints that you can create a nuSOAP client that does this, but Amazon's documentation is weak to non-existent.

Has anyone actually got this to work? Is there a good resource that I may have overlooked?

Amazon turned my reports into XML format, but this still isn't working.

I get the response:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SE="http://schemas.xmlsoap.org/soap/encoding/">

<SOAP-ENV:Body>
<ns1:ArrayOfMerchantDocumentInfo_Response xsi:type="ns0:ArrayOfMerchantDocumentInfo" xmlns:ns0="http://www.amazon.com/merchants/merchant-interface/" xmlns:ns1="http://systinet.com/xsd/SchemaTypes/"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Which is supposed to be a list of available documents (orders). But it looks like a bunch of nothing to me!

I've found a sample written in PHP, here. Unfortunately, it doesn't work. It (quite literally) does nothing.

I sent an email to their support department, and got a one-line RTM pointing to this less than thorough documentation.

I'm still going to try and get this working, and I'll post back with update.

Amazon's Documentation Says:

Although Amazon.com developed this initial version, we have no intent to support, maintain, or otherwise revise it in the future. Our hope is that someone in the Open Source community will step forward as the package maintainer, and later release new versions pursuant to the applicable licensing requirements.


Solution

  • Thanks everyone,

    I did eventually get this working (after 3 weeks of hacking at their sample code).

    It was a complete nightmare. You start with their sample code (which they claim doesn't exist), then you have to find about 20 different pear libraries, and then rename them because they're all named wrong.

    Then you have to change the methods your calling via SOAP to undocumented ones- because the ones that are in the documentation don't actually work.

    ...and finally, have them set your reports as XML and schedule for every 4 hours. Which actually takes 3 days before it starts generating reports.

    Of course, any email to their 'support' department basically gets you a reply that says:

        Thank you for contacting Amazon.
    
        Please enjoy this view of our middle finger.
    
        Have a nice day!
    

    (and then they have the audacity to send a follow-up email asking if their response was helpful!) Amazon sucks. I'll be glad when we get rid of them.