Wodify currently offers an API to access programs and their respective Workouts! This API can return XML or JSON based on your needs.
In this article, we will cover:
API Details
The endpoint for the API is: app.wodify.com/API/Programs_v1.aspx.
The API accepts three parameters:
- apikey - Your affiliate's API key for authentication
- type - Possible values are "xml" or "json" (default is "xml")
- endcoding - Possible values as "ascii", "utf-8", or "utf-16" (default is "ascii")
Return Examples
Example: app.wodify.com/API/Programs_v1.aspx?apikey=rwdy3j2rk15m31ta0r6111116&type=json&encoding=utf-8
returns in JSON:
{
"RecordList":
{
"Program":
[
{
"Id": "1009",
"Name": "CrossFit",
"Description": null,
"Color": null,
"PublishExternally": "True",
"CountTowardsAttendanceLimits"
"CreatedBy": "17597",
"CreatedOn": "2014-01-02T10:39:48",
"UpdatedBy": "17597",
"UpdatedOn": "2014-01-02T10:39:48",
"Is_Active": "True"
},
{
"Id": "1032",
"Name": "Test Program",
"Description": null,
"Color": null,
"PublishExternally": "True",
"CountTowardsAttendanceLimits"
"CreatedBy": "39175",
"CreatedOn": "2014-02-13T10:31:19",
"UpdatedBy": "39175",
"UpdatedOn": "2014-02-13T10:31:19",
"Is_Active": "True"
}
]
}
}
Switching it to XML: app.wodify.com/API/Programs_v1.aspx?apikey=
produces:
<?xml version="1.0" encoding="UTF-8"?>
<RecordList>
<Program>
<Id>1009</Id>
<Name>CrossFit</Name>
<Description />
<Color />
<PublishExternally>True</
<CountTowardsAttendanceLimits>
<CreatedBy>17597</CreatedBy>
<CreatedOn>2014-01-02T10:39:
<UpdatedBy>17597</UpdatedBy>
<UpdatedOn>2014-01-02T10:39:
<Is_Active>True</Is_Active>
</Program>
<Program>
<Id>1032</Id>
<Name>Test Program</Name>
<Description />
<Color />
<PublishExternally>True</
<CountTowardsAttendanceLimits>
<CreatedBy>39175</CreatedBy>
<CreatedOn>2014-02-13T10:31:
<UpdatedBy>39175</UpdatedBy>
<UpdatedOn>2014-02-13T10:31:
<Is_Active>True</Is_Active>
</Program>
</RecordList>
The fields returned are:
- ID: The ID of the Program. You will likely not need this.
- Name: The name of the Program. In other Wodify APIs, this is what is used as input.
- Description: The description of the Program.
- Color: The hex color code used by Wodify to represent this program in various places.
- PublishExternally: Whether or not the classes from this Program will be shown in the public whiteboard, etc. by default.
- CountTowardsAttendanceLimits: Whether or not attending classes for this Program counts towards a client's plan's attendance limits. If you are listing programs on your site, this may be a useful piece of information to display to clients.
- CreatedBy: The user ID of the user that created this Program.
- CreatedOn: The timestamp (in EST) that this Program was created.
- UpdatedBy: The user ID of the user that last updated this Program.
- UpdatedOn: The timestamp (in EST) that this Program was last updated.
- IsActive: Whether or not this Program is currently in use in Wodify.
HTML Sample
<!doctype HTML>
<html>
<head> </head>
<body>
<select id='program_list'>
<option value='0'>Select a Program</option>
<?php
$curl = curl_init('http://app.wodify.
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$curl_response = curl_exec($curl);
curl_close($curl);
$programs = json_decode($curl_response, true);
foreach ($programs['RecordList']['
<option id='<?= $program['Id'] ?>'><?= $program['Name'] ?></option>
<?php endforeach; ?>
</select>
</body>
</html>
If you need any additional assistance with the Program API, feel free to reach out to us at support@wodify.com or via Priority Live Chat in your admin account (Promote only).
Comments