Start with Shoppi API
https://www.shoppiapp.com/api/[CLASS]/[METHOD]/[OUTPUT]
| [CLASS] |
The class of methods such as login |
| [METHOD] |
The method such as auth |
| [OUTPUT] |
The type of data format (json, jsonp, text) default is xmlrpc |
Analyzing the return data structure
| Array representation |
Variables |
Array(
“result”=>[RESULT],
“feedback”=>[FEEDBACK],
“redirect”=>[REDIRECT]
);
|
| [RESULT] |
Ok, ko, warning, error |
| [FEEDBACK] |
String or array |
| [REDIRECT] |
Abs or rel URL |
|
PHP API FUNCTION
function api($class,$method,$args='',$lkey='',$uid=''){
$server = 'https://www.shoppiapp.com/api/'.$class.'/'.$method.'/json';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$server);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($curl,CURLOPT_HTTPHEADER,array('lkey:$lkey','uid:$uid'));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($args));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close ($ch);
return $server_output;
}
|
Page
https://www.shoppiapp.com/api/view_page/info/json
| Parameter |
Description |
| pageId |
Integer |
| Return |
Description |
| category |
array |
| title |
string |
| photo |
string |
| content |
string |
| loc |
lat,long |
List orders
https://www.shoppiapp.com/api/show/list/json
| Parameter |
Description |
| pageId |
integer |
| status |
string (pending,paid,delay,chargeback) |
| Return |
Description |
| id |
integer |
| title |
string |
| status |
string |
| currency |
string |
| total |
float |
| ship_cost |
float |
| country |
string |
| city |
string |
| result |
string (ok/ko) |