API Error Handling

Objective

Seller are increasingly using the product API in Seller Center to create or update their products, as can be seen in the API Analytics Overview. Unfortunately, errors can occur during import and it is often difficult to find the causes of these errors.

Precondition

It is recommended that Seller full access users create a separate “Seller API Access ” -user under their accounts.

Usage

Please check regularly the API documentation that is provided in Seller Center under Help > API-Documentation. This documentation is frequently updated with new calls.

Whenever products is uploaded via CSV/API, a feed is created, which means that the file is queued and processed at a later time . Usually, the feed is processed approximately 1-2 minutes later. If there are already multiple feeds queued up (especially with a large number of products), the processing can take a longer.

Once a feed is processed as an API-user, there is the possibility to check the status of the feed (to determine if it was successful or if there were any issues). By using Webhooks, Seller can be notified when a feed is finished. For more information, please read the article for Webhooks and Integration Management.

Feed Status Check

The feed status can be checked using the call “FeedStatus”

An example is given below:

Seller-Center-URL?Action=FeedStatus&FeedID=ca5d0b57-4ec4-4e44-bdaa-060cae1eea04&Format=XML&Timestamp=2015-07-08T18%3A51%3A48%2B10%3A00&UserID=email-address&Version=1.0&Signature=c869e2f159ea27f0ae7e223ccc50a12e69a4a8eb028d9774000bb0e369098f51

The FeedId is returned in the response after a feed has been uploaded. An example result of a feed with errors is given below:

<?xml version=“1.0” encoding=“UTF-8”?>
<SuccessResponse>
<Head>
<RequestId/>
<RequestAction>FeedStatus</RequestAction>
<ResponseType>FeedDetail</ResponseType>
<Timestamp>2015-07-08T18:52:31+1000</Timestamp>
<RequestParameters>
<FeedID>ca5d0b57-4ec4-4e44-bdaa-060cae1eea04</FeedID>
</RequestParameters>
</Head>
<Body>
<FeedDetail>
<Feed>ca5d0b57-4ec4-4e44-bdaa-060cae1eea04</Feed>
<Status>Finished</Status>
<Action>ProductUpdate</Action>
<CreationDate>2015-07-08 18:42:05</CreationDate>
<UpdatedDate>2015-07-08 18:43:09</UpdatedDate>
<Source>api</Source>
<TotalRecords>289</TotalRecords>
<ProcessedRecords>289</ProcessedRecords>
<FailedRecords>35</FailedRecords>
<FeedErrors>
<Error>
<Code></Code>
<Message>Field SellerSku (for Seller SKU: AN_SD_1079687) with value ‘AN_SD_1079687’     has a problem: Seller SKU ‘AN_SD_1079687’ not found</Message>
</Error>
                </FeedErrors>
           </FeedDetail>
      </Body>
 </SuccessResponse>

Retrieve Uploaded Data

Based on this error report, the user is also able to retrieve the uploaded data in order to check the data directly.

  • In order to do this, the call GetFeedRawInput returns the uploaded data in Base64 encoding. To decode the data, the following page can be used: https://www.base64decode.org/.

The request URL will look like the following:

Seller-Center-URL?Action=GetFeedRawInput&FeedIdList=[“83380623-57c9-4163-b062-9f558d1934c2”]&Format=XML&Timestamp=2015-07-09T16%3A26%3A51%2B10%3A00&UserID=
email-address&Version=1.0&Signature=025d81f072e1df7ad2d46804ae1fecf261da7b7cb87d53209f96401f13a7c435
Please make sure that the FeedId is surrounded by quotation marks. Multiple feed IDs can be listed within the brackets. An example could look like the following: [“12455-7544″,”8754-5454”].