SOAP Example, Sample, and Response

Below are the CSS Classes available to style your WOD:


The following article details Wodify's SOAP API.  Included are:

1. Link to WSDL
2. SOAP Example
3. SOAP Sample
4. SOAP Response

1. Below is the link to Wodify's WSDL for WOD Integration:


http://app.wodify.com/API/WOD_v1.asmx?wsdl

2. SOAP Example

<!doctype HTML>
<html>

<head>
</head>

<body>

<?php

 //SOAP Method



        class GetWOD {
            public $APIKey;
            public $Date;
            public $LocationText;
            public $ProgramText;

            function __construct($apikey, $date, $locationname, $programname){
                $this->APIKey = $apikey;
                $this->Date = $date;
                $this->LocationText = $locationname;
                $this->ProgramText = $programname;
            }
        }

        $SOAPClient = new SoapClient("http://app.wodify.com/API/WOD_v1.asmx?wsdl", array('features' => SOAP_SINGLE_ELEMENT_ARRAYS));
        
        $error = 0;
        $soapResponse = "";
        try {
        //NOTE: Change the variables in the call below to the right values
            $soapResponse = $SOAPClient->GetWOD(new GetWOD('API KEY', 'DATE in YYYY-MM-DD format', 'LOCATION NAME', 'PROGRAM NAME'));
        } catch (SoapFault $fault) { 
$error = 1; 
            print("Sorry, GetWOD returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring); 
        }

        if ($error == 0) {
   if (is_null($soapResponse)) { 
                    print("NULL response");
                } else {
       echo $soapResponse->WOD->FormattedWOD;
       }
}


?>

</body>

</html>



3. SOAP Request:

POST /API/WOD_v1.asmx HTTP/1.1
Host: dev.wodify.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetWOD xmlns="http://www.outsystems.com">
      <APIKey>string</APIKey>
      <Date>string</Date>
      <LocationText>string</LocationText>
      <ProgramText>string</ProgramText>
    </GetWOD>
  </soap12:Body>
</soap12:Envelope>


4. SOAP Response:

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetWODResponse xmlns="http://www.outsystems.com">
      <WOD>
        <WodHeader>
          <Tenant_Id>int</Tenant_Id>
          <Id>int</Id>
          <Date>date</Date>
          <ShouldPublish>boolean</ShouldPublish>
          <PublishDateTime>dateTime</PublishDateTime>
          <Name>string</Name>
          <Comments>string</Comments>
          <OwnershipLevelId>int</OwnershipLevelId>
          <UserId>int</UserId>
          <ProgramId>int</ProgramId>
          <BlogPostId>string</BlogPostId>
          <IsPostUpdateRequired>boolean</IsPostUpdateRequired>
          <IsPostedToFacebook>boolean</IsPostedToFacebook>
          <HasBeenSaved>boolean</HasBeenSaved>
          <CreatedBy>int</CreatedBy>
          <CreatedOn>dateTime</CreatedOn>
          <UpdatedBy>int</UpdatedBy>
          <UpdatedOn>dateTime</UpdatedOn>
          <IsActive>boolean</IsActive>
        </WodHeader>
        <CreatedDate>date</CreatedDate>
        <UpdatedDate>string</UpdatedDate>
        <Location>
          <Tenant_Id>int</Tenant_Id>
          <Id>int</Id>
          <Name>string</Name>
          <StreetAddress1>string</StreetAddress1>
          <StreetAddress2>string</StreetAddress2>
          <City>string</City>
          <StateId>int</StateId>
          <ZipCode>string</ZipCode>
          <CountryId>int</CountryId>
          <Province>string</Province>
          <CreatedBy>int</CreatedBy>
          <CreatedOn>dateTime</CreatedOn>
          <UpdatedBy>int</UpdatedBy>
          <UpdatedOn>dateTime</UpdatedOn>
          <IsActive>boolean</IsActive>
        </Location>
        <Program>
          <Tenant_Id>int</Tenant_Id>
          <Id>int</Id>
          <Name>string</Name>
          <Description>string</Description>
          <Color>string</Color>
          <PublishExternally>boolean</PublishExternally>
          <CreatedBy>int</CreatedBy>
          <CreatedOn>dateTime</CreatedOn>
          <UpdatedBy>int</UpdatedBy>
          <UpdatedOn>dateTime</UpdatedOn>
          <Is_Active>boolean</Is_Active>
        </Program>
        <Announcements>
          <Announcement>
            <Id>int</Id>
            <Message>string</Message>
            <FromDate>date</FromDate>
            <ToDate>date</ToDate>
            <IsExternal>boolean</IsExternal>
            <CreatedBy>int</CreatedBy>
            <CreatedOn>dateTime</CreatedOn>
            <UpdatedBy>int</UpdatedBy>
            <UpdatedOn>dateTime</UpdatedOn>
            <IsActive>boolean</IsActive>
          </Announcement>
          <Announcement>
            <Id>int</Id>
            <Message>string</Message>
            <FromDate>date</FromDate>
            <ToDate>date</ToDate>
            <IsExternal>boolean</IsExternal>
            <CreatedBy>int</CreatedBy>
            <CreatedOn>dateTime</CreatedOn>
            <UpdatedBy>int</UpdatedBy>
            <UpdatedOn>dateTime</UpdatedOn>
            <IsActive>boolean</IsActive>
          </Announcement>
        </Announcements>
        <Components>
          <APIComponent>
            <Id>int</Id>
            <ComponentTypeName>string</ComponentTypeName>
            <OwnershipLevelName>string</OwnershipLevelName>
            <UserName>string</UserName>
            <Name>string</Name>
            <Description>string</Description>
            <IsBenchmark>boolean</IsBenchmark>
            <HasBeenSaved>boolean</HasBeenSaved>
            <IsNewComponentEmailSent>boolean</IsNewComponentEmailSent>
            <AllowRxPlus>boolean</AllowRxPlus>
            <Rounds>int</Rounds>
            <Comments>string</Comments>
            <RepScheme>string</RepScheme>
            <PerformanceResultTypeName>string</PerformanceResultTypeName>
          </APIComponent>
          <APIComponent>
            <Id>int</Id>
            <ComponentTypeName>string</ComponentTypeName>
            <OwnershipLevelName>string</OwnershipLevelName>
            <UserName>string</UserName>
            <Name>string</Name>
            <Description>string</Description>
            <IsBenchmark>boolean</IsBenchmark>
            <HasBeenSaved>boolean</HasBeenSaved>
            <IsNewComponentEmailSent>boolean</IsNewComponentEmailSent>
            <AllowRxPlus>boolean</AllowRxPlus>
            <Rounds>int</Rounds>
            <Comments>string</Comments>
            <RepScheme>string</RepScheme>
            <PerformanceResultTypeName>string</PerformanceResultTypeName>
          </APIComponent>
        </Components>
      </WOD>
    </GetWODResponse>
  </soap12:Body>
</soap12:Envelope>















Feedback and Knowledge Base