문제

I am using this

http://domain.com/index.php/rest/V1/orders/7??fields=billing_address,customer_firstname,customer_lastname

it return the billing_address,customer_firstname,customer_lastname of order id 7, I want to get these details of all orders so i try

http://domain.com/index.php/rest/V1/orders?searchCriteria=all

it work return all orders But i want to get specific feilds for example billing_address,customer_firstname,customer_lastname.

How can I get specifics columns of all orders?

도움이 되었습니까?

해결책

try this one, the response will have only these fields.

entity_id, billing_address,customer_firstname, and customer_lastname only

http://www.domain.com/rest/V1/orders?
searchCriteria[filter_groups][0][filters][0][field]=entity_id&
searchCriteria[filter_groups][0][filters][0][value]=1&
searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&
searchCriteria[sortOrders][0][field]=increment_id&
fields=items[entity_id,billing_address,customer_firstname,customer_lastname]

check link for a detailed guide

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top