TarifService :: TarifFournisseursByFournisseur

The GET method, is used to retrieve data.

The list of parameters is not mandatory to request:

  • string fournisseur,
  • 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:

?fournisseur=BILLO&pageNumber=1&rowsPerPage=10

Example:

require (__DIR__ . '/service/WebServices100.php');

use services\WebServices100;

$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/TarifService/rest/TarifFournisseurs?fournisseur=BILLO&pageNumber=1&rowsPerPage=10';

// Send requests to receive data
$result = WebServices100::getData($url)));

$response= json_decode($result);

Result:

Array
(
[0] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 336
[IdGamme2] => 339
[Gamme1] => 34 cm
[Gamme2] => Classique
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[1] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 336
[IdGamme2] => 340
[Gamme1] => 34 cm
[Gamme2] => Forçat
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[2] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 337
[IdGamme2] => 339
[Gamme1] => 42 cm
[Gamme2] => Classique
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[3] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 337
[IdGamme2] => 340
[Gamme1] => 42 cm
[Gamme2] => Forçat
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[4] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 338
[IdGamme2] => 339
[Gamme1] => 54 cm
[Gamme2] => Classique
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[5] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 338
[IdGamme2] => 340
[Gamme1] => 54 cm
[Gamme2] => Forçat
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[6] => stdClass Object
(
[RefArticle] => 1234AAGSANAL
[IdGamme1] => 331
[IdGamme2] => 334
[Gamme1] => 34 cm
[Gamme2] => Classique
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[7] => stdClass Object
(
[RefArticle] => 1234AAGSANAL
[IdGamme1] => 331
[IdGamme2] => 335
[Gamme1] => 34 cm
[Gamme2] => Forçat
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[8] => stdClass Object
(
[RefArticle] => 1234AAGSANAL
[IdGamme1] => 332
[IdGamme2] => 334
[Gamme1] => 42 cm
[Gamme2] => Classique
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
[9] => stdClass Object
(
[RefArticle] => 1234AAGSANAL
[IdGamme1] => 332
[IdGamme2] => 335
[Gamme1] => 42 cm
[Gamme2] => Forçat
[PrixAchat] => 0
[IdFournisseur] => BILLO
)
)