I Hope someone help me, Is there any way get merchants,customer,employee, employee etc data using php REST API, please help how it work step by step. advance thank you. :)
The REST API can do that, and is easy to learn, but you will need to do the php coding part yourself. It looks like "jsonencode" and "jsondecode" are two libraries that come with PHP that you could use. You will also need to set the header with the API token.
This is how you can get json data
function curlPost($url,$post_data = NULL) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $this->access_token)); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: Bearer ' . $this->access_token ) ); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); if($post_data != NULL){ curl_setopt($ch, CURLOPT_POSTFIELDS,json_encode($post_data)); } $data = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); return $data; }
1 Person is following this question.