{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/extracker/json-schema/extracker-change-order-request-schema.json",
  "title": "ChangeOrderRequest",
  "x-generated": "2026-12-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/extracker-openapi.json#/components/schemas/ChangeOrderRequest",
  "properties": {
    "id": {
      "type": "number",
      "format": "double"
    },
    "uuid": {
      "type": "string"
    },
    "corNumber": {
      "type": "string"
    },
    "version": {
      "type": "number",
      "format": "double"
    },
    "entryMethod": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/ChangeOrderRequestStatus"
    },
    "stage": {
      "$ref": "#/$defs/ChangeOrderRequestStage"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "jobNumber": {
      "type": "string"
    },
    "customerJobNumber": {
      "type": "string"
    },
    "customerReferenceNumber": {
      "type": "string"
    },
    "changeNotificationId": {
      "type": "number",
      "format": "double"
    },
    "dateSubmitted": {
      "type": "string",
      "format": "date-time"
    },
    "companyId": {
      "type": "number",
      "format": "double"
    },
    "contract": {},
    "customer": {
      "$ref": "#/$defs/Customer"
    },
    "customerName": {
      "type": "string"
    },
    "customerCoNumber": {
      "type": "string"
    },
    "contractorName": {
      "type": "string"
    },
    "projectId": {
      "type": "number",
      "format": "double"
    },
    "projectName": {
      "type": "string"
    },
    "contractId": {
      "type": "number",
      "format": "double"
    },
    "requestedAmount": {
      "type": "number",
      "format": "double"
    },
    "inReviewAmount": {
      "type": "number",
      "format": "double"
    },
    "approvedCoIssuedAmount": {
      "type": "number",
      "format": "double"
    },
    "approvedToProceedAmount": {
      "type": "number",
      "format": "double"
    },
    "voidAmount": {
      "type": "number",
      "format": "double"
    },
    "daysInReview": {
      "type": "number",
      "format": "double"
    },
    "coIssueDate": {
      "type": "string",
      "format": "date-time"
    },
    "approvedToProceedDate": {
      "type": "string",
      "format": "date-time"
    },
    "voidDate": {
      "type": "string",
      "format": "date-time"
    },
    "approvedOrVoidDate": {
      "type": "string",
      "format": "date-time"
    },
    "labels": {
      "items": {
        "$ref": "#/$defs/Label"
      },
      "type": "array"
    },
    "tmTags": {
      "items": {
        "$ref": "#/$defs/AssociatedTMTag"
      },
      "type": "array"
    },
    "manualTmTag": {
      "type": "string"
    },
    "tmTagCount": {
      "type": "number",
      "format": "double"
    },
    "responsibleParty": {
      "properties": {
        "assigneeType": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "assigneeType",
        "name",
        "id"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "internalNotes": {
      "type": [
        "string",
        "null"
      ]
    },
    "reasonCategory": {
      "allOf": [
        {
          "$ref": "#/$defs/CorReasonCategory"
        }
      ],
      "nullable": true
    },
    "reasonCategoryGroup": {
      "allOf": [
        {
          "$ref": "#/$defs/CorReasonCategoryGroup"
        }
      ],
      "nullable": true
    },
    "subcontractorCorItems": {
      "items": {},
      "type": "array"
    },
    "subcontractorCorItem": {
      "nullable": true
    },
    "linkedSentCOR": {
      "properties": {
        "status": {
          "type": "string"
        },
        "number": {
          "type": "string"
        },
        "id": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "status",
        "number",
        "id"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "statusChangedAt": {
      "type": "string",
      "format": "date-time"
    },
    "totalHours": {
      "type": "number",
      "format": "double"
    },
    "totalPDT": {
      "type": "number",
      "format": "double"
    },
    "totalHoursPDT": {
      "type": "number",
      "format": "double"
    },
    "totalPOT": {
      "type": "number",
      "format": "double"
    },
    "totalHoursPOT": {
      "type": "number",
      "format": "double"
    },
    "totalDT": {
      "type": "number",
      "format": "double"
    },
    "totalHoursDT": {
      "type": "number",
      "format": "double"
    },
    "totalOT": {
      "type": "number",
      "format": "double"
    },
    "totalHoursOT": {
      "type": "number",
      "format": "double"
    },
    "totalST": {
      "type": "number",
      "format": "double"
    },
    "totalHoursST": {
      "type": "number",
      "format": "double"
    },
    "integrationMetadata": {
      "items": {
        "$ref": "#/$defs/IntegrationMetadata"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "uuid",
    "version",
    "title"
  ],
  "type": "object",
  "additionalProperties": false,
  "$defs": {
    "AssociatedTMTag": {
      "description": "An abbreviated representation of a T&M Tag often used by associated parent objects.",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32",
          "description": "The T&M Tag id, primary key"
        },
        "uuid": {
          "type": "string",
          "description": "The T&M Tag UUID",
          "format": "uuid"
        },
        "number": {
          "type": "string"
        },
        "paddedTagNumber": {
          "type": "string",
          "description": "The T&M Tag number has a padded format for display, it begins with \"EX\" followed by 5 numbers with leading zeros.\nThis is automatically calculated and can't be set by users."
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "dateOfWorkPerformed": {
          "type": "string",
          "format": "date-time"
        },
        "dateOfWorkPerformedAdditional": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "If there are any additional dates of work performed, they will be listed here."
        },
        "customerReferenceNumber": {
          "type": "string"
        },
        "signedAt": {
          "type": "string",
          "format": "date-time"
        },
        "contractorSignedAt": {
          "type": "string",
          "format": "date-time"
        },
        "dateSubmitted": {
          "type": "string",
          "format": "date-time"
        },
        "hasAssociatedCor": {
          "type": "boolean"
        },
        "totalHours": {
          "type": "number",
          "format": "double",
          "description": "The sum of the labor hours on the T&M Tag."
        }
      },
      "required": [
        "id",
        "uuid"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "ChangeOrderRequestStage": {
      "type": "string",
      "enum": [
        "on_hold",
        "revise_and_resubmit",
        "rom",
        "in_review",
        "owner_review",
        "potential_co",
        "approved",
        "pricing",
        "void",
        "estimate",
        "pending",
        "in_dispute",
        "claim",
        "proceed_pending_pricing",
        "proceed_pending_approval",
        "placeholder",
        "approved_to_proceed",
        "approved_co_issued",
        "rejected"
      ],
      "description": "Stage for change order requests."
    },
    "ChangeOrderRequestStatus": {
      "type": "string",
      "enum": [
        "draft",
        "in_review",
        "approved_to_proceed",
        "rejected",
        "approved_co_issued",
        "placeholder"
      ],
      "description": "Status for change order requests."
    },
    "CorReasonCategory": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "isArchived": {
          "type": "boolean"
        },
        "isDefault": {
          "type": "boolean"
        },
        "sortOrder": {
          "type": "number",
          "format": "double"
        },
        "reasonCategoryGroup": {
          "allOf": [
            {
              "$ref": "#/$defs/CorReasonCategoryGroup"
            }
          ],
          "nullable": true
        }
      },
      "required": [
        "id"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "CorReasonCategoryGroup": {
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "isArchived": {
          "type": "boolean"
        },
        "isDefault": {
          "type": "boolean"
        },
        "sortOrder": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "id"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "Customer": {
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32",
          "description": "The customer record id, primary key."
        },
        "name": {
          "type": "string",
          "description": "The customer's name. This can be updated, but any PDF document created already\nwill not update with the new name. Future PDFs will be created using the updated\nvalue though."
        },
        "internalId": {
          "type": "string",
          "description": "Users can set an internal or custom ID value for a customer record.\nThis is helpful in integrating with other systems."
        },
        "creatorId": {
          "type": "number",
          "format": "double",
          "description": "The user who created this customer info record.\nNote that customer info records may also be automatically created by users as part of accepting a project invite.\nIn this case, the user who accepted the project invite would be the creator of this record."
        },
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zipCode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "phone": {
          "type": "string",
          "description": "The customer's phone number.",
          "maxLength": 255
        },
        "fax": {
          "type": "string",
          "description": "The customer's fax number.",
          "maxLength": 255
        }
      },
      "required": [
        "id"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "IntegrationMetadata": {
      "properties": {
        "id": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "value": {},
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "provider",
        "name"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "Label": {
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32",
          "description": "The label id, primary key."
        },
        "name": {
          "type": "string",
          "description": "The actual label value that is displayed."
        },
        "companyStandard": {
          "type": "boolean",
          "description": "If this is `true` then it means the label is seen by users in the company\nwhen adding labels to things in the application. This is to allow a company\nto prioritize an surface common labels. Users can create/add any label they like\nto things. Since there's no restriction, this just helps make others aware\nof important, common, or \"standard\" labels the company uses."
        },
        "active": {
          "type": "boolean"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id"
      ],
      "type": "object",
      "additionalProperties": false
    }
  }
}