Getting Started

Step 1: Sign up for a CoConstruct developer account

Get access to CoConstruct’s APIs by signing up for a developer account. Our API Team will reach out to learn more about the integrated solution you’re planning to build and discuss how you can best make use of the CoConstruct API to achieve your goal.

We’ll also set you up with the Client ID and Client Secret you’ll need to access our APIs as well as the credentials for a developer sandbox environment for testing and experimentation.

In the meantime, you can start exploring our API documentation.

Step 2: Get an access token

CoConstruct uses the OAuth 2.0 Authorization Code grant type to issue an access token for our APIs. Any resources we can link to that provide info on OAuth framework?  

Visit www.oauth.com to read about the basis of oAuth 2.0.


To request a token, you’ll need to provide the following info:

Grant Type

Authorization Code

Callback URL

Use the callback URL that you provided to CoConstruct when registering your application.

Auth URL

Sandbox: https://authorize-sandbox.coconstruct.com/connect/authorize

Production: https://authorize.coconstruct.com/connect/authorize

Access Token URL

Sandbox: https://authorize-sandbox.coconstruct.com/connect/token

Production: https://authorize.coconstruct.com/connect/token

Client ID

32 character value, e.g., 05703afd9a20093851fee3b7a72cf5f6

Client Secret

64 character value, e.g., 9c0ea20ed5092b4608c29eabb6d135ba706acb88c46031c5d1768c40f38e8151

Scope

Include the scopes relevant to the API calls you’ll be making, which are noted in our API documentation.


You may also include the offline_access scope to obtain a refresh token along with the access token.

Postman is our recommended tool for trying out our OAuth workflow and making subsequent API calls. The image below illustrates how to request an access token in Postman.

Picture
Picture

Step 3: Complete the authorization workflow

Upon successful validation of the info in the previous step, you will be presented with the authorization workflow as shown below.

Completing the workflow requires logging in as a CoConstruct user with admin privileges.

During development and testing, you may use the test credentials provided by Coconstruct, which will have the necessary admin privileges.


After logging in with valid CoConstruct credentials, you will need to give consent to the connecting app as shown in the screen on the right.

The scopes you requested in Step 2 will inform what the end user sees here, detailing which areas of the CoConstruct account you have requested to access.

After you click Allow, the token will be issued.

Step 4: Make your first API call

Now that you have your access token, you can make a call to any of CoConstruct’s APIs. We recommend starting with the Get Contractor List request, which provides basic information about CoConstruct accounts and serves as the basis for the workflows you’ll build out with our API.

The base URL for all API requests will be as follows:

  • Production: https://api.coconstruct.com/

  • Sandbox: https://api-sandbox.coconstruct.com/

Using Postman, the Get Contractor List request will appear as follows:


Get api call

A successful Get Contractor List request will return a JSON response in the following format.