BanqueService :: Insert
The POST method, is used to retrieve data.
The list of necessary parameters for sending a query:
- Banque banque.
The list of parameters is not mandatory to request:
- bool useSageProcess = true.
Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).
Input parameters:
{
"banque":
{
"Abrege": "TEST_PAT",
"Adresse": "22 Boulevard General Thierry",
"CodeBic": "BBCELLUL",
"CodePostal": "L-8651",
"ComplementAdresse": "Pas de complément",
"Email": "prirambona@proconsult.lu",
"Interlocuteur": "Patrick RIRAMBONA",
"Intitule": "Ma Banque",
"NomPays": "Luxembourg",
"Region": "Nord",
"SiteInternet": "http:\\proconsult.lu",
"Telecopie": "2555555956",
"Telephone": "3333585558",
"Ville": "Kautenbach"
},
"useSageProcess":"true"
}
Example:
require (__DIR__ . '/service/WebServices100.php'); use services\WebServices100; $url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/BanqueService/rest/Insert'; // add parameters $data = new Banque(); ... $json_data = json_encode($data); // Send requests to receive data $result = WebServices100::getData($url, $json_data); $response = json_decode($result);
Result:
stdClass Object
(
[Id] => 7
[Abrege] => TEST_PAT
[CodeBic] => BBCELLUL
[Intitule] => Ma Banque
[Interlocuteur] => Patrick RIRAMBONA
[Adresse] => 22 Boulevard General Thierry
[ComplementAdresse] => Pas de complément
[CodePostal] => L-8651
[Ville] => Kautenbach
[Region] => Nord
[NomPays] => Luxembourg
[Telephone] => 3333585558
[Telecopie] => 2555555956
[Email] => prirambona@proconsult.lu
[SiteInternet] => http:\proconsult.lu
[Createur] => W100
[DateModification] => /Date(1538660700000+0200)/
)