Votes

Votes are expressions of support or preference that users cast for submitted ideas on your Frill account.

Vote object

Vote have the following fields

Field
Details

idx string

A unique identifier for the vote

created_at string

The date time the vote was created in UTC timezone

voter object

The user this vote is associated with

idea object

The idea this vote is associated with

Endpoints

You can use the following endpoints to manage Votes

get

Returns a list of votes

Authorizations
Query parameters
limitintegerOptional

Limits the number of items on a page

Default: 20
afterstringOptional

The after cursor - used for pagination

idea_idxstringOptional

A unique identifier for the idea. Only fetch votes for this idea

user_idxstringOptional

A unique identifier for the follower. Only fetch votes for this follower

Responses
200
Successfully returned a list of votes
application/json
get
GET /v1/votes HTTP/1.1
Host: api.frill.co
Authorization: Basic username:password
Accept: */*
{
  "data": [
    {
      "idx": "vote_abcd1234",
      "created_at": "text",
      "voter": {
        "idx": "follower_abcd1234",
        "name": "John Smith",
        "avatar": "https://example.com/example.jpg"
      },
      "idea": {
        "idx": "idea_abcd1234",
        "name": "New idea",
        "slug": "new-idea",
        "description": "This is a new idea from a customer",
        "cover_image": "https://example.com/example.jpg",
        "vote_count": 1,
        "comment_count": 1,
        "note_count": 1,
        "is_pined": true,
        "is_bug": true,
        "is_archived": true,
        "is_completed": true,
        "show_in_roadmap": true,
        "approval_status": "text",
        "created_at": "text",
        "updated_at": "text",
        "author": {
          "idx": "follower_abcd1234",
          "name": "John Smith",
          "avatar": "https://example.com/example.jpg"
        },
        "status": {
          "idx": "status_abcd1234",
          "name": "Completed",
          "color": "#6392D9"
        },
        "topics": [
          {
            "idx": "topic_abcd1234",
            "name": "New feauture"
          }
        ]
      }
    }
  ],
  "pagination": {
    "total": 10,
    "before": "before-cursor",
    "after": "after-cursor"
  }
}
post

Vote on an idea

Authorizations
Body
idea_idxstringOptional
voter_idxstringOptional
Responses
200
Successfully voted on an idea
application/json
post
POST /v1/votes HTTP/1.1
Host: api.frill.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "idea_idx": "text",
  "voter_idx": "text"
}
{
  "idx": "vote_abcd1234",
  "created_at": "text",
  "voter": {
    "idx": "follower_abcd1234",
    "name": "John Smith",
    "avatar": "https://example.com/example.jpg"
  },
  "idea": {
    "idx": "idea_abcd1234",
    "name": "New idea",
    "slug": "new-idea",
    "description": "This is a new idea from a customer",
    "cover_image": "https://example.com/example.jpg",
    "vote_count": 1,
    "comment_count": 1,
    "note_count": 1,
    "is_pined": true,
    "is_bug": true,
    "is_archived": true,
    "is_completed": true,
    "show_in_roadmap": true,
    "approval_status": "text",
    "created_at": "text",
    "updated_at": "text",
    "author": {
      "idx": "follower_abcd1234",
      "name": "John Smith",
      "avatar": "https://example.com/example.jpg"
    },
    "status": {
      "idx": "status_abcd1234",
      "name": "Completed",
      "color": "#6392D9"
    },
    "topics": [
      {
        "idx": "topic_abcd1234",
        "name": "New feauture"
      }
    ]
  }
}
delete

Unvote an idea

Authorizations
Path parameters
idea_idxstringRequired
voter_idxstringRequired
Responses
200
Request was successful
application/json
delete
DELETE /v1/votes HTTP/1.1
Host: api.frill.co
Authorization: Basic username:password
Accept: */*
{
  "success": true,
  "message": "Request was successful"
}

Last updated