1. Overview

Congrid Public API enables customers & third parties to integrate with the Congrid platform.

The API is a REST style API with JSON as the data format making it easy to approach with plenty of tooling available.

Through the API you can access and manage different resources of the Congrid platform. The API provides an easy way to automate day-to-day tasks, such as creating a project and managing the base data of the project.

Currently supported operations by the API are creating and configuring projects in the system.

1.1. API Details

The API version v1 is available at:

The API both consumes and produces data in the following format:

application/json

1.2. Contact

Any questions, issues, suggestions etc please do not hesitate to contact us at

2. Tutorial

A short tutorial about using the API is available at

The tutorial explains how to create a project and fetch project related data. It contains source code and example requests and responses.

3. Authentication & Authorization

API requests are authenticated and authorized with a Authorization Token sent in HTTP headers. E.g.

Congrid-API-Token: c67714zxcvc8f866f762345595269ac119234568531f

Authorization Tokens are user account specific. Tokens are available for special API access accounts. The user accounts that have API-access enabled have access to ALL the projects of the customer.

There are two types of API users, namely full-access and read-only. The full-access API users are able to perform all the API operations that are available. The read-only API user can only read data through the API. The read-only user is a natural choice for third parties that require read access to the data, but do not need to be able to modify the data.

The API users are always enabled by Congrid admins. Thereafter the company admin users can obtain and change the API tokens from the user settings page:

4. Testing in Staging Environment

Congrid provides a staging environment to test your API implementation against the Congrid Public API before actual production use.

Note
Please note that the data in the staging environement is NOT guaranteed to stay intact but is subject to occasional resets with data from production environment.
Note
The files, floor plans and photos are not replicated to the staging environment. Hence for example all the entries returned by the /project/{projectId}/files end-point might not be downloadable. At the moment it is not possible to generate new reports on the sandbox host.

The staging environment is located under:

And the API URL for the environment is:

Please ask Congrid to provide an account for you in the staging environment by contacting support@congrid.fi

5. Headers

Name Description Direction

Congrid-API-Token
mandatory

The API Token used for authentication and authorization of requests

Request

Congrid-Request-Id
optional

Generated by the API to help troubleshoot requests if there is need

Please do NOT set this Header in the client application as it will be overwritten by the API.

Response

6. Users & Roles

Congrid system has to separate entities to handle user accounts and access rights.

  • Users define user accounts and information related to the user, such as name and email

  • Roles specify access rights for users

A User is something that is handled by Congrid system internally. Hence user objects cannot be modified through the API.

A Role on the other hand is something that is used to grant (and remove) access rights for different objects and actions in Congrid system.

The roles can be managed through AD. This requires mapping the project roles to AD groups. This can be done through the API projects end-point. Refer to ad configuration entity for more details about the properties related AD to group mapping.

6.1. Removing a User

Removing or disabling a user in Congrid system essentially means removing all the roles from the user. The easiest way to perform this through the API is to fetch all the roles through the roles end-point and then one by one remove those roles.

7. Static Data & Definitions

The following end-points return static definition and id data.

These end-points are not tied to any particular project but are shared throughout the system.

7.1. GET /targetTypes

7.1.1. Description

Returns all the target type mappings available in the system. These target type mappings are used when targets are created or updated. The targetTypeId of a target is populated with one of the id values returned by this end-point.

The mappings are static by nature and existing ones should not change over time. However new target types might be introduced later on.

7.1.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

7.1.3. Responses

HTTP Code Description Schema

200

A response listing all the target type mappings available in the system

TargetTypes

default

Error

ErrorModel

7.1.4. Example HTTP response

Response 200
{
  "count" : 4,
  "pageSize" : 100,
  "results" : [ {
    "id" : "42b3c6feaa68c1",
    "name" : "Rakennus"
  }, {
    "id" : "42b3c6feaa68c2",
    "name" : "Lohko"
  }, {
    "id" : "42b3c6feaa68c3",
    "name" : "Kerros"
  }, {
    "id" : "42b3c6feaa68c4",
    "name" : "Tila"
  } ]
}

7.2. GET /floorPlanTypes

7.2.1. Description

Returns all the floor plan type mappings available in the system. These floor plan type mappings are required when floor plans are created or updated. The floorPlanTypeId of a floor plan is populated with one of the id values returned by this end-point.

These mappings are static by nature and existing ones should not change over time. However new floorplan types might be introduced later on.

7.2.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

7.2.3. Responses

HTTP Code Description Schema

200

A response listing all the floorplan type mappings available in the system

FloorplanTypes

default

Error

ErrorModel

7.2.4. Example HTTP response

Response 200
{
  "count" : 13,
  "pageSize" : 100,
  "results" : [ {
    "id" : "42b3c6feaa78c2",
    "name" : "ARK"
  }, {
    "id" : "42b3c6feaa78c8",
    "name" : "Autom"
  }, {
    "id" : "42b3c6feaa78d2",
    "name" : "ELEM"
  }, {
    "id" : "42b3c6feaa78c5",
    "name" : "GEO"
  }, {
    "id" : "42b3c6feaa78d1",
    "name" : "GEO"
  }, {
    "id" : "42b3c6feaa78c7",
    "name" : "IV"
  }, {
    "id" : "42b3c6feaa78c9",
    "name" : "Kaluste"
  }, {
    "id" : "42b3c6feaa78c3",
    "name" : "LVI"
  }, {
    "id" : "42b3c6feaa78c6",
    "name" : "LVV"
  }, {
    "id" : "42b3c6feaa78d0",
    "name" : "Maisema"
  }, {
    "id" : "42b3c6feaa78d3",
    "name" : "PALO"
  }, {
    "id" : "42b3c6feaa78c1",
    "name" : "RAK"
  }, {
    "id" : "42b3c6feaa78c4",
    "name" : "Sähkö"
  } ]
}

8. Version End-Point

The version end-point returns the running version of the API.

8.1. GET /version

8.1.1. Description

Returns the version of the software running the API

8.1.2. Responses

HTTP Code Description Schema

200

Version response

VersionResponse

default

Error

ErrorModel

8.1.3. Example HTTP response

Response 200
{
  "version" : "20161219",
  "message" : "Running production version"
}

9. Manage a Project in Congrid

The following chapter describes how you can create a project in Congrid and manage the base data of the project through the API.

The base data of a project consists of:

  • Users and their access rights

  • Companies participating in the project (Sub-contractors, auditors etc)

  • Floor plans and floor plan meta data

  • Targets and target to floorplan mapping

The follwoing end-points are available to allow different operations for the project base data.

9.1. GET /projects

9.1.1. Description

Returns all the projects for the user

Use the optional projectCode query parameter to only retrieve projects with a certain projectCode.

E.g. `&projectCode=P-123` Returns all the projects where projectCode is P-123

Note
projectCode is not quaranteed to be unique so there can be multiple projects with the same projectCode

9.1.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectCode
optional

Project code of the project

string

9.1.3. Responses

HTTP Code Description Schema

200

project response

Projects

default

Error

ErrorModel

9.1.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "ascd45240vb852",
    "name" : "Construction project county hospital",
    "moduleIds" : [ "PUNCH_LISTS", "QUALITY_MEASUREMENTS" ],
    "projectCode" : "P-1256",
    "startedAt" : "2016-09-22",
    "modifiedAt" : "2016-10-04T10:39:31.629000Z",
    "finishedAt" : "2017-01-01",
    "statusId" : "ACTIVE"
  }, {
    "id" : "2ceciaerf3c0a",
    "name" : "Skyscraper city center",
    "moduleIds" : [ "PUNCH_LISTS" ],
    "projectCode" : "5554",
    "startedAt" : "2013-05-01",
    "modifiedAt" : "2016-10-04T10:39:31.629000Z",
    "finishedAt" : "2017-01-01",
    "statusId" : "ACTIVE"
  } ]
}

9.2. POST /projects

9.2.1. Description

Creates a new project in the system and returns a project object with unique project id set. Use this id in all the future API requests related to this project.

The available modules for the project are defined when the project is created. The modules can later be changed through the Congrid UI.

As the project is created the system will automatically add one company to the project. This is the company specified by the ownerId response property and is the company id of the API account user. Performing a GET to the companies end-point should return that company.

The project can have AD groups associated with it to streamline the user access right management. Please refer to the adConfiguration object for more details how the access rights are configured.

9.2.2. Parameters

Type Name Description Schema

Body

project
required

Project to create

NewProject

9.2.3. Responses

HTTP Code Description Schema

201

project response

Project

422

Error processing request

ErrorModel

default

Error

ErrorModel

9.2.4. Example HTTP request

Request body
{
  "name" : "Construction project county hospital",
  "moduleIds" : [ "PUNCH_LISTS", "SAFETY_MEASUREMENTS" ],
  "projectCode" : "P-1256",
  "startedAt" : "2016-09-22",
  "finishedAt" : "2017-01-01",
  "statusId" : "ACTIVE",
  "adConfiguration" : {
    "projectLiveEdit" : [ "PROJECT_A_USERS" ],
    "projectLiveAdmin" : [ "LIVE_ADMIN", "GENERAL_ADMIN" ],
    "projectLiveView" : [ "ACCOUNTING", "MANAGEMENT" ]
  }
}

9.2.5. Example HTTP response

Response 201
{
  "id" : "ascd45240vb852",
  "name" : "Construction project county hospital",
  "moduleIds" : [ "PUNCH_LISTS", "QUALITY_MEASUREMENTS" ],
  "projectCode" : "P-1256",
  "startedAt" : "2016-09-22",
  "modifiedAt" : "2016-10-04T10:39:31.629000Z",
  "finishedAt" : "2017-01-01",
  "statusId" : "ACTIVE",
  "adConfiguration" : {
    "projectClientAdmin" : [ "CLIENT_USERS" ],
    "projectLiveAdmin" : [ "LIVE_ADMIN", "GENERAL_ADMIN" ],
    "projectLiveEdit" : [ "USERS" ],
    "projectLiveView" : [ "ACCOUNTING", "MANAGEMENT" ]
  }
}
Response 422
{
  "code" : 606,
  "message" : "moduleIds.1 in body should be one of [PUNCH_LISTS SAFETY_MEASUREMENTS TASK_PLANNING SAFETY_NOTES PHOTO_NOTES QUALITY LITE QUALITY_MEASUREMENTS FIELD SITE_DIARY]"
}

9.3. PUT /projects/{projectId}

9.3.1. Description

Update project data

Please note that if you update the AD groups associated with the project you will have to update all the groups in the adConfiguration property. Every group that is not given or given an empty array is reset.

Please refer to the adConfiguration object for more details how the access rights are configured.

9.3.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

project
required

Project to update

Project

9.3.3. Responses

HTTP Code Description Schema

200

Project response

Project

default

Error

ErrorModel

9.3.4. Example HTTP response

Response 200
{
  "id" : "ascd45240vb852",
  "name" : "Construction project county hospital",
  "moduleIds" : [ "PUNCH_LISTS", "QUALITY_MEASUREMENTS" ],
  "projectCode" : "P-1256",
  "startedAt" : "2016-09-22",
  "modifiedAt" : "2016-10-04T10:39:31.629000Z",
  "finishedAt" : "2017-01-01",
  "statusId" : "ACTIVE",
  "adConfiguration" : {
    "projectClientAdmin" : [ "CLIENT_USERS" ],
    "projectLiveAdmin" : [ "LIVE_ADMIN", "GENERAL_ADMIN" ],
    "projectLiveEdit" : [ "USERS" ],
    "projectLiveView" : [ "ACCOUNTING", "MANAGEMENT" ]
  }
}

9.4. POST /projects/{projectId}/address

9.4.1. Description

Creates a new address for the project

9.4.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

address
required

Address to create

NewAddress

9.4.3. Responses

HTTP Code Description Schema

201

Address response

Address

default

Error

ErrorModel

9.4.4. Example HTTP request

Request body
{
  "id" : "49jcdsa9j1dksaocsap",
  "projectId" : "cmskam4o1mr4cads0c2",
  "address1" : "Kaisaniemenkatu 4 A",
  "city" : "Helsinki",
  "countryCode" : "FI",
  "postalCode" : "00100",
  "createdAt" : "2016-03-13T10:00:15.000Z",
  "modifiedAt" : "2016-06-13T10:00:15.000Z"
}

9.4.5. Example HTTP response

Response 201
{
  "id" : "49jcdsa9j1dksaocsap",
  "projectId" : "cmskam4o1mr4cads0c2",
  "address1" : "Kaisaniemenkatu 4 A",
  "city" : "Helsinki",
  "countryCode" : "FI",
  "postalCode" : "00100",
  "createdAt" : "2016-03-13T10:00:15.000Z",
  "modifiedAt" : "2016-06-13T10:00:15.000Z"
}

9.5. PUT /projects/{projectId}/address

9.5.1. Description

Update project address

9.5.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

address
required

Address to update

Address

9.5.3. Responses

HTTP Code Description Schema

201

Address response

Address

default

Error

ErrorModel

9.5.4. Example HTTP response

Response 201
{
  "id" : "49jcdsa9j1dksaocsap",
  "projectId" : "cmskam4o1mr4cads0c2",
  "address1" : "Kaisaniemenkatu 4 A",
  "city" : "Helsinki",
  "countryCode" : "FI",
  "postalCode" : "00100",
  "createdAt" : "2016-03-13T10:00:15.000Z",
  "modifiedAt" : "2016-06-13T10:00:15.000Z"
}

9.6. GET /projects/{projectId}/address

9.6.1. Description

Returns the address of the project

9.6.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

9.6.3. Responses

HTTP Code Description Schema

200

Address response

Address

default

Error

ErrorModel

9.6.4. Example HTTP response

Response 200
{
  "id" : "49jcdsa9j1dksaocsap",
  "projectId" : "cmskam4o1mr4cads0c2",
  "address1" : "Kaisaniemenkatu 4 A",
  "city" : "Helsinki",
  "countryCode" : "FI",
  "postalCode" : "00100",
  "createdAt" : "2016-03-13T10:00:15.000Z",
  "modifiedAt" : "2016-06-13T10:00:15.000Z"
}

9.7. POST /projects/{projectId}/companies

9.7.1. Description

After you have created a project, the project only has one company atteched to it; the company that created the project. Use this end-point to add all the relevant subcontractors to it.

This end-point creates a new company and attaches it to the project.

If you will not explicitly set the companyTypeId property then it is set with the default value CONTRACTOR

9.7.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

company
required

Company to create

NewCompany

9.7.3. Responses

HTTP Code Description Schema

201

The created company

Company

default

Error

ErrorModel

9.7.4. Example HTTP request

Request body
{
  "name" : "Painters from the West",
  "vatCode" : "Y-1256256",
  "companyTypeId" : "CONTRACTOR",
  "specifier" : "Painter"
}

9.7.5. Example HTTP response

Response 201
{
  "id" : "942vm31c2s",
  "projectId" : "asdcasd32v34g0",
  "name" : "Painters from the West",
  "vatCode" : "Y-1256256",
  "companyTypeId" : "CONTRACTOR",
  "specifier" : "Painter",
  "modifiedAt" : "2016-06-13T10:00:15.000Z"
}

9.8. PUT /projects/{projectId}/companies/{companyId}

9.8.1. Description

Updates company information

If you will not explicitly set the companyTypeId property in the PUT request, then it is set with the default value CONTRACTOR

9.8.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

companyId
required

ID of the company

string

Body

company
required

Company to update

Company

9.8.3. Responses

HTTP Code Description Schema

200

Company response

Company

default

Error

ErrorModel

9.8.4. Example HTTP response

Response 200
{
  "id" : "942vm31c2s",
  "projectId" : "asdcasd32v34g0",
  "name" : "Painters from the West",
  "vatCode" : "Y-1256256",
  "companyTypeId" : "CONTRACTOR",
  "specifier" : "Painter",
  "modifiedAt" : "2016-06-13T10:00:15.000Z"
}

9.9. DELETE /projects/{projectId}/companies/{companyId}

9.9.1. Description

Removes a company from the project

Note
Removing a company from the project does not remove the users of that company from the project. The users need to be removed separately through the project/users end-point

9.9.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

companyId
required

ID of the company

string

9.9.3. Responses

HTTP Code Description Schema

204

Company deleted

No Content

default

Error

ErrorModel

9.10. GET /projects/{projectId}/companies

9.10.1. Description

Returns all the companies (the main contractor and sub contractors) that participate in the project

Use the following query parameters to limit the results:

  • vatCode to limit by VAT code

  • modifiedAtLt to limit by modified before a time (exclusively)

  • modifiedAtLte to limit by modified before a time (inclusively)

  • modifiedAtGt to limit by modified after a time (exclusively)

  • modifiedAtGte to limit by modified after a time (inclusively)

Note
VAT code is not a unique property in the scope of a project hence multiple company entities in Congrid system can have the same vat code.

9.10.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

vatCode
optional

Filter results to only contain object with the specified vatCode

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

9.10.3. Responses

HTTP Code Description Schema

200

A list of companies participating in the the project

Companies

default

Error

ErrorModel

9.10.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "942vm31c2s",
    "projectId" : "asdcasd32v34g0",
    "name" : "Painters from the West",
    "vatCode" : "Y-1256256",
    "companyTypeId" : "CONTRACTOR",
    "specifier" : "Painter",
    "modifiedAt" : "2016-06-13T10:00:15.000Z"
  }, {
    "id" : "cad31cdava",
    "projectId" : "asdcasd32v34g0",
    "name" : "Construction Ltd",
    "vatCode" : "Y-4135653",
    "companyTypeId" : "CONTRACTOR",
    "modifiedAt" : "2017-05-11T10:00:15.000Z"
  } ]
}

9.11. GET /projects/{projectId}/contacts

9.11.1. Description

Returns all the contacts for this project.

The following optional query parameters can be used to filter the results:

  • companyId to fetch all the contacts of a specific company

  • email to fetch all the contacts that have a specific email address

  • modifiedAtLt to fetch all the contacts that have been modified before a time (exclusively)

  • modifiedAtLte to fetch all the contacts that have been modified before a time (inclusively)

  • modifiedAtGt to fetch all the contacts that have been modified after a time (exclusively)

  • modifiedAtGte to fetch all the contacts that have been modified after a time (inclusively)

Note
This end-point exposes the contacts of a single project. If you want to retrieve all the contacts of all projects please refer to this end-point

9.11.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

companyId
optional

Filter by id of a company

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

email
optional

Filter results to only contain object with the specified email

string

9.11.3. Responses

HTTP Code Description Schema

200

The contacts

Contacts

default

Error

ErrorModel

9.11.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "xv331d31",
    "projectId" : "asdcasd32v34g0",
    "companyId" : "mbnhtigt498584",
    "name" : "Joe Johnson",
    "email" : "joe.johnson@contact.com",
    "phone" : "+35812312312",
    "taxNumber" : "01390-123120",
    "isManager" : false
  }, {
    "id" : "9csa1i2mxsa9",
    "projectId" : "asdcasd32v34g0",
    "companyId" : "31dkkiasd0c0c0",
    "name" : "Neil Smith",
    "email" : "neil.smith@contact.com",
    "phone" : "+358010101010",
    "taxNumber" : "000431-213123",
    "isManager" : true
  } ]
}

9.12. POST /projects/{projectId}/contacts

9.12.1. Description

Add contacts for a company in the scope of a project.

Note
Removing a company from the project does not remove the associated contacts.

9.12.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

contact
required

Contact to create

NewContact

9.12.3. Responses

HTTP Code Description Schema

201

The created contact

Contact

default

Error

ErrorModel

9.12.4. Example HTTP request

Request body
{
  "companyId" : "mbnhtigt498584",
  "name" : "Joe Johnson",
  "email" : "joe.johnson@contact.com",
  "phone" : "+35812312312",
  "taxNumber" : "01390-123120",
  "isManager" : false
}

9.12.5. Example HTTP response

Response 201
{
  "id" : "xv331d31",
  "projectId" : "asdcasd32v34g0",
  "companyId" : "mbnhtigt498584",
  "name" : "Joe Johnson",
  "email" : "joe.johnson@contact.com",
  "phone" : "+35812312312",
  "taxNumber" : "01390-123120",
  "isManager" : false
}

9.13. PUT /projects/{projectId}/contacts/{contactId}

9.13.1. Description

Updates contact information

9.13.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

contactId
required

ID of the contact in the scope of the company

string

Body

contact
required

Contact to update

Contact

9.13.3. Responses

HTTP Code Description Schema

200

Contact response

Contact

default

Error

ErrorModel

9.13.4. Example HTTP response

Response 200
{
  "id" : "xv331d31",
  "projectId" : "asdcasd32v34g0",
  "companyId" : "mbnhtigt498584",
  "name" : "Joe Johnson",
  "email" : "joe.johnson@contact.com",
  "phone" : "+35812312312",
  "taxNumber" : "01390-123120",
  "isManager" : false
}

9.14. DELETE /projects/{projectId}/contacts/{contactId}

9.14.1. Description

Removes a contact from the company

9.14.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

contactId
required

ID of the contact in the scope of the company

string

9.14.3. Responses

HTTP Code Description Schema

204

Contact deleted

No Content

default

Error

ErrorModel

9.15. POST /projects/{projectId}/roles

9.15.1. Description

Creates a new role for the project

  • If the user is an existing Congrid user (based on email), then the role is added to the project

  • If the user is not an existing Congrid user, then the user is first created in Congrid system and then the role is added to the project

The id returned in the POST response can be used to remove the user role from the project.

To update the roles of the user for the project perform a new POST with the same email address. This will add new roles for the user and remove the old ones.

Note
If the user account is in "disabled" mode. The user is added to the project and is visible in project listing (however the user stays disabled and cannot log in to Congrid)
Note
If a user with PROJECT_LITE role is created, the API automatically associates it with a contact. If such contact does not exist it will be created.

9.15.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

user
required

User to attach to the project

NewRole

9.15.3. Responses

HTTP Code Description Schema

201

User response

Role

default

Error

ErrorModel

9.15.4. Example HTTP request

Request body
{
  "email" : "jack@congrid.fi",
  "roles" : [ "PROJECT_CLIENT_ADMIN", "PROJECT_LIVE_VIEW" ],
  "companyId" : "sacn53nigvw122oop2",
  "projectId" : "ax31dxdpc3p1px1"
}

9.15.5. Example HTTP response

Response 201
{
  "userId" : "ascv24o5fov",
  "email" : "jack@congrid.fi",
  "roles" : [ "PROJECT_CLIENT_ADMIN", "PROJECT_LIVE_VIEW" ],
  "companyId" : "sacn53nigvw122oop2"
}

9.16. DELETE /projects/{projectId}/roles/{userId}

9.16.1. Description

Removes a role from the project. After this the user with the role does not have permissions to access the project or its data anymore.

Note
Removing a role from a project will not remove any data that was generated by the user during the project

9.16.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

userId
required

ID of the user

string

9.16.3. Responses

HTTP Code Description Schema

204

User removed from the project

No Content

default

Error

ErrorModel

9.17. GET /projects/{projectId}/roles

9.17.1. Description

Returns all the roles that are related to this project

9.17.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

9.17.3. Responses

HTTP Code Description Schema

200

Users response

Roles

default

Error

ErrorModel

9.18. POST /projects/{projectId}/floorPlans

9.18.1. Description

Add a new floorplan to the project.

Adding a floorplan to a project is a three step operation:

1) Create a new floorplan object (this step)

2) Upload (PUT) the floorplan data to Congrid platform using the uploadUrl property

3) Inform (POST) Congrid platform once the data has been succesfully uploaded via the floor plan uploaded end-point

The response object for step 1 specifies the URL that should be used in step 2 to upload the floorplan data with a HTTP PUT.

The PUT request should specify the actual file of the floor plan in form-data field file. An example curl reqeust for the PUT

curl -X PUT
  -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  -F "file=@/tmp/123.pdf"
  "https://s3-eu-west-1.amazonaws.com/congrid/projects/abc/floorplans/123.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=1&X-Amz-Credential=Awest-1&X-Amz-SignedHeaders=host&X-Amz-Date=2016&X-Amz-Signature=5"

To create a new version of an existing floor plan use this same end-point but set the slug property in the POST request to point to an existing floor plan slug.

Note
The uploadUrl property is only present in the POST response because it has a validity time which starts counting when the POST is performed.

9.18.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

floorplan
required

Floorplan to create

NewFloorplan

9.18.3. Responses

HTTP Code Description Schema

201

Floorplan response. This response contains the URL to which the floorplan data should be PUT

Floorplan

400

Error processing request

ErrorModel

default

Error

ErrorModel

9.18.4. Example HTTP request

Request body
{
  "name" : "Floorplan 1 - basement",
  "floorPlanTypeId" : "asc23c34v",
  "slug" : "asc23v",
  "description" : "This is the floorplan for the basement"
}

9.18.5. Example HTTP response

Response 201
{
  "id" : "asdc2x43c7",
  "name" : "Floorplan 1 - basement",
  "floorPlanTypeId" : "asc23c34v",
  "projectId" : "2455v0356y2",
  "slug" : "asc23v",
  "description" : "This is the floorplan for the basement",
  "uploadUrl" : "https://s3-eu-west-1.amazonaws.com/congrid/projects/abc/floorplans/123.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=1&X-Amz-Credential=Awest-1&X-Amz-SignedHeaders=host&X-Amz-Date=2016&X-Amz-Signature=5"
}
Response 400
{
  "code" : 109,
  "message" : "Incorret floorplan slug"
}

9.19. POST /projects/{projectId}/floorPlans/{floorPlanId}/uploaded

9.19.1. Description

Use this end-point to inform that a floor plan has been uploaded to the URL returned for it during the floor plan POST.

This step is important because it indicates to the Congrid platform that it can process the floor plan data and make it available for the different modules using it.

9.19.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

floorPlanId
required

ID of the floor plan

string

9.19.3. Responses

HTTP Code Description Schema

200

Floorplan data uploaded

No Content

default

Error

ErrorModel

9.20. PUT /projects/{projectId}/floorPlans/{floorPlanId}

9.20.1. Description

Update floor plan metadata. This end-point is used to update the metadata of a floorplan.

To udpate the actual floor plan image data please refer to POST floorplan end-point.

9.20.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

floorPlanId
required

ID of the floor plan

string

Body

floorplan
required

Floorplan to update

Floorplan

9.20.3. Responses

HTTP Code Description Schema

200

Floorplan response

Floorplan

default

Error

ErrorModel

9.20.4. Example HTTP response

Response 200
{
  "id" : "asdc2x43c7",
  "name" : "Floorplan 1 - basement",
  "floorPlanTypeId" : "asc23c34v",
  "projectId" : "2455v0356y2",
  "slug" : "asc23v",
  "description" : "This is the floorplan for the basement"
}

9.21. DELETE /projects/{projectId}/floorPlans/{floorPlanId}

9.21.1. Description

Removes a floor plan version from the project.

To remove all the versions of a floor plan please refer to end-point

9.21.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

floorPlanId
required

ID of the floor plan

string

9.21.3. Responses

HTTP Code Description Schema

204

Floorplan deleted

No Content

default

Error

ErrorModel

9.22. GET /projects/{projectId}/floorPlans

9.22.1. Description

Returns all the floor plans of the project.

By default this end-point returns all the versions of all floor plans.

Use the optional active query parameter to fetch only the latest versions of each floor plan.

Use the optional slugId query parameter to only retrieve floor plans with a specific slug. This is equal to returning all versions of a particular floor plan.

9.22.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

slug
optional

The slug by which the results are filtered

string

Query

active
optional

Return only active (latest) versions of the floor plans.

boolean

9.22.3. Responses

HTTP Code Description Schema

200

floor plans response

Floorplans

default

Error

ErrorModel

9.22.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "asdc2x43c7",
    "name" : "Floorplan 1 - basement",
    "floorPlanTypeId" : "asc23c34v",
    "projectId" : "2455v0356y2",
    "slug" : "asc23v",
    "description" : "This is the floorplan for the basement"
  }, {
    "id" : "b54cs2x872c32",
    "name" : "Room 1",
    "floorPlanTypeId" : "asc23c34v",
    "projectId" : "2455v0356y2",
    "slug" : "btkk56",
    "description" : "Room 1"
  } ]
}

9.23. DELETE /projects/{projectId}/floorPlanSlug/{floorPlanSlugId}

9.23.1. Description

Removes all versions of a floor plan with the given slug from the project.

To remove any single version of a floor plan please refer to DELETE Floorplan

9.23.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

floorPlanSlugId
required

Slug ID of the floor plan

string

9.23.3. Responses

HTTP Code Description Schema

204

Floor plan deleted

No Content

400

Error processing request

ErrorModel

default

Error

ErrorModel

9.23.4. Example HTTP response

Response 400
{
  "code" : 109,
  "message" : "Incorret floorplan slug"
}

9.24. POST /projects/{projectId}/targets

9.24.1. Description

Adds a new target for the project. Targets can be used to describe the structure of different physical areas of the construction site through a parent child hierarchy.

Targets can have multiple floor plans attached to them. Utilize the target floor plan mapping end-point to specify which floor plans should be attached to the target.

9.24.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

target
required

Target to create

NewTarget

9.24.3. Responses

HTTP Code Description Schema

201

Target response

Target

400

Error processing request

ErrorModel

default

Error

ErrorModel

9.24.4. Example HTTP request

Request body
{
  "targetTypeId" : "cas542v02",
  "name" : "Building 1",
  "parentId" : "casn87062m2",
  "description" : "Building 1 of section 1"
}

9.24.5. Example HTTP response

Response 201
{
  "id" : "asca4b870lx",
  "projectId" : "074bmn234jc",
  "targetTypeId" : "cas542v02",
  "name" : "Building 1",
  "parentId" : "casn87062m2",
  "description" : "Building 1 of section 1"
}
Response 400
{
  "code" : 111,
  "message" : "Incorrect target type id: ABC"
}

9.25. PUT /projects/{projectId}/targets/{targetId}

9.25.1. Description

Update the target metadata.

Use this end-point to update the metadata, such as name or target type, of the target.

9.25.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

targetId
required

ID of the target

string

Body

target
required

Target to update

Target

9.25.3. Responses

HTTP Code Description Schema

201

Target response

Target

default

Error

ErrorModel

9.25.4. Example HTTP response

Response 201
{
  "id" : "asca4b870lx",
  "projectId" : "074bmn234jc",
  "targetTypeId" : "cas542v02",
  "name" : "Building 1",
  "parentId" : "casn87062m2",
  "description" : "Building 1 of section 1"
}

9.26. DELETE /projects/{projectId}/targets/{targetId}

9.26.1. Description

Removes a target from the project. If the target has child targets, then those are also removed.

Notes, photos and other objects attached to the target are not removed and they still have the information about the target available even after the target has been removed.

9.26.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

targetId
required

ID of the target

string

9.26.3. Responses

HTTP Code Description Schema

204

Target deleted

No Content

default

Error

ErrorModel

9.27. GET /projects/{projectId}/targets

9.27.1. Description

Returns all the targets of the project

9.27.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

9.27.3. Responses

HTTP Code Description Schema

200

targets response

Targets

default

Error

ErrorModel

9.27.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "asca4b870lx",
    "projectId" : "074bmn234jc",
    "targetTypeId" : "cas542v02",
    "name" : "Building 1",
    "parentId" : "casn87062m2",
    "description" : "Building 1 of section 1"
  }, {
    "id" : "0hl6kbfd04p",
    "projectId" : "074bmn234jc",
    "targetTypeId" : "cas542v02",
    "parentId" : "casn87062m2",
    "description" : "Building 2 of section 1"
  } ]
}

9.28. GET /projects/{projectId}/targetFloorPlans

9.28.1. Description

Get all the target to floor plan mappings of the project.

Use the optional targetId or floorPlanId query parameters to limit the mappings to a particular floor plan or target.

9.28.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

floorPlanId
optional

string

Query

targetId
optional

string

9.28.3. Responses

HTTP Code Description Schema

200

Return floor plan targets

TargetFloorPlans

default

Error

ErrorModel

9.28.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "asca4b870lx54kc",
    "targetId" : "074bmn234jc",
    "floorPlanId" : "cas542v02"
  }, {
    "id" : "0hl6kbfd04pcd21",
    "targetId" : "v839cjd074bmn234jc",
    "floorPlanId" : "cim65o309bc4320"
  } ]
}

9.29. POST /projects/{projectId}/targetFloorPlans

9.29.1. Description

Create a new floorplan to target mapping.

To update or remove this mapping, use the returned id in the followup requests

9.29.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Body

targetFloorPlan
required

Add a floor plan to a target

NewTargetFloorPlan

9.29.3. Responses

HTTP Code Description Schema

201

Created new target to floor plan mapping

TargetFloorPlan

default

Error

ErrorModel

9.29.4. Example HTTP request

Request body
{
  "targetId" : "m3i0v90dsc1plxs",
  "floorPlanId" : "054vjn54cxps233x"
}

9.29.5. Example HTTP response

Response 201
{
  "id" : "cdascmt5jn3igi",
  "targetId" : "m3i0v90dsc1plxs",
  "floorPlanId" : "054vjn54cxps233x"
}

9.30. DELETE /projects/{projectId}/targetFloorPlans/{targetFloorPlanId}

9.30.1. Description

Removes a single target to floor plan mapping.

Removing the mapping does NOT remove the floor plan or the target.

9.30.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

targetFloorPlanId
required

string

9.30.3. Responses

HTTP Code Description Schema

200

Target to floor plan mapping removed

No Content

default

Error

ErrorModel

9.31. PUT /projects/{projectId}/targetFloorPlans/{targetFloorPlanId}

9.31.1. Description

Update a target floor plan mapping

9.31.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Path

targetFloorPlanId
required

string

Body

targetFloorPlan
required

Floor plan target mapping to update

TargetFloorPlan

9.31.3. Responses

HTTP Code Description Schema

200

Updated target to floor plan mapping

TargetFloorPlan

default

Error

ErrorModel

10. Root Level End-Points

Sometimes it is necessary to be able to perform actions that are not tied to a project. Hence the API exposes root level end-points. Through these the API user is able to perform operations on the whole system instead of on a specific project.

Some root level end-points are exposed to fetch data related to all projects at once. Others such as the users end-point is exposed to get a listing of all users in the system.

10.1. GET /roles

10.1.1. Description

Returns all the roles for all the projects of the company that are in the system.

Note
To retrieve roles for single projects please refer to the following end-point

10.1.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

email
optional

The email address by which the results are filtered

string

Query

projectId
optional

ID of the project

string

10.1.3. Responses

HTTP Code Description Schema

200

The roles

Roles

default

Error

ErrorModel

10.1.4. Example HTTP response

Response 200
{
  "count" : 3,
  "pageSize" : 100,
  "results" : [ {
    "id" : "10",
    "email" : "joe.johnson@contact.com",
    "companyId" : "dck3i4ocads9123",
    "projectId" : "PVvfdFDKVS5454",
    "roles" : [ "PROJECT_LIVE_ADMIN", "PROJECT_CLIENT_ADMIN", "PROJECT_LIVE_EDIT", "PROJECT_LIVE_VIEW" ]
  }, {
    "id" : "15",
    "email" : "neil.smith@contact.com",
    "companyId" : "vfidsoi24o5v0dfsv0ds",
    "projectId" : "v90fsd9042fkcdpadafv",
    "roles" : [ "PROJECT_LIVE_ADMIN", "PROJECT_LIVE_VIEW" ]
  }, {
    "id" : "3142",
    "companyId" : "ua6tvr70c14me8fjj6hf0jazj578p12h",
    "email" : "company-admin-role@congrid.fi",
    "roles" : [ "COMPANY_ADMIN" ]
  } ]
}

10.2. POST /roles

10.2.1. Description

Adds a new role to the system.

Through this end-point you can create both:

  • Project roles

  • Roles that are not tied to any project, for example the COMPANY_ADMIN role

The id returned in the POST response can be used to remove the role

To update per project roles of the user either:

  • Perform a new POST with the same email address and projectId. This will add new roles for the user and remove the old ones.

  • Use the per project end-point

Note
If a user with PROJECT_LITE role is created, the API automatically associates it with a contact. If such contact does not exist it will be created.

10.2.2. Parameters

Type Name Description Schema

Body

role
required

Role to add to the system

NewRole

10.2.3. Responses

HTTP Code Description Schema

201

Role response

Role

default

Error

ErrorModel

10.2.4. Example HTTP request

Request body
{
  "email" : "jack@congrid.fi",
  "roles" : [ "PROJECT_CLIENT_ADMIN", "PROJECT_LIVE_VIEW" ],
  "companyId" : "sacn53nigvw122oop2",
  "projectId" : "ax31dxdpc3p1px1"
}

10.2.5. Example HTTP response

Response 201
{
  "id" : "15",
  "email" : "neil.smith@contact.com",
  "companyId" : "vfidsoi24o5v0dfsv0ds",
  "projectId" : "v90fsd9042fkcdpadafv",
  "roles" : [ "PROJECT_LIVE_ADMIN", "PROJECT_LIVE_VIEW" ]
}

10.3. GET /contacts

10.3.1. Description

Returns all the contacts for all the projects.

The following optional query parameters can be used to filter the results:

  • companyId to fetch all the contacts of a specific company

  • email to fetch all the contacts that have a specific email address

  • modifiedAtLt to fetch all the contacts that have been modified before a time (exclusively)

  • modifiedAtLte to fetch all the contacts that have been modified before a time (inclusively)

  • modifiedAtGt to fetch all the contacts that have been modified after a time (exclusively)

  • modifiedAtGte to fetch all the contacts that have been modified after a time (inclusively)

Note
To retrieve contacts for single projects please refer to the following end-point

10.3.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

email
optional

Filter results to only contain object with the specified email

string

Query

companyId
optional

Filter by id of a company

string

Query

projectId
optional

ID of the project

string

10.3.3. Responses

HTTP Code Description Schema

200

The contacts

Contacts

default

Error

ErrorModel

10.3.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "xv331d31",
    "projectId" : "asdcasd32v34g0",
    "companyId" : "mbnhtigt498584",
    "name" : "Joe Johnson",
    "email" : "joe.johnson@contact.com",
    "phone" : "+35812312312",
    "taxNumber" : "01390-123120",
    "isManager" : false,
    "modifiedAt" : "2016-06-13T10:00:15.000Z"
  }, {
    "id" : "9csa1i2mxsa9",
    "projectId" : "931xckdeio213d",
    "companyId" : "1cd90sakdc314d",
    "name" : "Neil Smith",
    "email" : "neil.smith@contact.com",
    "phone" : "+358010101010",
    "taxNumber" : "000431-213123",
    "isManager" : true,
    "modifiedAt" : "2017-01-15T10:24:15.000Z"
  } ]
}

10.4. GET /companies

10.4.1. Description

Returns all the companies for all the projects this user has access to.

You can use the following optional query parameter to limit the results:

  • projectId to limit the query based on a projectId

  • vatCode to limit by VAT code

  • modifiedAtLt to limit by modified before a time (exclusively)

  • modifiedAtLte to limit by modified before a time (inclusively)

  • modifiedAtGt to limit by modified after a time (exclusively)

  • modifiedAtGte to limit by modified after a time (inclusively)

Note
To retrieve contacts for single projects please refer to the following end-point

10.4.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

projectId
optional

ID of the project

string

Query

vatCode
optional

Filter results to only contain object with the specified vatCode

string

10.4.3. Responses

HTTP Code Description Schema

200

The companies

Companies

default

Error

ErrorModel

10.4.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "942vm31c2s",
    "projectId" : "asdcasd32v34g0",
    "name" : "Painters from the West",
    "vatCode" : "Y-1256256",
    "companyTypeId" : "CONTRACTOR",
    "specifier" : "Painter",
    "modifiedAt" : "2016-06-13T10:00:15.000Z"
  }, {
    "id" : "cad31cdava",
    "projectId" : "asdcasd32v34g0",
    "name" : "Construction Ltd",
    "vatCode" : "Y-4135653",
    "companyTypeId" : "CONTRACTOR",
    "modifiedAt" : "2017-01-15T10:00:15.000Z"
  } ]
}

10.5. GET /measurementTemplates

10.5.1. Description

Returns all the available measurement templates

10.5.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

companyId
optional

Filter by id of a company

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

10.5.3. Responses

HTTP Code Description Schema

200

Measurement templates response

MeasurementTemplates

default

unexpected error

ErrorModel

10.5.4. Example HTTP response

Response 200
{
  "count" : 1,
  "pageSize" : 10,
  "results" : [ {
    "displayName" : "TR 2010",
    "id" : "7",
    "measurementTypeId" : "TR",
    "modifiedAt" : "2015-03-08T20:12:13.812598Z",
    "name" : "TR 2010",
    "projectId" : "lEE6oqEeDIc2Mu7IYVE6XcUd",
    "topicIds" : [ "36", "37" ]
  } ]
}

10.6. GET /measurementTopicTemplates

10.6.1. Description

Returns all the available measurement topic templates

Use the optional measurementTemplateId query parameter to limit the response to measurement topics of a specific measurement

10.6.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

measurementTemplateId
optional

Filter results to only contain object with the specified measurement template id

string

Query

companyId
optional

Filter by id of a company

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

10.6.3. Responses

HTTP Code Description Schema

200

Measurement topic templates response

MeasurementTopicTemplates

default

unexpected error

ErrorModel

10.6.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "37",
    "measurementTemplateId" : "7",
    "name" : "Dustiness",
    "negativeMultiplier" : 1,
    "orderNumber" : "6b",
    "positiveMultiplier" : 1,
    "projectId" : null
  }, {
    "id" : "36",
    "measurementTemplateId" : "7",
    "name" : "Orderliness and waste management",
    "negativeMultiplier" : 1,
    "orderNumber" : "6a",
    "positiveMultiplier" : 1,
    "projectId" : null
  } ]
}

10.7. GET /inspectionTemplates

10.7.1. Description

Returns all the inspection templates that are available

10.7.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

companyId
optional

Filter by id of a company

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

10.7.3. Responses

HTTP Code Description Schema

200

Inspection templates response

InspectionTemplates

default

unexpected error

ErrorModel

10.8. GET /inspectionTopicTemplates

10.8.1. Description

Returns all the inspection topic templates that are available

Use the optional inspectionTemplateId query parameter to fetch only topics related to a specific inspection template.

10.8.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

inspectionTemplateId
optional

Filter results to only contain object with the specified inspection template id

string

Query

companyId
optional

Filter by id of a company

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

10.8.3. Responses

HTTP Code Description Schema

200

Inspection topic templates response

InspectionTopicTemplates

default

unexpected error

ErrorModel

10.9. GET /inspectionDocuments/{documentId}

10.9.1. Description

Get meta data of a single inspection document. This end-point will generate a proper downloadUrl for the document

10.9.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Path

documentId
required

ID of the inspection topic in path

string

10.9.3. Responses

HTTP Code Description Schema

200

Document response

Document

default

unexpected error

ErrorModel

10.9.4. Example HTTP response

Response 200
{
  "id" : "xsac425fv0l05l356lg",
  "projectId" : "074bmn234jc",
  "modifiedAt" : "2016-06-13T10:00:15.000Z",
  "createdAt" : "2016-06-13T09:00:15.000Z",
  "name" : "Inspection document",
  "filename" : "abc.pdf",
  "workSectionId" : "123",
  "workActivityId" : "41",
  "downloadUrl" : "https://congrid.s3.amazonaws.com/projects/074bmn234jc/files/xsac425fv0l05l356lg/abc.pdf?Signature=XX&Expires=1487746035&AWSAccessKeyId=OOO",
  "tags" : [ ]
}

10.10. GET /inspectionDocuments

10.10.1. Description

Get documents related to an inspection

Use the projectId query parameter to limit the results to a specific project.

To download a document use the following end-point to get a signed downloadUrl for each document you want to download end-point

10.10.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

projectId
optional

ID of the project

string

Query

tags
optional

string

10.10.3. Responses

HTTP Code Description Schema

200

documents response

Documents

default

unexpected error

ErrorModel

10.10.4. Example HTTP response

Response default
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "xsac425fv0l05l356lg",
    "projectId" : "074bmn234jc",
    "modifiedAt" : "2016-06-13T10:00:15.000Z",
    "createdAt" : "2016-06-13T09:00:15.000Z",
    "name" : "Inspection document",
    "filename" : "abc.pdf",
    "workSectionId" : "123",
    "workActivityId" : "41",
    "tags" : [ ]
  }, {
    "id" : "asvadfvaer5ascdsac",
    "projectId" : "074bmn234jc",
    "modifiedAt" : "2016-06-13T10:00:15.000Z",
    "createdAt" : "2016-06-13T09:00:15.000Z",
    "name" : "Inspection document 2",
    "filename" : "123.pdf",
    "workSectionId" : "115",
    "workActivityId" : "42",
    "tags" : [ ]
  } ]
}

11. Project Data

Usually throughout a project a significant amount of data is generated by the project users. This data can be retrieved programmatically from Congrid system for post-processing and backup purposes.

The API supports retrieval of the data and documents created during a project.

The API also supports importing of measurement data to the system.

The end-points below describe both the data retrieval and data import options in more detail.

11.1. GET /projects/{projectId}/files

11.1.1. Description

This end-point gives access to all the documents created for the project in Congrid. These documents include inspection results, measurement results and created reports. The reponse from this end-point does not contain the actual files, only information about the files. Each file object contains a URL for downloading the file. These download URLs are valid for a limited amount of time.

Optional modifiedAtGte, modifiedAtGt, modifiedAtLte and modifiedAtLt query parameters can be used for fetching files modified before/after a timestamp or during a timespan.

E.g. `&modifiedAtGte=2016-06-13T00:00:00.000Z&modifiedAtLt=2016-06-20T00:00:00.000Z` returns files modified at 2016-06-13T00:00:00.000Z and after, but not files modified at 2016-06-20T00:00:00.000Z or after.

Optional tags query parameter can be used to fetch only files that contain a specific tags.

Congrid system will automatically create files (reports than can be downloaded) in the following scenarios:

  • When a measurement is marked as 'done' and the backend has processed all related data

  • When an inspection is marked as 'done' and the backend has processed all related data

Note
To retrieve all files for all projects please refer to the following end-point

11.1.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

tags
optional

A list of tags

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

11.1.3. Responses

HTTP Code Description Schema

200

Files response

Files

default

Error

ErrorModel

11.1.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "xsac425fv0l05l356lg",
    "projectId" : "074bmn234jc",
    "modifiedAt" : "2016-06-13T10:00:15.000Z",
    "name" : "TR report week 10",
    "listIds" : [ ],
    "measurementIds" : [ ],
    "inspectionIds" : [ "1234", "24542" ],
    "workActivityIds" : [ "4556242", "54942" ],
    "workSectionIds" : [ "58481", "9056145" ],
    "downloadUrl" : "https://congrid.s3.amazonaws.com/projects/074bmn234jc/reports/xsac425fv0l05l356lg/TR_2017_week_10.pdf?Signature=XX&Expires=1487746035&AWSAccessKeyId=OOO",
    "tags" : [ "TR_MEASUREMENT" ]
  }, {
    "id" : "5894vjf9dc723csa213e",
    "projectId" : "074bmn234jc",
    "modifiedAt" : "2016-09-15T10:00:15.000Z",
    "name" : "TR report week 40",
    "listIds" : [ "12" ],
    "measurementIds" : [ ],
    "inspectionIds" : [ ],
    "workActivityIds" : [ ],
    "workSectionIds" : [ ],
    "downloadUrl" : "https://congrid.s3.amazonaws.com/projects/074bmn234jc/reports/5894vjf9dc723csa213e/TR_2017_week_40.pdf?Signature=XX&Expires=1487746035&AWSAccessKeyId=OOO",
    "tags" : [ "TR_MEASUREMENT" ]
  } ]
}

11.2. GET /files

11.2.1. Description

This end-point gives access to all the documents created for all the the projects in Congrid.

Note
To retrieve files for single projects please refer to the following end-point

11.2.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

tags
optional

A list of tags

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

projectId
optional

ID of the project

string

11.2.3. Responses

HTTP Code Description Schema

200

Files response

Files

default

Error

ErrorModel

11.2.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "xsac425fv0l05l356lg",
    "projectId" : "074bmn234jc",
    "modifiedAt" : "2016-06-13T10:00:15.000Z",
    "name" : "TR report week 10",
    "tags" : [ "TR_MEASUREMENT", "SYSTEM_GENERATED" ],
    "listIds" : [ ],
    "measurementIds" : [ ],
    "inspectionIds" : [ "1234", "24542" ],
    "workActivityIds" : [ "4556242", "54942" ],
    "workSectionIds" : [ "58481", "9056145" ],
    "downloadUrl" : "https://congrid.s3.amazonaws.com/projects/074bmn234jc/reports/xsac425fv0l05l356lg/TR_2017_week_10.pdf?Signature=XX&Expires=1487746035&AWSAccessKeyId=OOO"
  }, {
    "id" : "5894vjf9dc723csa213e",
    "projectId" : "9dsa09kd130xc",
    "modifiedAt" : "2016-09-15T10:00:15.000Z",
    "name" : "TR report week 40",
    "listIds" : [ "12" ],
    "measurementIds" : [ ],
    "inspectionIds" : [ ],
    "workActivityIds" : [ ],
    "workSectionIds" : [ ],
    "downloadUrl" : "https://congrid.s3.amazonaws.com/projects/9dsa09kd130xc/reports/5894vjf9dc723csa213e/TR_2017_week_40.pdf?Signature=XX&Expires=1487746035&AWSAccessKeyId=OOO",
    "tags" : [ "TR_MEASUREMENT", "USER_GENERATED" ]
  } ]
}

11.3. POST /measurements

11.3.1. Description

Create or import a new measurement to Congrid system. The API expects the imported measurements to be final ones and hence those are automatically completed. Additionally all the negative notes that are automatically generated from the minusCount value are marked as "Accepted".

To create a new measurement in Congrid the API user needs to know the relevant templateId values for both the measurement and the measurement topics. A company usually has multiple templates and those can be further customised per project if needed. Hence the API cannot make the decision to which template to map the new measurement but this needs to be done by the API user.

To get the available templates through the API use the following end-points:

11.3.2. Parameters

Type Name Description Schema

Body

measurement
required

Measurement to create

NewMeasurement

11.3.3. Responses

HTTP Code Description Schema

201

Measurement response

Measurement

default

unexpected error

ErrorModel

11.3.4. Example HTTP request

Request body
{
  "templateId" : "1",
  "projectId" : "xc54bcds074bmn234jc",
  "name" : "TR measurement week 45",
  "createdAt" : "2016-11-09T10:39:31.629000Z",
  "measurementTypeId" : "TR",
  "measurementCategoryId" : "INTERNAL",
  "topics" : [ {
    "templateId" : "10",
    "plusCount" : 10,
    "minusCount" : 1
  }, {
    "templateId" : "11",
    "plusCount" : 6,
    "minusCount" : 11
  }, {
    "templateId" : "12",
    "plusCount" : 5,
    "minusCount" : 5
  }, {
    "templateId" : "13",
    "plusCount" : 6,
    "minusCount" : 10
  } ]
}

11.3.5. Example HTTP response

Response 201
{
  "measurementId" : "13556",
  "projectId" : "xc54bcds074bmn234jc",
  "projectName" : "Construction project Opera House",
  "projectCode" : "A-2354",
  "modifiedAt" : "2016-11-04T10:39:31.629000Z",
  "name" : "TR measurement week 45",
  "createdAt" : "2016-11-09T10:39:31.629000Z",
  "weekNumber" : 45,
  "year" : 2016,
  "result" : 56.3,
  "measurementTypeId" : "TR",
  "measurementCategoryId" : "INTERNAL",
  "statusId" : "COMPLETED"
}

11.4. GET /projects/{projectId}/measurements

11.4.1. Description

Through this end-point you can retrieve the measurement data from Congrid system. By default this end-point returns only the data of completed measurements. This means measurements having on of the following statusId values: COMPLETED, ACCEPTED, REJECTED, VERIFIED. Use the optional statusId query parameter to fetch data of measurements with a different statusId value.

Optional modifiedAtGte, modifiedAtGt, modifiedAtLte and modifiedAtLt query parameters can be used for fetching files modified before/after a timestamp or during a timespan.

E.g. `&modifiedAtGte=2016-06-13T00:00:00.000Z&modifiedAtLt=2016-06-20T00:00:00.000Z` returns files modified at 2016-06-13T00:00:00.000Z and after, but not files modified at 2016-06-20T00:00:00.000Z or after.

Optional measurementTypeId query parameter can be used to fetch only files that are of a particular type.

Note
This end-point exposes the measurements of a single project. If you want to retrieve all the measurements of all projects please refer to this end-point

11.4.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

measurementTypeId
optional

Filter results to only contain object with the specified measurementTypeId

string

Query

statusId
optional

Filter results to only contain object with the specified statusIds

< string > array(multi)

11.4.3. Responses

HTTP Code Description Schema

200

Measurements response

Measurements

default

Error

ErrorModel

11.4.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "measurementId" : "13556",
    "projectId" : "xc54bcds074bmn234jc",
    "projectName" : "Hospital project city center",
    "projectCode" : "A-B4783",
    "modifiedAt" : "2016-11-04T10:39:31.629000Z",
    "name" : "TR measurement week 45",
    "createdAt" : "2016-11-09T10:39:31.629000Z",
    "weekNumber" : 45,
    "year" : 2016,
    "result" : 56.3,
    "measurementTypeId" : "TR",
    "measurementCategoryId" : "INTERNAL",
    "statusId" : "COMPLETED"
  }, {
    "measurementId" : "1355401",
    "projectId" : "xc54bcds074bmn234jc",
    "projectName" : "Hospital project city center",
    "projectCode" : "A-B4783",
    "modifiedAt" : "2016-01-04T10:39:31.629000Z",
    "name" : "TR measurement week 45",
    "createdAt" : "2016-01-09T10:39:31.629000Z",
    "weekNumber" : 1,
    "year" : 2016,
    "result" : 87.7,
    "measurementTypeId" : "TR",
    "measurementCategoryId" : "EXTERNAL",
    "statusId" : "COMPLETED"
  } ]
}

11.5. GET /measurements

11.5.1. Description

Returns all the measurements for all the projects. By default this end-point returns only the data of completed measurements. This means measurements having on of the following statusId values: COMPLETED, ACCEPTED, REJECTED, VERIFIED. Use the optional statusId query parameter to fetch data of measurements with a different statusId value.

Note
To retrieve measurements for single projects please refer to the following end-point

11.5.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

measurementTypeId
optional

Filter results to only contain object with the specified measurementTypeId

string

Query

statusId
optional

Filter results to only contain object with the specified statusIds

< string > array(multi)

Query

projectId
optional

ID of the project

string

11.5.3. Responses

HTTP Code Description Schema

200

measurements response

Measurements

default

Error

ErrorModel

11.5.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "measurementId" : "13556",
    "projectId" : "xc54bcds074bmn234jc",
    "projectName" : "Hospital project city center",
    "projectCode" : "A-B4783",
    "modifiedAt" : "2016-11-04T10:39:31.629000Z",
    "name" : "TR measurement week 45",
    "createdAt" : "2016-11-09T10:39:31.629000Z",
    "weekNumber" : 45,
    "year" : 2016,
    "result" : 56.3,
    "measurementTypeId" : "TR",
    "measurementCategoryId" : "INTERNAL",
    "statusId" : "COMPLETED"
  }, {
    "measurementId" : "1355401",
    "projectId" : "90habcds074bmn23ol1",
    "projectName" : "Residencial building C",
    "projectCode" : "A-900900",
    "modifiedAt" : "2016-01-04T10:39:31.629000Z",
    "name" : "TR measurement week 45",
    "createdAt" : "2016-01-09T10:39:31.629000Z",
    "weekNumber" : 1,
    "year" : 2016,
    "result" : 87.7,
    "measurementTypeId" : "TR",
    "measurementCategoryId" : "EXTERNAL",
    "statusId" : "COMPLETED"
  } ]
}

11.6. GET /measurements/{measurementId}

11.6.1. Description

Returns ones single measurement by its unique id

Note
To retrieve measurements for single projects please refer to the following end-point

11.6.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Path

measurementId
required

ID of the measurement

string

11.6.3. Responses

HTTP Code Description Schema

200

measurements response

Measurement

default

Error

ErrorModel

11.6.4. Example HTTP response

Response 200
{
  "measurementId" : "13556",
  "projectId" : "xc54bcds074bmn234jc",
  "projectName" : "Hospital project city center",
  "projectCode" : "A-B4783",
  "modifiedAt" : "2016-11-04T10:39:31.629000Z",
  "name" : "TR measurement week 45",
  "createdAt" : "2016-11-09T10:39:31.629000Z",
  "weekNumber" : 45,
  "year" : 2016,
  "result" : 56.3,
  "measurementTypeId" : "TR",
  "measurementCategoryId" : "INTERNAL",
  "statusId" : "COMPLETED"
}

11.7. GET /measurementTopics

11.7.1. Description

Through this end-point you can retrieve measurement topics related to a measurement.

Use the optional measurementId query parameter to get all the measurement topics related to a particular measurement.

If you know the unique id of the measurement topic then you can fetch it directly through this end-point

11.7.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

measurementId
optional

ID of the measurement in query

string

11.7.3. Responses

HTTP Code Description Schema

200

Measurement topics response

MeasurementTopics

default

unexpected error

ErrorModel

11.7.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "115508",
    "measurementId" : "21516",
    "name" : "Pölyisyys",
    "negativeMultiplier" : 1,
    "orderNumber" : "6b",
    "plusCount" : 95,
    "positiveMultiplier" : 1,
    "templateId" : "479790"
  }, {
    "id" : "115507",
    "measurementId" : "21516",
    "name" : "Järjestys ja jätehuolto",
    "negativeMultiplier" : 1,
    "orderNumber" : "6a",
    "plusCount" : 0,
    "positiveMultiplier" : 1,
    "templateId" : "479789"
  }, {
    "id" : "115506",
    "measurementId" : "21516",
    "name" : "Sähkö ja valaistus",
    "negativeMultiplier" : 1,
    "orderNumber" : "5",
    "plusCount" : 10,
    "positiveMultiplier" : 1,
    "templateId" : "479788"
  } ]
}

11.8. GET /measurementTopics/{measurementTopicId}

11.8.1. Description

Returns ones single measurement topic by its unique id

11.8.2. Parameters

Type Name Description Schema

Path

measurementTopicId
required

ID of the measurement topic

string

11.8.3. Responses

HTTP Code Description Schema

200

measurement topic response

MeasurementTopic

default

Error

ErrorModel

11.8.4. Example HTTP response

Response 200
{
  "id" : "123",
  "measurementId" : "13556",
  "modifiedAt" : "2016-11-04T10:39:31.629000Z",
  "name" : "Ladders, Fall prevention",
  "createdAt" : "2016-11-09T10:39:31.629000Z",
  "orderNumber" : "1a",
  "negativeMultiplier" : 0.5,
  "positiveMultiplier" : 1.0,
  "plusCount" : 10
}

11.9. GET /inspections

11.9.1. Description

Through this end-point you will receive data of different inspections in Congrid system

Use the optional query parameters to limit the results.

Note
The statusId query parameter can be defined multiple times. For example if you want to retrieve both PENDING and COMPLETED inspections you can use the following query ?statusId=COMPLETED&statusId=PENDING

11.9.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

statusId
optional

Filter results to only contain object with the specified statusIds

< string > array(multi)

11.9.3. Responses

HTTP Code Description Schema

200

Inspections response

Inspections

default

unexpected error

ErrorModel

11.9.4. Example HTTP response

Response default
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "12356",
    "createdAt" : "2017-02-21T14:14:43.522Z",
    "modifiedAt" : "2017-02-24T10:02:10.970848Z",
    "name" : "Quality inspection 132 Inspection",
    "projectId" : "Suc7LS0pwHrHJye7f13PQhwO",
    "statusId" : "PENDING",
    "targetId" : "ZmFtxYzZpAnu9xRwRnNLcDRo"
  }, {
    "id" : "21234152",
    "createdAt" : "2017-02-21T14:14:43.522Z",
    "modifiedAt" : "2017-02-24T10:02:10.970848Z",
    "name" : "Quality inspection 54 Inspection",
    "projectId" : "Suc7LS0pwHrHJye7f13PQhwO",
    "statusId" : "COMPLETED"
  } ]
}

11.10. GET /inspections/{inspectionId}

11.10.1. Description

Get one single inspection by id.

11.10.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Path

inspectionId
required

ID of the inspection in path

string

11.10.3. Responses

HTTP Code Description Schema

200

Inspection response

Inspection

default

unexpected error

ErrorModel

11.10.4. Example HTTP response

Response default
{
  "id" : "12356",
  "createdAt" : "2017-02-21T14:14:43.522Z",
  "modifiedAt" : "2017-02-24T10:02:10.970848Z",
  "name" : "Quality inspection 132 Inspection",
  "projectId" : "Suc7LS0pwHrHJye7f13PQhwO",
  "statusId" : "PENDING",
  "targetId" : "ZmFtxYzZpAnu9xRwRnNLcDRo"
}

11.11. GET /inspectionTopics

11.11.1. Description

Through this end-point you can retrieve data from different inspection topics from Congrid system

11.11.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

inspectionId
optional

ID of the inspection in query

string

11.11.3. Responses

HTTP Code Description Schema

200

Inspections response

InspectionTopics

default

unexpected error

ErrorModel

11.12. GET /inspectionTopics/{inspectionTopicId}

11.12.1. Description

Get one single inspection topic by id.

11.12.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Path

inspectionTopicId
required

ID of the inspection topic in path

string

11.12.3. Responses

HTTP Code Description Schema

200

Inspection topic response

InspectionTopic

default

unexpected error

ErrorModel

11.13. GET /lists

11.13.1. Description

Returns all the lists for all the projects

Use the optional projectId query parameter to only retrieve lists from a certain project.

11.13.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

11.13.3. Responses

HTTP Code Description Schema

200

project response

Lists

default

Error

ErrorModel

11.13.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "id" : "ascd45240vb852",
    "name" : "Construction project county hospital",
    "moduleIds" : [ "PUNCH_LISTS", "QUALITY_MEASUREMENTS" ],
    "projectCode" : "P-1256",
    "startedAt" : "2016-09-22",
    "modifiedAt" : "2016-10-04T10:39:31.629000Z",
    "finishedAt" : "2017-01-01",
    "statusId" : "ACTIVE"
  }, {
    "id" : "2ceciaerf3c0a",
    "name" : "Skyscraper city center",
    "moduleIds" : [ "PUNCH_LISTS" ],
    "projectCode" : "5554",
    "startedAt" : "2013-05-01",
    "modifiedAt" : "2016-10-04T10:39:31.629000Z",
    "finishedAt" : "2017-01-01",
    "statusId" : "ACTIVE"
  } ]
}

11.14. GET /lists/{listId}

11.14.1. Description

Returns one list based on the listId

11.14.2. Parameters

Type Name Description Schema

Path

listId
required

ID of the list

string

11.14.3. Responses

HTTP Code Description Schema

200

list response

List

default

Error

ErrorModel

11.14.4. Example HTTP response

Response 200
{
  "id" : "ascd45240vb852",
  "name" : "Construction project county hospital",
  "moduleIds" : [ "PUNCH_LISTS", "QUALITY_MEASUREMENTS" ],
  "projectCode" : "P-1256",
  "startedAt" : "2016-09-22",
  "modifiedAt" : "2016-10-04T10:39:31.629000Z",
  "finishedAt" : "2017-01-01",
  "statusId" : "ACTIVE"
}

11.15. GET /notes

11.15.1. Description

Returns all the notes in the system

Use the optional query parameters to perform a more specific query:

  • projectId - return all photos of the a particular project

  • modifiedAtLt, modifiedAtLte, modifiedAtGt, modifiedAtGte to return photos from a certain time period

  • noteTypeId - return notes of a certain type

Note
The notes can be attached to different types of entites in Congrid system. Depending on the type of the note the listId, measurementId, measurementTopicId, inspectionId and inspectionTopicId properties in the response are populated.

Use the following end-points to fetch related entities from the system

11.15.2. Parameters

Type Name Description Schema

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

Query

projectId
optional

ID of the project

string

Query

measurementId
optional

ID of the measurement in query

string

Query

inspectionId
optional

ID of the inspection in query

string

Query

measurementTopicId
optional

Filter results to only contain object with the specified measurementTopicId

string

Query

inspectionTopicId
optional

Filter results to only contain object with the specified inspectionTopicId

string

Query

listId
optional

ID of the list in query

string

Query

noteTypeId
optional

Filter results to only contain objects with the specified noteTypeId

string

11.15.3. Responses

HTTP Code Description Schema

200

The Notes

Notes

default

Error

ErrorModel

11.15.4. Example HTTP response

Response 200
{
  "count" : 3,
  "pageSize" : 100,
  "results" : [ {
    "createdAt" : "2017-02-12T20:06:00.073Z",
    "id" : "407513",
    "noteTypeId" : "PHOTO",
    "projectId" : "HG31cADS30k09eqkc0eq1",
    "statusId" : "PENDING",
    "targetId" : "IDgIazNytovhC2wK0InHSsKT"
  }, {
    "id" : "407512",
    "inspectionId" : "21433",
    "inspectionTopicId" : "115415",
    "noteTypeId" : "QUALITY",
    "projectId" : "90advkofk13049fkda0kD",
    "statusId" : "PENDING",
    "targetId" : "IDgIazNytovhC2wK0InHSsKT"
  }, {
    "createdAt" : "2017-02-11T16:32:36.572Z",
    "id" : "407511",
    "measurementId" : "21516",
    "measurementTopicId" : "115506",
    "noteTypeId" : "TR",
    "projectId" : "Avad37LS0pwHrHJye7f13PQhwO",
    "statusId" : "PENDING"
  } ]
}

11.16. GET /photos

11.16.1. Description

Through this end-point you can retrieve meta data about photos in Congrid system.

To be able to download a photo you will need a signed url which is available for each photo individually through the following end-point

Use the optional query parameters to perform a more specific query:

  • projectId - return all photos of the a particular project

  • modifiedAtLt, modifiedAtLte, modifiedAtGt, modifiedAtGte to return photos from a certain time period

11.16.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

Query

projectId
optional

ID of the project

string

Query

modifiedAtGt
optional

ISO 8601 format date time specifying the date exclusively after which changes are fetched

(GT = greater than)

string

Query

modifiedAtGte
optional

ISO 8601 format date time specifying the date inclusively after which changes are fetched

(GTE = greater than and equal)

string

Query

modifiedAtLt
optional

ISO 8601 format date time specifying the date exclusively before which changes are fetched

(LT = less than)

string

Query

modifiedAtLte
optional

ISO 8601 format date time specifying the date inclusively before which changes are fetched

(LTE = less than and equal)

string

11.16.3. Responses

HTTP Code Description Schema

200

Photos response

Photos

default

unexpected error

ErrorModel

11.16.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 100,
  "results" : [ {
    "createdAt\"" : "2016-12-16T12:25:16.808Z",
    "filename\"" : "20161216-1425036930.jpg",
    "id\"" : "SADCdvfeRIzqVsFmju5mdmkit69t8Naz0",
    "modifiedAt\"" : "2016-12-16T12:25:25.588116Z",
    "projectId\"" : "ci20j8c9dacklml13mxlslsd"
  }, {
    "createdAt\"" : "2016-12-16T12:25:01.827Z",
    "filename\"" : "20161216-1424587770.jpg",
    "id\"" : "489jvodksmocd1dsmockmsdko",
    "modifiedAt\"" : "2016-12-16T12:25:25.617658Z",
    "projectId\"" : "x34r0ckadsokcpsadl1k3odmcsa"
  } ]
}

11.17. GET /photos/{photoId}

11.17.1. Description

Through this end-point you can retrieve meta data about one photo in the system.

This end-point will also return a signed download URL for the actual photo data.

11.17.2. Parameters

Type Name Description Schema

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Path

photoId
required

ID of the photo

string

11.17.3. Responses

HTTP Code Description Schema

200

Photo response

Photo

default

unexpected error

ErrorModel

11.17.4. Example HTTP response

Response 200
{
  "createdAt" : "2016-12-16T12:25:16.808Z",
  "filename" : "20161216-1425036930.jpg",
  "id" : "wnJvHoARIzqVsFmju5mdmkit69t8Naz0",
  "modifiedAt" : "2016-12-16T12:25:25.588116Z",
  "projectId" : "AAA7LS0pwHrHJye7f13PQhwO",
  "downloadUrl" : "https://congrid.s3.amazonaws.com/projects/AAA7LS0pwHrHJye7f13PQhwO/photos/20161216-1425036930.jpg?Signature=X&Expires=1489489710&AWSAccessKeyId=A"
}

11.18. GET /projects/{projectId}/workSections

11.18.1. Description

Returns all the work sections related to the project

11.18.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

11.18.3. Responses

HTTP Code Description Schema

200

Work sections response

WorkSections

default

unexpected error

ErrorModel

11.18.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "code" : "65",
    "id" : "280",
    "name" : "Concrete work",
    "parentId" : "277",
    "projectId" : "x0s5lj41hl4hg1tvgbmjo2naol0yzbvf"
  }, {
    "code" : "64",
    "id" : "279",
    "name" : "Foundations",
    "parentId" : "277",
    "projectId" : "x0s5lj41hl4hg1tvgbmjo2naol0yzbvf"
  } ]
}

11.19. GET /projects/{projectId}/workActivities

11.19.1. Description

Returns all the work activities for the project

11.19.2. Parameters

Type Name Description Schema

Path

projectId
required

ID of the project

string

Header

Congrid-API-Token
required

The API Token used for authenticating and authorizing requests

string

Header

Congrid-Request-Id
optional

A unique identifier generated by the API to help troubleshoot requests.

string

Query

pageSize
optional

The page size to return

integer

Query

page
optional

The page number to return

integer

11.19.3. Responses

HTTP Code Description Schema

200

Work activities response

WorkActivities

default

unexpected error

ErrorModel

11.19.4. Example HTTP response

Response 200
{
  "count" : 2,
  "pageSize" : 10,
  "results" : [ {
    "id" : "17",
    "name" : "Accepting the work site",
    "orderNumber" : "0",
    "projectId" : "x0s5lj41hl4hg1tvgbmjo2naol0yzbvf"
  }, {
    "id" : "18",
    "name" : "Kick-off meeting",
    "orderNumber" : "1",
    "projectId" : "x0s5lj41hl4hg1tvgbmjo2naol0yzbvf"
  } ]
}

12. Definitions

12.1. VersionResponse

The version object contains information about the version of the running API instance

Name Description Schema

version
required

The version of the running API instance

string

message
optional

Arbitrary message related to the API version

string

12.2. TargetType

Target types are static mappings from a human readable type to an id that is used when creating or updating target objects in the system.

Name Description Schema

id
required

Identifier of the target type

string

name
required

Human readable name of the target type

string

12.3. TargetTypes

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of target type objects

< TargetType > array

12.4. FloorplanType

Floor plan types are static mappings from a human readable type to an id that is used when creating or updating floor plan objects in the system.

Name Description Schema

id
required

Id of the floor plan type.

Use this id as the floorplanTypeId when creating or updating floor plans of a project

string

name
required

Human readable name of the floor plan type

string

12.5. FloorplanTypes

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of floor plan type objects

< FloorplanType > array

12.6. Project

Project is one of the main objects in the system. All data associated with a project can be roughly split in two categories: the mostly static base data configured at start of the project and user generated data crated on a day-to-day basis.

We strongly encourage you to properly configure the base data at start of the project to make the day to day user experience as fluent as possible. This is however not mandatory or enforced by any means and you can always update the base data at any time during the project.

The project base data consists of the following:

  • Companies or subcontractors participating in the project

  • Floorplans of the construction site

  • Targets that specify the hierarchical structure of the physical buildings and areas of the construction site

  • Users that are allowed to access the project data

  • AD Configuration for role management through AD

Name Description Schema

id
optional

Unique id of the project generated by the backend.

Use this id in all further requests related to the project.

string

ownerId
optional

The id of the main contractor for this project.

string

addressId
optional

The id of the address for this project.

string

modifiedAt
optional

The timestamp in the ISO 8601 DateTime format when the project entity was last time modified. Updates of related entities, such as sub contractors, users etc will NOT update this value

string(date-time)

name
required

The name of the project (does not need to be unique)

string

projectCode
optional

The project code of the project (does not need to be unique)

string

statusId
optional

If no status id value is given, then the project status is set to NOT_STARTED

Valid status id values:

NOT_STARTED - Project has not been started yet

ACTIVE - Project is active

PAUSED - Project is paused

WARRANTY_REPAIR - Project has been opened for warranty repair

MAINTENANCE - Project is in maintenance

CLOSED - Project is closed
Default : "NOT_STARTED"

enum (NOT_STARTED, ACTIVE, PAUSED, WARRANTY_REPAIR, MAINTENANCE, CLOSED)

moduleIds
required

An array of module ids that are enabled for the project.

The following module ids are available:

PUNCH_LISTS - Enable punch list module

SAFETY_MEASUREMENTS - Safety measurements TR/MVR in Finland

TASK_PLANNING - Task planning for quality module

SAFETY_NOTES - Public safety notes module

PHOTO_NOTES - Photo notes module

QUALITY - The quality module

LITE - The lite module for subcontractor usage

QUALITY_MEASUREMENTS - Quality measurements e.g Tervetalo in Finland

ASPHALT - Asphalt measurements

FIELD - The field module for having documents in the field

SITE_DIARY - A site diary module for construction sites

< enum (PUNCH_LISTS, SAFETY_MEASUREMENTS, TASK_PLANNING, SAFETY_NOTES, PHOTO_NOTES, QUALITY, LITE, QUALITY_MEASUREMENTS, FIELD, SITE_DIARY, ASPHALT) > array

startedAt
optional

The start date of the project in the ISO 8601 Date format - YYYY-MM-DD (2016-01-21)

string(date)

finishedAt
optional

The end date of the project in the ISO 8601 Date format - YYYY-MM-DD (2016-01-21)

string(date)

adConfiguration
optional

AD configuration for the project

AdConfiguration

12.7. NewProject

Use the properties defined here when adding a new project to the system

Name Description Schema

name
required

The name of the project (does not need to be unique)

string

projectCode
optional

The project code of the project (does not need to be unique)

string

statusId
optional

If no status id value is given, then the project status is set to NOT_STARTED

Valid status id values:

NOT_STARTED - Project has not been started yet

ACTIVE - Project is active

PAUSED - Project is paused

WARRANTY_REPAIR - Project has been opened for warranty repair

MAINTENANCE - Project is in maintenance

CLOSED - Project is closed
Default : "NOT_STARTED"

enum (NOT_STARTED, ACTIVE, PAUSED, WARRANTY_REPAIR, MAINTENANCE, CLOSED)

moduleIds
required

An array of module ids that are enabled for the project.

The following module ids are available:

PUNCH_LISTS - Enable punch list module

SAFETY_MEASUREMENTS - Safety measurements TR/MVR in Finland

TASK_PLANNING - Task planning for quality module

SAFETY_NOTES - Public safety notes module

PHOTO_NOTES - Photo notes module

QUALITY - The quality module

LITE - The lite module for subcontractor usage

QUALITY_MEASUREMENTS - Quality measurements e.g Tervetalo in Finland

ASPHALT - Asphalt measurements

FIELD - The field module for having documents in the field

SITE_DIARY - A site diary module for construction sites

< enum (PUNCH_LISTS, SAFETY_MEASUREMENTS, TASK_PLANNING, SAFETY_NOTES, PHOTO_NOTES, QUALITY, LITE, QUALITY_MEASUREMENTS, FIELD, SITE_DIARY, ASPHALT) > array

startedAt
optional

The start date of the project in the ISO 8601 Date format - YYYY-MM-DD (2016-01-21)

string(date)

finishedAt
optional

The end date of the project in the ISO 8601 Date format - YYYY-MM-DD (2016-01-21)

string(date)

adConfiguration
optional

AD configuration for the project

AdConfiguration

12.8. Projects

A response object for a list of projects.

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of project objects

< Project > array

12.9. AdConfiguration

AD configuration object for the project. The roles for the project can be configured with AD groups. In practise this means that each of the roles listed below can have multiple AD groups associated with them. All users of those AD groups will then automatically get the corresponding project roles when they login through AD.

For exapmle:

The project is configured with the following roles:

  adConfiguration: {
    projectLiveAdmin: ["PROJ_A_USERS", "CONGRID_ADMINS"],
    projectLiveView:  ["MANAGERS", "ACCOUNTANTS"],
    projectClientAdmin: ["PROJ_A_USERS"]
  }

This configuration would map users from the following AD groups to Congrid roles in the following way:

  • PROJ_A_USERS - users in this AD group have access to Live as Admin and can use the mobile application

  • CONGRID_ADMINS - users in this AD group have access to Live as Admins

  • MANAGERS - users in this AD group have access to Live as View only users

  • ACCOUNTANTS - users in this AD group have access to Live as View only users

Name Description Schema

projectLiveAdmin
optional

An array of AD groups that give the PROJECT_LIVE_ADMIN role for all the users in these groups.

< string > array

projectLiveView
optional

An array of AD groups that give the PROJECT_LIVE_VIEW role for all the users in these groups.

< string > array

projectLiveEdit
optional

An array of AD groups that give the PROJECT_LIVE_EDIT role for all the users in these groups.

< string > array

projectClientAdmin
optional

An array of AD groups that give the PROJECT_CLIENT_ADMIN role for all the users in these groups.

< string > array

12.10. AddressesResponse

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

< Address > array

12.11. NewAddress

Name Description Schema

address1
required

Address line 1

string

address2
optional

Address line 2

string

city
required

The name of the city

string

countryCode
required

The country code in ISO 3661-1 alpha 2 format for example:

FI = Finland

GB = United Kingdom of Great Britain and Northern Ireland

SE = Sweden

string

postalCode
optional

Postal code of the address

string

12.12. Address

Name Description Schema

address1
required

Address line 1

string

address2
optional

Address line 2

string

city
required

The name of the city

string

countryCode
required

The country code in ISO 3661-1 alpha 2 format for example:

FI = Finland

GB = United Kingdom of Great Britain and Northern Ireland

SE = Sweden

string

postalCode
optional

Postal code of the address

string

id
optional

The unique id of the address. This is a read-only property given by the backend

string

projectId
optional

The project id of the project for which this address is.

string

createdAt
optional

ISO 8601 format date time when the project address entity was created.

string(date-time)

modifiedAt
optional

ISO 8601 format date time when the project address entity was last time updated.

string(date-time)

12.13. Role

The role object contains information about a users roles regarding different projects, companies etc.

The roles the user can have for the project are:

  • PROJECT_CLIENT_ADMIN - Admin role to allow client access for the user

  • PROJECT_LIVE_VIEW - Live view role allow view accesss to Live

  • PROJECT_LIVE_EDIT - Live edit role allows editing for data in Live

  • PROJECT_LIVE_ADMIN - Live admin role allows admin access for the project

  • PROJECT_LITE - Lite user role

  • COMPANY_ADMIN - A company level administrator

Note
The PROJECT_LITE role is associated with a contact with the same email address. If such contact does not exist it will be created for the project.
Name Description Schema

projectId
optional

If this is a project role, then the id of the project to which this role should be attached to

string

email
required

The email address of the user. The API automatically removes all whitespaces and lowercases the email address.

string

companyId
required

The id of the company to which the user should be attached for this project. A company with the given id must exist for the project, otherwise the user cannot be attached to the project.

string

roles
required

Set the permissions for the user for this project.

PROJECT_CLIENT_ADMIN - Admin role to allow client access for the user

PROJECT_LIVE_VIEW - Live view role allow view accesss to Live

PROJECT_LIVE_EDIT - Live edit role allows editing for data in Live

PROJECT_LIVE_ADMIN - Live admin role allows admin access for the project

PROJECT_LITE - A user with only Lite access

COMPANY_ADMIN - A company level administrator

< enum (PROJECT_CLIENT_ADMIN, PROJECT_LIVE_VIEW, PROJECT_LIVE_EDIT, PROJECT_LIVE_ADMIN, PROJECT_LITE, COMPANY_ADMIN) > array

id
required

The id of the user role in this project.

string

12.14. NewRole

Use the properties defined here when adding a new roles for a user to the system

Name Description Schema

projectId
optional

If this is a project role, then the id of the project to which this role should be attached to

string

email
required

The email address of the user. The API automatically removes all whitespaces and lowercases the email address.

string

companyId
required

The id of the company to which the user should be attached for this project. A company with the given id must exist for the project, otherwise the user cannot be attached to the project.

string

roles
required

Set the permissions for the user for this project.

PROJECT_CLIENT_ADMIN - Admin role to allow client access for the user

PROJECT_LIVE_VIEW - Live view role allow view accesss to Live

PROJECT_LIVE_EDIT - Live edit role allows editing for data in Live

PROJECT_LIVE_ADMIN - Live admin role allows admin access for the project

PROJECT_LITE - A user with only Lite access

COMPANY_ADMIN - A company level administrator

< enum (PROJECT_CLIENT_ADMIN, PROJECT_LIVE_VIEW, PROJECT_LIVE_EDIT, PROJECT_LIVE_ADMIN, PROJECT_LITE, COMPANY_ADMIN) > array

12.15. Roles

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of project user objects

< Role > array

12.16. Contact

A contact describes the contact details for one contact in a project. The contact is associated with a company.

Name Description Schema

name
optional

Name of the contact

string

email
optional

The email address of the user. The API automatically removes all whitespaces and lowercases the email address.

string

companyId
required

The id of the company to which the contact should be attached for this project. A company with the given id must exist for the project, otherwise the contact cannot be attached to the project.

string

phone
optional

Phone number of the contact

string

taxNumber
optional

Tax number of the contact

string

isManager
optional

Is the contact in a manager role or not. Currently this is a good indicator for whom to contact from the company.

boolean

id
required

The id of the contact in the scope of this project

string

projectId
optional

The projectId this contact belongs to

string

modifiedAt
optional

ISO 8601 format date time string describing when the contact was last modified

This is a read-only property always set by the backend.

string(date-time)

12.17. NewContact

Use the properties defined here when adding a new contact for a project

Name Description Schema

name
optional

Name of the contact

string

email
optional

The email address of the user. The API automatically removes all whitespaces and lowercases the email address.

string

companyId
required

The id of the company to which the contact should be attached for this project. A company with the given id must exist for the project, otherwise the contact cannot be attached to the project.

string

phone
optional

Phone number of the contact

string

taxNumber
optional

Tax number of the contact

string

isManager
optional

Is the contact in a manager role or not. Currently this is a good indicator for whom to contact from the company.

boolean

12.18. Contacts

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of contact objects

< Contact > array

12.19. Company

The company object describes a contractor or subcontractor that is part of a project.

Tasks, notes, items etc that are created during the project can only be assigned to companies that are part of the project.

Note
A company with the same name can exist in two different projects and still have different id property in both of the projects.
Name Description Schema

name
required

Name of the company or subcontractor

string

vatCode
optional

The VAT code of the company if known.

Companies of different projects can be mapped together based on this VAT code

string

companyTypeId
optional

The type of the company to add. This is by default CONTRACTOR
Default : "CONTRACTOR"

enum (SUPERVISOR, DESIGNER, SUPPLIER, CONTRACTOR)

specifier
optional

An additional specifier string that can be used to further categorize companies

string

id
optional

Unique id of this company in the scope of the project.

This is a read-only property that is always set by the backend

string

projectId
optional

Project id of the project this company is added to

This is a read-only property that is always set by the backend

string

modifiedAt
optional

ISO 8601 format date time string describing when the object was last modified

string(date-time)

12.20. NewCompany

Use the properties defined here when adding a new company/subcontractor to the system

Name Description Schema

name
required

Name of the company or subcontractor

string

vatCode
optional

The VAT code of the company if known.

Companies of different projects can be mapped together based on this VAT code

string

companyTypeId
optional

The type of the company to add. This is by default CONTRACTOR
Default : "CONTRACTOR"

enum (SUPERVISOR, DESIGNER, SUPPLIER, CONTRACTOR)

specifier
optional

An additional specifier string that can be used to further categorize companies

string

12.21. Companies

A response object for the companies.

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

Array of company models

< Company > array

12.22. Floorplan

A floorplan object describes the metadata for a floorplan image. This metadata is used to map the floorplan to the correct location on the construction.

The floorplan has two important properties that require further explanation, namely the id and slug. The id uniquely identifies a floor plan metadata and floor plan image data combination. The slug on the other maps multiple versions a particular floor plan together.

What this means in practise is that you can update the floor plan image data without losing the old image data. In order to do this, POST a new floor plan with an existing slug and the API will automatically handle the mapping.

Now if you ever need to resume an old floorplan version for a floorplan, you can use the id of the old floorplan to do it.

To attach a floor plan to a target please refer to the target floor plan mapping end-point.

Name Description Schema

name
required

Name of the floorplan

string

floorPlanTypeId
required

The id of the floorplan type.

Check the /floorPlanTypes end-point for all available types and their ids

string

description
optional

Description of the floorplan

string

slug
optional

Floorplan slug. Floorplan slug is used to map different versions of a floorplan together. If two floorplans objects have the same slug that means those floorplans are actually two different versions of the same floorplan.

NOTE: You can only give floorplan slug when POST:ing a new floor plan or new floor plan version

string

id
required

Unique id of this floorplan

This is a read-only property that is always set by the backend

string

projectId
optional

Unique id of the project the floorplan is attached to

This is a read-only property that is always set by the backend

string

uploadUrl
optional

An upload URL that is used to upload the actual floorplan data to Congrid platform

This is a read-only property that is always set by the backend

string

nextVersionId
optional

The id of the next version of this floorplan. If nextVersionId is null then it means that this is the most recent version of a floorplan.

This is a read-only property that is always set by the backend

string

12.23. NewFloorplan

Use the properties defined here when adding a new floorplan to the system

Name Description Schema

name
required

Name of the floorplan

string

floorPlanTypeId
required

The id of the floorplan type.

Check the /floorPlanTypes end-point for all available types and their ids

string

description
optional

Description of the floorplan

string

slug
optional

Floorplan slug. Floorplan slug is used to map different versions of a floorplan together. If two floorplans objects have the same slug that means those floorplans are actually two different versions of the same floorplan.

NOTE: You can only give floorplan slug when POST:ing a new floor plan or new floor plan version

string

12.24. Floorplans

A response object for the floorplans.

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of floorplan objects

< Floorplan > array

12.25. Target

A construction site usually consists of different sections, buildinds, floors, flats etc. The target objects are used to specify the hierarchy of the construction site and the above mentioned areas. The target object also associates floor plans to different areas.

The target objects form a tree with parent child relations. Floorplans are attached to targets and the granularity on which this is done can differ from construction site to construction site.

An example tree with floorplan mappings

 Section 1  (id: 's1', floorPlanIds: ['fp1'] )
   -- Building 1 (id: 'b1', parentId: 's1')
      -- Floor A (id: 'fA', parentId: 'b1')
   -- Building 2 (id: 'b2', parentId: 's1', floorPlanIds: ['fp2'] )
      -- Floor B (id: 'fB', parentId: 'b2')

The example above shows the structure of a simple construction site. It has one section and two buildings with one floor each. Two floorplans are attached to the targets and are shown to the end user with the following outcome.

  • Floorplan with floorplanId fp1 is shown when the user opens Section 1, Building 1 or Floor A in Building 1.

  • Floorplan with floorplanId fp2 is shown when user opens Building 2 or Floor B

Name Description Schema

name
required

Name of the target (for example Building 1)

string

targetTypeId
required

The id of the target type. Check /targetTypes end-point for all available types

string

parentId
optional

Id of the parent target if this is a child target

string

description
optional

Short description of the target

string

id
required

Unique id of this target (always set by the backend)

This is a read-only property that is always set by the backend

string

deletedAt
optional

Timestamp when the target was deleted

This is a read-only property that is always set by the backend

string

projectId
optional

Project id of the project this target is added to.

This is a read-only property that is always set by the backend

string

12.26. NewTarget

Use the properties defined here when adding a new target to the system

Name Description Schema

name
required

Name of the target (for example Building 1)

string

targetTypeId
required

The id of the target type. Check /targetTypes end-point for all available types

string

parentId
optional

Id of the parent target if this is a child target

string

description
optional

Short description of the target

string

12.27. Targets

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of target objects

< Target > array

12.28. TargetFloorPlans

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

< TargetFloorPlan > array

12.29. NewTargetFloorPlan

Name Description Schema

floorPlanId
required

The unique id of the floor plan that will be associated with a target

string

targetId
required

The unique id of the target

string

12.30. TargetFloorPlan

This object specifies a floor plan to target mapping. The mapping is Many-To-Many by nature which means that one target can have many floor plans associated with it and vice versa.

A target does not need to have a floor plan associated with it and nor does a floor plan need to be associated with any target.

Name Description Schema

floorPlanId
required

The unique id of the floor plan that will be associated with a target

string

targetId
required

The unique id of the target

string

id
required

Unique id of this floor plan to target mapping

string

12.31. WorkSections

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

< WorkSection > array

12.32. WorkSection

A work sections identifies one rows in the quality matrix.

The work sections can form a hierarchy with simple parent child relationships.

A work section together with a work activity represent a cell in the quality matrix.

Name Description Schema

id
required

Unique id of this work section in Congrid system

string

name
optional

Name of the work section in Congrid system

string

parentId
optional

The id of the parent work section (if such exists) in Congrid system

string

description
optional

Description of this work section

string

code
optional

A code used to identify this work section

string

projectId
required

Project id of the project this work section belongs to

string

12.33. WorkActivities

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

< WorkActivity > array

12.34. WorkActivity

A work activity identifies one column in the quality matrix.

A work activity together with a work section represent a cell in the quality matrix.

Name Description Schema

id
required

Unique id of this work activity in Congrid system

string

name
optional

Name of this work activity

string

orderNumber
optional

The numeric order for this work activity in the the matrix. The larger the number, the further to the right the work activity is the matrix.

string

projectId
required

Project id of the project this work activity belongs to

string

12.35. File

File is a generic object describing information about a file stored in Congrid system.

Each file can be tagged with multiple tags. Tags can have arbitrary names but there are some static tags called system tags that Congrid system uses internally.

Below is a list of system tags and their descriptions:

  • TR_MEASUREMENT - A report from TR measurement

  • MVR_MEASUREMENT - A report from MVR measurement

  • ASPHALT_MEASUREMENT - A report from asphalt measurement

  • QUALITY_MEASUREMENT - A report from RT quality measurement

  • QUALITY_INSPECTION - A report from a quality inspection

  • NOTES - A report from notes

There are two additional tags which specify whether the report is generated automatically by the system or manually by the user. These tags are:

  • SYSTEM_GENERATED - report automatically generated by the system

  • USER_GENERATED - report manually generated by the user

SYSTEM_GENERATED reports are automatically generated with the following rules:

  • All measurement & inspection related reports once the measurement or inspection is marked as completed

  • NOTES report is generated on the first day of the month for all changed notes in the previous month. This needs to be separately enabled for a company.

Name Description Schema

id
required

Unique id of this file

string

name
optional

Name of the file in Congrid system

string

filename
optional

Filename of the file in Congrid system.

The automatically generated measurements follow this naming convention (timestamp being the timestamp of when the file was generated at Congrid system):

<type>_<year>_week_<week_number>_<name>_<target name>_<timestamp>.pdf

For example:

TR_2016_week_46_TR-measurement-project_area-1_20161218-142921.pdf

The automatically generated inspection files follow this naming convention (timestamp being the timestamp of when the file was generated at Congrid system):

<type>_[<work section name>]<timestamp>.pdf

_QUALITY_Ground-works_20161218-142921.pdf

The automatically generated notes reports follow this naming convention (timestamp being the timestamp of when the file was generated at Congrid system):

<type>_<timestamp>_<report number>_of_<number of all generated reports>.pdf

NOTES_20161218-142921_1_of_2.pdf

string

tags
optional

An array of tags that are given to the file

< string > array

modifiedAt
required

ISO 8601 format date time string describing when the file was last modified. The modifiedAt property is set by the backend when it generates the report.

string(date-time)

projectId
required

Project id of the project this file belongs to

string

inspectionIds
optional

Array of inspection ids from which the report is generated

< string > array

workSectionIds
optional

Array of work section ids from which the report is generated

< string > array

workActivityIds
optional

Array of work activity ids from which the report is generated

< string > array

listIds
optional

Array of list ids from which the report is generated

< string > array

measurementIds
optional

Array of measurement ids from which the report is generated

< string > array

downloadUrl
optional

URL from where the file can be downloaded for a limited amount of time

string

12.36. Files

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of file objects

< File > array

12.37. Document

Document is a generic object describing information about a file stored in Congrid system.

Each file can be tagged with multiple tags. Tags can have arbitrary names but there are some static tags called system tags that Congrid system uses internally.

Name Description Schema

id
required

Unique id of this file

string

name
optional

Name of the file in Congrid system

string

filename
optional

Filename of the file in Congrid system.

string

workSectionId
optional

Id of the work section this document belongs to

string

workActivityId
optional

Id of the work activity this document belongs to

string

tags
optional

An array of tags that are given to the file

< string > array

modifiedAt
required

ISO 8601 format date time string describing when the file was last modified. The modifiedAt property is set by the backend when the document is modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the file was created. The createdAt property is set by the backend when the document is created

string(date-time)

projectId
required

Project id of the project this file belongs to

string

downloadUrl
optional

URL from where the file can be downloaded for a limited amount of time

string

12.38. Documents

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of document objects

< Document > array

12.39. NewMeasurement

The new measurement object is used to POST a complete measurement to Congrid system. The common use case is that measurements created in different systems can be imported to Congrid in an easy manner.

Name Description Schema

templateId
required

The id of the template to which this measurement is associated

string

name
optional

Name of the measurement in Congrid system

string

modifiedAt
optional

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

projectId
required

Project id of the project this measurement is part of

string

targetId
optional

Id of the target for which this measurement was mapped to

string

measurementTypeId
required

The measurement type id of this measurement. Valid type ids are:

* ASPHALT

* QUALITY

* TR

* MVR
Default : "TR"

enum (TR, MVR, QUALITY, ASPHALT)

measurementCategoryId
optional

The measurement category of this measurement. Valid values are

INTERNAL

EXTERNAL

string

topics
optional

An array of measurement topic objects

< NewMeasurementTopic > array

12.40. Measurement

Measurement object describes a safety measurement in Congrid system. After a measurement has been conducted it is marked as completed and a result for the measurement can be calculted. The measurement object contains this result with some additional meta data that is useful for post-processing.

Name Description Schema

templateId
required

The id of the template to which this measurement is associated

string

measurementId
required

Unique id of this measurement in the scope of the project

string

name
optional

Name of the measurement in Congrid system

string

modifiedAt
required

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

projectId
required

Project id of the project this measurement is part of

string

projectName
optional

Name the project this measurement is part of

string

projectCode
optional

The project code of the project this measurement is part of

string

weekNumber
optional

The week number for when the measurement was conducted

integer

year
optional

The year when the measurement was done

integer

result
optional

The calculated result of the measurement

number(float)

targetId
optional

Id of the target for which this measurement was mapped to

string

statusId
required

Can have the following values:

* PENDING - The measurement is being conducted

* COMPLETED - The measurement is completed

* ACCEPTED - The measurement is accepted

* REJECTED - The measurement is rejected

* VERIFIED - The measurement has been verified
Default : "PENDING"

enum (PENDING, COMPLETED, VERIFIED, ACCEPTED, REJECTED)

measurementTypeId
required

The measurement type id of this measurement. Valid type ids are:

* ASPHALT

* QUALITY

* TR

* MVR
Default : "TR"

enum (TR, MVR, QUALITY, ASPHALT)

measurementCategoryId
optional

The measurement category of this measurement. Valid values are

INTERNAL

EXTERNAL

string

12.41. Measurements

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of measurement objects

< Measurement > array

12.42. NewMeasurementTopic

Measurement topic describes a topic which is part of a measurement.

Name Description Schema

modifiedAt
optional

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

plusCount
required

Plus count

integer

minusCount
required

Plus count

integer

templateId
required

Template id of the measurement topic this should map to

string

12.43. MeasurementTopic

Measurement topic describes a topic which is part of a measurement.

Name Description Schema

id
optional

Id of the measurement topic

string

measurementId
optional

Measurement id of the measurement this topic is related to

string

name
optional

Name of the measurement topic

string

modifiedAt
optional

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

orderNumber
required

Order number string

string

plusCount
required

Plus count

integer

negativeMultiplier
optional

number(float)

positiveMultiplier
optional

number(float)

templateId
optional

Template id from which the topic was derived

string

12.44. MeasurementTopics

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of measurement topic objects

< MeasurementTopic > array

12.45. MeasurementTemplate

Measurement template object

Name Description Schema

id
required

string

name
optional

Name of the measurement template in Congrid system

string

modifiedAt
optional

ISO 8601 format date time string describing when the measurement template was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement template was created

string(date-time)

projectId
required

Project id of the project this measurement template is part of

string

companyId
optional

Company id of the project this measurement template belongs to

string

measurementTypeId
optional

The measurement type id of this measurement. Valid type ids are: - TR - MVR - ASPHALT - QUALITY

string

topicIds
optional

A list of measurement topic ids that are associated with this template

< string > array

availableForCompany
required

boolean

availableForAll
required

boolean

12.46. MeasurementTemplates

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of measurement template objects

< MeasurementTemplate > array

12.47. MeasurementTopicTemplate

Measurement topic template object

Name Description Schema

id
required

string

name
optional

Name of the measurement in Congrid system

string

modifiedAt
optional

ISO 8601 format date time string describing when this measurement topic template was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when this measurement topic template was started

string(date-time)

measurementTemplateId
optional

Id of the template that was used as a basis for this measurement

string

orderNumber
optional

Order number for the topic in the measurement

string

negativeMultiplier
optional

Multiplier for negative marks created for this topic

number(float)

positiveMultiplier
optional

Multiplier for positive marks created for this topic

number(float)

12.48. MeasurementTopicTemplates

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of measurement topic template objects

< MeasurementTopicTemplate > array

12.49. Note

Name Description Schema

id
required

A unique identifier given by the backend

string

modifiedAt
optional

ISO 8601 format date time string describing when the note was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the note was created

string(date-time)

companyId
optional

The company id of the company for which the note is assigned to

string

description
optional

The description given for the note by the end-user

string

projectId
required

The project id the photo is related to

string

measurementId
optional

The measurement id of a measurement if the note is associated with one

string

inspectionId
optional

The inspection id of a inspection if the note is associated with one

string

listId
optional

The list id of a list if the note is associated with one

string

inspectionTopicId
optional

The topic id of a inspection topic if the note is associated with one

string

measurementTopicId
optional

The topic id of a measurement topic if the note is associated with one

string

targetId
optional

The id of the target selected for the photo

string

workSectionId
optional

The work section id of a work section if the note is associated with one

string

workActivityId
optional

The work activity id of a work activity if the note is associated with one

string

statusId
required

The current status of the note
Default : "PENDING"

enum (PENDING, RECEIVED, WIP, COMPLETED, VERIFIED, ACCEPTED, REJECTED)

noteTypeId
required

The type of the note
Default : "PUNCH"

enum (PUNCH, TR, MVR, QUALITY, ASPHALT, QUALITY_INSPECTION, SAFETY, PHOTO)

photoIds
optional

< string > array

marker
optional

Marker

12.50. Notes

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

< Note > array

12.51. Event

Name Description Schema

id
required

Unique id given by the backend

string

statusUpdatedAt
optional

ISO 8601 format date time string describing when the event was created

string(date-time)

comment
optional

Comment related to the event if applicable

string

statusIdFrom
optional

Original status of the object before the event

string

statusIdTo
optional

The status of the object after the event

string

12.52. Events

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

< Event > array

12.53. Marker

Name Description Schema

x
required

The x-coordinate of the marker

integer(int32)

y
required

The y-coordinate of the marker

integer(int32)

floorPlanId
required

The unique floor plan id the marker is part of

string

12.54. Photo

Name Description Schema

id
optional

A unique identifier given by the backend

string

filename
required

File name of the actual file

string

modifiedAt
optional

ISO 8601 format date time string describing when the photo was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the photo was created

string(date-time)

projectId
optional

Id of the project to which the photo belongs

string

downloadUrl
optional

Signed download URL for the photo. This download URL is only valid for a short amount of time.

string

12.55. Photos

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of photo objects

< Photo > array

12.56. List

List object describes in Congrid system

Name Description Schema

id
required

Unique id of this measurement in the scope of the project

string

name
optional

Name of the measurement in Congrid system

string

modifiedAt
required

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

projectId
required

Project id of the project this measurement is part of

string

12.57. Lists

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of list objects

< List > array

12.58. InspectionTemplate

Inspection template object describes a template that can be used as a basis for an inspection

Name Description Schema

id
required

Unique id of this inspection template in Congrid

string

name
optional

Name of the inspection template in Congrid system

string

modifiedAt
optional

ISO 8601 format date time string describing when the inspection template was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the inspection template was created

string(date-time)

projectId
optional

Project id of the project this inspection template is part of

string

companyId
optional

Company id of the project this inspection template is part of

string

inspectionTypeId
optional

The inspection type id of this template. Valid type ids are: - QUALITY

string

availableForCompany
required

Is this template available for the whole company

boolean

availableForAll
required

Is this a system template which is available for everyone

boolean

topicIds
optional

A list of inspection topic ids that are associated with this inspection

< string > array

12.59. InspectionTemplates

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of inspection template objects

< InspectionTemplate > array

12.60. InspectionTopicTemplate

Inspection topic template object

Name Description Schema

id
required

string

name
optional

Name of the inspection topic in Congrid system

string

modifiedAt
optional

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

inspectionTemplateId
optional

Id of the template that was used as a basis for this measurement

string

orderNumber
optional

Order number for the topic in the measurement

string

12.61. InspectionTopicTemplates

Information about the inspection topic templates in the system

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of inspection topic template objects

< InspectionTopicTemplate > array

12.62. Inspection

Describes an inspection object in Congrid system.

Inspections can be created based on a template or then from scratch. An inspection object can have many inspection topics.

Name Description Schema

id
required

Unique id of this measurement in the scope of the project

string

name
optional

Name of the measurement in Congrid system

string

modifiedAt
required

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

projectId
required

Project id of the project this measurement is part of

string

templateId
optional

Id of the template that was used as a basis for this measurement

string

targetId
optional

Id of the target for which this measurement was mapped to

string

statusId
optional

Can have the following values:

* PENDING - The measurement is being conducted

* RECEIVED - The measurement has been received by backend

* WIP - The measurement is being processed by backend - Maps to pending

* COMPLETED - The measurement is completed

* VERIFIED - The measurement is verified (not sure how this is used at the moment)

* ACCEPTED - The measurement is accepted

* REJECTED - The measurement is rejected

string

inspectionTypeId
optional

The inspection type id of this template. Valid type ids are: - QUALITY

string

12.63. Inspections

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of inspection objects

< Inspection > array

12.64. InspectionTopic

Name Description Schema

id
required

Unique id of this inspection topic

string

name
optional

Name of the inspection topic

string

comments
optional

Comment for the inspection topic

string

modifiedAt
optional

ISO 8601 format date time string describing when the measurement was last modified

string(date-time)

createdAt
optional

ISO 8601 format date time string describing when the measurement was started

string(date-time)

orderNumber
required

Order number string

string

templateId
optional

Optional template id

string

inspectionId
optional

Id of the inspection this is part of

string

statusId
optional

Can have the following values:

* PENDING - This topic is being conducted

* COMPLETED - This topic is completed

* ACCEPTED - This topic is accepted

* REJECTED - This topic is rejected

* VERIFIED - This topic has been verified
Default : "PENDING"

enum (PENDING, COMPLETED, VERIFIED, ACCEPTED, REJECTED)

12.65. InspectionTopics

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

results
optional

An array of inspection topic objects

< InspectionTopic > array

12.66. PagingResponse

The paging response contains the total number of available items available for querying. The page size defines how many objects are returned per page / per query.

Name Description Schema

count
required

Total number of objects that are available for retrieval

integer

pageSize
required

Number of objects to return per page

integer

12.67. ErrorModel

The API returns an JSON error model for every error. The error response tries to give a bit more insight of what actually happened then just simply returning a specific HTTP Result-Code.

A list of error codes and descriptions:

  • 100 - Project with projectId not found

  • 103 - Target with parentId not found

  • 104 - Target with targetId not found - cannot attach floorplan to target

  • 108 - Incorrect companyId

  • 109 - Incorrect floorplan slug

  • 110 - Unknown floorplanTypeId

  • 111 - Unknown targetTypeId

  • 400 - Unable to process request

  • 401 - The API Token is either missing or is invalid. Please verify that you are sending the correct API Token in the correct HTTP Header to the API.

  • 404 - Document, path or entity not found

  • 422 - A mandatory property is missing from the request. The message part of the error response specifies which property is missing

  • 500 - Internal server error

  • 502 - Bad Gateway (This is a temporary error and is seen if for example one of the backend servers used for fulfilling the requests cannot give a proper response)

  • 503 - Service temporarily unavailable (This is a temporary error which is seen if some of the backend servers gets overloaded)

  • 602 - Missing required property. The message part will give addional information.

  • 606 - Uknown entry for an enum. The message part will give addional information.

Name Description Schema

code
required

Error code

integer(int32)

message
required

Detailed error message

string