Data Delay in API?

I just set up a fresh account to test an API integration that we are planning to do on a client account. I created a new email list under the account, but I can't seem to get that list to show up through the API's Client Subscriber List call.

I'm am using the Ruby wrapper, and as far as I can tell the the following code should return an array of the Subscriber Lists that I have created, but it only returns nil:

CreateSend.api_key 'xxx'
cs = CreateSend::CreateSend.new
cs.clients.first.lists

According to the Ruby Gem code, the Clients list method is the same as the Clients Subscriber Lists method listed in the API docs:

http://api.createsend.com/api/v3/clients/{clientid}/lists.{xml|json}

Am I misunderstanding what this call is supposed to return, or is there some kind of data delay between creating new lists and seeing them in the API?

To be clear, I'm looking to access the lists created under the Lists & Subscribers tab at http://accountname.createsend.com/subscribers/

jfredson, 5 years ago

I'm an idiot. I didn't notice that cs.clients was returning an array of Hashie objects rather than Client objects like I had assumed.

Seems that you have to take the ClientID returned in the Hashie object and use it to manually create a Client object to then get an array of lists for the client.

jamesd jamesd, 5 years ago

Yup, I'm making use of hashie for converting all the responses generically in the ruby library.

The tests should be a good reference of how to access and use the different resources.

Always very happy to have feedback on any of our API libraries though. :)

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098