TarifService :: DeleteTarifArticle

The DELETE method, is used to retrieve data.

The list of necessary parameters for sending a query:

  • TarifArticle tarif

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

Input parameters:

{"tarif":{
"RefArticle":"BAAR01",
"IdGamme1":0,
"IdGamme2":0,
"Gamme1":"",
"Gamme2":"",
"IdCategorieTarifaire":"",
"IntituleCategorieTarifaire":"Grossistes12345",
"Coefficient":1.6,
"PrixVente":372,
"Remise":0,
"TypePrix":0}
}

Example:

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

use services\TarifArticle;

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

// add parameters
$data = new TarifArticle();

$data->setRefArticle('BAAR01');
$data->setIdGamme1(0);
$data->setIdGamme2(0);
$data->setGamme1('');
$data->setGamme2('');
$data->setIdCategorieTarifaire('');
$data->setIntituleCategorieTarifaire('Grossistes12345');
$data->setCoefficient('1.6');
$data->setPrixVente(372);
$data->setRemise(0);
$data->setTypePrix(0);

$json_data = json_encode($data->getResponse());

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

Result:

BOOLEAN