Idea Endorsements API


POST /api/v1/ideas/:idea_id/endorsements

Create an idea endorsement

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to endorse

POST /api/v1/ideas/PRJ1-I-1/endorsements

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements" -d '{"idea_endorsement":{"email":"henry.humpty@account1.com"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea_endorsement": {
    "email": "henry.humpty@account1.com"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_endorsement": {
    "id": "6398143198553510884",
    "idea_id": "58056975",
    "created_at": "2017-03-16T17:03:19.105Z",
    "value": null,
    "endorsed_by_portal_user": {
      "id": "6398143198503756674",
      "name": "henry.humpty@account1.com",
      "email": "henry.humpty@account1.com",
      "created_at": "2017-03-16T17:03:19.094Z"
    },
    "integration_fields": [

    ],
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
    }
  }
}

GET /api/v1/ideas/:idea_id/endorsements

Get all endorsements for an idea

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to get endorsements for

GET /api/v1/ideas/PRJ1-I-1/endorsements

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_endorsements": [
    {
      "id": "53377392",
      "idea_id": "58056975",
      "created_at": "2017-03-16T17:02:52.000Z",
      "value": null,
      "endorsed_by_portal_user": {
        "id": "646391926",
        "name": "John Long",
        "email": "john@long.com",
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/ideas/:idea_id/endorsements/:id

Get a specific endorsement for an idea

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to get endorsement for
id * Id of an idea endorsement

GET /api/v1/ideas/PRJ1-I-1/endorsements/53377392

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements/53377392" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_endorsement": {
    "id": "53377392",
    "idea_id": "58056975",
    "created_at": "2017-03-16T17:02:52.000Z",
    "value": null,
    "endorsed_by_portal_user": {
      "id": "646391926",
      "name": "John Long",
      "email": "john@long.com",
      "created_at": "2017-03-16T17:02:52.000Z"
    },
    "integration_fields": [
      {
        "id": "975466318",
        "name": "key",
        "value": "JRA-123",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    ],
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
    }
  }
}

POST /api/v1/ideas/:idea_id/endorsements

Create an idea endorsement

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to endorse

POST /api/v1/ideas/PRJ1-I-1/endorsements

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements" -d '{"idea_endorsement":{"email":"henry.humpty@account1.com"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea_endorsement": {
    "email": "henry.humpty@account1.com"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_endorsement": {
    "id": "6398143200750750712",
    "idea_id": "58056975",
    "created_at": "2017-03-16T17:03:19.617Z",
    "value": null,
    "endorsed_by_portal_user": {
      "id": "6398143200720204015",
      "name": "henry.humpty@account1.com",
      "email": "henry.humpty@account1.com",
      "created_at": "2017-03-16T17:03:19.612Z"
    },
    "integration_fields": [

    ],
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
    }
  }
}

POST /api/v1/ideas/:idea_id/endorsements

Multiple endorsements fail

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to endorse

POST /api/v1/ideas/PRJ1-I-1/endorsements

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements" -d '{"idea_endorsement":{"email":"henry.humpty@account1.com"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea_endorsement": {
    "email": "henry.humpty@account1.com"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_endorsement": {
    "id": "6398143201251899677",
    "idea_id": "58056975",
    "created_at": "2017-03-16T17:03:19.732Z",
    "value": null,
    "endorsed_by_portal_user": {
      "id": "6398143201207341736",
      "name": "henry.humpty@account1.com",
      "email": "henry.humpty@account1.com",
      "created_at": "2017-03-16T17:03:19.728Z"
    },
    "integration_fields": [

    ],
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
    }
  }
}

POST /api/v1/ideas/PRJ1-I-1/endorsements

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements" -d '{"idea_endorsement":{"email":"henry.humpty@account1.com"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea_endorsement": {
    "email": "henry.humpty@account1.com"
  }
}

Response

Status: 409 Conflict
  Content-Type: application/json; charset=utf-8
{
  "error": "User has already voted for idea"
}

PUT /api/v1/ideas/:idea_id/endorsements/:id

Update an idea endorsement

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to endorse
id * Id of an idea endorsement
value Dollar value of the idea endorsement, numeric

PUT /api/v1/ideas/PRJ1-I-1/endorsements/53377392

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements/53377392" -d '{"idea_endorsement":{"value":123.45}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea_endorsement": {
    "value": 123.45
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_endorsement": {
    "id": "53377392",
    "idea_id": "58056975",
    "created_at": "2017-03-16T17:02:52.000Z",
    "value": "123.45",
    "endorsed_by_portal_user": {
      "id": "646391926",
      "name": "John Long",
      "email": "john@long.com",
      "created_at": "2017-03-16T17:02:52.000Z"
    },
    "integration_fields": [
      {
        "id": "975466318",
        "name": "key",
        "value": "JRA-123",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    ],
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
    }
  }
}

DELETE /api/v1/ideas/:idea_id/endorsements/:id

Delete an idea endorsement

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to remove endorsement from
id * ID of the endorsement to remove

DELETE /api/v1/ideas/PRJ1-I-1/endorsements/53377392

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/endorsements/53377392" -d '' -X DELETE \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 204 No Content
  

Overview

API Resources