Skip to content
dmitrig edited this page Sep 14, 2010 · 3 revisions

Description: Create new choice object
Format: XML
URL: POST /questions/7/choices.xml?choice%5Bdata%5D=text
Parameters:

  • choice: hash, required: Hash of the attributes of the new choice
    • visitor_identifier: string, optional: Identifier of visitor submitting idea. Defaults to ‘owner’.
    • data: string, optional: Information to be presented to user, eg. picture/video url, text
    • local_identifier: optional, int: An ID from the API client to associate with the choice

Returns:
Choice object

<?xml version="1.0" encoding="UTF-8"?>
<choice>
  <active type="boolean">true</active>
  <created-at type="datetime">2010-07-06T23:38:32-04:00</created-at>
  <creator-id type="integer">1</creator-id>
  <data>text</data>
  <id type="integer">21</id>
  <item-id type="integer" nil="true"></item-id>
  <local-identifier nil="true"></local-identifier>
  <loss-count type="integer">0</loss-count>
  <losses type="integer">0</losses>
  <position type="integer" nil="true"></position>
  <prompt-id type="integer" nil="true"></prompt-id>
  <prompts-count type="integer">0</prompts-count>
  <prompts-on-the-left-count type="integer">0</prompts-on-the-left-count>
  <prompts-on-the-right-count type="integer">0</prompts-on-the-right-count>
  <question-id type="integer">7</question-id>
  <ratings type="integer" nil="true"></ratings>
  <request-id type="integer" nil="true"></request-id>
  <score type="float">50.0</score>
  <tracking nil="true"></tracking>
  <updated-at type="datetime">2010-07-06T23:38:32-04:00</updated-at>
  <votes-count type="integer">0</votes-count>
  <wins type="integer">0</wins>
</choice>

Notes:

  • need to make choice hash optional
  • what is items-id?