Locality Documentatie Api
Locality Documentatie Api
Running...<br>
<?
$username = 'user';
$password = 'pass';
$hash = base64_encode($username . ':' . $password);
$headers = array(
'Authorization: Basic ' . $hash
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://marketplace-api.emag.ro/awb/read_zpl?emag_id=9755945';
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result . "\n";
?>
</html>
Using this request will return a base64 encoded content of the ZPL format as in the example below
In order to issue an AWB you need to submit the correct locality id. You can also use the id from the order.
The resource is locality and the available actions are read and count.
name All localities with this name String of length between 0 and 60
modified All localities modified after this date Date with the 'Y-m-d H:i:s' format
55
Key Description Constraints
name All localities with this name String of length between 0 and 60
region2 The name of the county for which you want String of length between 0 and 60
localities
modified All localities modified after this date Date with the 'Y-m-d H:i:s' format
itemsPerPage The maximum number of localities to return. Optional. Integer value between 1 and 100.
currentPage The page offset. Optional. Integer value between 1 and 65535.
When not using the country filter the API will respond only with localities from the platform country.
name_latin The latin name of the locality String of length between 0 and 60
modified Last modification date Date with the 'Y-m-d H:i:s' format
In order to issue an AWB you need to submit the correct courier account id.
56