GammeService :: GetCombinaisonGammeListByRefArticle

The GET method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • string refArticle.

Returns data as JSON, for use in PHP, you need to convert JSON in StdClass PHP (PHP function: json_decode ()).

Input parameters:

/1234AAGSANA

Example:

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

use services\WebServices100;

$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/GammeService/rest/CombinaisonsGamme/1234AAGSANA';

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

$response = json_decode($result);

Result:

Array
(
[0] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 336
[IdGamme2] => 339
[IntituleGamme2] => Classique
[Reference] =>
[CodeBarres] =>
[PrixAchat] => 0
[EnSommeil] =>
)
[1] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 336
[IdGamme2] => 340
[IntituleGamme2] => Forçat
[Reference] =>
[CodeBarres] =>
[PrixAchat] => 0
[EnSommeil] =>
)
[2] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 337
[IdGamme2] => 339
[IntituleGamme2] => Classique
[Reference] =>
[CodeBarres] =>
[PrixAchat] => 0
[EnSommeil] =>
)
[3] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 337
[IdGamme2] => 340
[IntituleGamme2] => Forçat
[Reference] =>
[CodeBarres] =>
[PrixAchat] => 0
[EnSommeil] =>
)
[4] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 338
[IdGamme2] => 339
[IntituleGamme2] => Classique
[Reference] =>
[CodeBarres] =>
[PrixAchat] => 0
[EnSommeil] =>
)
[5] => stdClass Object
(
[RefArticle] => 1234AAGSANA
[IdGamme1] => 338
[IdGamme2] => 340
[IntituleGamme2] => Forçat
[Reference] =>
[CodeBarres] =>
[PrixAchat] => 0
[EnSommeil] =>
)
)