How to Set Costs for Cost Codes
This tutorial will guide you through the process of setting costs for cost codes by creating adjustments in the context of HeavyJob.
Prerequisites
Before you begin, ensure you have access to your API credentials (Client ID and Secret) for authentication.
For details on obtaining the tokens, refer to the Getting Started with Request Tokens guide.
Step 1: Retrieve Business Units
Purpose: Retrieve the business units available for your organization using the GET Business Units Endpoint. This will allow you to retrieve the necessarybusinessUnitId
to use in further API calls.Loading...
businessUnitId
in the following step.Step 2: Retrieve Cost Categories
Purpose: Use thebusinessUnitId
from Step 1 to retrieve the list of cost categories available within that business unit using the GET Cost Categories Endpoint.Loading...
id
field returned for setting cost adjustments later.Step 3: Retrieve Cost Codes
Purpose: Retrieve a list of cost codes with accounting values associated with a specific business unit, or job, using the GET Cost Codes Endpoint. You'll need thebusinessUnitId
from Step 1 and optionally, jobId
if you'd like a list of cost codes by job.Loading...
id
to create adjustments in the next step.Step 4: Set Costs via Cost PUT Endpoint
Instructions:1. Use the
id
from Step 2 (Retrieve Cost Categories) as costCategoryId
2. Use the
id
from Step 3 (Retrieve Cost Codes) as costCodeId
3. Set
effectiveDate
to the date on which the costs are true. This can be in the past or future.Loading...
Response: This response will confirm the adjustment creation.
Additional note
If you'd like to check that your request has gone through and is reflected, you can call the GET Job Costs Endpoint.
Troubleshooting
If you encounter issues, review the Getting Started with Request Tokens guide or contact support for assistance.