cancel
Showing results for 
Search instead for 
Did you mean: 

Complex Filter with C# - V1 SOAP

Complex Filter with C# - V1 SOAP

Hi.

I'm using C#, and I'm trying to list customer.list from SOAP API V1.

All the examples I found was in PHP, and the problem is, I know nothing in PHP(Jon Snow).

 

I already tried to use Dictionary, but when I send my object to call() method, I got the answer that is not supported. 

 

The only example I got using complex filter is this below:

$client = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

// If some stuff requires api authentification,
// then get a session token
$session = $client->login('apiUser', 'apiKey');
$complexFilter = array(
    'complex_filter' => array(
        array(
            'key' => 'group_id',
            'value' => array('key' => 'in', 'value' => '1,3')
        )
    )
);
$result = $client->customerCustomerList($session, $complexFilter);

var_dump ($result);

And I need to do this filter using the "created_at" filter.

I already tried this:

Dictionary<string, Dictionary<string, string>> complexFilter = new Dictionary<string, Dictionary<string, string>>();
            Dictionary<string, string> temp = new Dictionary<string, string>();
            string temp2 = "2017-01-14";
            temp.Add("created_at", temp2);
            complexFilter.Add("complex_filter", temp);
            var returnObject = client.call(sessionId, "customer.list", complexFilter);

but it doen't work either.

 

Can someone give me a light, please? 

I'm getting mad...

2 REPLIES 2

Re: Complex Filter with C# - V1 SOAP

did you ever manage to sort this ? I have the same issue now

Re: Complex Filter with C# - V1 SOAP

Someone who solved this question? I cannot be able to get a simple list of customers in c#.

 

What is the c#-type to use for php-array ?

 

I'm using v.1 soap api = 1.9 magento