POST /votes

Creates a new vote for the idea.

Resource URL

POST https://api.prodpad.com/v1/votes

Parameters

apikey required If the apikey parameter is missing or incorrect a 401 error will be returned

Post Body

Fields

nametyperequiredDescription
vote string Yes One of “Yea”,”Nay” or “Maybe”
idea_id integer Yes The id of the idea that is being voted on. Idea ids can be feteched using GET /ideas endpoint.
user_id integer Yes The user id of the person making the vote. The users can be fetched using GET /users endpoint.
comment string Yes A comment explaining the reasoning for the vote.

Payload

{
 
"vote":"Yea",
 
"user_id" : 2,
 
"idea_id" : 1,
 
"comment" : "This idea has been asked about by 6 separate clients unprompted."
}

Response

Status: 201 OK
{
   
"id" : 1155,
   
"vote" : "Yea",
   
"ideas" : {
       
"id" : 1
   
},
   
"comments" : {
       
"id" : 2345,
       
"comment" : "This idea has been asked about by 6 separate clients unprompted.",
       
"ideas" : {
           
"id": 1,
       
},
       
"created_at": "2014-05-19 20:31:55",
   
},
   
"created_at": "2014-05-19 20:31:55",
   
"updated_at": "2014-05-19 20:31:55",
}

Notes

  • All dates are in UTC
  • The text fields can include HTML markup
Have more questions? Submit a request

Comments