Cost types

A cost type is a standard dimension used to capture and categorize project cost details in construction projects.

Each project typically has different cost types related to labor, materials, rented equipment, and other operational costs. Standard cost types serve as templates for creating new cost types.

Each cost type is associated with a task, which is in turn associated with a project. A cost type record is uniquely identified by the standard cost type used to create it, as well as the specific project and task it applies to.

Note: In the construction industry, the cost type corresponds with the category in the work breakdown structure (WBS).

List cost types.

get/objects/construction/cost-type

Returns up to 100 object references from the collection with a key, ID, and link for each cost type. This operation is mostly for use in testing; use the query service to find objects that meet certain criteria and to specify properties that are returned.

Permissions and other requirements
SubscriptionProject Costing or Construction
User typeBusiness, Employee, Project Manager
PermissionsList Cost Types
SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "101",
      • "id": "LABOR",
      • "href": "/objects/construction/cost-type/101"
      },
    • {
      • "key": "102",
      • "id": "MATERIALS",
      • "href": "/objects/construction/cost-type/102"
      },
    • {
      • "key": "103",
      • "id": "EQUIPMENT",
      • "href": "/objects/construction/cost-type/103"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create a cost type

post/objects/construction/cost-type

Creates a new cost type. When you create a cost type, the following field values from the given standard cost type are used unless you override them:

  • accumulationType
  • glAccount
  • parent
  • item

Custom field values from the standard cost type can also be used by the cost type. For this to work, the standard cost type and the cost type must have same custom fields with the same IDs, types, and lengths. Custom fields of type Sequence are not copied.

Parent-child relationships defined by standard cost types are preserved when cost types are created.

Permissions and other requirements
SubscriptionProject Costing or Construction
User typeBusiness, Project Manager
PermissionsAdd Cost Types
SecurityOAuth2
Request
Request Body schema: application/json
required

Cost type to create

name
required
string

Name of the cost type.

Example: "Equipment"
required
object

Project that will use this cost type.

key
string

Project key.

Example: "109"
id
string

Project ID.

Example: "22-001"
required
object

General ledger account associated with this cost type.

key
string

Account key

Example: "144"
id
string

Account ID

Example: "1112"
required
object

Item associated with this cost type.

key
string

Item key.

Example: "319"
id
string

Item ID.

Example: "Overhead"
description
string

Cost type description.

Example: "Equipment"
object

Task that will use this cost type.

key
string

System-assigned unique key for the task record.

Example: "1410"
id
string

Unique identifier for the task.

Example: "3-450"
object

The accumulation type associated with the object.

key
string

Accumulation type key.

Example: "2"
id
string

Accumulation type ID.

Example: "Direct cost"
costUnitDescription
string or null

Describes the unit of measure used by this cost type. For example, for a labor cost type, the cost unit represents an hour of labor. For a materials cost type, the cost unit could be "tons", "feet", or similar.

Example: "each"
object

Parent cost type, for cost type hierarchies.

key
string

key for the parent cost type.

Example: "1"
id
string

Parent cost type ID.

Example: "EQ-GRP"
object

Cost type planned dates.

startDate
string <date>

Planned begin date.

Example: "2023-01-04"
endDate
string <date>

Planned end date.

Example: "2023-02-24"
object

Cost type actual dates.

startDate
string <date>

Actual begin date.

Example: "2023-01-06"
endDate
string <date>

Actual end date.

Example: "2023-03-01"
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
object

The root cost type that this cost type descends from.

key
string

Key for the root cost type.

Example: "13921"
id
string

Root cost type ID.

Example: "EQ"
object

The standard cost type that is the template for this cost type.

key
string

Key for the standard cost type.

Example: "1"
id
string

Standard cost type ID.

Example: "EQ"
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "project": {
    • "id": "PRJ-001"
    },
  • "task": {
    • "id": "T-100"
    },
  • "name": "Concrete",
  • "description": "Cost type for concrete materials",
  • "accumulationType": {
    • "id": "MAT"
    },
  • "costUnitDescription": "Cubic Yards",
  • "glAccount": {
    • "id": "6000"
    },
  • "item": {
    • "id": "C-100"
    },
  • "planned": {
    • "startDate": "2024-10-31",
    • "endDate": "2024-12-31"
    },
  • "root": {
    • "id": "ROOT-001"
    },
  • "standardCostType": {
    • "id": "STD-002"
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "40",
    • "id": "40",
    • "href": "/objects/construction/cost-type/40"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a cost type

get/objects/construction/cost-type/{key}

Returns detailed information for a specified cost type.

Permissions and other requirements
SubscriptionProject Costing or Construction
User typeBusiness, Employee, Project Manager
PermissionsView Cost Types
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the cost type.

Example: 495
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "5941",
    • "project": {
      • "key": "109",
      • "id": "22-001",
      • "name": "Wallula Heights Conference Center",
      • "href": "/objects/projects/project/109"
      },
    • "task": {
      • "key": "690",
      • "id": "2-050",
      • "name": "Demolition",
      • "href": "/objects/projects/task/690"
      },
    • "id": "EQ",
    • "name": "Equipment",
    • "description": "Equipment Group",
    • "accumulationType": {
      • "id": "3",
      • "key": "3",
      • "name": "Equipment",
      • "href": "/objects/construction/accumulation-type/3"
      },
    • "costUnitDescription": null,
    • "status": "active",
    • "glAccount": {
      • "key": "383",
      • "id": "5001.07",
      • "href": "/objects/general-ledger/account/383"
      },
    • "parent": {
      • "key": "490",
      • "id": "1",
      • "name": "EQ"
      },
    • "item": {
      • "key": "317",
      • "id": "Equipment",
      • "name": "Equipment",
      • "href": "/objects/inventory-control/item/317"
      },
    • "planned": {
      • "startDate": "2022-04-30",
      • "endDate": "2022-06-30"
      },
    • "actual": {
      • "startDate": "2022-04-30",
      • "endDate": "2022-06-30"
      },
    • "audit": {
      • "createdDateTime": "2022-01-25T16:11:28Z",
      • "modifiedDateTime": "2022-01-25T16:11:28Z",
      • "createdBy": "1",
      • "modifiedBy": "1"
      },
    • "root": {
      • "key": "5941",
      • "id": "EQ",
      • "name": "Equipment",
      • "href": "/objects/construction/cost-type/5941"
      },
    • "standardCostType": {
      • "key": "1",
      • "id": "EQ",
      • "name": "Equipment",
      • "href": "/objects/construction/cost-type/1"
      },
    • "href": "/objects/construction/cost-type/5941"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update a cost type

patch/objects/construction/cost-type/{key}

Updates an existing cost type by setting field values. Any fields not provided remain unchanged.

Permissions and other requirements
SubscriptionProject Costing or Construction
User typeBusiness, Project Manager
PermissionsEdit Cost Types
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the cost type.

Example: 495
Request Body schema: application/json
name
string

Name of the cost type.

Example: "Equipment"
description
string

Cost type description.

Example: "Equipment"
object

Project that will use this cost type.

key
string

Project key.

Example: "109"
id
string

Project ID.

Example: "22-001"
object

Task that will use this cost type.

key
string

System-assigned unique key for the task record.

Example: "1410"
id
string

Unique identifier for the task.

Example: "3-450"
object

The accumulation type associated with the object.

key
string

Accumulation type key.

Example: "2"
id
string

Accumulation type ID.

Example: "Direct cost"
costUnitDescription
string or null

Describes the unit of measure used by this cost type. For example, for a labor cost type, the cost unit represents an hour of labor. For a materials cost type, the cost unit could be "tons", "feet", or similar.

Example: "each"
object

General ledger account associated with this cost type.

key
string

Account key

Example: "144"
id
string

Account ID

Example: "1112"
object

Parent cost type, for cost type hierarchies.

key
string

key for the parent cost type.

Example: "1"
id
string

Parent cost type ID.

Example: "EQ-GRP"
object

Item associated with this cost type.

key
string

Item key.

Example: "319"
id
string

Item ID.

Example: "Overhead"
object

Cost type planned dates.

startDate
string <date>

Planned begin date.

Example: "2023-01-04"
endDate
string <date>

Planned end date.

Example: "2023-02-24"
object

Cost type actual dates.

startDate
string <date>

Actual begin date.

Example: "2023-01-06"
endDate
string <date>

Actual end date.

Example: "2023-03-01"
status
string
Default: "active"

Object status. Active objects are fully functional. Inactive objects are essentially hidden and cannot be used or referenced.

Enum: "active" "inactive"
Example: "active"
object

The root cost type that this cost type descends from.

key
string

Key for the root cost type.

Example: "13921"
id
string

Root cost type ID.

Example: "EQ"
object

The standard cost type that is the template for this cost type.

key
string

Key for the standard cost type.

Example: "1"
id
string

Standard cost type ID.

Example: "EQ"
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "description": "Updated to include additional equipment rental details."
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "40",
    • "id": "40",
    • "href": "/objects/construction/cost-type/40"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete a cost type

delete/objects/construction/cost-type/{key}

Deletes a cost type.

Permissions and other requirements
SubscriptionProject Costing or Construction
User typeBusiness, Project Manager
PermissionsDelete Cost Type
SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the cost type.

Example: 495
Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}

Query cost types

post/services/core/query

Queries an object for filtered data.

SecurityOAuth2
Request
Request Body schema: application/json
object
string

Object type to query, in the form <application-name>/<object name>. For custom objects use platform-apps/nsp::<object-name>.

Example: "construction/cost-type"
fields
Array of strings

List of fields to include in the response. Can be any combination of these:

  • The name of a field in the object that you are querying, such as id.

  • The name of a field in a related object, using the form relatedObjectName.fieldName, such as vendor.id.

  • The result of an aggregate function run against the values in the returned objects. Use the form function:fieldName, such as min:startDate to return the earliest starting date. Valid function names are:

    • count
    • avg
    • sum
    • min
    • max
  • The result of an aggregate function run against the values in related objects, using the form function:relatedObjectName.fieldName, such as max:vendor.creditLimit. The same functions are supported as for object fields.

Example: ["key","id","max:vendor.creditLimit"]
Array of equal (object) or not equal (object) or less than (object) or (less than or equal (object)) or greater than (object) or (greater than or equal (object)) or in (object) or not in (object) or between (object) or not between (object) or contains (object) or does not contain (object) or has (object) or starts with (object) or does not start with (object) or ends with (object) or does not end with (object)

Filter conditions to select the objects to return based on their field values. You use operators and conditions to build your filter, such as {"$eq":{"status":"active"}} to select objects in which status is equal to "active".

Example: [{"$eq":{"status":"active"}},{"$gt":{"totalDue":"1000"}},{"$contains":{"name":"Acme"}}]
Array
Any of:

Field value must be equal to this specified value.

For date fields, you can use these macro values that are relative to the current date or the asOfDate in filterParameters, if set:

  • today
  • currentWeek
  • currentMonth
  • currentQuarter
  • currentYear
  • yesterday
  • lastWeek
  • priorMonth
  • priorQuarter
  • priorYear

These are most useful for queries that you want to save and use repeatedly, such as for views or reports. Just change the asOfDate each time to retrieve the same data set for different time periods.

For example, {"eq":{"postingDate":"priorYear"}}.

object

The field name and value to be compared with object values.

Example: {"status":"active"}
filterExpression
string
Default: "and"

Logical operators to apply when there are multiple filter conditions. The conditions in the filters array are implicitly numbered starting at 1. Supports and, or, and grouping with parentheses.

Shortcuts:

  • and by itself means that all conditions must be true.
  • or by itself means that at least one condition must be true.
Example: "(1 and 2) or 3"
object

Pre-defined filter options.

asOfDate
string <date>

The "as of" date to use with any relative date comparisons in filters. For example, if asOfDate is set to "2022-04-01" then priorMonth will be "03".

The current date is used if asOfDate is not set.

Example: "2022-04-01"
includeHierarchyFields
boolean
Default: false

Set to true to include hierarchical structure information with each object in the response.

Example: false
caseSensitiveComparison
boolean
Default: true

Queries are case-sensitive by default. Set to false to ignore case in a query.

Example: true
includePrivate
boolean
Default: false

By default, in a multi-entity company queries from the top-level entity do not access data in private entities. Set includePrivate to true if you want to query data in private entities.

Example: false
Array of objects

Set the order of the results by specifying field names to sort by and whether they should be in ascending or descending order.

Example: [{"totalDue":"asc"},{"lastPaymentMadeDate":"desc"}]
Array
property name*
additional property
string
Enum: "asc" "desc"
start
integer

First record of the result set to include in the response.

Example: 1
size
integer

Number of records to include in the result set, 4000 maximum.

Example: 100
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "object": "construction/cost-type",
  • "filters": [
    • {
      • "$eq": {
        }
      }
    ],
  • "fields": [
    • "key",
    • "id",
    • "name",
    • "description",
    • "project.name"
    ],
  • "orderBy": [
    • {
      • "id": "asc"
      }
    ]
}
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "1729",
      • "id": "EQ",
      • "name": "Equipment",
      • "description": "Equipment Group",
      • "project.name": "Gresham High School Gymnasium"
      },
    • {
      • "key": "1730",
      • "id": "EQ-Owned",
      • "name": "EQ Owned",
      • "description": "EQ Owned",
      • "project.name": "Gresham High School Gymnasium"
      },
    • {
      • "key": "1731",
      • "id": "EQ-Rental",
      • "name": "EQ Rental",
      • "description": "EQ Rental",
      • "project.name": "Gresham High School Gymnasium"
      },
    • {
      • "key": "1732",
      • "id": "LAB",
      • "name": "Labor",
      • "description": "Labor",
      • "project.name": "Gresham High School Gymnasium"
      },
    • {
      • "key": "1737",
      • "id": "MAT",
      • "name": "Materials",
      • "description": "Material",
      • "project.name": "Gresham High School Gymnasium"
      }
    ],
  • "ia::meta": {
    • "totalCount": 5,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}