NAV Navbar
shell javascript python

Introduction

Welcome to the OneClickCode API! You can use our API to access OneClickCode API endpoints, which can get currently get information on various municipalities in our database.

We have language examples in Shell, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

An example API call with Authentication headers included:

# With shell, you can just pass the correct header with each request
curl -X GET \
  'https://api.oneclickcode.com/v1/jurisdiction?lat=38.8536868&lon=-104.8721747&address=3104%20Colorado%20Ave%20Colorado%20Springs%20CO' \
  -H 'x-api-key: APIKEY'
var request = require('request')

var options = {
  method: 'GET',
  url: 'https://api.oneclickcode.com/v1/jurisdiction',
  qs: {
    lat: 38.8536868,
    lon: -104.8721747,
    address: '3104 Colorado Ave Colorado Springs CO'
  },
  headers: { 'x-api-key': 'APIKEY' }
}

request(options, function(error, response, body) {
  if (error) throw new Error(error)

  console.log(body)
})
import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
  'x-api-key': "APIKEY"
}

conn.request("GET", "/v1/jurisdiction?lat=38.8536868&lon=-104.8721747&address=3104%20Colorado%20Ave%20Colorado%20Springs%20CO", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Make sure to replace APIKEY with your API key.

OneClickCode uses API keys to allow access to the API. You can contact code@oneclickcode.com for information on pricing and to purchase an API key.

OneClickCode expects for the API key to be included in all API requests to the server in a header that looks like the following:

x-api-key: APIKEY


Code Summary

Description

Create and retrieve reports indicating the code summary for a specific address. All listed parameters are required.

POST /code-summary

curl -X POST \
  https://api.oneclickcode.com/v1/code-summary \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-api-key: APIKEY' \
  -d '{
    "lat": 38.8536868,
    "lon":-104.8743634,
    "street": "3104 Colorado Ave",
    "city": "Colorado Springs",
    "zip": 80904
}'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.oneclickcode.com/v1/code-summary',
  headers:
   { 'cache-control': 'no-cache',
     'content-type': 'application/json',
     'x-api-key': 'APIKEY' },
  body:
   { lat: 38.8536868,
     lon: -104.8743634,
     street: '3104 Colorado Ave',
     city: 'Colorado Springs',
     zip: 80904 },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

payload = "{\n\t\"lat\": 38.8536868,\n\t\"lon\":-104.8743634,\t\n\t\"street\": \"3104 Colorado Ave\",\n\t\"city\": \"Colorado Springs\",\n\t\"zip\": 80904\n}"

headers = {
    'x-api-key': "APIKEY",
    'content-type': "application/json",
    'cache-control': "no-cache",
    }

conn.request("POST", "/v1/code-summary", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

POST Body

Make sure to set your request header content-type to application/json and include an object with the following properties attached to the POST request body.

Property Required Type Description Example
lat true float Latitude 38.8536868
lon true float Longitude -104.8743634
street true string Street Address 3104 Colorado Ave
city true string City Name Colorado Springs
zip true int 5 Digit Zip 80904

Response Body

Property Type Description
success string Either "error" or "success"
response object or undefined Code Summary Object

GET /code-summary/{report_number}

curl --request GET \
  --url https://api.oneclickcode.com/code-summary/17685 \
  --header 'cache-control: no-cache' \
  --header 'x-api-key: APIKEY' \
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.oneclickcode.com/code-summary/17685',
  headers:
   { 'cache-control': 'no-cache',
     'x-api-key': 'APIKEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
    'x-api-key': "APIKEY",
    'cache-control': "no-cache",
    }

conn.request("GET", "/code-summary/17685", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response Body

Property Type Description
success string Either "error" or "success"
response object or undefined Code Summary Object

Code Summary Object

Property Type Description
aboutOneClickCode array List of strings detailing the OneClick Code company
disclaimers object
    .installation_notice string Notice regarding installation recommendations
    .third_party_notice string Notice regarding data gathered from third parties
    .copyright string OneClick Code copyright notice
report_number integer The report number to use in future lookups and Manufacturer Summary requests
createdAt integer The time created represented by millis since the epoch in UTC time
address string The address of the location info was requested for
latitude float The latitude provided when making the original request
longitude float The longitude provided when making the original request
area_name string The name of the municipality that contains the given property address
state_name_short string Abbreviated state name
climate_zone string The climate zone (1 through 8) designated by the US Department of Energy
moisture_zone string The moisture zone (Moist, Dry, or Marine) designated by the US Department of Energy
website_url string The website address for the building permit issuing authority
permits_issued_by_label string The name of the municipality that issues building permits for the given property address
irc string The residential code book and year for the building permit issuing authority
ibc string The commercial building code book and year for the building permit issuing authority
iecc string The energy conservation code book and year for the building permit issuing authority
iws_required_eaves boolean Whether an ice barrier (ice and water shield) is required on the roof eaves
iws_eaves_exceptions string If an ice barrier is not required, any exceptions that would require an ice barrier (ice and water shield) on the roof eaves
eight_twelve_iws_rule boolean When an ice barrier is required, on roofs with slope equal to or greater that 8/12, whether the ice barrier shall be applied not less than 36 inches along the eaves
shingles_per_manufacturer boolean Whether shingles are required by the building permit issuing authority to be installed according to manufacturer specifications
code_enforced boolean Whether the municipality reguires the code to be followed
contact_phone string The best phone number to contact the building permit issuing authority
drip_edge boolean Whether drip edge is required by the building permit issuing authority under IRC
drip_edge_ibc boolean Whether drip edge is required by the building permit issuing authority under IBC
underlayment boolean Whether underlayment is required by the building permit issuing authority
valley_liner boolean Whether valley liners are required by the building permit issuing authority
hail_exposure string Based hail exposure map Figure R903.5. Moderate hail exposure means 1 or more hail days with hail diameters larger than 1.5 inches in a 20-year period. Severe hail exposure means 1 or more hail days with hail diameters larger than or equal to 2.0 inches in a 20-year period.
ceiling number The highest elevation for which a drone is allowed to fly near given property address
restricted_area boolean Whether a given property address is within a restricted area and a drone is unable to fly or would need special permission to fly
faa_auth boolean Whether a drone needs FAA authorization in order to fly near given property address
insulation_above_deck_commercial string The minimum R-value insulation method for insulation entirely above commercial roof decks
attic_other_commercial string The minimum R-value insulation method for attics and other areas
residential_ceiling string The minimum R-value insulation method for residential ceilings
residential_wood_frame_wall string The minimum R-value insulation method for residential wood frame walls
has_elevation boolean
elevation float The elevation, in feet, of the provided property address
has_tax_details boolean
combined_tax_rate string The total sales tax rate for the provided property address
city_tax_rate string The sales tax rate attributed to the city the property address resides in
combined_district_tax_rate string The total sales tax rate attributed to any special district(s) the property address resides in
county_tax_rate string The sales tax rate attributed to the county the property address resides in
state_tax_rate string The sales tax rate attributed to the state the property address resides in
has_zillow_details boolean
zillow_id string Unique Zillow id
zillow_link string Zillow website link for provided property address
year_built string House year was built, provided by Zillow
zestimate string Zestimate, house value estimate, provided by Zillow
home_size string Total square footage of house, provided by Zillow
num_floors string Total number of above grade floors, provided by Zillow

Code Summary Detail

Description

Retrieve the specific code details used in creating the code summary.

GET /code-summary/{report_number}/detail

curl --request GET \
  --url https://api.oneclickcode.com/code-summary/17685/detail \
  --header 'cache-control: no-cache' \
  --header 'x-api-key: APIKEY' \
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.oneclickcode.com/code-summary/17685/detail',
  headers:
   { 'cache-control': 'no-cache',
     'x-api-key': 'APIKEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
    'x-api-key': "APIKEY",
    'cache-control': "no-cache",
    }

conn.request("GET", "/code-summary/17685/detail", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response Body

Property Type Description
success string Either "error" or "success"
response object or undefined Code Summary Detail Object

Code Summary Detail Object

Property Type Description
aboutOneClickCode array List of strings detailing the OneClick Code company
disclaimers object
    .installation_notice string Notice regarding installation recommendations
    .third_party_notice string Notice regarding data gathered from third parties
    .copyright string OneClick Code copyright notice
locale object An object containind details of the locale
    .township_desc string
    .permits_issued_by string The name of the municipality that issues building permits for the given property address
    .city string The city or town that the given address resides in
    .county string The county or county equivalent that the given address resides in
    .state string The state that the given address resides in
    .city_desc string The legal description of the city or town that the given address resides in
    .township string The township (if applicable) that the given address resides in
    .county_desc string The legal description of the county that the given address resides in
codes array
    [i].section_text string The ICC building code text
    [i].aside_text string Any notes related to the building code
    [i].section_header string The ICC building code section
book object
    .ibc_book string The IBC book (or what the State Building Code is based on) in use by provided municipality
    .iecc_state_book string The state based energy code book (if applicable)
    .irc_book string The IRC book (or what the State Building Code is based on) in use by provided municipality
    .ibc_state_book string The state based building code book (if applicable)
    .irc_state_book string The state based residential code book (if applicable)
    .iecc_book string The IECC book (or what the State Building Code is based on) in use by provided municipality

Code Summary PDF

Description

Retrieve a PDF representing info in Code Summary Object and Code Summary Detail Object.

GET /code-summary/{report_number}/pdf

curl --request GET \
  --url https://api.oneclickcode.com/code-summary/17685/pdf \
  --header 'accept: application/pdf' \
  --header 'cache-control: no-cache' \
  --header 'x-api-key: APIKEY' \
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.oneclickcode.com/code-summary/17685/pdf',
  headers:
   { 'cache-control': 'no-cache',
     accept: 'application/pdf',
     'x-api-key': 'APIKEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
    'x-api-key': "APIKEY",
    'accept': "application/pdf",
    'cache-control': "no-cache",
    }

conn.request("GET", "/code-summary/17685/pdf", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response Body

PDF Binary representing info in Code Summary Object and Code Summary Detail Object


Manufacturer List

Description

Get a list of supported manufacturers and their products

GET /manufacturer-list

curl --request GET \
  --url https://api.oneclickcode.com/manufacturer-list \
  --header 'cache-control: no-cache' \
  --header 'x-api-key: APIKEY' \
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.oneclickcode.com/manufacturer-list',
  headers:
   { 'cache-control': 'no-cache',
     'x-api-key': 'APIKEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
    'x-api-key': "APIKEY",
    'cache-control': "no-cache",
    }

conn.request("GET", "/manufacturer-list", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response Body

Property Type Description
success string Either "error" or "success"
response object or undefined Manufacturer List Object

Manufacturer List Object

Property Type Description
manufacturer_list array List of current manufacturers
    [i].manufacturer_id int Unique manufacturer id
    [i].manufacturer_name string
product_list array
    [i].product_series string
    [i].product_name string Product name specific to selected manufacturer
    [i].product_id int
    [i].manufacturer string

Manufacturer Summary

Description

Create a manufacturer summary that shows how a municipalities code requirements compare to a manufacturers requirements.

POST /manufacturer-summary

curl -X POST \
  https://api.oneclickcode.com/v1/manufacturer-summary \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-api-key: APIKEY' \
  -d '{
    "manufacturer_id": 1,
    "product_id": 15,
    "report_number": 17686
}'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.oneclickcode.com/v1/manufacturer-summary',
  headers:
   { 'cache-control': 'no-cache',
     'content-type': 'application/json',
     'x-api-key': 'APIKEY' },
  body:
   { manufacturer_id: 1,
     product_id: 15,
     report_number: 17686 },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

payload = "{\n\t\"manufacturer_id\": 1,\n\t\"product_id\": 15,\t\n\t\"report_number\": 17686\n}"

headers = {
    'x-api-key': "APIKEY",
    'content-type': "application/json",
    'cache-control': "no-cache",
    }

conn.request("POST", "/v1/manufacturer-summary", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

POST Body

Make sure to set your request header content-type to application/json and include an object with the following properties attached to the POST request body.

Property Required Type Example
manufacturer_id true int 1
product_id true int 15
report_number true int 17686

Response Body

Property Type Description
success string Either "error" or "success"
response object or undefined Manufacturer Summary Object

GET /manufacturer-summary/{report_number}

curl --request GET \
  --url https://api.oneclickcode.com/manufacturer-summary/17685 \
  --header 'cache-control: no-cache' \
  --header 'x-api-key: APIKEY' \
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.oneclickcode.com/manufacturer-summary/17685',
  headers:
   { 'cache-control': 'no-cache',
     'x-api-key': 'APIKEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
    'x-api-key': "APIKEY",
    'cache-control': "no-cache",
    }

conn.request("GET", "/manufacturer-summary/17685", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response Body

Property Type Description
success string Either "error" or "success"
response object or undefined Manufacturer Summary Object

Manufacturer Summary Object

Property Type Description
aboutOneClickCode array List of strings detailing the OneClick Code company
disclaimers object
    .installation_notice string Notice regarding installation recommendations
    .third_party_notice string Notice regarding data gathered from third parties
    .copyright string OneClick Code copyright notice
report_number integer The report number to use in future lookups and Manufacturer Summary requests
createdAt integer The time created represented by millis since the epoch in UTC time
address string The address of the location info was requested for
latitude float The latitude provided when making the original request
longitude float The longitude provided when making the original request
irc string The residential code book and year for the building permit issuing authority
iws_required_eaves boolean Whether an ice barrier (ice and water shield) is required on the roof eaves
iws_eaves_exceptions string If an ice barrier is not required, any exceptions that would require an ice barrier (ice and water shield) on the roof eaves
shingles_per_manufacturer boolean Whether shingles are required by the building permit issuing authority to be installed according to manufacturer specifications
code_enforced boolean Whether the municipality reguires the code to be followed
drip_edge boolean Whether drip edge is required by the building permit issuing authority under IRC
underlayment boolean Whether underlayment is required by the building permit issuing authority
valley_liner boolean Whether valley liners are required by the building permit issuing authority
manufacturer_requirements object
    .manufacturer_id int
    .manufacturer_name string
    .product_id int
    .product_name string
    .product_series string
    .iws_required bool
    .drip_edge_required bool
    .underlayment_required bool
    .valley_liner_required bool
final_requirements object
    .drip_edge bool Whether drip edge is required by the building permit issuing authority or manufacturing specifications under IRC
    .valley_liner bool Whether valley liners are required by the building permit issuing authority or manufacturing specifications
    .underlayment bool Whether underlayment is required by the building permit issuing authority or manufacturing specifications
    .iws bool Whether an ice barrier (ice and water shield) is required on the roof eaves by the building permit issuing authority or manufacturer specifications

Manufacturer Summary PDF

Description

Retrieve a PDF that shows how a municipalities code requirements compare to a manufacturers requirements.

GET /manufacturer-summary/{report_number}/pdf

curl --request GET \
  --url https://api.oneclickcode.com/manufacturer-summary/17685/pdf \
  --header 'accept: application/pdf' \
  --header 'cache-control: no-cache' \
  --header 'x-api-key: APIKEY' \
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.oneclickcode.com/manufacturer-summary/17685/pdf',
  headers:
   { 'cache-control': 'no-cache',
     accept: 'application/pdf',
     'x-api-key': 'APIKEY' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import http.client

conn = http.client.HTTPSConnection("api.oneclickcode.com")

headers = {
    'x-api-key': "APIKEY",
    'accept': "application/pdf",
    'cache-control': "no-cache",
    }

conn.request("GET", "/manufacturer-summary/17685/pdf", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

Response Body

PDF Binary representing how a municipalities code requirements compare to a manufacturers requirements.