Murray, Utah | USA
801.265.1100



Full Blog Entry

Amazon API Update Shipping Tracking Information

April 5th 2016 00:46:51 | Programming
blog image for Amazon API Update Shipping Tracking Information

The Problem

Updating order tracking information to Amazon should be easy but it is not. The documentation was generic and the examples on the internet are either not working of they don't give an accurate example on how to submit tracking numbers with their feeds API. The feeds API will give you a success on submitting the request but then it doesn't tell you what is wrong and why it didn't upload. Even Google searching for the same problem didn't reveal any significant solution to what was happening and there seemed to be a bunch of forum post from people with the same problem. So lets hope you found this post because as far as real solutions I was not able to find one which is why I am posting it here. Now I debated putting this information on here for free but "It took me forever to figure out" which is why I'm asking ya'll to donated to my coffee addiction.

The Headache

While trying to implement automatic shipping and tracking number information for Amazon's MarketplaceWebServiceOrders API to help with our customer order system, I ran into some trouble with trying to upload data and send the XML request. It should have been a simple task to push the API request but it wasn't and turned into a huge headache for my team and I. The trouble came from us trying to test all this on a live server with real order information. After weeks and months of testing (half hour here, half hour there) and manually uploading tracking information we seemed to still get the same results from Amazon's upload tracking information API which were submission successful or some crap Amazon error response code.

Testing API worked, why not live API?

Your situation might be a little different then ours but uploading tracking to Amazon's TESTING API worked every time, when it was time to upload and send order tracking to Amazon's live API it just never worked. Your situation might be a little different but for most developers writing code for API calls most are done on a live server with semi-real data. Trial an error is what took me so long on implementing an automated script that uploads tracking numbers. The first time around I wrote all the functions to make it work but just didn't have the time to sit and try and try until I got it correct. A year later (yes we were uploading tracking manually for a year) I had time to figure out why it wasn't working and now is saving us countless hours of manually uploading tracking information.

The Solutions

If you're on a live server, are sick of scratching your head and don't have the time to waste Do yourself a favor, fork out a nice hot steamed brew cup of joe and I will save you hours and hours of time trying to figure out why the hell that amazon API request is not taking your tracking number. I will send you all my information I have on the problem along with my php functions I use to submit the feed correctly. If you don't get an email right away it is because I send this manually so if you have any question you can ask via email as well.


Here is a start of my example function, of course its not completed...

Example:


<?php
function UpdateAmazonShipping($orderId$transId$shipDate$shipCarrier$shipNo$itemId$qty)
{
    global 
$debug;
    
$serviceUrl "https://mws.amazonservices.com";
    
    
$config = array (
      
'ServiceURL' => $serviceUrl,
      
'ProxyHost' => null,
      
'ProxyPort' => -1,
      
'MaxErrorRetry' => 3,
    );
    
     
$service = new MarketplaceWebService_Client(
         
AWS_ACCESS_KEY_ID
         
AWS_SECRET_ACCESS_KEY
         
$config,
         
APPLICATION_NAME,
         
APPLICATION_VERSION
    
);
    
...
?>


 

Name (required)
Email (required - never shown publicly)
Your Comment

captcha

Categories


Blog Portal Links


Contact Us

We Are Available 24/7

Our main place of business and mailing address:

  • Duranged Design Inc
  • 4740 So. Riverside Dr.
  • Murray, Utah 84123 USA
  • 801.265.1100

Feedback Submit your ideas or ask a question

Feedback
Thank you! Message Sent!
ERROR: Message Not Sent!