ArticleService :: GetArticleFournisseurList

The POST method, is used to retrieve data.

The list of parameters is not mandatory to request:

  • Criteria criteria,

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": "IdArticle",
   "Operator": "0",
   "Value": "BAAR01"
  },
  "Operator":0
 }
}

Example:

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

use services\Criteria;
use services\WebServices100;

// add parameters
$data = new stdClass();
$data->criteria = null;

$json_data = json_encode($data);

$url = 'http://<Your ip>:<Your Port>/WebServices100/<Your environment>/ArticleService/rest/GetArticleFournisseurList';

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

$response= json_decode($result);

Result:

Array
(
    [0] => stdClass Object
        (
            [IdArticle] => BAAR01
            [IdFournisseur] => BILLO
            [ReferenceFournisseur] => BA100
            [PrixAchat] => 186
            [IdUnite] => 1
            [Conversion] => 1
            [DelaiApprovisionementEnJours] => 15
            [GarantieEnMois] => 12
            [Colisage] => 1
            [QuantiteMini] => 1
            [TypeTarification] => 0
            [Gamme] => 0
            [EstFournisseurPrincipal] => 1
            [PrixAchatDevise] => 0
            [IdDevise] => 0
            [Remise] => 0
            [TypeRemise] => 0
            [CodeBarres] => 
        )

    [1] => stdClass Object
        (
            [IdArticle] => BAAR01
            [IdFournisseur] => BRELO
            [ReferenceFournisseur] => BA112
            [PrixAchat] => 195
            [IdUnite] => 1
            [Conversion] => 1
            [DelaiApprovisionementEnJours] => 0
            [GarantieEnMois] => 0
            [Colisage] => 1
            [QuantiteMini] => 1
            [TypeTarification] => 0
            [Gamme] => 0
            [EstFournisseurPrincipal] => 
            [PrixAchatDevise] => 0
            [IdDevise] => 0
            [Remise] => 0
            [TypeRemise] => 0
            [CodeBarres] => 
        )

    [2] => stdClass Object
        (
            [IdArticle] => BAAR01
            [IdFournisseur] => COLLI
            [ReferenceFournisseur] => BAC28
            [PrixAchat] => 201
            [IdUnite] => 1
            [Conversion] => 1
            [DelaiApprovisionementEnJours] => 0
            [GarantieEnMois] => 0
            [Colisage] => 1
            [QuantiteMini] => 1
            [TypeTarification] => 0
            [Gamme] => 0
            [EstFournisseurPrincipal] => 
            [PrixAchatDevise] => 0
            [IdDevise] => 0
            [Remise] => 0
            [TypeRemise] => 0
            [CodeBarres] => 
        )
)