Introduction
Planning de Garde is scheduling software for health profesionals.
Authentication
Our API uses an OAuth2 authentication strategy based on the following URLs:
- Authorization URL: https://app.planning-de-garde.fr/oauth/authorize
- Access Token URL: https://app.planning-de-garde.fr/oauth/access_token
The access token must be sent via the classic header method: Authorization
=> Bearer YOUR_TOKEN
.
Integrations
Ruby
A sample Rails app using our Omniauth gem and API connector is available at : https://planning-de-garde-sample-app.herokuapp.com/users/sign_in (app is hosted on Heroku free dyno, please allow 20 seconds for warm up :))
Common endpoints
Users
User profile
GET https://api.planning-de-garde.fr/v2/me
{
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png",
"exchanges_email_enabled": true,
"gardes_reminder_email_enabled": true,
"push_notifications_enabled": true,
"lifen_email_notifications_enabled": true,
"linked_vd_enabled": true
}
Once logged in, you can access the user profile.
HTTP Request
GET https://api.planning-de-garde.fr/v2/me
Access all users
GET https://api.planning-de-garde.fr/v2/users
[
{
"id": 18,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Hépato-Gastro-Entérologie",
"city_name": "Paris",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
{
"id": 19,
"first_name": "Maurice",
"last_name": "Malbeck",
"email": "[email protected]",
"portable": "+33687667676",
"speciality_name": "Hépato-Gastro-Entérologie",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
}
]
Retrieves all users who share a planning
with the curent user.
HTTP Request
GET https://api.planning-de-garde.fr/v2/users
Updating a user
{
"user" : {
"exchanges_email_enabled": true,
"gardes_reminder_email_enabled": false,
"push_notifications_enabled": true
}
}
PUT https://api.planning-de-garde.fr/v2/users/USER_ID
{
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
}
As for now, only the users’s preferences can be updated via the API.
HTTP Request
PUT https://api.planning-de-garde.fr/v2/users/USER_ID
URL Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
user_id | true | User ID | 18 |
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
user[exchanges_email_enabled] | false | Exchanges emails | true/false |
user[gardes_reminder_email_enabled] | false | Weekly emails | true/false |
user[push_notifications_enabled] | false | Push notifications | true/false |
user[lifen_email_notifications_enabled] | false | Lifen emails | true/false |
user[linked_vd_enabled] | false | Linked VD | true/false |
Specialities
Access all specialities
GET https://api.planning-de-garde.fr/v2/specialities
[
{
"id": 1,
"name": "Anatomie et Cytologies pathologiques"
},
{
"id": 2,
"name": "Anesthésie-Réanimation"
}
]
Retrieves all specialities.
HTTP Request
GET https://api.planning-de-garde.fr/v2/specialities
Cities
Access all cities
GET https://api.planning-de-garde.fr/v2/cities
[
{
"id": 1,
"name": "Amiens"
},
{
"id": 2,
"name": "Angers"
}
]
Retrieves all cities.
HTTP Request
GET https://api.planning-de-garde.fr/v2/cities
Holidays
Access all holidays
GET https://api.planning-de-garde.fr/v2/holidays
[
{
"started_on": "2017-01-01",
"color": "#bbb"
},
{
"started_on": "2017-04-06",
"color": "#bbb"
}
]
Retrieves all holidays.
HTTP Request
GET https://api.planning-de-garde.fr/v2/holidays
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
start | true | Start date | 2017-01-01 |
end | true | End date | 2017-12-31 |
Plannings
Acces all plannings
GET https://api.planning-de-garde.fr/v2/plannings
[
{
"id": 67,
"name": "Planning de test",
"started_on": "2017-09-01",
"ended_on": "2017-09-30",
"color": "#00B5DD",
"public_url": "https://app.planning-de-garde.fr/external/plannings/885afb96f9458e"
}
]
Retrieves all active plannings for the current user.
An active planning ended_on
is in the futur and is published.
HTTP Request
GET https://api.planning-de-garde.fr/v2/plannings
Acces a specific planning
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID
{
"id": 67,
"name": "Planning de test",
"started_on": "2017-09-01",
"ended_on": "2017-09-30",
"color": "#00B5DD",
"public_url": "https://app.planning-de-garde.fr/external/plannings/885afb96f9458e",
"gardes": [
{
"id": 6605,
"started_on": "2017-09-01",
"color": "#00B5DD",
"user": {
"id": 18,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Hépato-Gastro-Entérologie",
"city_name": "Paris",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 67,
"name": "Planning de test",
"started_on": "2017-09-01",
"ended_on": "2017-09-30"
},
"line": {
"id": 500,
"name": "Ligne 1"
}
},
{
"id": 6606,
"started_on": "2017-09-02",
"color": "#00B5DD",
"user": {
"id": 19,
"first_name": "Maurice",
"last_name": "Malbeck",
"email": "[email protected]",
"portable": "+33687667676",
"speciality_name": "Hépato-Gastro-Entérologie",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 67,
"name": "Planning de test",
"started_on": "2017-09-01",
"ended_on": "2017-09-30"
},
"line": {
"id": 500,
"name": "Ligne 1"
}
}
],
"lines": [
{
"id": 500,
"name": "Ligne 1"
}
]
}
Retrieves all gardes for a specific planning
HTTP Request
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
start | false | Start date | 2017-01-01 |
end | false | End date | 2017-12-31 |
Acces a specific planning’s users
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/users
[
{
"id": 1,
"first_name": "Jean",
"last_name": "Dupont"
},
{
"id": 2,
"first_name": "Bernard",
"last_name": "Moler"
},
{
"id": 15,
"first_name": "Julie",
"last_name": "Brunet"
}
]
Retrieves all users for a specific planning
HTTP Request
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/users
Gardes
Acces all gardes
GET https://api.planning-de-garde.fr/v2/gardes
[
{
"id": 6607,
"started_on": "2017-09-03",
"color": "#00B5DD",
"user": {
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 67,
"name": "Planning de test",
"started_on": "2017-09-01",
"ended_on": "2017-09-30",
"color": "#00B5DD"
},
"line": {
"id": 500,
"name": "Ligne 1"
}
},
{
"id": 6609,
"started_on": "2017-09-05",
"color": "#00B5DD",
"user": {
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 67,
"name": "Planning de test",
"started_on": "2017-09-01",
"ended_on": "2017-09-30",
"color": "#00B5DD"
},
"line": {
"id": 500,
"name": "Ligne 1"
}
}
]
Retrieves all gardes from published plannings for the current user.
HTTP Request
GET https://api.planning-de-garde.fr/v2/gardes
Wishes
Access all plannings available for wishes management
GET https://api.planning-de-garde.fr/v2/wish_selectors/plannings
[
{
"id": 9213,
"name": "Planning de garde",
"started_on": "2016-11-02",
"ended_on": "2017-05-01"
}
]
A planning needs to be selected first to list all possible wish selectors. The main plannings listing endpoint only display published plannings. This endpoint has the business logic necessary to display all plannings for which wishes can be added or retrieved.
HTTP Request
GET https://api.planning-de-garde.fr/v2/wish_selectors/plannings
Access all wishes
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/wish_selectors
[
{
"title": "Garde",
"subtitle": "18h00 - 08h00",
"started_on": "2017-02-26",
"garde_id": 1743200,
"wish_id": null,
"display_order": 0,
"status": "neutral",
"display_status": "Disponible",
"color": "#ccc"
},
{
"title": "Garde",
"subtitle": "18h00 - 08h00",
"started_on": "2017-02-27",
"garde_id": 1743199,
"wish_id": 187653,
"display_order": 0,
"status": "requested",
"display_status": "Souhait",
"color": "#5cb85c"
},
{
"title": "Garde",
"subtitle": "18h00 - 08h00",
"started_on": "2017-02-28",
"garde_id": 1743198,
"wish_id": 187654,
"display_order": 0,
"status": "unavailable",
"display_status": "Indisponible",
"color": "#d9534f"
}
]
Wish selectors are a proxy for managing wishes. For each garde a wish_selector
will be available and will eventually link to a wish if it exists (otherwise wish_id
will be null
and status
wil be set to neutral
).
If a wish is present, the status and the color will be provided by the API (status
can then be set between requested
and unavailable
).
When multiple wish selectors are available for a given date, display_order
will indicate the order in which to display them.
HTTP Request
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/wish_selectors
Create a wish
POST https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/wish_selectors
[
{
"title": "Garde",
"subtitle": "18h00 - 08h00",
"started_on": "2017-02-28",
"garde_id": 1743019,
"wish_id": 985355,
"display_order": 0,
"status": "unavailable",
"display_status": "Indisponible",
"color": "#d9534f"
}
]
422: Unprocessable entity
{
"message": "Vous ne pouvez pas ajouter un souhait sur un créneau déjà assigné et publié."
}
In some cases, the wishes can’t be modified and a 422
error will be presented.
HTTP Request
POST https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/wish_selectors
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
wish_selector[garde_id] | true | garde ID | 1743019 |
wish_selector[wish_id] | false | Wish ID | 985355 |
wish_selector[requested_status] | true | Requested status | unavailable, requested, neutral |
Swaps
Acces filtered gardes for a planning (to create a new swap)
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/gardes
[
{
"id": 181586,
"started_on": "2017-10-02",
"color": null,
"status": "disapproved",
"selected": false,
"user": {
"id": 191,
"first_name": "Maurice",
"last_name": "Bemole",
"email": "[email protected]",
"portable": null,
"speciality_name": "Hépato-Gastro-Entérologie",
"city_name": "Paris",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-30"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
}
]
Status can be either approved, neutral or disapproved
HTTP Request
GET https://api.planning-de-garde.fr/v2/plannings/PLANNING_ID/gardes
URL Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
planning_id | true | Planning ID | 899 |
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
garde_id | true | Garde the current user owns | 181585 |
Create multiple swaps
POST https://api.planning-de-garde.fr/v2/swaps
[
{
"id": 42,
"from_user": {
"id": 3,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Psychiatrie",
"city_name": "Nancy",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"to_user": {
"id": 1,
"first_name": "Maurice",
"last_name": "Balloc",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Anatomie et Cytologies pathologiques",
"city_name": "Angers",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"from_garde": {
"id": 181590,
"started_on": "2017-10-06",
"color": null,
"user": {
"id": 3,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Psychiatrie",
"city_name": "Nancy",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-31"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
},
"to_garde": {
"id": 181598,
"started_on": "2017-10-14",
"color": null,
"user": {
"id": 1,
"first_name": "Maurice",
"last_name": "Balloc",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Anatomie et Cytologies pathologiques",
"city_name": "Angers",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-31"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
}
}
]
HTTP Request
POST https://api.planning-de-garde.fr/v2/swaps
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
swap[from_garde_id] | true | Garde the current user owns | 181590 |
swap[to_user_ids] | false | An array of user IDs (if empty, all users are selected) | [17] |
swap[to_garde_ids] | false | An array of garde IDs (if empty, handout mode enabled) | [181598] |
swap[fast_swap_enabled] | true | Enable fast swap system | false |
swap[message] | false | Message | “Bonjour” |
Access all swaps
GET https://api.planning-de-garde.fr/v2/swaps
[
{
"id": 42,
"from_user": {
"id": 3,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Psychiatrie",
"city_name": "Nancy",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"to_user": {
"id": 1,
"first_name": "Maurice",
"last_name": "Balloc",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Anatomie et Cytologies pathologiques",
"city_name": "Angers",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"from_garde": {
"id": 181590,
"started_on": "2017-10-06",
"color": null,
"user": {
"id": 3,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Psychiatrie",
"city_name": "Nancy",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-31"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
},
"to_garde": {
"id": 181598,
"started_on": "2017-10-14",
"color": null,
"user": {
"id": 1,
"first_name": "Maurice",
"last_name": "Balloc",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Anatomie et Cytologies pathologiques",
"city_name": "Angers",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-31"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
}
}
]
Retrieves all swaps a user needs to answer.
HTTP Request
GET https://api.planning-de-garde.fr/v2/swaps
Access all waiting swaps
GET https://api.planning-de-garde.fr/v2/waiting_swaps
[
{
"id": 42,
"from_user": {
"id": 3,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Psychiatrie",
"city_name": "Nancy",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"to_user": {
"id": 1,
"first_name": "Maurice",
"last_name": "Balloc",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Anatomie et Cytologies pathologiques",
"city_name": "Angers",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"from_garde": {
"id": 181590,
"started_on": "2017-10-06",
"color": null,
"user": {
"id": 3,
"first_name": "Marc",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": "Psychiatrie",
"city_name": "Nancy",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-31"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
},
"to_garde": {
"id": 181598,
"started_on": "2017-10-14",
"color": null,
"user": {
"id": 1,
"first_name": "Maurice",
"last_name": "Balloc",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Anatomie et Cytologies pathologiques",
"city_name": "Angers",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png"
},
"planning": {
"id": 899,
"name": "Planning Octobre",
"started_on": "2017-10-01",
"ended_on": "2017-10-31"
},
"line": {
"id": 1248,
"name": "Ligne 1"
}
}
}
]
Retrieves all swaps a user sent.
HTTP Request
GET https://api.planning-de-garde.fr/v2/waiting_swaps
Destroy a swap
HTTP Request
DELETE https://api.planning-de-garde.fr/v2/swaps/SWAP_ID
Answer a swap
HTTP Request
POST https://api.planning-de-garde.fr/v2/swap_answers
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
swap_id | true | Swap ID | 42 |
answer | true | Boolean | true |
Accesses
Create a SSO URL
POST https://api.planning-de-garde.fr/v2/accesses
{
"sso_token": "4a5d4c07173d67731f8691c8f03477",
"sso_url": "http://app.planning-de-garde.fr/external/sso/4a5d4c07173d67731f8691c8f03477",
"valid_until": "2016-06-13T15:34:02.204Z"
}
HTTP Request
POST https://api.planning-de-garde.fr/v2/accesses
Mobile endpoints
Registrations
Create a new registration
POST https://api.planning-de-garde.fr/v2/mobile/registrations
{
"application_uid" : "1234abcd",
"user" : {
"email": "[email protected]",
"password": "valid_password",
"first_name": "Jean",
"last_name": "Dupond"
}
}
{
"user": {
"id": 18,
"first_name": "Jean",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": null,
"city_name": null,
"status_name": "interne",
"profile_image_url": ""
},
"meta": {
"token": "43735d91b4741da27969d143026dc01dd4766e2ddcf51fd15ea5308d763666"
}
}
If the provided attributes are not valid, a 422
will be returned with a main error message and additionnal error messages per attribute.
A user with the provided email already exists
{
"error": "Cet utilisateur n'est pas valide",
"errors": {
"email": [
"n'est pas disponible"
]
}
}
HTTP Request
POST https://api.planning-de-garde.fr/v2/mobile/registrations
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
application_uid | true | application uid | 1234abcd |
user[email] | true | [email protected] | |
user[password] | true | password | valid_password (6 car min) |
user[first_name] | true | first name | Jean |
user[last_name] | true | last name | Dupond |
user[portable] | false | portable | 06 87 87 87 87 |
Sessions
Create a new session
POST https://api.planning-de-garde.fr/v2/mobile/access_tokens
{
"application_uid" : "1234abcd",
"user" : {
"email": "[email protected]",
"password": "valid_password"
}
}
{
"token": "valid_token"
}
HTTP Request
POST https://api.planning-de-garde.fr/v2/mobile/access_tokens
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
application_uid | true | application uid | 1234abcd |
user[email] | true | [email protected] | |
user[password] | true | password | valid_password (6 car min) |
Destroy an access_token
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
application_uid | true | application uid | 1234abcd |
HTTP Request
DELETE https://api.planning-de-garde.fr/v2/mobile/access_tokens/YOUR_TOKEN
External providers
POST https://api.planning-de-garde.fr/v2/mobile/oauth/facebook
{
"access_token": "very_long_access_token"
}
A new user registers (status:
201
)
{
"user": {
"id": 18,
"first_name": "Jean",
"last_name": "Dupond",
"email": "[email protected]",
"portable": null,
"speciality_name": null,
"city_name": null,
"status_name": "interne",
"profile_image_url": ""
},
"meta": {
"token": "43735d91b4741da27969d143026dc01dd4766e2ddcf51fd15ea5308d763666"
}
}
An exisiting user signs in (status:
200
)
{
"token": "valid_token"
}
The access token is blank (status:
400
)
{
"error": "Un access_token est obligatoire."
}
The email can’t be accessed on Facebook (status:
400
)
{
"error": "Votre compte n'a pu être créé automatiquement car vous n'avez pas accepté de nous communiquer votre email.",
"identity_id": 78
}
This endpoint has a complex logic depending on the info being pulled from Facebook.
HTTP Request
POST https://api.planning-de-garde.fr/v2/mobile/oauth/facebook
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
application_uid | true | application uid | 1234abcd |
access_token | true | Facebook access token | very_long_access_token |
Push tokens
Create a push token
POST https://api.planning-de-garde.fr/v2/mobile/push_tokens
[
{
"id": 1,
"os": "ios",
"token": "1234567",
"created_at": "2017-09-02T11:55:35.391Z"
}
]
When a user authorizes push notifications.
HTTP Request
POST https://api.planning-de-garde.fr/v2/mobile/push_tokens
Query Parameters
Parameter | Mandatory | Description | Example |
---|---|---|---|
push_token[os] | true | Operating system | ios |
push_token[token] | true | Token | 12345678910 |
Lifen endpoints
Planning de Garde integrates Lifen’s secure healthcare chat. A few additional endpoints are available if your app is lifen enabled on our backend.
Users
User profile
GET https://api.planning-de-garde.fr/v2/lifen/me
{
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png",
"exchanges_email_enabled": true,
"gardes_reminder_email_enabled": true,
"push_notifications_enabled": true,
"lifen_email_notifications_enabled": true,
"linked_vd_enabled": true,
"lifen_uuid": "lifen_uuid",
"lifen_token": "lifen_token"
}
The default /me
is replaced by this endpoint which has additional attributes.
HTTP Request
GET https://api.planning-de-garde.fr/v2/lifen/me
Access all users
GET https://api.planning-de-garde.fr/v2/lifen/users
[
{
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png",
"lifen_uuid": "lifen_uuid"
}
]
Retrieves all users who share a planning
with the curent user and have a lifen_uuid
.
HTTP Request
GET https://api.planning-de-garde.fr/v2/lifen/users
Refreshing a Lifen token
POST https://api.planning-de-garde.fr/v2/lifen/refresh_token
{
"id": 18,
"first_name": "Bernard",
"last_name": "Dupond",
"email": "[email protected]",
"portable": "+33612345678",
"speciality_name": "Chirurgie cardiaque et thoracique",
"city_name": "Lyon",
"status_name": "médecin",
"profile_image_url": "https://app.planning-de-garde.fr/attachments/profile_image.png",
"exchanges_email_enabled": true,
"gardes_reminder_email_enabled": true,
"push_notifications_enabled": true,
"lifen_email_notifications_enabled": true,
"linked_vd_enabled": true,
"lifen_uuid": "lifen_uuid",
"lifen_token": "new_lifen_token"
}
HTTP Request
POST https://api.planning-de-garde.fr/v2/lifen/refresh_token