1. Go to this page and download the library: Download guinee/eservice 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/ */
$reference = 'DEM-2026-00042';
$client->sendMessage($reference, 'Votre dossier est en cours de traitement.');
// Recommandé : le fichier est téléversé et conservé avec la demande (15 Mo max).
$client->sendDocument(
$reference,
[
'file' => __DIR__ . '/decision.pdf',
'filename' => 'decision.pdf',
'title' => 'Décision',
'numero' => 'REG-2026-001',
],
'Voici votre document.',
);
// Toujours compatible : document déjà hébergé par le partenaire.
$client->sendDocument(
$reference,
ResultData::make()->numero('REG-2026-001')->documentUrl('https://…/doc.pdf'),
);
$client->requestDocuments($reference, ['CNI', 'Justificatif de domicile'], 'Merci de compléter.');
$client->validAppointment($reference, 'rdv', 'approve');
$client->completeDemand($reference, 'Votre demande est terminée.');
// Callback webhook (demande entière — plus lié à une étape)
$client->callback($reference, CallbackRequest::completed(['numero' => 'REG-1']));
use EService\Partner\Dossier\IncomingDossier;
$dossier = IncomingDossier::fromPayload(file_get_contents('php://input'));
$reference = $dossier->reference; // utiliser ensuite dans sendMessage / sendDocument / …
http_response_code(200);
header('Content-Type: application/json');
echo json_encode($dossier->ackResponse('JOB-' . uniqid(), 'accepted'));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.