CreatePoll

Method Name: CreatePoll.
Method description: Used to create a create a poll.

Request XML Payload

<?xml version="1.0" encoding="utf-8" ?>
<pd:pdRequest partnerGUID="3F2504E0-4F89-11D3-9A0C-0305E82C3301" xmlns:pd="http://api.polldaddy.com/pdapi.xsd">
  <pd:userCode>123456-FErKS5yu15scpSGmvip4JA==</pd:userCode>
  <pd:demands>
    <pd:demand id="CreatePoll">
      <pd:poll>
        <pd:question><![CDATA[Do you like polls?]]></pd:question>
        <pd:multipleChoice>no</pd:multipleChoice>
        <pd:randomiseAnswers>yes</pd:randomiseAnswers>
        <pd:otherAnswer>yes</pd:otherAnswer>
        <pd:resultsType>percent</pd:resultsType>
        <pd:blockRepeatVotersType>cookie</pd:blockRepeatVotersType>
        <pd:blockExpiration>7257600</pd:blockExpiration>
        <pd:comments>moderate</pd:comments>
        <pd:makePublic>yes</pd:makePublic>
        <pd:closePoll>yes</pd:closePoll>
        <pd:closeDate>2010-05-30T00:42:00</pd:closeDate>
        <pd:styleID>15</pd:styleID>
        <pd:packID>11577</pd:packID>
        <pd:folderID>140644</pd:folderID>
        <pd:languageID>30</pd:languageID>
        <pd:sharing>no</pd:sharing>
        <pd:answers>
		  <pd:answer>
			<pd:text><![CDATA[Yes]]></pd:text>
		  </pd:answer>
		  <pd:answer>
			<pd:text><![CDATA[No]]></pd:text>
		  </pd:answer>
        </pd:answers>
      <pd:poll>
    </pd:demand>
  </pd:demands>
</pd:pdRequest>

Response XML Payload

<?xml version="1.0" encoding="utf-8" ?>
<pd:pdResponse partnerGUID="3F2504E0-4F89-11D3-9A0C-0305E82C3301" xmlns:pd="http://api.polldaddy.com/pdapi.xsd">
  <pd:userCode>123456-FErKS5yu15scpSGmvip4JA==</pd:userCode>
  <pd:demands>
    <pd:demand id="GetPoll">
      <pd:poll id="690432265">
        <pd:question><![CDATA[Do you like polls?]]></pd:question>
        <pd:multipleChoice>no</pd:multipleChoice>
        <pd:randomiseAnswers>yes</pd:randomiseAnswers>
        <pd:otherAnswer>yes</pd:otherAnswer>
        <pd:resultsType>percent</pd:resultsType>
        <pd:blockRepeatVotersType>cookie</pd:blockRepeatVotersType>
        <pd:blockExpiration>7257600</pd:blockExpiration>
        <pd:comments>moderate</pd:comments>
        <pd:makePublic>yes</pd:makePublic>
        <pd:closePoll>yes</pd:closePoll>
        <pd:closeDate>2010-05-30T00:42:00</pd:closeDate>
        <pd:styleID>15</pd:styleID>
        <pd:packID>11577</pd:packID>
        <pd:folderID>140644</pd:folderID>
        <pd:languageID>30</pd:languageID>
        <pd:sharing>no</pd:sharing>
        <pd:mediaType>0</pd:mediaType>
        <pd:mediaCode/>
        <pd:answers>
		  <pd:answer id='2783737'>
			<pd:text><![CDATA[Yes]]></pd:text>
			<pd:mediaType>0</pd:mediaType>
			<pd:mediaCode><![CDATA[]]></pd:mediaCode>
		  </pd:answer>
		  <pd:answer id='2937738'>
			<pd:text><![CDATA[No]]></pd:text>
			<pd:mediaType>0</pd:mediaType>
			<pd:mediaCode><![CDATA[]]></pd:mediaCode>
		  </pd:answer>
        </pd:answers>
      <pd:poll>
    </pd:demand>
  </pd:demands>
</pd:pdResponse>

Field Descriptions

Field Type Length Possible Values
question String 160 na
multipleChoice String na yes/no
randomiseAnswers String na yes/no
otherAnswer String na yes/no
resultsType String na show/hide/percent
blockRepeatVotersType String na off/cookie/cookieip
blockExpiration Integer 10 na
comments String na off/allow/moderate
makePublic String na yes/no
closePoll String na yes/no
closeDate String 20 na
styleID Integer 10 na
packID Integer 10 na
languageID Integer 10 na
sharing String na yes/no
mediaType Integer 2 na
mediaCode String 20 na
text String 200 na
Advertisements

%d bloggers like this: