How can we help you?

Can my SquareSpace / Box Ally site integrate with Wodify WODs?

Follow

Yep! Please add the below to each page you'd like the WOD displayed:

<div id="wodcontainer"></div>

<script type="text/javascript">
var getWodDetails = ({ elementId, apiKey, location, program }) => {
var today = new Date();
var date = `${today.getFullYear()}-${(today.getMonth() + 1)}-${today.getDate()}`;
var fetchUrl = `https://app.wodify.com/API/WODs_v1.aspx?apiKey=${apiKey}&date=${date}&location=${encodeURIComponent(location)}&program=${encodeURIComponent(program)}&type=json`;
fetch(fetchUrl)
.then(response => response.json())
.then(data => {
if (data && data.RecordList && data.RecordList.APIWod.FormattedWOD) {
var container = document.getElementById(elementId);
container.innerHTML = data.RecordList.APIWod.FormattedWOD;
}
});
};
getWodDetails({
elementId: "wodcontainer",
apiKey: "APIKEY GOES HERE",
location: "YOUR LOCATION GOES HERE",
program: "YOUR PROGRAM GOES HERE"
});
</script>

You will need to update the following:

  • "apiKey": Enter the API key for the tenant here
  • "location": Enter the name of the location you wish to pull WODs from
  • "program": Enter the name of the program you wish to pull WODs from
  • "numDays" : Enter the number of days for which you'd like WODs to be displayed, starting today and moving backwards (to show just the current day, enter 1, to show the past week, enter 7)

 

Note: HTTPS is required to use the WODs API.

Comments

Check the current status of our products

View status