TiersService :: GetListClient
The POST method, is used to retrieve data.
The list of parameters is not mandatory to request:
- Criteria criteria,
- array orders,
- int pageNumber,
- int rowsPerPage.
Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).
Input parameters:
- Criteria
{"criteria":
{
"__type":"CriteriaLogical:http://www.proconsult.lu/WebServices100",
"Operand1":
{
"__type":"CriteriaComparison:http://www.proconsult.lu/WebServices100",
"FieldName": "NumeroTiers",
"Operator": "0",
"Value": "BAGUES"
},
"Operator":0
}
}
- orders
{"orders":[{"CodePostal":"Asc"}]}- pageNumber
{pageNumber: 1}- rowsPerPage
{rowsPerPage: 10}
Example:
require (__DIR__ . '/service/Criteria.php');
use services\WebServices100;
use services\Criteria;
// add parameters
$response = new Criteria();
$response->setType('CriteriaLogical:http://www.proconsult.lu/WebServices100');
$response->setFieldName('NumeroTiers');
$response->setOperator("0");
$response->setValue("BAGUES");
$response->setOperand(
[
'Operand1' => [
'__type' => 'CriteriaComparison:http://www.proconsult.lu/WebServices100',
'FieldName' => 'NumeroTiers',
'Operator' => '0',
'Value' => 'BAGUES']
);
$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/TiersService/rest/GetListClient';
$data = $response->getResponse();
// Send requests to receive data
$result = WebServices100::getData($url, $data)));
$response = json_decode($result);
Result:
Array
(
[0] => stdClass Object
(
[TypeTiers] => 0
[NumeroTiers] => BAGUES
[NumeroTiersPayeur] => BAGUES
[IdCategorieComptable] => 1
[IdCategorieTarifaire] => 1
[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] => 06 65 87 00 00
[Fax] => 06 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(549489600000+0400)/
)
[1] => stdClass Object
(
[Name] => Capital social
[Type] => 3
[Size] => 0
[EstCalculee] =>
[Value] => 0
)
[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] => 0
)
[5] => stdClass Object
(
[Name] => Points fidélité restants
[Type] => 3
[Size] => 0
[EstCalculee] => 1
[Value] => 0
)
[6] => stdClass Object
(
[Name] => Fin validité carte fidélité
[Type] => 1
[Size] => 0
[EstCalculee] =>
[Value] => /Date(1199048400000+0300)/
)
[7] => stdClass Object
(
[Name] => Date négociation règlement
[Type] => 2
[Size] => 0
[EstCalculee] =>
[Value] => /Date(1214769600000+0400)/
)
)
)
)