Returns a record of all custom value entries configured for your ConstructionOnline company account
https://api.constructiononline.com/api/CustomValues
In ConstructionOnline, custom values are fields that can be customized for each company to best fit their specific needs. Custom values can be found throughout the many different features of ConstructionOnline and are denoted by a gear icon ⚙️ beside the field heading. There are 42 different types of custom values, such as Trade, Project Stage, Key Roles, and Project Type.
Each type of custom value can include multiple entries, or specific options for that field. For example, the custom value type "Trade" may contain entries such as HVAC, Mechanical, Electrical, and Plumbing. While some custom values are preloaded with default options, each custom value type can be completely customized by adding or removing specific entries.
Many of ConstructionOnline's API endpoints for other features will reference the custom values returned from this request. If you need to reference multiple types of custom values, this call can be used to return all entries for all custom value types. We recommend storing the entries in a collection or data table so they can be easily referenced in the future.
Requests
Example requests in cURL, C#, Python, and JavaScript can be found below:
cURL
# replace {email} with the email address for your ConstructionOnline account
# {password} with your ConstructionOnline password
# {apikey} with your provided API key
curl https://api.constructiononline.com/api/CustomValues -u {email}:{password} -H 'APIKey:{apikey}'
C#
/* replace {username} with the email address for your ConstructionOnline account
{password} with your ConstructionOnline password
{apikey} with the API key you were provided with */
public string GetData(string endpoint) {
string username = "{username}";
string password = "{password}";
string apikey = "{apikey}";
HttpResponseMessage response = null;
HttpClientHandler handler = new HttpClientHandler() { AutomaticDecompression = System.Net.DecompressionMethods.GZip };
using (HttpClient client = new HttpClient(handler)) {
client.Timeout = new TimeSpan(0, 0, 30);
client.BaseAddress = new Uri("http://api.constructiononline.com");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password)));
client.DefaultRequestHeaders.Add("APIKey", apikey);
client.DefaultRequestHeaders.Add("Accept-Encoding", "gzip");
response = client.GetAsync(endpoint).Result;
}
return response?.Content.ReadAsStringAsync().Result;
}
MessageBox.Show(GetData("api/CustomValues"));
Python
#replace {username} with the email address for your ConstructionOnline account
#{password} with your ConstructionOnline password
#{apikey} with the API key you were provided with
import base64, requests, json
apikey = "{apikey}"
username = "{username}"
password = "{password}"
def makeRequest(endpoint):
url = "https://api.constructiononline.com/" + endpoint
userPass = username + ":" + password
headers = {
"APIKey": apikey,
"Accept-Encoding": "gzip, deflate, br",
"Authorization": "Basic " + base64.b64encode(userPass.encode()).decode(),
}
response = requests.get(url, headers=headers)
return json.dumps(json.loads(response.text), indent=2)
#Main Program
print(makeRequest("api/CustomValues"))
JavaScript
/* replace {username} with the email address for your ConstructionOnline account
{password} with your ConstructionOnline password
{apikey} with the API key you were provided with */
username = '{username}';
password = '{password}';
apikey = '{apikey}';
function makeRequest(endpoint) {
auth = btoa('${username}:${password}');
var myHeaders = new Headers();
myHeaders.append("APIKey", apikey);
myHeaders.append("Accept-Encoding", "gzip, deflate, br");
myHeaders.append("Authorization", "Basic ${auth}");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.constructiononline.com/" + endpoint, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
return response;
};makeRequest("api/CustomValues");
Custom Values
Each custom value type is represented by a specific number, as depicted in the table below.
# | Custom Value Type | Description |
1 | RESOURCE_TYPE | Contact group options for contacts, such as "Vendor" or "Engineer". Used with Contacts. |
2 | EQUIPMENT_CATEGORY | Categories that a material/piece of equipment may fall under, such as "General Requirements" or "Concrete". Used with Daily Logging. |
3 | UNIT | Units of measure for financial items. Used with Estimating, Selections, and Change Orders. |
4 | PROJECT_TYPE | Project types, such as "Single-family Residential" or "Remodeling". Used with Projects. |
5 | PUNCH_STATUS | Status options for Punch List Items, such as "Work in Progress" or "In Dispute". Used with Punch Lists. |
6 | SCHEDULE_STATUS | Status options for Schedules, such as "Paused" or "Running". Used with Scheduling. |
7 | PROJECT_STAGE | Stages of a Project, such as "Pre-bid" or "Approved". Used with Projects. |
8 | SUBMITTAL_TYPE | Submittal types, such as "Product Information". Used with Submittals. |
9 | TRADE | Trade/area of work options, such as "HVAC" or "Electrical". Used with almost all features in ConstructionOnline. |
10 | TODO_STAGE | To Do Stage options, such as "Closed" or "Planning". Used with To Dos. |
11 | TODO_TYPE | Types of To Dos, such as "Task" or "Follow Up". Used with To Dos. |
12 | TODO_CATEGORY | To Do category options, such as "Closeout" or "Design". Used with To Dos. |
13 | CORDER_TYPE | Types of Change Orders, such as "Allowance" or "Sub Scope Change". Used with Change Orders. |
14 | CORDER_REASON | Reasons for Change Orders, such as "Add Materials" or "Client Request". Used with Change Orders. |
15 | LEAD_WON_REASON | Reasons why a Lead was won, such as "ICP". Used with Leads. |
16 | LEAD_LOST_REASON | Reasons why a Lead was lost, such as "Budget" or "Non-ICP". Used with Leads. |
17 | PROJECT_GROUP | Types of Project Groups, such as the name of a subdivision. Used with Projects. |
18 | PROJECT_CATEGORY | Project Categories, such as "New Build" or "Remodel". Used with Projects. |
19 | PROJECT_OFFICE | Office location options, such as "Atlanta" or "Dallas". Used with Projects. |
20 | PROJECT_DIVISION | Division options, such as "Residential" or "Commercial". Used with Projects and Contacts. |
21 | PROJECT_REGION | Region options, such as "Southeast" or "Northeast". Used with Projects and Contacts. |
22 | ACTIVITY_TYPE | Types of Lead Events, such as "Callback" or "Meeting". Used with Lead Tracking. |
23 | CALENDAR_TYPE | Types of Calendar Events, such as "Appointment" or "Inspection". Used with Calendars. |
24 | SCHEDULE_TYPE | Types of Schedule Tasks, such as "Administrative" or "Closeout". Used with Scheduling. |
26 | CONTACT_CATEGORY | Contact category options, such as "Owner". Used with Contacts. |
27 | OPPORTUNITY_STAGE | Opportunity stage options, such as "Prospecting" or "Qualification". Used with Opportunities. |
28 | OPPORTUNITY_TYPE | Types of Opportunities, such as "New Business" or "Existing Business". Used with Opportunities. |
29 | OPPORTUNITY_SOURCE | Source options for Opportunities, such as "Social Media" or "Email Marketing". Used with Opportunities. |
30 | OPPORTUNITY_WON_REASON | Reasons why an Opportunity was won. Used with Opportunities. |
31 | OPPORTUNITY_LOST_REASON | Reasons why an Opportunity was lost, such as "Budget". Used with Opportunities. |
32 | REDLINE_TAGS | Redline Sheet tag options, such as "Electrical" or "Plumbing". Used with Redline Planroom and Redline Takeoff. |
33 | CHECK_STATUS | Status options for Checklist Items, such as "Work in Progress" or "In Dispute". Used with Checklists. |
36 | INCIDENT_TYPE | Types of incidents for Safety Logs, such as "Accident" or "Safety Violation". Used with Daily Logs. |
37 | KEY_ROLE | Key Role options for Project team members, such as "Contractor" or "Builder". Used with Projects when assigning Key Roles to Contacts. |
38 | ORDER_STATUS | Order/delivery status options for approved Selection Choices, such as "In Transit" or "Delayed". Used with Client Selections. |
39 | CO_DELIVERY_STATUS | Order/delivery status options for approved Change Orders, such as "In Transit" or "Delayed". Used with Change Orders. |
40 | MESSAGE_TEMPLATE_TYPE | Types of Message Templates, such as "Initial Setup" or "Overdue". Used with Messages. |
41 | LABOR_TYPE | Labor type options for Companies, such as "Union" or "Non-Union". Used with Companies. |
42 | TAGS | Tag options for Companies, such as "Commercial" or "Residential". Used with Companies. |
43 | JOB_TITLE | Specific job titles for Contacts, such as "Site Foreman" or "Project Manager". Used with Contacts. |
Responses
200: Success
A successful request will return a 200 response with a collection of all custom value entries in the body, as seen below:
[
{
"ID": 250,
"TYPE": 2,
"TITLE": "General Requirements",
"COMPANY_ID": 0,
"REPLACE_ID": null,
"IS_DEFAULT": true,
"IMAGE_ID": null
},
{
"ID": 251,
"TYPE": 2,
"TITLE": "Site Construction",
"COMPANY_ID": 0,
"REPLACE_ID": null,
"IS_DEFAULT": true,
"IMAGE_ID": null
},
{
"ID": 266,
"TYPE": 3,
"TITLE": "Each",
"COMPANY_ID": 0,
"REPLACE_ID": null,
"IS_DEFAULT": true,
"IMAGE_ID": null
},
{
"ID": 267,
"TYPE": 3,
"TITLE": "Day",
"COMPANY_ID": 0,
"REPLACE_ID": null,
"IS_DEFAULT": true,
"IMAGE_ID": null
}
]
Name | Type | Description |
ID | integer | Unique identifier for each object, which corresponds to a specific custom value entry. Other ConstructionOnline API endpoints that return custom values will return the ID that represents a custom value entry—not the name of the entry itself. |
TYPE | integer | Enumeration of the custom value type. |
TITLE | string | Name of the custom value entry. |
COMPANY_ID | integer | Company ID of the user who created the custom value entry. |
REPLACE_ID | integer |
ID of the previous custom value entry that the current entry replaced, either from a deletion or update. |
IS_DEFAULT | boolean | Indicates if the custom value is a default value for the custom value type. |
IMAGE_ID | integer | ID of the image associated with the custom value entry. |
404: Error
The server was not able to locate the resource specified in the request.
429: Error
The user has surpassed the request rate limit for the hour, day, week, or month.
500: Error
There was an internal server error and the server was unable to complete the request.
Last updated: Dec 7, 2023