Cost

Returns job costs

This call returns job costs for the specified job, effective date or start date.

Securitybearer
Request
path Parameters
jobId
required
string <uuid>

The job id to query by.

query Parameters
effectiveDate
string <date-time>

The effective date of the costs. If omitted, returns all costs including any future costs.

startDate
string <date-time>

The starting date to calculate costs. If omitted, returns all costs from the beginning of the job.

Responses
200

Success

404

The specified resource is not found.

get/api/v1/jobs/{jobId}/costs
Request samples
Response samples
application/json
{
  • "jobId": "61300b34-5fc7-4271-a638-6af37ad1813b",
  • "totalCost": 556867.4,
  • "costCodeCosts": [
    ]
}

Returns job costs associated with a cost code

This call returns a paginated list of job costs associated with a cost code for a specified cost code, effective date or start date.

Securitybearer
Request
query Parameters
costCodeId
required
string <uuid>

The cost code id.

effectiveDate
string <date-time>

The effective date of the costs. If omitted, returns all costs including any future costs.

startDate
string <date-time>

The starting date to calculate costs. If omitted, returns all costs from the beginning of the job.

cursor
string

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

limit
integer <int32>
Default: 1000

The maximum number of results that should be returned.

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

Returns costs and hours spent per cost code

This call returns a paginated list of costs and hours spent per cost code for the specified business unit, cost codes, jobs, foremen, or date range.

Securitybearer
Request
Request Body schema:

Set of filters for the request.

jobIds
Array of strings or null <uuid>

List of Job Ids. Used with JobTagIds to limit jobs. Returns jobs with JobIds and JobTagIds.

jobTagIds
Array of strings or null <uuid>

List of Job Tag Ids. Used with JobIds to limit jobs. Returns jobs with JobIds and JobTagIds.

foremanIds
Array of strings or null <uuid>

List of Foreman Ids. Used to limit transactions. Returns transactions only for foremen specified.

startDate
string or null <date-time>

Beginning local date (yyyy-MM-dd) of date range. Used with EndDate. Transactions whose dates fall within this date range will be included.

endDate
string or null <date-time>

End local date (yyyy-MM-dd) of date range. Used with StartDate. Transactions whose dates fall within this date range will be included.

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.

businessUnitId
string or null <uuid>

The business unit id.

costCodeIds
Array of strings or null <uuid>

List of Cost Code Ids.

Responses
post/api/v1/jobCosts/advancedRequest
Request samples
{
  • "businessUnitId": "81aa06f2-46ec-457f-9b35-ae6e05d4dbef",
  • "costCodeIds": [
    ],
  • "jobIds": [
    ],
  • "jobTagIds": [
    ],
  • "foremanIds": [
    ],
  • "startDate": "2022-08-06T00:00:00",
  • "endDate": "2022-08-06T00:00:00",
  • "cursor": "gCpeihFB1whbiZt1qIf1TbhL8TPbeRP2",
  • "limit": 500
}
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns job costs

This call returns a paginated list of job costs.

Securitybearer
Request
Request Body schema:

The request object for getting job costs.

jobIds
Array of strings or null <uuid>

List of Job Ids. Used with JobTagIds to limit jobs. Returns jobs with JobIds and JobTagIds.

jobTagIds
Array of strings or null <uuid>

List of Job Tag Ids. Used with JobIds to limit jobs. Returns jobs with JobIds and JobTagIds.

foremanIds
Array of strings or null <uuid>

List of Foreman Ids. Used to limit transactions. Returns transactions only for foremen specified.

startDate
string or null <date-time>

Beginning local date (yyyy-MM-dd) of date range. Used with EndDate. Transactions whose dates fall within this date range will be included.

endDate
string or null <date-time>

End local date (yyyy-MM-dd) of date range. Used with StartDate. Transactions whose dates fall within this date range will be included.

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.

businessUnitId
string or null <uuid>

The business unit id.

costCodeIds
Array of strings or null <uuid>

List of Cost Code Ids.

Responses
post/api/v2/jobCosts/advancedRequest
Request samples
{
  • "businessUnitId": "81aa06f2-46ec-457f-9b35-ae6e05d4dbef",
  • "costCodeIds": [
    ],
  • "jobIds": [
    ],
  • "jobTagIds": [
    ],
  • "foremanIds": [
    ],
  • "startDate": "2022-08-06T00:00:00",
  • "endDate": "2022-08-06T00:00:00",
  • "cursor": "gCpeihFB1whbiZt1qIf1TbhL8TPbeRP2",
  • "limit": 500
}
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns a paginated list of job costs.

This call returns a paginated list of costs and hours spent per cost code for the specified business unit, cost codes, jobs, or foremen. You must request at least one of the following: businessUnitId, jobIds, jobTagIds, or costCodeIds.

Securitybearer
Request
Request Body schema:

Set of filters for the request.

businessUnitId
string or null <uuid>

The business unit id.

jobIds
Array of strings or null <uuid>

List of Job Ids. Used with JobTagIds to limit jobs. Returns jobs with JobIds and JobTagIds.

jobTagIds
Array of strings or null <uuid>

List of Job Tag Ids. Used with JobIds to limit jobs. Returns jobs with JobIds and JobTagIds.

foremanIds
Array of strings or null <uuid>

List of Foreman Ids. Used to limit transactions. Returns transactions only for foremen specified.

costCodeIds
Array of strings or null <uuid>

List of Cost Code Ids.

costCodeTagIds
Array of strings or null <uuid>

List of Cost Code Setup Tag 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/jobCostsToDate/search
Request samples
{
  • "businessUnitId": "214dd610-35bc-4504-9246-7073493e0400",
  • "jobIds": [
    ],
  • "jobTagIds": [
    ],
  • "foremanIds": [
    ],
  • "costCodeIds": [
    ],
  • "costCodeTagIds": [
    ],
  • "cursor": "string",
  • "limit": 0
}
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns a paginated list of job cost custom costs.

Securitybearer
Request
Request Body schema:
jobIds
Array of strings or null <uuid>

List of Job Ids. Used with JobTagIds to limit jobs. Returns jobs with JobIds and JobTagIds.

jobTagIds
Array of strings or null <uuid>

List of Job Tag Ids. Used with JobIds to limit jobs. Returns jobs with JobIds and JobTagIds.

foremanIds
Array of strings or null <uuid>

List of Foreman Ids. Used to limit transactions. Returns transactions only for foremen specified.

startDate
string or null <date-time>

Beginning local date (yyyy-MM-dd) of date range. Used with EndDate. Transactions whose dates fall within this date range will be included.

endDate
string or null <date-time>

End local date (yyyy-MM-dd) of date range. Used with StartDate. Transactions whose dates fall within this date range will be included.

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.

businessUnitId
string or null <uuid>

The business unit id.

costCodeIds
Array of strings or null <uuid>

List of Cost Code Ids.

Responses
post/api/v1/jobCostCustomCosts/advancedRequest
Request samples
{
  • "businessUnitId": "81aa06f2-46ec-457f-9b35-ae6e05d4dbef",
  • "costCodeIds": [
    ],
  • "jobIds": [
    ],
  • "jobTagIds": [
    ],
  • "foremanIds": [
    ],
  • "startDate": "2022-08-06T00:00:00",
  • "endDate": "2022-08-06T00:00:00",
  • "cursor": "gCpeihFB1whbiZt1qIf1TbhL8TPbeRP2",
  • "limit": 500
}
Response samples
application/json
{
  • "results": [
    ],
  • "metadata": {
    }
}

Returns cost code costs

This list returns a list of cost code costs.

Securitybearer
Request
path Parameters
costCodeId
required
string <uuid>

The cost code id.

query Parameters
effectiveDate
string <date-time>

The effective date of the costs. If omitted, returns all costs including any future costs.

startDate
string <date-time>

The starting date to calculate costs. If omitted, returns all costs from the beginning of the job.

Responses
get/api/v1/costCodes/{costCodeId}/costs
Request samples
Response samples
application/json
{
  • "costCodeId": "7261c280-1124-433f-abf8-b04f657cf5b4",
  • "equipmentCost": 1000.5,
  • "equipmentHours": 10.2,
  • "laborCost": 2000.6,
  • "laborHours": 25.3,
  • "materialCost": 3000.1,
  • "subcontractCost": 4000.6,
  • "truckingCost": 300.5,
  • "quantity": 100.6,
  • "customCostTypeValues": [
    ]
}

Sets costs for the cost code by creating adjustments.

To adjust the trucking cost, use the associated custom cost type from the business unit preferences.

Securitybearer
Request
path Parameters
costCodeId
required
string <uuid>

The cost code id.

Request Body schema:
required

The cost.

effectiveDate
required
string <date-time>

The date on which the costs are true.

equipmentCost
number or null <double>

The equipment cost.

equipmentHours
number or null <double>

The equipment hours.

laborCost
number or null <double>

The labor cost.

laborHours
number or null <double>

The labor hours.

materialCost
number or null <double>

The material cost.

subcontractCost
number or null <double>

The subcontract cost.

quantity
number or null <double>

The quantity.

Array of objects or null (ApiCustomCostTypeValueWrite)

List of custom-cost-type actual costs.

Responses
put/api/v1/costCodes/{costCodeId}/costs
Request samples
{
  • "effectiveDate": "2019-01-01",
  • "equipmentCost": 100.5,
  • "equipmentHours": 150.2,
  • "laborCost": 20220.6,
  • "laborHours": 25.6,
  • "materialCost": 300.1,
  • "subcontractCost": 400.6,
  • "quantity": 100.6,
  • "customCostTypeValues": [
    ]
}