CONTRACTDEF: Defect
The CONTRACTDEF entity stores defects. A defect identified under an NEC or JCT contract. Tracks notification, correction deadline, rectification date, and status.
Default definition. This article describes the default
CONTRACTDEF definition shipped with DemandFlow. Administrators can add, remove, rename, or re-type fields, change which ones are required, and alter the layout from the Definitions screen in Settings. Your tenant's current schema may differ from what is shown here. To read the current definition at any time, GET the DEFINITION object whose id matches CONTRACTDEF.Entity properties
| Property | Value |
|---|---|
| Entity code | CONTRACTDEF |
| Display name | Defect |
| Plural | Defects |
| Level | 71040 |
Use cases
Child entity of CONTRACT via SUB|CONTRACT comboKey. Under NEC clause 43 the Supervisor notifies defects.
Fields
Defect Details
| Field | Type | Required | Notes |
|---|---|---|---|
defectRef | text | Defect reference. Example: e.g. DEF-001 | |
status | enum | Yes | Status. Valid ids: open (Open), rectified (Rectified), disputed (Disputed), accepted (Accepted (not rectified)). |
name | text (multi-line) | Yes | Description |
location | text | Location / area | |
notifiedBy | enum | Notified by. Valid ids: supervisor (Supervisor), contractor (Contractor), pm (Project Manager). | |
assigned_to | reference → user | Owner |
Dates
| Field | Type | Required | Notes |
|---|---|---|---|
dateNotified | date | Yes | Date notified |
correctionDeadline | date | Date notified + defects correction period from contract | |
rectifiedDate | date | Rectified date |
Resolution
| Field | Type | Required | Notes |
|---|---|---|---|
remedialAction | text (multi-line) | Remedial action taken | |
costOfRectification | number | Cost of rectification |
Documents
| Field | Type | Required | Notes |
|---|---|---|---|
attachments | file | Defect Evidence |
Relationships
- No declared relationships in the default definition.
Creating a Defect via the API
POST /v1/objects
Authorization: Bearer <your-pat>
Content-Type: application/json
{
"entity": "CONTRACTDEF",
"level": 71040,
"comboKey": "SUB:<your-sub-id>|ENT:",
"status": "open",
"name": "Example value",
"dateNotified": "2025-01-15"
}
Listing Defects
GET /v1/entities/CONTRACTDEF/SUB