php - How to get all tax rates from Magento2 through rest api?
I want to fetch all tax rates from magento2, i tried http://magento2url/rest/default/V1/taxRates/2", here it gives tax rate information of perticular id but i want all.
I tried the following url: http://magento2url/index.php/rest/V1/taxRates?searchCriteria[currentPage]
here response is :
stdClass Object ( [message] => Request does not match any route. )
the same url, if i give products http://magento2url/index.php/rest/V1/products?searchCriteria[currentPage] is working fine.
Please suggest if any one know the answer or give any suggestion how can i proceed here ?
Answer
Solution:
Please try this end point "/V1/taxRates/search?searchCriteria", if you want specific field you can use "/V1/taxRates/search?searchCriteria&fields=items[tax_country_id,tax_region_id,region_name,rate]"
Answer
Solution:
give the url as follows to get all tax rates
http://magentourl/index.php/rest/V1/taxRates/search?searchCriteria[currentPage]
this same for customers also.just rename taxRates to customers to get all customers of current page.