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": "6495838406365601732",
    "reference_prefix": "NEWPRODUCT",
    "name": "New Product",
    "product_line": false,
    "created_at": "2017-12-04T23:30:37.222Z",
    "updated_at": "2017-12-04T23:30:37.222Z",
    "description": {
      "id": "6495838406382928141",
      "body": "An amazing new product",
      "created_at": "2017-12-04T23:30:37.226Z",
      "attachments": [

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

    ],
    "custom_fields": [

    ],
    "screen_definitions": [

    ],
    "has_ideas": false,
    "has_master_features": false,
    "release_workflow": {
      "id": 717623509,
      "name": "Default release workflow"
    },
    "feature_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    },
    "idea_workflow": {
      "id": 80245244,
      "name": "Default idea workflow"
    },
    "strategic_imperative_workflow": {
      "id": 883066232,
      "name": "Default goal workflow"
    },
    "initiative_workflow": {
      "id": 61191651,
      "name": "Default initiative workflow"
    },
    "epic_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    }
  }
}

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-12-04T23:30:00.000Z"
    },
    {
      "id": "1030512512",
      "reference_prefix": "PL2",
      "name": "Product Line 2",
      "product_line": true,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "174813163",
      "reference_prefix": "PL3",
      "name": "Product Line 3",
      "product_line": true,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "336591436",
      "reference_prefix": "PL4",
      "name": "Product Line 4",
      "product_line": true,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "517761884",
      "reference_prefix": "PRJ2",
      "name": "Project 2",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "702241743",
      "reference_prefix": "PRJ3",
      "name": "Project 3",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "935317104",
      "reference_prefix": "PRJ4",
      "name": "Project 4",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "12123897",
      "reference_prefix": "PRJ5",
      "name": "Project 5",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "431075141",
      "reference_prefix": "PRJ6",
      "name": "Project 6",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.000Z"
    },
    {
      "id": "783720408",
      "reference_prefix": "PRJ7",
      "name": "Project 7",
      "product_line": false,
      "created_at": "2017-12-04T23:30:00.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-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:00.000Z",
    "description": {
      "id": "21164619",
      "body": "",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

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

    ],
    "custom_fields": [

    ],
    "screen_definitions": [
      {
        "id": 524951996,
        "screenable_type": "Project",
        "name": "Screen Definition 1",
        "custom_field_definitions": [
          {
            "key": "name",
            "position": 1,
            "name": "Name",
            "type": "CustomFieldDefinitions::TextField",
            "api_type": "string",
            "options": [

            ]
          },
          {
            "key": "website",
            "position": 2,
            "name": "Website",
            "type": "CustomFieldDefinitions::UrlField",
            "api_type": "url",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 826556567,
        "screenable_type": "Competitor",
        "name": "Screen Definition 3",
        "custom_field_definitions": [

        ]
      },
      {
        "id": 647403809,
        "screenable_type": "Release",
        "name": "Screen Definition 8",
        "custom_field_definitions": [
          {
            "key": "release_custom_date",
            "position": 1,
            "name": "Release custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 405267877,
        "screenable_type": "Ideas::Idea",
        "name": "Screen Definition 5",
        "custom_field_definitions": [
          {
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "options": [
              {
                "id": 1059223798,
                "label": "Acme Corp"
              }
            ]
          }
        ]
      },
      {
        "id": 19837977,
        "screenable_type": "Feature",
        "name": "Screen Definition 6",
        "custom_field_definitions": [
          {
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 908690576,
        "screenable_type": "Epic",
        "name": "Screen Definition 7",
        "custom_field_definitions": [
          {
            "key": "master_feature_custom_date",
            "position": 1,
            "name": "Master feature custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "options": [

            ]
          }
        ]
      }
    ],
    "has_ideas": true,
    "has_master_features": false,
    "release_workflow": {
      "id": 717623509,
      "name": "Default release workflow"
    },
    "feature_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    },
    "idea_workflow": {
      "id": 80245244,
      "name": "Default idea workflow"
    },
    "strategic_imperative_workflow": {
      "id": 883066232,
      "name": "Default goal workflow"
    },
    "initiative_workflow": {
      "id": 61191651,
      "name": "Default initiative workflow"
    },
    "epic_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    }
  }
}

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-12-04T23:30:00.000Z",
    "updated_at": "2017-12-04T23:30:37.714Z",
    "description": {
      "id": "21164619",
      "body": "",
      "created_at": "2017-12-04T23:30:00.000Z",
      "attachments": [

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

    ],
    "custom_fields": [

    ],
    "screen_definitions": [
      {
        "id": 524951996,
        "screenable_type": "Project",
        "name": "Screen Definition 1",
        "custom_field_definitions": [
          {
            "key": "name",
            "position": 1,
            "name": "Name",
            "type": "CustomFieldDefinitions::TextField",
            "api_type": "string",
            "options": [

            ]
          },
          {
            "key": "website",
            "position": 2,
            "name": "Website",
            "type": "CustomFieldDefinitions::UrlField",
            "api_type": "url",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 826556567,
        "screenable_type": "Competitor",
        "name": "Screen Definition 3",
        "custom_field_definitions": [

        ]
      },
      {
        "id": 647403809,
        "screenable_type": "Release",
        "name": "Screen Definition 8",
        "custom_field_definitions": [
          {
            "key": "release_custom_date",
            "position": 1,
            "name": "Release custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 405267877,
        "screenable_type": "Ideas::Idea",
        "name": "Screen Definition 5",
        "custom_field_definitions": [
          {
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "options": [
              {
                "id": 1059223798,
                "label": "Acme Corp"
              }
            ]
          }
        ]
      },
      {
        "id": 19837977,
        "screenable_type": "Feature",
        "name": "Screen Definition 6",
        "custom_field_definitions": [
          {
            "key": "customers_table",
            "position": 1,
            "name": "Customers for custom table",
            "type": "CustomFieldDefinitions::LinkMany",
            "api_type": "array",
            "options": [

            ]
          }
        ]
      },
      {
        "id": 908690576,
        "screenable_type": "Epic",
        "name": "Screen Definition 7",
        "custom_field_definitions": [
          {
            "key": "master_feature_custom_date",
            "position": 1,
            "name": "Master feature custom date",
            "type": "CustomFieldDefinitions::DateField",
            "api_type": "date",
            "options": [

            ]
          }
        ]
      }
    ],
    "has_ideas": true,
    "has_master_features": false,
    "release_workflow": {
      "id": 717623509,
      "name": "Default release workflow"
    },
    "feature_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    },
    "idea_workflow": {
      "id": 80245244,
      "name": "Default idea workflow"
    },
    "strategic_imperative_workflow": {
      "id": 883066232,
      "name": "Default goal workflow"
    },
    "initiative_workflow": {
      "id": 61191651,
      "name": "Default initiative workflow"
    },
    "epic_workflow": {
      "id": 499195972,
      "name": "Default feature workflow"
    }
  }
}

Overview

API Resources