PHP API missing Client.GetSegments

It seems the PHP class is missing the GetSegments call..

I tryed to just duplicate the GetLists call and edit it as follows

public function clientGetSegments( $client_id = null )
        if ( !$client_id )
            $client_id = $this->client_id;
        return $this->makeCall( 'Client.GetSegments'
            , array(
                'params' => array(
                    'ClientID' => $client_id

But no such love.. it "somewhat"works when I use post or get instead of soap, but it still spews out errors. Mostly in the simplexml_load_string function internally..

If any one has already fixed this please let me know..


Ben Ben, 9 years ago

Hi Alex,

I've been digging into this and the problem is with the API - there has been a case mis-match with the method parameters and that's causing the problem in some development environments, including this PHP wrapper.

We've fixed this issue in our development environment, and still have some testing to do before this is pushed live but we have a planned update on Sunday afternoon US Central time which will include this update. After that time the code you have here will work.

Ken Ken, 9 years ago

Hi Alex,

The fix has been deployed live. Feel free to get back to us if you have any other problems or questions.
Alex D, 9 years ago

Great. Works perfect. Now is there any way I can get the segment count via API? I know you guys are caching this for performance reasons, but it would be usefull to be able to get the number..

Cheers! Look forward to the day when I can send campaigns via API as well!!

Alex Duffield - Owner
InControl Solutions
Alex D, 9 years ago

When requesting segments, from a list that has no segments the API should return "All Subscribers" as a segment, just as the interface for CM does.

Alex Duffield - Owner
InControl Solutions

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free