StockService :: GetCombinaisonLotSerie

The GET method, is used to retrieve data.

The list of necessary parameters for sending a query:
  • string refArticle,
  • int idDepot,
  • decimal quantite.

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

Input parameters:

?refArticle=LINGOR18&idDepot=1&quantite=14

Example:

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

use services\WebServices100;

$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/StockService/rest/CombinaisonLotSeries?refArticle=LINGOR18&idDepot=1&quantite=14';

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

$response = json_decode($result);

Result:

Array
(
[0] => stdClass Object
(
[RefArticle] => LINGOR18
[NumLotSerie] => 12
[Complement] =>
[DatePeremption] => /Date(-2208992400000+0100)/
[DateFabrication] => /Date(1357772400000+0100)/
[Quantite] => 1
[QuantiteRestante] => 0
[QuantiteReserve] => 0
[EstEpuise] =>
[IdDepot] => 1
[TypeMouvement] => 1
[Createur] => COLU
[DateModification] => /Date(1518779040000+0100)/
)
[1] => stdClass Object
(
[RefArticle] => LINGOR18
[NumLotSerie] => LOT-BDF9411123
[Complement] =>
[DatePeremption] => /Date(-2208992400000+0100)/
[DateFabrication] => /Date(1357081200000+0100)/
[Quantite] => 4
[QuantiteRestante] => 0
[QuantiteReserve] => 0
[EstEpuise] =>
[IdDepot] => 1
[TypeMouvement] => 1
[Createur] => COLU
[DateModification] => /Date(1518774660000+0100)/
)
[2] => stdClass Object
(
[RefArticle] => LINGOR18
[NumLotSerie] => LOT-BDF9412083
[Complement] =>
[DatePeremption] => /Date(-2208992400000+0100)/
[DateFabrication] => /Date(1357081200000+0100)/
[Quantite] => 3
[QuantiteRestante] => 0
[QuantiteReserve] => 0
[EstEpuise] =>
[IdDepot] => 1
[TypeMouvement] => 1
[Createur] => COLU
[DateModification] => /Date(1493886360000+0200)/
)
[3] => stdClass Object
(
[RefArticle] => LINGOR18
[NumLotSerie] => TEST_INV100_1
[Complement] =>
[DatePeremption] => /Date(1437429600000+0200)/
[DateFabrication] => /Date(1405893600000+0200)/
[Quantite] => 6
[QuantiteRestante] => 0
[QuantiteReserve] => 0
[EstEpuise] =>
[IdDepot] => 1
[TypeMouvement] => 1
[Createur] => COLU
[DateModification] => /Date(1524155580000+0200)/
)
)