TiersService :: GetListFournisseur
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": "BILLO"
},
"Operator":0
}
}
- orders
{"orders":[{"Ville":"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("BILLO");
$response->setOperand(
[
'Operand1' => [
'__type' => 'CriteriaComparison:http://www.proconsult.lu/WebServices100',
'FieldName' => 'NumeroTiers',
'Operator' => '0',
'Value' => 'BILLO']
);
$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/TiersService/rest/GetListFournisseur';
$data = $response->getResponse();
// Send requests to receive data
$result = WebServices100::getData($url, $data)));
$response = json_decode($result);
Result:
Array
(
[0] => stdClass Object
(
[TypeTiers] => 1
[NumeroTiers] => BILLO
[NumeroTiersPayeur] => BILLO
[IdCategorieComptable] => 1
[IdCategorieTarifaire] => 1
[IdConditionLivraison] => 1
[IdModeExpedition] => 1
[IdModeleReglement] => 3
[Intitule] => Billot
[Qualite] => M.
[Abrege] => Billot
[Contact] => Mr Félix Billot
[CompteCollectif] => 4010000
[Adresse] => 2, allée des Lilas
[Complement] => BP 21
[CodePostal] => 62000
[Ville] => CALAIS
[Region] =>
[Pays] => France
[Telephone] => 03 21 31 98 58
[Fax] => 03 21 46 30 25
[Email] => billo@billo.fr
[SiteWeb] => billo.fr
[NumeroSiret] =>
[NumeroTva] => FR37545654321
[CodeEdi] =>
[CodeNAF] => 46.52Z
[Commentaire] =>
[Langue] => 0
[EstEnSommeil] =>
[InfosLibres] => Array
(
[0] => stdClass Object
(
[Name] => Date création société
[Type] => 2
[Size] => 0
[EstCalculee] =>
[Value] => /Date(1227992400000+0300)/
)
[1] => stdClass Object
(
[Name] => Capital social
[Type] => 3
[Size] => 0
[EstCalculee] =>
[Value] => 12000
)
[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(-2208999600000+0300)/
)
[7] => stdClass Object
(
[Name] => Date négociation règlement
[Type] => 2
[Size] => 0
[EstCalculee] =>
[Value] => /Date(1233435600000+0300)/
)
)
)
)