DocumentService :: GetListDocumentEnCoursByDomaine

The POST method, is used to retrieve data.

The list of parameters is not mandatory to request:

  • DomaineDocument domaine,
  • array orders,
  • 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:

{"domaine":1,"orders":{"NumeroTiers":"Desc"},"pageNumber":0,"rowsPerPage":0}

Example:

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

use services\WebServices100;

// add parameters
$data = new stdClass();
$data->domaine = 1;
$data->orders = ['NumeroTiers'=> 'Desc'];
$data->pageNumber = 0;
$data->rowsPerPage  = 0;

$json_data = json_encode($data);

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

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

$response= json_decode($result);

Result:

Array
(
    [0] => stdClass Object
        (
            [__type] => DocumentAchat:http://www.proconsult.lu/WebServices100
            [TypeDocument] => 16
            [Domaine] => 1
            [NumeroDocument] => FFA00001
            [Date] => /Date(1420146000000+0300)/
            [Reference] => 
            [NumeroTiers] => JASER
            [NumeroTiersPayeur] => JASER
            [Statut] => 2
            [Provenance] => 0
            [DateLivraison] => /Date(-2208999600000+0300)/
            [DateLivraisonRealisee] => /Date(-2208999600000+0300)/
            [DateExpedition] => /Date(-2208999600000+0300)/
            [SectionAnalytique] => 
            [Contact] => 
            [NbFactures] => 0
            [NbColis] => 1
            [TauxEscompte] => 3
            [Langue] => 0
            [Donnee1] => 
            [Donnee2] => 
            [Donnee3] => 
            [Donnee4] => 
            [EstImprime] => 
            [EstTransfere] => 
            [EstCloture] => 
            [EstReliquat] => 
            [IdSouche] => 0
            [IdCollaborateur] => 2
            [IdDepot] => 1
            [IdAdresseLivraison] => 0
            [IdModeExpedition] => 1
            [IdConditionLivraison] => 1
            [IdCategorieComptable] => 1
            [IdCategorieTarifaire] => 1
            [IdModeleReglement] => -1
            [IdDevise] => 0
            [CoursDevise] => 0
            [FraisExpedition] => 0
            [TypeFraisExpedition] => 0
            [TypePrixFraisExpedition] => 0
            [FrancoDePort] => 0
            [TypeFrancoPort] => 0
            [TypePrixFrancoPort] => 0
            [ExpeditionCodeTaxe1] => D20
            [ExpeditionCodeTaxe2] => 
            [ExpeditionCodeTaxe3] => 
            [ExpeditionTaux1] => 0
            [ExpeditionTaux2] => 0
            [ExpeditionTaux3] => 0
            [InfosLibres] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Commentaires
                            [Type] => 0
                            [Size] => 69
                            [EstCalculee] => 
                            [Value] => 
                        )

                    [1] => stdClass Object
                        (
                            [Name] => Divers
                            [Type] => 0
                            [Size] => 69
                            [EstCalculee] => 
                            [Value] => 
                        )

                )

        )

    [1] => stdClass Object
        (
            [__type] => DocumentAchat:http://www.proconsult.lu/WebServices100
            [TypeDocument] => 15
            [Domaine] => 1
            [NumeroDocument] => FBA00001
            [Date] => /Date(1420405200000+0300)/
            [Reference] => 
            [NumeroTiers] => JASER
            [NumeroTiersPayeur] => JASER
            [Statut] => 2
            [Provenance] => 0
            [DateLivraison] => /Date(-2208999600000+0300)/
            [DateLivraisonRealisee] => /Date(-2208999600000+0300)/
            [DateExpedition] => /Date(-2208999600000+0300)/
            [SectionAnalytique] => 
            [Contact] => 
            [NbFactures] => 0
            [NbColis] => 1
            [TauxEscompte] => 3
            [Langue] => 0
            [Donnee1] => 
            [Donnee2] => 
            [Donnee3] => 
            [Donnee4] => 
            [EstImprime] => 
            [EstTransfere] => 
            [EstCloture] => 
            [EstReliquat] => 
            [IdSouche] => 0
            [IdCollaborateur] => 2
            [IdDepot] => 1
            [IdAdresseLivraison] => 0
            [IdModeExpedition] => 1
            [IdConditionLivraison] => 1
            [IdCategorieComptable] => 1
            [IdCategorieTarifaire] => 1
            [IdModeleReglement] => -1
            [IdDevise] => 0
            [CoursDevise] => 0
            [FraisExpedition] => 0
            [TypeFraisExpedition] => 0
            [TypePrixFraisExpedition] => 0
            [FrancoDePort] => 0
            [TypeFrancoPort] => 0
            [TypePrixFrancoPort] => 0
            [ExpeditionCodeTaxe1] => D20
            [ExpeditionCodeTaxe2] => 
            [ExpeditionCodeTaxe3] => 
            [ExpeditionTaux1] => 0
            [ExpeditionTaux2] => 0
            [ExpeditionTaux3] => 0
            [InfosLibres] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Commentaires
                            [Type] => 0
                            [Size] => 69
                            [EstCalculee] => 
                            [Value] => 
                        )

                    [1] => stdClass Object
                        (
                            [Name] => Divers
                            [Type] => 0
                            [Size] => 69
                            [EstCalculee] => 
                            [Value] => 
                        )

                )

        )
)