In this example we will perform the steps to retrieve a schedule. This can be used to get your own schedule in JSON format.
- A username and password for a Zermelo Portal.
- The user needs to have a schedule in the Zermelo Portal.
- The user needs to have permissions to see his schedule.
- Some experience with JSON.
- Some experience with Curl.
Step 1: The authorization code
We log in to the Portal using our username and password. Our Portal is example.zportal.nl in this walk through.Then we we go to the "Koppel App" (Link App) page and note the authorization code. In this example it is 120 340 450 670.
For more information about this step see API Authentication.
Step 2: The access token
We now use the authorization code to retrieve an access token.
Curl will print out the following:
Here gmj5if8aqcute3n0evi6g3uaee is our access token.
For more information about this step see Exchange the authorization code for an access token.
Known bug: the "expires_in" value returned may not be correct.
Step 3: The schedule
We can now use this access token to retrieve our schedule. The start and end parameters are in Unix time.
This is the response:
For more information about this step see Appointment.