Custom Object Records API


Custom Tables have a different set of custom objects for each Product. This means that if you want to create one or list them you must scope them to a product.

Once you have the id of a specific custom object record, you can inspect, modify, or delete them on the root custom objects resource.

Custom Tables are an Enterprise+ exclusive feature.

POST /api/v1/products/:product_id/custom_objects/:key/records

Create a custom object record

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the record in
key * API key of the custom object type to create

POST /api/v1/products/PRJ1/custom_objects/customers/records

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/custom_objects/customers/records" -d '{"custom_object_record":{"custom_fields":{"name":"Major conglomerate","website":"www.conglom.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
{
  "custom_object_record": {
    "custom_fields": {
      "name": "Major conglomerate",
      "website": "www.conglom.com"
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "custom_object_record": {
    "id": "6477599627213224125",
    "key": "customers",
    "custom_fields": [
      {
        "key": "website",
        "name": "Website",
        "value": "www.conglom.com",
        "type": "url"
      },
      {
        "key": "name",
        "name": "Name",
        "value": "Major conglomerate",
        "type": "string"
      }
    ],
    "custom_object_links": [
      {
        "key": "custom_table_name",
        "name": "Custom Table Linked Records",
        "record_type": "CustomObjectRecord",
        "record_ids": [

        ]
      }
    ]
  }
}

GET /api/v1/products/:product_id/custom_objects/:key/records

Get all objects from a custom table

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
product_id * Numeric ID, or key of the product to get page for
key * API key of the custom object to get records for

GET /api/v1/products/PRJ1/custom_objects/customers/records

Example CURL command

curl -g "https://secure.aha.io/api/v1/products/PRJ1/custom_objects/customers/records" -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
{
  "custom_object_records": [
    {
      "id": "640362830",
      "key": "customers",
      "custom_fields": [
        {
          "key": "name",
          "name": "Name",
          "value": "Acme Corp",
          "type": "string"
        },
        {
          "key": "website",
          "name": "Website",
          "value": "www.acme.com",
          "type": "url"
        }
      ],
      "custom_object_links": [
        {
          "key": "custom_table_name",
          "name": "Custom Table Linked Records",
          "record_type": "CustomObjectRecord",
          "record_ids": [
            1059223798
          ]
        }
      ]
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/custom_object_records/:id

Get a specific custom object record

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID of the custom object record to be retrieved

GET /api/v1/custom_object_records/640362830

Example CURL command

curl -g "https://secure.aha.io/api/v1/custom_object_records/640362830" -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
{
  "custom_object_record": {
    "id": "640362830",
    "key": "customers",
    "custom_fields": [
      {
        "key": "name",
        "name": "Name",
        "value": "Acme Corp",
        "type": "string"
      },
      {
        "key": "website",
        "name": "Website",
        "value": "www.acme.com",
        "type": "url"
      }
    ],
    "custom_object_links": [
      {
        "key": "custom_table_name",
        "name": "Custom Table Linked Records",
        "record_type": "CustomObjectRecord",
        "record_ids": [
          1059223798
        ]
      }
    ]
  }
}

PUT /api/v1/custom_object_records/:id

Update a custom object record

Parameters

Name Description
id * Numeric ID of the custom object record to be updated

PUT /api/v1/custom_object_records/640362830

Example CURL command

curl "https://secure.aha.io/api/v1/custom_object_records/640362830" -d '{"custom_object_record":{"custom_fields":{"name":"Acme parent corp","website":"www.acmeparent.com"}}}' -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
{
  "custom_object_record": {
    "custom_fields": {
      "name": "Acme parent corp",
      "website": "www.acmeparent.com"
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "custom_object_record": {
    "id": "640362830",
    "key": "customers",
    "custom_fields": [
      {
        "key": "name",
        "name": "Name",
        "value": "Acme parent corp",
        "type": "string"
      },
      {
        "key": "website",
        "name": "Website",
        "value": "www.acmeparent.com",
        "type": "url"
      }
    ],
    "custom_object_links": [
      {
        "key": "custom_table_name",
        "name": "Custom Table Linked Records",
        "record_type": "CustomObjectRecord",
        "record_ids": [
          1059223798
        ]
      }
    ]
  }
}

DELETE /api/v1/custom_object_records/:id

Delete a custom object record

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID of the custom object record to be deleted

DELETE /api/v1/custom_object_records/640362830

Example CURL command

curl "https://secure.aha.io/api/v1/custom_object_records/640362830" -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