I am using below curl_init
like this,
$webSiteUrl = 'mydomain.com'
$last2DayUpdated = date('Y-m-d',(strtotime ('-1 day', strtotime(date('Y-m-d')))));
$ch = curl_init("{$webSiteUrl}/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]={$last2DayUpdated}&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq");
But I want to fetch particular info like billing_address,customer_firstname,customer_lastname
For this, I need to use fields
parameter.
But both parameters searchCriteria
and fields
are not working with each other. Only single parameter is working.
Anyone knows how can I use these both parameters together?
UPDATED:
I have tried as below, but not working.
$ch = curl_init("{$webSiteUrl}/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]={$last2DayUpdated}&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&fields=billing_address,customer_firstname,customer_lastname");