HtmlToText
nav contactez nous pour obtenir un accès à l'api 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 tokens do not expire. 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 :)) source code omniauth gem api connector 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" }, "pl