AdresseLivraisonService :: GetListByTiers
The POST method, is used to retrieve data.
The list of necessary parameters for sending a query:
- string numeroTiers.
The list of parameters is not mandatory to request:
- array orders.
Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).
Input parameters:
{"numeroTiers":"BAGUES","orders":[{"Pays":"Desc"}]}
Example:
require (__DIR__ . '/service/WebServices100.php'); use services\WebServices100; // add parameters $data = new stdClass(); $data->numeroTiers = "BAGUES"; $data->orders = array(); $data->orders[]->Pays = "Desc"; $json_data = json_encode($data); $url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/AdresseLivraisonService/rest/GetListByTiers'; // Send requests to receive data $result = WebServices100::getData($url, $json_data); $response = json_decode($result);
Result:
Array
(
[0] => stdClass Object
(
[Id] => 1
[NumeroTiers] => BAGUES
[IdModeExpedition] => 1
[IdConditionLivraison] => 1
[Intitule] => Bague's en or
[Contact] => Mr Or
[Adresse] => Rue tĂȘte dOr
[Complement] =>
[CodePostal] => 57000
[Ville] => METZ
[Region] =>
[Pays] => France
[Telephone] => 06 65 87 00 00
[Fax] => 06 65 87 00 01
[Email] =>
[EstPrincipale] => 1
)
[1] => stdClass Object
(
[Id] => 23
[NumeroTiers] => BAGUES
[IdModeExpedition] => 0
[IdConditionLivraison] => 0
[Intitule] => Toto Intitule 32324
[Contact] => Di Muzio Valerian
[Adresse] => Rue de la liberation 17
[Complement] => boite 3
[CodePostal] => 3510
[Ville] => Dudelange
[Region] => Luxembourg
[Pays] => Luxembourg
[Telephone] => +352 26 31 32 51
[Fax] => +352 26 31 32 51
[Email] => info@proconsult.lu
[EstPrincipale] =>
)
)