Creating profiles from a template through the API

Hi,

We are trying to create profiles from a template through the API.

We want to change the onDutyToken, duration, the description displayed on th page, the source calendar, and the target calendar.

We are a bit stuck around this, setting up the onDutyToken and the source calendar don’t work:


curl -u useremila@somedomain:ak_f4k3dKey -X POST -H "Content-Type: application/json" -d '{"templateId":"someId", "subdomain":"Somefakedsubdomain", "title":"Our title", "times":{"onDutyToken":"Marker for the profile named Our Title"},"calendars":{"calendarIds":["someuseremila@somedomain"]}}' https://api.youcanbook.me/v1/profiles

Thanks in advance,

@xbertrandias your onDutyToken is setup correctly. The result should be: Marker for the profile named Our Title

For the calendarId part you can try to PATCH this in after you get the new profile ID returned.