PHPackages                             julienbornstein/doctolib-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. julienbornstein/doctolib-php

ActiveLibrary[API Development](/categories/api)

julienbornstein/doctolib-php
============================

Doctolib PHP Client

0.1.2(4y ago)4944[3 issues](https://github.com/julienbornstein/doctolib-php/issues)MITPHPPHP &gt;=7.4

Since May 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/julienbornstein/doctolib-php)[ Packagist](https://packagist.org/packages/julienbornstein/doctolib-php)[ Docs](https://github.com/julienbornstein/doctolib-php)[ RSS](/packages/julienbornstein-doctolib-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (11)Versions (4)Used By (0)

Doctolib PHP Client
===================

[](#doctolib-php-client)

[![Latest Release](https://camo.githubusercontent.com/24695bc0f9a6ee1fd4016ff771da9f868903e8ba0c9cadbaf17ead35fcc747d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a756c69656e626f726e737465696e2f646f63746f6c69622d7068702e7376673f7374796c653d666c61742d737175617265)](https://github.com/julienbornstein/doctolib-php/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![GitHub Workflow Status](https://camo.githubusercontent.com/897136b33c6bf8aad5e70bd5578daa6fdf37f77bc4fc90b20d3ad08cff333675/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a756c69656e626f726e737465696e2f646f63746f6c69622d7068702f436f6e74696e756f7573253230496e746567726174696f6e3f7374796c653d666c61742d737175617265)](https://github.com/julienbornstein/doctolib-php/actions/workflows/continuous-integration.yml)[![Codecov](https://camo.githubusercontent.com/921a8707b7085c0508f0e503ec3611feb7380699ca140e4e39d97b76bf681368/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6a756c69656e626f726e737465696e2f646f63746f6c69622d706870)](https://app.codecov.io/gh/julienbornstein/doctolib-php)[![Total Downloads](https://camo.githubusercontent.com/b0fb38a87e4d08c866a322bfe67c1062532e597a9e8779f707227c01d0dfa5bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756c69656e626f726e737465696e2f646f63746f6c69622d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/julienbornstein/doctolib-php)

**Note:** This is an UNOFFICIAL Doctolib PHP Client.

This is a PHP client for [Doctolib](https://www.doctolib.fr/). It includes the following:

- Helper methods for REST endpoints:
    - Search Profiles (Doctor) by Speciality and Location, and get Booking and Availability information.
    - Get Patient, Profile, Appointment.
    - Create, Confirm, Delete an Appointment.
    - Authentication. *broken*
- PSR-4 autoloading support.

Requirements
------------

[](#requirements)

- PHP 7.4 or later.
- PHP [cURL extension](http://php.net/manual/en/book.curl.php) (Usually included with PHP).

Installation
------------

[](#installation)

Install it using [Composer](https://getcomposer.org/):

```
$ composer require julienbornstein/doctolib-php
```

Usage
-----

[](#usage)

```
$doctolib = new Doctolib\Client(
    new Symfony\Component\HttpClient\HttpClient(),
    SerializerFactory::create()
);

$searchResults = $doctolib->search('dentiste');
$speciality = $searchResults['specialities'][0];

$profiles = $doctolib->searchProfilesBySpecialityAndLocation('dentiste', '75009-paris'); // = https://www.doctolib.fr/dentiste/75009-paris
$profiles = $doctolib->searchProfilesBySpecialityAndLocation('dentiste', '75009-paris', [
    'latitude' => 48.8785328,
    'longitude' => 2.3377854,
]);

$booking = $doctolib->getBooking('cabinet-dentaire-haussmann-saint-lazare');
$agendas = $booking->getAgendas();
$visitMotives = Agenda::getVisitMotivesForAgendas($agendas);

$tomorrow = new DateTime('tomorrow');
$visitMotive = $visitMotives[0];
$availabilities = $doctolib->getAvailabilities($agendas, $tomorrow, $visitMotive->getRefVisitMotiveId());

$firstAvailability = $availabilities[0];
$firstSlot = $firstAvailability->getSlots()[0];

$doctolib->setSessionId('YOUR_SESSION_ID');

$patient = $doctolib->getMasterPatient();

$appointment = $doctolib->createAppointment($booking, $visitMotive, $firstSlot);
$appointment = $doctolib->confirmAppointment($appointment, $patient);

$upcomingAppointments = $doctolib->getUpcomingAppointments();
$appointment = $doctolib->getAppointment('APPOINTMENT_ID');
$doctolib->deleteAppointment('APPOINTMENT_ID');
```

Framework integrations
----------------------

[](#framework-integrations)

### Symfony

[](#symfony)

Add this block in your `services.yaml` file to register the `Client` as a service.

```
    Doctolib\Client:
      arguments:
        $serializer: '@doctolib.serializer'

    doctolib.serializer:
      class: Symfony\Component\Serializer\SerializerInterface
      factory: ['Doctolib\SerializerFactory', 'create']
```

Examples
--------

[](#examples)

You can find some examples in the [examples](examples) directory.

You can also check this project [julienbornstein/doctolib-autobooking](https://github.com/julienbornstein/doctolib-autobooking)

Testing
-------

[](#testing)

```
$ make test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/julienbornstein/doctolib-php/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Julien Bornstein](https://github.com/julienbornstein)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance5

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~123 days

Total

3

Last Release

1612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/274dfb5d01b6a08bdfca95bc73fbcd07844747b24f8fda98fcef3304e66d0d05?d=identicon)[julienbornstein](/maintainers/julienbornstein)

---

Top Contributors

[![julienbornstein](https://avatars.githubusercontent.com/u/548449?v=4)](https://github.com/julienbornstein "julienbornstein (8 commits)")

---

Tags

doctolibpackagedoctolib

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/julienbornstein-doctolib-php/health.svg)

```
[![Health](https://phpackages.com/badges/julienbornstein-doctolib-php/health.svg)](https://phpackages.com/packages/julienbornstein-doctolib-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M518](/packages/shopware-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k16.8k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.7k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
