CostCode

Returns cost codes

This call returns a list of cost codes with accounting values, if available, given business unit, job, cost code or accounting template.

Securitybearer
Request
query Parameters
accountingTemplateName
string

If specified, returns accounting values for this template instead of the default template.

jobId
string <uuid>

Filters the list of cost codes by job

businessUnitId
string <uuid>

Filters the list of cost codes by business unit

costCodeId
string <uuid>

Return a single cost code

limit
integer <int32>
Default: 1000

The maximum number of results that should be returned.

cursor
string

When there are additional results, the metadata nextCursor field should be passed to retrieve the next page of results.

Responses
get/api/v1/costCodes
Request samples
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Creates a new cost code with accounting values.

The code will be uppercased and trimmed of whitespace.

Securitybearer
Request
query Parameters
accountingTemplateName
string
Request Body schema:
required
jobId
required
string <uuid>

The job that the cost code is in. This is a required field.

code
required
string non-empty

The cost code code. This is a required field.

description
string or null

The cost code description.

quantity
number or null <double>

The quantity.

unitOfMeasure
string or null

The unit of measure.

laborHours
number or null <double>

The labor hours.

equipmentHours
number or null <double>

The equipment hours.

laborDollars
number or null <double>

The labor cost.

equipmentDollars
number or null <double>

The equipment cost.

materialDollars
number or null <double>

The material cost.

subcontractDollars
number or null <double>

The subcontract cost.

status
string (CostCodeStatus)
Enum: "active" "completed" "discontinued" "inactive"
note
string or null

The cost code note.

historicalActivityCode
string or null

The historical activity code.

historicalBiditem
string or null

The historical biditem code.

heavyBidEstimateCode
string or null

The estimate code.

isTm
boolean or null

The flag indicating whether the cost code is a time-and-material item.

startDate
string or null <date-time>

The start date.

endDate
string or null <date-time>

The end date.

duration
number or null <double>

The duration (days).

isHiddenFromMobile
boolean or null

The flag indicating whether the cost code is hidden from mobile. Default is false.

isCapExpected
boolean or null

The flag indicating whether to set the cost code to cap expected. Default is true.

payItemId
string or null <uuid>

The pay item that this cost code is associated with.

payItemFactor
number or null <double>

Any costs contributed by this cost code are multiplied by this factor before being applied to its parent pay item.

isPayItemDriver
boolean or null

Whether this cost code contributes to the cost of its parent pay item.

accountingCode
string or null

The accounting code.

category
string or null

"Category" accounting field

cpm
string or null

"CPM Code" accounting field

glAcct
string or null

"GL Acct" accounting field

subJob
string or null

"Sub-Job" accounting field

wbsCode
string or null

"WBS Code" accounting field

Responses
post/api/v1/costCodes
Request samples
{
  • "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
  • "code": "string",
  • "description": "string",
  • "quantity": 0,
  • "unitOfMeasure": "string",
  • "laborHours": 0,
  • "equipmentHours": 0,
  • "laborDollars": 0,
  • "equipmentDollars": 0,
  • "materialDollars": 0,
  • "subcontractDollars": 0,
  • "status": "active",
  • "note": "string",
  • "historicalActivityCode": "string",
  • "historicalBiditem": "string",
  • "heavyBidEstimateCode": "string",
  • "isTm": true,
  • "startDate": "2019-08-24T14:15:22Z",
  • "endDate": "2019-08-24T14:15:22Z",
  • "duration": 0,
  • "isHiddenFromMobile": true,
  • "isCapExpected": true,
  • "payItemId": "b2d8a764-f85b-4480-b0d8-9a597eeacb8a",
  • "payItemFactor": 0,
  • "isPayItemDriver": true,
  • "accountingCode": "string",
  • "category": "string",
  • "cpm": "string",
  • "glAcct": "string",
  • "subJob": "string",
  • "wbsCode": "string"
}
Response samples
application/json
{
  • "accountingCode": "Account Code 1",
  • "code": "COSTCODE",
  • "description": "This is a cost code.",
  • "businessUnitId": "03b9b2d2-9af6-4bc5-9517-fd0d8e448d0c",
  • "businessUnitCode": "BUCODE",
  • "jobId": "78d3a94d-8e3b-4b7f-a833-ccb6bd3d2a52",
  • "jobCode": "JOBCODE",
  • "isHiddenFromMobile": false,
  • "quantityDrivingEntityType": "none",
  • "payItemId": "d40f89e3-6729-4fb2-b452-e4639af0ce2a",
  • "payItem": "pay item",
  • "payItemFactor": 2,
  • "isPayItemDriver": true,
  • "quantity": 100.12,
  • "unitOfMeasure": "EA",
  • "status": "active",
  • "historicalActivityCode": "",
  • "historicalBiditem": "",
  • "heavyBidEstimateCode": "",
  • "isCapExpected": true,
  • "isTm": false,
  • "workersCompId": "39beef34-21dc-4f8c-a894-37de8b4563f0",
  • "workersCompCode": "WORKERSCOMPCODE",
  • "workersCompDescription": "Workers Comp Description",
  • "laborHours": 5.5,
  • "equipmentHours": 2.5,
  • "laborDollars": 10000.25,
  • "equipmentDollars": 2500.75,
  • "materialDollars": 2890.1,
  • "subcontractDollars": 1500.4,
  • "supplyDollars": 8989.3,
  • "customCostTypeDollars": [
    ],
  • "isDeleted": false,
  • "id": "85f16824-83a3-4c49-a402-0b48c607e1cb"
}

Creates or updates cost codes (up to 10000)

Creates or updates cost codes on the specified job.

This endpoint currently only supports the adding or updating of cost codes across a single job. If more than one job ID is specified, the request will be rejected.

Securitybearer
Request
Request Body schema:
required

The list of cost codes to be added or updated.

Array ([ 1 .. 10000 ] items)
jobId
required
string <uuid>

The job that the cost code is in. This is a required field.

code
required
string non-empty

The cost code code. This is a required field.

description
string or null

The cost code description.

quantity
number or null <double>

The quantity.

unitOfMeasure
string or null

The unit of measure.

laborHours
number or null <double>

The labor hours.

equipmentHours
number or null <double>

The equipment hours.

laborDollars
number or null <double>

The labor cost.

equipmentDollars
number or null <double>

The equipment cost.

materialDollars
number or null <double>

The material cost.

subcontractDollars
number or null <double>

The subcontract cost.

status
string (CostCodeStatus)
Enum: "active" "completed" "discontinued" "inactive"
note
string or null

The cost code note.

historicalActivityCode
string or null

The historical activity code.

historicalBiditem
string or null

The historical biditem code.

heavyBidEstimateCode
string or null

The estimate code.

isTm
boolean or null

The flag indicating whether the cost code is a time-and-material item.

startDate
string or null <date-time>

The start date.

endDate
string or null <date-time>

The end date.

duration
number or null <double>

The duration (days).

isHiddenFromMobile
boolean or null

The flag indicating whether the cost code is hidden from mobile. Default is false.

isCapExpected
boolean or null

The flag indicating whether to set the cost code to cap expected. Default is true.

payItemId
string or null <uuid>

The pay item that this cost code is associated with.

payItemFactor
number or null <double>

Any costs contributed by this cost code are multiplied by this factor before being applied to its parent pay item.

isPayItemDriver
boolean or null

Whether this cost code contributes to the cost of its parent pay item.

supplyDollars
number or null <double>

The supply cost.

removePayItem
boolean

If HeavyJobApi.Controllers.Models.CostCode.ApiCostCodeWrite.PayItemId is null, whether to remove an existing relationship. Defaults to false.

Responses
204

No Content

patch/api/v1/costCodes
Request samples
[
  • {
    }
]

Returns cost codes

This call returns a list of cost codes with accounting values, if available, given business unit, job, cost code, accounting template or modified since date.

Securitybearer
Request
query Parameters
accountingTemplateName
string

If specified, returns accounting values for this template instead of the default template.

jobId
string <uuid>

Filters the list of cost codes by job

businessUnitId
string <uuid>

Filters the list of cost codes by business unit

costCodeId
string <uuid>

Return a single cost code

isDeleted
boolean

If true, only include deleted cost codes. If false, only include non-deleted cost codes. If null, include all.

limit
integer <int32>
Default: 1000

The maximum number of results that should be returned.

cursor
string
The timestamp you want to see the changes from. (optional) When there are additional results, the metadata nextCursor field should be passed to retrieve the next page of results.
modifiedSince
string <date-time>
Responses
get/api/v2/costCodes
Request samples
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns cost codes

This call returns a list of cost codes for the specified business unit, jobs, cost codes, or accounting template

Securitybearer
Request
Request Body schema:
required

The request object for getting cost codes.

businessUnitId
string or null <uuid>

Business Unit Id

jobIds
Array of strings or null <uuid>

Job Id

costCodeIds
Array of strings or null <uuid>

List of cost code Ids

cursor
string or null

Optional.
When there are additional results, the metadata nextCursor field should be passed to retrieve the next page of results.

accountingTemplateName
string or null

Optional.
Accounting template Name

limit
integer or null <int32>

The maximum number of results that should be returned.

Responses
post/api/v2/costCodes/advancedRequest
Request samples
{
  • "businessUnitId": "d03c8427-83f3-4f71-8eba-e89a7ea8ec1a",
  • "jobIds": [
    ],
  • "costCodeIds": [
    ],
  • "cursor": "gCpeihFB1whbiZt1qIf1TbhL8TPbeRP2",
  • "accountingTemplateName": "Accounting Template",
  • "limit": 500
}
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns cost codes

VOLATILE The query parameters and responses are likely to change. Do not use this operation for mission-critical applications yet.

This call returns a list of cost codes for the specified business unit, jobs, job tags, and cost codes

Securitybearer
Request
Request Body schema:
required

The request object for getting cost codes.

businessUnitId
string or null <uuid>

Business Unit ID

jobIds
Array of strings or null <uuid>

List of job IDs

jobTagIds
Array of strings or null <uuid>

List of job tag IDs

costCodeIds
Array of strings or null <uuid>

Cost code IDs

cursor
string or null

Optional.
When there are additional results, the metadata nextCursor field should be passed to retrieve the next page of results.

limit
integer or null <int32>

The maximum number of results that should be returned.

Responses
post/api/v1/costCodes/search
Request samples
{
  • "businessUnitId": "214dd610-35bc-4504-9246-7073493e0400",
  • "jobIds": [
    ],
  • "jobTagIds": [
    ],
  • "costCodeIds": [
    ],
  • "cursor": "string",
  • "limit": 0
}
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Creates or updates budgets for a list of cost code and custom cost type combination

Securitybearer
Request
Request Body schema:
required
Array
costCodeId
string <uuid>

The cost code id.

customCostTypeId
string <uuid>

The custom cost type id.

budgetedCost
number <double>

The custom cost type budgeted cost.

Responses
204

No Content

patch/api/v1/costCodes/customCostTypes
Request samples
[
  • {
    }
]