{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-project-phases-with-keys-schema.json",
  "title": "data_project_phases_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-pm-openapi.yml#/components/schemas/data_project_phases_withKeys",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "__ryvitKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of key paths that can be used to retrieve this object."
        },
        "__modifiedUTC": {
          "type": "string",
          "description": "UTC timestamp of when this object was last modified in the cache."
        }
      }
    },
    {
      "$ref": "#/$defs/data_project_phases"
    }
  ],
  "$defs": {
    "data_project_phases": {
      "required": [
        "PMCo",
        "Project",
        "JCCo",
        "Job",
        "PhaseGroup",
        "Phase",
        "Contract",
        "Item",
        "ActiveYN",
        "KeyID"
      ],
      "type": "object",
      "properties": {
        "PMCo": {
          "type": "integer",
          "description": ""
        },
        "Project": {
          "maxLength": 10,
          "type": "string",
          "description": ""
        },
        "JCCo": {
          "type": "integer",
          "description": ""
        },
        "Job": {
          "maxLength": 10,
          "type": "string",
          "description": ""
        },
        "PhaseGroup": {
          "type": "integer",
          "description": ""
        },
        "Phase": {
          "maxLength": 20,
          "type": "string",
          "description": ""
        },
        "Description": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Contract": {
          "maxLength": 10,
          "type": "string",
          "description": ""
        },
        "Item": {
          "maxLength": 16,
          "type": "string",
          "description": ""
        },
        "ProjMinPct": {
          "pattern": "^[-+]?[0-9]{1,2}(?:.[0-9]{0,4})?$",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ActiveYN": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "Notes": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "UniqueAttchID": {
          "maxLength": 36,
          "minLength": 36,
          "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "KeyID": {
          "type": "integer",
          "description": ""
        },
        "InsCode": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "__custom_fields": {
          "type": "object",
          "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
        },
        "ProjectPhaseCostType": {
          "type": "array",
          "items": {
            "required": [
              "JCCo",
              "Job",
              "PhaseGroup",
              "CostType",
              "UM",
              "BillFlag",
              "ItemUnitFlag",
              "PhaseUnitFlag",
              "BuyOutYN",
              "Plugged",
              "ActiveYN",
              "OrigHours",
              "OrigUnits",
              "OrigCost",
              "SourceStatus",
              "KeyID"
            ],
            "type": "object",
            "properties": {
              "JCCo": {
                "type": "integer",
                "description": ""
              },
              "Job": {
                "maxLength": 10,
                "type": "string",
                "description": ""
              },
              "PhaseGroup": {
                "type": "integer",
                "description": ""
              },
              "CostType": {
                "type": "integer",
                "description": ""
              },
              "UM": {
                "maxLength": 3,
                "type": "string",
                "description": ""
              },
              "BillFlag": {
                "maxLength": 1,
                "type": "string",
                "description": ""
              },
              "ItemUnitFlag": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "PhaseUnitFlag": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "BuyOutYN": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "LastProjDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Format: YYYY-MM-DD"
              },
              "Plugged": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "ActiveYN": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "OrigHours": {
                "pattern": "^[-+]?[0-9]{1,8}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "OrigUnits": {
                "pattern": "^[-+]?[0-9]{1,9}(?:.[0-9]{0,3})?$",
                "type": "string",
                "description": ""
              },
              "OrigCost": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": "string",
                "description": ""
              },
              "ProjNotes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SourceStatus": {
                "maxLength": 1,
                "type": "string",
                "description": ""
              },
              "InterfaceDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Format: YYYY-MM-DD"
              },
              "Notes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "UniqueAttchID": {
                "maxLength": 36,
                "minLength": 36,
                "pattern": "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "KeyID": {
                "type": "integer",
                "description": ""
              },
              "__custom_fields": {
                "type": "object",
                "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
              }
            }
          },
          "description": ""
        }
      }
    }
  }
}