1. Go to this page and download the library: Download montanez50/holded library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
montanez50 / holded example snippets
ded\Caller;
use Holded\Document;
$token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' //your token
$caller = new Caller ($token);
$document = new Document ($caller);
//docType should be one of: {invoice, salesreceipt, creditnote, salesorder, proform, waybill,estimate, purchase, purchaseorder or purchaserefund}
$docType = 'salesreceipt';
$listdocuments = $document->list(null,$docType);
print_r($listdocuments);
lded\Caller;
use Holded\Document;
$caller = new Caller ('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
$document = new Document ($caller);
$salesreceiptid='XXXXXXXXXXXXXXX';
$listdocuments = $document->list(null, ['salesreceipt',$salesreceiptid ]);
print_r($listdocuments);