DocumentService :: GetListLigneDocument

The POST method, is used to retrieve data.

The list of parameters is not mandatory to request:

  • TypeDocument typeDocument,
  • string numeroDocument

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

Input parameters:

{"typeDocument":14,"numeroDocument":"FBR00001"}

Example:

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

use services\WebServices100;

// add parameters
$data = new stdClass();
$data->typeDocument = 14;
$data->numeroDocument = "FBR00001";

$json_data = json_encode($data);

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

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

$response= json_decode($result);

Result:

Array
(
    [0] => stdClass Object
        (
            [__type] => LigneArticle:http://www.proconsult.lu/WebServices100
            [Id] => 121
            [TypeDocument] => 14
            [Domaine] => 1
            [NumeroDocument] => FBR00001
            [NumeroDocumentBC] => 
            [NumeroDocumentBL] => 
            [NumeroDocumentPL] => 
            [Date] => /Date(1420578000000+0300)/
            [DateBC] => /Date(1420578000000+0300)/
            [DateBL] => /Date(1420578000000+0300)/
            [DatePL] => /Date(-2208999600000+0300)/
            [NumeroLigne] => 10000
            [Designation] => Stylo plume dorée Sill Vany
            [InfosLibres] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Colisage
                            [Type] => 3
                            [Size] => 0
                            [EstCalculee] => 
                            [Value] => 
                        )

                    [1] => stdClass Object
                        (
                            [Name] => Unité de colisage
                            [Type] => 0
                            [Size] => 21
                            [EstCalculee] => 
                            [Value] => 
                        )

                    [2] => stdClass Object
                        (
                            [Name] => Commentaires
                            [Type] => 0
                            [Size] => 69
                            [EstCalculee] => 
                            [Value] => 
                        )

                )

            [RefArticle] => STYPLOR
            [IdGamme1] => 0
            [IdGamme2] => 0
            [DateLivraison] => /Date(-2208999600000+0300)/
            [PrixUnitaire] => 125
            [PrixUnitaireBC] => 0
            [PrixRevientUnitaire] => 125
            [PrixUnitaireTTC] => 125
            [PrixUnitaireDevise] => 37.27
            [MontantHT] => 562.5
            [MontantTTC] => 562.5
            [CMUP] => 125
            [Quantite] => 5
            [QuantiteBC] => 5
            [QuantiteBL] => 5
            [QuantitePL] => 0
            [PoidsNet] => 100
            [PoidsBrut] => 100
            [Conditionnement] => Pièce
            [QuantiteConditionnement] => 5
            [RefFournisseur] => 
            [RefArticleCompose] => 
            [SectionAnalytique] => 
            [EstValorise] => 1
            [EstNomenclature] => 
            [LigneTTC] => 0
            [IdDepot] => 1
            [IdCollaborateur] => 3
            [RemiseType1] => 1
            [RemiseValeur1] => 10
            [RemiseType2] => 0
            [RemiseValeur2] => 0
            [RemiseType3] => 0
            [RemiseValeur3] => 0
            [CodeTaxe1] => IMP
            [CodeTaxe2] => 
            [CodeTaxe3] => 
            [Taux1] => 0
            [Taux2] => 0
            [Taux3] => 0
            [IdEmplacement] => 2
            [TexteSupplementaire] => 
            [NumLotSerie] => 
            [ComplementLotSerie] => 
            [DatePeremption] => /Date(-2208999600000+0300)/
            [DateFabrication] => /Date(-2208999600000+0300)/
        )

    [1] => stdClass Object
        (
            [__type] => LigneArticle:http://www.proconsult.lu/WebServices100
            [Id] => 122
            [TypeDocument] => 14
            [Domaine] => 1
            [NumeroDocument] => FBR00001
            [NumeroDocumentBC] => 
            [NumeroDocumentBL] => 
            [NumeroDocumentPL] => 
            [Date] => /Date(1420578000000+0300)/
            [DateBC] => /Date(1420578000000+0300)/
            [DateBL] => /Date(1420578000000+0300)/
            [DatePL] => /Date(-2208999600000+0300)/
            [NumeroLigne] => 20000
            [Designation] => Pile Renata 377 pour montres
            [InfosLibres] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Colisage
                            [Type] => 3
                            [Size] => 0
                            [EstCalculee] => 
                            [Value] => 
                        )

                    [1] => stdClass Object
                        (
                            [Name] => Unité de colisage
                            [Type] => 0
                            [Size] => 21
                            [EstCalculee] => 
                            [Value] => 
                        )

                    [2] => stdClass Object
                        (
                            [Name] => Commentaires
                            [Type] => 0
                            [Size] => 69
                            [EstCalculee] => 
                            [Value] => 
                        )

                )

            [RefArticle] => PIL377REN
            [IdGamme1] => 0
            [IdGamme2] => 0
            [DateLivraison] => /Date(-2208999600000+0300)/
            [PrixUnitaire] => 8.75
            [PrixUnitaireBC] => 0
            [PrixRevientUnitaire] => 8.75
            [PrixUnitaireTTC] => 8.75
            [PrixUnitaireDevise] => 2.61
            [MontantHT] => 78.75
            [MontantTTC] => 78.75
            [CMUP] => 8.75
            [Quantite] => 10
            [QuantiteBC] => 10
            [QuantiteBL] => 10
            [QuantitePL] => 0
            [PoidsNet] => 20
            [PoidsBrut] => 20
            [Conditionnement] => Pièce
            [QuantiteConditionnement] => 10
            [RefFournisseur] => 
            [RefArticleCompose] => 
            [SectionAnalytique] => 
            [EstValorise] => 1
            [EstNomenclature] => 
            [LigneTTC] => 0
            [IdDepot] => 1
            [IdCollaborateur] => 3
            [RemiseType1] => 1
            [RemiseValeur1] => 10
            [RemiseType2] => 0
            [RemiseValeur2] => 0
            [RemiseType3] => 0
            [RemiseValeur3] => 0
            [CodeTaxe1] => IMP
            [CodeTaxe2] => 
            [CodeTaxe3] => 
            [Taux1] => 0
            [Taux2] => 0
            [Taux3] => 0
            [IdEmplacement] => 60
            [TexteSupplementaire] => 
            [NumLotSerie] => 
            [ComplementLotSerie] => 
            [DatePeremption] => /Date(-2208999600000+0300)/
            [DateFabrication] => /Date(-2208999600000+0300)/
        )

)