Products API


POST /api/v1/products

Create a product

Parameters

Name Alias Description
name * Name of the product
reference_prefix * prefix Give the product an abbreviation. It will be used as a prefix on all features for this product.
description Description of the product and it can include HTML formatting.
parent_id Numeric ID or prefix of product line to be parent of the new product. The product line must already exist.

POST /api/v1/products

Example CURL command

curl "https://secure.aha.io/api/v1/products" -d '{"product":{"name":"New Product","description":"An amazing new product","prefix":"NEWPRODUCT"}}' -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
{
  "product": {
    "name": "New Product",
    "description": "An amazing new product",
    "prefix": "NEWPRODUCT"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "product": {
    "id": "6453125038328700868",
    "reference_prefix": "NEWPRODUCT",
    "name": "New Product",
    "product_line": false,
    "created_at": "2017-08-11T21:00:56.247Z",
    "updated_at": "2017-08-11T21:00:56.280Z",
    "description": {
      "id": "6453125038346027277",
      "body": "An amazing new product",
      "created_at": "2017-08-11T21:00:56.252Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/projects/NEWPRODUCT",
    "resource": "http://account1.example.org/projects/NEWPRODUCT",
    "children": [

    ],
    "custom_fields": [

    ],
    "comments_count": 0,
    "has_ideas": false
  }
}

GET /api/v1/products

Get a list of all of the products in the account

GET /api/v1/products

Example CURL command

curl -g "https://secure.aha.io/api/v1/products" -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
{
  "products": [
    {
      "id": "610602692",
      "reference_prefix": "PL1",
      "name": "Product Line 1",
      "product_line": true,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "1030512512",
      "reference_prefix": "PL2",
      "name": "Product Line 2",
      "product_line": true,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "174813163",
      "reference_prefix": "PL3",
      "name": "Product Line 3",
      "product_line": true,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "336591436",
      "reference_prefix": "PL4",
      "name": "Product Line 4",
      "product_line": true,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "517761884",
      "reference_prefix": "PRJ2",
      "name": "Project 2",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "702241743",
      "reference_prefix": "PRJ3",
      "name": "Project 3",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "935317104",
      "reference_prefix": "PRJ4",
      "name": "Project 4",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "12123897",
      "reference_prefix": "PRJ5",
      "name": "Project 5",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "431075141",
      "reference_prefix": "PRJ6",
      "name": "Project 6",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    },
    {
      "id": "783720408",
      "reference_prefix": "PRJ7",
      "name": "Project 7",
      "product_line": false,
      "created_at": "2017-08-11T21:00:11.000Z"
    }
  ],
  "pagination": {
    "total_records": 11,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/products/:id

Get a specific product

Parameters

Name Description
id * Numeric ID, or key of the product or product-line to be retrieved

GET /api/v1/products/PRJ1

Example CURL command

curl -g "https://secure.aha.io/api/v1/products/PRJ1" -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
{
  "product": {
    "id": "131414752",
    "reference_prefix": "PRJ1",
    "name": "Project 1",
    "product_line": false,
    "created_at": "2017-08-11T21:00:11.000Z",
    "updated_at": "2017-08-11T21:00:11.000Z",
    "description": {
      "id": "21164619",
      "body": "",
      "created_at": "2017-08-11T21:00:10.000Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/projects/PRJ1",
    "resource": "http://account1.example.org/projects/PRJ1",
    "children": [

    ],
    "custom_fields": [

    ],
    "comments_count": 7,
    "has_ideas": true
  }
}

PUT /api/v1/products/:id

Update a product

Parameters

Name Alias Description
id * Numeric ID, or key of the product to be updated
name Name of the product
reference_prefix prefix Give the product an abbreviation. It will be used as a prefix on all features for this product.
description Description of the product and it can include HTML formatting.
parent_id Numeric ID or prefix of product line to be parent of the new product. The product line must already exist.

PUT /api/v1/products/131414752

Example CURL command

curl "https://secure.aha.io/api/v1/products/131414752" -d '{"product":{"name":"Two Products"}}' -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
{
  "product": {
    "name": "Two Products"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "product": {
    "id": "131414752",
    "reference_prefix": "PRJ1",
    "name": "Two Products",
    "product_line": false,
    "created_at": "2017-08-11T21:00:11.000Z",
    "updated_at": "2017-08-11T21:00:56.748Z",
    "description": {
      "id": "21164619",
      "body": "",
      "created_at": "2017-08-11T21:00:10.000Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/projects/PRJ1",
    "resource": "http://account1.example.org/projects/PRJ1",
    "children": [

    ],
    "custom_fields": [

    ],
    "comments_count": 7,
    "has_ideas": true
  }
}

Overview

API Resources