I'm unable to get the value of sales_order_address table custom column value in
rest/V1/orders/?searchCriteria[filter_groups][0][filters][0][field]=status&searchCriteria[filter_groups][0][filters][0][value]=processing");
I'm unable to get the value of sales_order_address table custom column value in
rest/V1/orders/?searchCriteria[filter_groups][0][filters][0][field]=status&searchCriteria[filter_groups][0][filters][0][value]=processing");
If you append the searchCriteria to the url, the API tries to us the api call
<route url="/V1/orders/:id" method="GET">
<service class="Magento\Sales\Api\OrderRepositoryInterface" method="get"/>
<resources>
<resource ref="Magento_Sales::actions_view" />
</resources>
</route>
The below will returns the data your are looking for. It is more advanced and has the constraint to require Zend dependency. Fortunately, Magento uses Zend and so do most frameworks.
<?php
$token = 'yourtoken';
$httpHeaders = new \Zend\Http\Headers();
$httpHeaders->addHeaders([
'Authorization' => 'Bearer ' . $token,
'Accept' => 'application/json',
'Content-Type' => 'application/json'
]);
$request = new \Zend\Http\Request();
$request->setHeaders($httpHeaders);
$request->setUri('http://<magentoroot>/index.php/rest/V1/orders');
$request->setMethod(\Zend\Http\Request::METHOD_GET);
$params = new \Zend\Stdlib\Parameters([
'searchCriteria' => [
'filterGroups' => [
0 => [
'filters' => [
0 => [
'field' => 'status',
'value' => $input->getArgument('status'),
'condition_type' => 'eq'
]
]
]
],
'current_page' => 1,
'page_size' => 10
],
]);
$request->setQuery($params);
$client = new \Zend\Http\Client();
$options = [
'adapter' => 'Zend\Http\Client\Adapter\Curl',
'curloptions' => [CURLOPT_FOLLOWLOCATION => true],
'maxredirects' => 0,
'timeout' => 30
];
$client->setOptions($options);
$response = $client->send($request);
$response = $response->getBody();