API Call Assistance

Please forgive my ignorance on this question. I am the support individual for Avtex, but I do not develop the API objects that we use with some of our customers. Please see his notes below to see if you can assist me on our issue we are now having. I do have screen snippets of logs, etc. He custom built a process to age and move contacts out of lists for campaigns, it is now not working.

This issue is as follows, and this thought is coming from our developer (I will also open a support case for this):

Here’s what I think is happening… To do what we need to do, the Windows Service we have has to download the contact list for each campaign, and then perform some logic on each row to decide if that contact should expire or be moved…

To download the contact list CSV is multiple API calls.

They go like so:

  1. Get the ID of the contact list by its name, using a GET to /api/v2/outbound/contactlists?name={ContactListName}
  2. Initiate the export of a contact list using a POST to /api/v2/outbound/contactlists/{ID from step 1}/export
  3. Get the URI to download the contact list using a GET to /api/v2/outbound/contactlists/{ID from step 1}/export
  4. Download the CSV using the URI from step 3 using a GET to the URI returned in step 3.

Step 3 is returning a 404 Not Found error from the API:

Hi there Angelia,

I would check to confirm that the contact list in question has not been deleted. If the contact list has been deleted, then the 404 error your developer is receiving is expected behavior.

If the contact list has not been deleted and you're still receiving the 404 error, please open a case with Care and they can further support you.

Best,
Becky

This is a wild guess w/o more detail, but as I recall, #2 is an asynchronous operation which returns a 202 Accepted. Which means, it may take some time for the operation to complete. Possibly from a half-second to several seconds or more. While the file is not ready, the call to retrieve it will return 404.

The larger the file, the longer the export time. So if this app has just recently began failing, and especially intermittently, I'd check the logic to ensure the appropriate wait / poll / retry logic is implemented.

Thank you! That is what our developer was thinking too, but he was not sure how to make the change, and did not want to do anything without assistance. I have a case opened with support now.

The list has not been deleted, I have the case open with Support. Thank you.

Angelia - in the meantime, I would recommend that your developer introduce wait time between steos 2 and 3 that you outlined above. (As Rj mentioned - if you're calling to retrieve the export without giving adequate time for the export operation to complete, you may experience exactly the error you've reported here.)

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.