PHP code example of liagkos / vatidinfo
1. Go to this page and download the library: Download liagkos/vatidinfo library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
liagkos / vatidinfo example snippets
try {
$client = new Liagkos\Taxis\Vatidinfo('Username-Token', 'Password-Token');
} catch (Exception $e) {
echo $e->getMessage(); // Or whatever for SOAP error (NOT authentication error)
die($e->getCode()); // Or whatever for SOAP error (NOT authentication error)
}
$params = [
'method' => 'query',
'afmFor' => '123456789',
'afmFrom' => '999999999',
'lookDate' => '2017-12-31',
'type' => 'array',
'separator' => '-'
];
$reply = $client->exec($params);
json
{
"success":true,
"data":{
"found":true,
"queryid":"863209758",
"errors":false,
"caller":{
"user":{
"username":"USERNAME",
"fullname":"ΠΑΠ*** ΓΕΩ*** του ΙΩΑ***",
"vatid":"123456789"
},
"owner":{
"fullname":"ΠΑΠ*** ΓΕΩ*** του ΙΩΑ***",
"vatid":"999999999"
}
},
"data":{
"dateShown":{
"date":"2018-07-11 00:00:00.000000",
"timezone_type":3,
"timezone":"UTC"
},
"name":"ΔΗΜΟΣΙΑ ΕΠΙΧΕΙΡΗΣΗ ΗΛΕΚΤΡΙΣΜΟΥ ΑΝΩΝΥΜΗ ΕΤΑΙΡΙΑ",
"title":"Δ.Ε.Η. Α.Ε. - Δ.Ε.Η.",
"vatid":"090000045",
"doyID":"1159",
"doyName":"Φ.Α.Ε. ΑΘΗΝΩΝ",
"address":{
"street":"ΧΑΛΚΟΚΟΝΔΥΛΗ",
"number":"30",
"city":"ΑΘΗΝΑ",
"zip":"10432"
},
"isWhat":"ΜΗ ΦΠ",
"isCompany":true,
"companyType":"ΑΕ",
"isActive":true,
"isActiveTxt":"ΕΝΕΡΓΟΣ ΑΦΜ",
"type":"ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ",
"regDate":{
"date":"1900-01-01 00:00:00.000000",
"timezone_type":3,
"timezone":"UTC"
},
"stopDate":false,
"normalVat":true,
"activities":{
"1":{
"descr":"ΚΥΡΙΑ",
"items":[
{
"code":35141000,
"descr":"ΥΠΗΡΕΣΙΕΣ ΕΜΠΟΡΙΟΥ (ΠΩΛΗΣΗΣ) ΗΛΕΚΤΡΙΚΟΥ ΡΕΥΜΑΤΟΣ",
"formatted":"35.14.10.00"
}
]
},
"2":{
"descr":"ΔΕΥΤΕΡΕΥΟΥΣΑ",
"items":[
{
"code":5200000,
"descr":"ΕΞΟΡΥΞΗ ΛΙΓΝΙΤΗ",
"formatted":"05.20.00.00"
},
{
"code":35111000,
"descr":"ΠΑΡΑΓΩΓΗ ΗΛΕΚΤΡΙΚΟΥ ΡΕΥΜΑΤΟΣ",
"formatted":"35.11.10.00"
},
{
"code":35111001,
"descr":"ΠΑΡΑΓΩΓΗ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ ΑΠΟ ΑΕΡΟΣΤΡΟΒΙΛΙΚΕΣ ΜΟΝΑΔΕΣ ΠΕΤΡΕΛΑΙΟΥ",
"formatted":"35.11.10.01"
},
{
"code":35111002,
"descr":"ΠΑΡΑΓΩΓΗ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ ΑΠΟ ΛΙΓΝΙΤΙΚΕΣ ΜΟΝΑΔΕΣ",
"formatted":"35.11.10.02"
},
{
"code":35111005,
"descr":"ΠΑΡΑΓΩΓΗ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ ΑΠΟ ΜΟΝΑΔΕΣ ΦΥΣΙΚΟΥ ΑΕΡΙΟΥ",
"formatted":"35.11.10.05"
},
{
"code":35111007,
"descr":"ΠΑΡΑΓΩΓΗ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ ΑΠΟ ΣΤΑΘΜΟΥΣ ΕΣΩΤΕΡΙΚΗΣ ΚΑΥΣΗΣ",
"formatted":"35.11.10.07"
},
{
"code":35111008,
"descr":"ΠΑΡΑΓΩΓΗ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ ΑΠΟ ΥΔΡΟΗΛΕΚΤΡΙΚΟΥΣ ΣΤΑΘΜΟΥΣ",
"formatted":"35.11.10.08"
},
{
"code":35121000,
"descr":"ΥΠΗΡΕΣΙΕΣ ΜΕΤΑΔΟΣΗΣ ΗΛΕΚΤΡΙΚΟΥ ΡΕΥΜΑΤΟΣ",
"formatted":"35.12.10.00"
},
{
"code":35131000,
"descr":"ΥΠΗΡΕΣΙΕΣ ΔΙΑΝΟΜΗΣ ΗΛΕΚΤΡΙΚΟΥ ΡΕΥΜΑΤΟΣ",
"formatted":"35.13.10.00"
},
{
"code":77401901,
"descr":"ΥΠΗΡΕΣΙΕΣ ΜΕΤΑΒΙΒΑΣΗΣ Η ΠΑΡΑΧΩΡΗΡΗΣ ΧΡΗΣΗΣ ΑΥΛΩΝ ΑΓΑΘΩΝ (ΔΙΚΑΙΩΜΑΤΩΝ ΠΝΕΥΜΑΤΙΚΗΣ ΙΔΙΟΚΤΗΣΙΑΣ, ΔΙΚΑΙΩΜΑΤΩΝ ΕΚΠΟΜΠΗΣ ΑΕΡΙΩΝ ΘΕΡΜΟΚΗΠΙΟΥ, ΔΙΠΛΩΜΑΤΩΝ ΕΥΡΕΣΙΤΕΧΝΙΑΣ, ΑΔΕΙΩΝ ΕΚΜΕΤΑΛΛΕΥΣΗΣ ΒΙΟΜΗΧΑΝΙΚΩΝ ΚΑΙ ΕΜΠΟΡΙΚΩΝ ΣΗΜΑΤΩΝ ΚΑΙ ΠΑΡΟΜΟΙΩΝ ΔΙΚΑΙΩΜΑΤΩΝ",
"formatted":"77.40.19.01"
}
]
}
}
}
}
}