cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Multiple filter of same attribute in Magento 1.9 soap v2 api?

How to add Multiple filter of same attribute in Magento 1.9 soap v2 api?

Hi, 

 

I'm trying to run magento 1.9 saopV2 api. i'm getting salesOrderList from api by applying filter, i have to get orders with multiple status i.e. pending, processing and complete. when i apply filter and submit api i only get orders with one filter only, i.e. pending, how can i get orders with multiple filters

 

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
    <soapenv:Header/>
    <soapenv:Body>
      <urn:salesOrderList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</sessionId>
         <filters xsi:type="ns1:filters">
				 <complex_filter SOAP-ENC:arrayType="ns1:complexFilter[2]" xsi:type="ns1:complexFilterArray">
					<item xsi:type="ns1:complexFilter">
                        <key xsi:type="xsd:string">status</key>
                        <value xsi:type="ns1:associativeEntity">
                        	<key xsi:type="xsd:string">eq</key>
                        	<value xsi:type="xsd:string">pending</value>
                        </value>
                    </item>
                    <item xsi:type="ns1:complexFilter">
                        <key xsi:type="xsd:string">status</key>
                        <value xsi:type="ns1:associativeEntity">
                        	<key xsi:type="xsd:string">eq</key>
                        	<value xsi:type="xsd:string">processing</value>
                        </value>
                    </item>
                    <item xsi:type="ns1:complexFilter">
                        <key xsi:type="xsd:string">updated_at</key>
                        <value xsi:type="ns1:associativeEntity">
                        	<key xsi:type="xsd:string">from</key>
                        	<value xsi:type="xsd:string">2019-06-20 00:00:00</value>
                        </value>
                    </item>
                    <item xsi:type="ns1:complexFilter">
                        <key xsi:type="xsd:string">updated_at</key>
                        <value xsi:type="ns1:associativeEntity">
                        	<key xsi:type="xsd:string">to</key>
                        	<value xsi:type="xsd:string">2019-06-20 23:59:59</value>
                        </value>
                    </item>
            	 </complex_filter>
         </filters>
       </urn:salesOrderList>
    </soapenv:Body>
    </soapenv:Envelope>
1 REPLY 1

Re: How to add Multiple filter of same attribute in Magento 1.9 soap v2 api?

did you find anything?