TiersService :: Update
The PUT method, is used to retrieve data.
The list of necessary parameters for sending a query:
- Tiers tiers
Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).
Input parameters:
{"tiers":
{
"__type":"Client:http:\/\/www.proconsult.lu\/WebServices100",
"TypeTiers":0,
"NumeroTiers":"TestTESTTEST",
"NumeroTiersPayeur":"BAGUES",
"IdCategorieComptable":1,
"IdCategorieTarifaire":2,
"IdConditionLivraison":1,
"IdModeExpedition":1,
"IdModeleReglement":4,
"Intitule":"Bague's en or",
"Qualite":"",
"Abrege":"Bague's en or",
"Contact":"Mlle Lee Ondine",
"CompteCollectif":"4110000",
"Adresse":"Rue t\u00eate dOr",
"Complement":"BP 65993",
"CodePostal":"57000",
"Ville":"Metz",
"Region":"Lorraine",
"Pays":"France",
"Telephone":"56 65 87 00 00",
"Fax":"56 65 87 00 01",
"Email":"bagues@bagues.fr",
"SiteWeb":"bagues.com",
"NumeroSiret":"02556852465474",
"NumeroTva":"546789",
"CodeEdi":"",
"CodeNAF":"32.12Z",
"Commentaire":"",
"Langue":0,
"EstEnSommeil":false,
"InfosLibres":[
{
"Name":"Date cr\u00e9ation soci\u00e9t\u00e9",
"Type":0,
"Size":0,
"EstCalculee":false,
"Value":""}
]
}
}
Example:
require (__DIR__ . '/service/Tiers.php');
require (__DIR__ . '/service/InfoLibre.php');
use services\Tiers;
use services\InfoLibre;
use services\Webservices100;
$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/TiersService/rest/Insert';
// add parameters
$infosLibres = new InfoLibre();
$infosLibres->setName("Date création société");
$infosLibres->setType(0);
$infosLibres->setSize(0);
$infosLibres->setEstCalculee(false);
$infosLibres->setValue("");
$tier = new Tiers();
$tier->setType("Client:http://www.proconsult.lu/WebServices100");
$tier->setTypeTiers(0);
$tier->setNumeroTiers("TestTESTTEST");
$tier->setNumeroTiersPayeur("BAGUES");
$tier->setIdCategorieComptable(1);
$tier->setIdCategorieTarifaire(2);
$tier->setIdConditionLivraison(1);
$tier->setIdModeExpedition(1);
$tier->setIdModeleReglement(4);
$tier->setIntitule("Bague's en or");
$tier->setQualite("");
$tier->setAbrege("Bague's en or");
$tier->setContact("Mlle Lee Ondine");
$tier->setCompteCollectif("4110000");
$tier->setAdresse("Rue tête dOr");
$tier->setComplement("BP 65993");
$tier->setCodePostal("57000");
$tier->setVille("Metz");
$tier->setRegion("Lorraine");
$tier->setPays("France");
$tier->setTelephone("56 65 87 00 00");
$tier->setFax("56 65 87 00 01");
$tier->setEmail("bagues@bagues.fr");
$tier->setSiteWeb("bagues.com");
$tier->setNumeroSiret("02556852465474");
$tier->setNumeroTva("546789");
$tier->setCodeEdi("");
$tier->setCodeNAF("32.12Z");
$tier->setCommentaire("");
$tier->setLangue(0);
$tier->setEstEnSommeil(false);
$tier->setInfosLibres([$infosLibres->getResponse()]);
$data = $tier->getResponse();
$data_json = json_encode($data);
// Send requests to receive data
$result = WebServices100::getData($url, $data_json);
$response = json_decode($result);
Result:
stdClass Object
(
[__type] => Client:http://www.proconsult.lu/WebServices100
[TypeTiers] => 0
[NumeroTiers] => TESTTESTTEST
[NumeroTiersPayeur] => BAGUES
[IdCategorieComptable] => 1
[IdCategorieTarifaire] => 2
[IdConditionLivraison] => 1
[IdModeExpedition] => 1
[IdModeleReglement] => 4
[Intitule] => Bague's en or
[Qualite] =>
[Abrege] => Bague's en or
[Contact] => Mlle Lee Ondine
[CompteCollectif] => 4110000
[Adresse] => Rue tête dOr
[Complement] => BP 65993
[CodePostal] => 57000
[Ville] => Metz
[Region] => Lorraine
[Pays] => France
[Telephone] => 56 65 87 00 00
[Fax] => 56 65 87 00 01
[Email] => bagues@bagues.fr
[SiteWeb] => bagues.com
[NumeroSiret] => 02556852465474
[NumeroTva] => 546789
[CodeEdi] =>
[CodeNAF] => 32.12Z
[Commentaire] =>
[Langue] => 0
[EstEnSommeil] =>
[InfosLibres] => Array
(
[0] => stdClass Object
(
[Name] => Date création société
[Type] => 2
[Size] => 0
[EstCalculee] =>
[Value] => /Date(-2208999600000+0300)/
)
[1] => stdClass Object
(
[Name] => Capital social
[Type] => 3
[Size] => 0
[EstCalculee] =>
[Value] =>
)
[2] => stdClass Object
(
[Name] => Actionnaire Pal
[Type] => 0
[Size] => 69
[EstCalculee] =>
[Value] =>
)
[3] => stdClass Object
(
[Name] => Score Banque de France
[Type] => 0
[Size] => 14
[EstCalculee] =>
[Value] =>
)
[4] => stdClass Object
(
[Name] => Total points fidélité
[Type] => 3
[Size] => 0
[EstCalculee] => 1
[Value] =>
)
[5] => stdClass Object
(
[Name] => Points fidélité restants
[Type] => 3
[Size] => 0
[EstCalculee] => 1
[Value] =>
)
[6] => stdClass Object
(
[Name] => Fin validité carte fidélité
[Type] => 1
[Size] => 0
[EstCalculee] =>
[Value] =>
)
[7] => stdClass Object
(
[Name] => Date négociation règlement
[Type] => 2
[Size] => 0
[EstCalculee] =>
[Value] =>
)
)
)