{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-work-orders-with-keys-schema.json",
  "title": "data_work_orders_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-sm-openapi.yml#/components/schemas/data_work_orders_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_work_orders"
    }
  ],
  "$defs": {
    "data_work_orders": {
      "required": [
        "SMWorkOrderID",
        "SMCo",
        "WorkOrder",
        "CustGroup",
        "ServiceCenter",
        "IsNew",
        "WOStatus",
        "Certified",
        "WorkOrderType"
      ],
      "type": "object",
      "properties": {
        "SMWorkOrderID": {
          "type": "integer",
          "description": ""
        },
        "SMCo": {
          "type": "integer",
          "description": ""
        },
        "WorkOrder": {
          "type": "integer",
          "description": ""
        },
        "CustGroup": {
          "type": "integer",
          "description": ""
        },
        "Customer": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "ServiceSite": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Description": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceCenter": {
          "maxLength": 10,
          "type": "string",
          "description": ""
        },
        "RequestedDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedTime": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "EnteredDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "EnteredBy": {
          "maxLength": 128,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedBy": {
          "maxLength": 50,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ContactName": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ContactPhone": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "IsNew": {
          "type": "boolean",
          "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": ""
        },
        "WOStatus": {
          "type": "integer",
          "description": ""
        },
        "LeadTechnician": {
          "maxLength": 15,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedByPhone": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "JCCo": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "Job": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CostingMethod": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Certified": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "CertifiedStartDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PRState": {
          "maxLength": 4,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PRLocalCode": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CraftTemplate": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "Reviewer": {
          "maxLength": 3,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "WorkOrderQuote": {
          "maxLength": 15,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "WorkOrderType": {
          "maxLength": 1,
          "type": "string",
          "description": "Enter the single character 'C' for Customers and 'J' for Jobs"
        },
        "__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."
        },
        "Scopes": {
          "type": "array",
          "items": {
            "required": [
              "SMWorkOrderScopeID",
              "SMCo",
              "WorkOrder",
              "Scope",
              "SaleLocation",
              "IsTrackingWIP",
              "PriceMethod",
              "Status",
              "IsPreventativeMaintenance",
              "RevenueRecognition"
            ],
            "type": "object",
            "properties": {
              "SMWorkOrderScopeID": {
                "type": "integer",
                "description": ""
              },
              "SMCo": {
                "type": "integer",
                "description": ""
              },
              "WorkOrder": {
                "type": "integer",
                "description": ""
              },
              "Scope": {
                "type": "integer",
                "description": ""
              },
              "CallType": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "WorkScope": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "ServiceCenter": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Division": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Notes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "CustGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "BillToARCustomer": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "RateTemplate": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "ServiceItem": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SaleLocation": {
                "type": "integer",
                "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": ""
              },
              "PriorityName": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "IsTrackingWIP": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "DueStartDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "DueEndDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "CustomerPO": {
                "maxLength": 30,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "NotToExceed": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Phase": {
                "maxLength": 20,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "PhaseGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "JCCo": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "Job": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Agreement": {
                "maxLength": 15,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Revision": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "PriceMethod": {
                "maxLength": 1,
                "type": "string",
                "description": ""
              },
              "Price": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Service": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "UseAgreementRates": {
                "enum": [
                  "Y",
                  "N",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxCode": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "WorkOrderQuote": {
                "maxLength": 15,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxRate": {
                "pattern": "^[-+]?[0-9]{1,2}(?:.[0-9]{0,6})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "HoldReason": {
                "maxLength": 50,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "FollowUpDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Status": {
                "type": "integer",
                "description": ""
              },
              "InsCode": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "IsPreventativeMaintenance": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "Derived": {
                "enum": [
                  "Y",
                  "N",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "LaborHours": {
                "pattern": "^[-+]?[0-9]{1,9}(?:.[0-9]{0,3})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "LaborCostEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "MaterialCostEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "EquipmentCostEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SubcontractCostEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "OtherCostEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "CostEstTotal": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "LaborPricingEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "MaterialPricingEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "EquipmentPricingEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SubcontractPricingEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "OtherPricingEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "CommonMarkupEst": {
                "enum": [
                  "Y",
                  "N",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "ReadyToBill": {
                "enum": [
                  "Y",
                  "N",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "ReadyToBillAmt": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "WorkOrderQuoteScope": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "BudgetCraft": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "BudgetClass": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "AltBillAddr": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxTypeOverride": {
                "maxLength": 1,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Assignment": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "RevenueRecognition": {
                "maxLength": 1,
                "type": "string",
                "description": ""
              },
              "Margin": {
                "pattern": "^[-+]?[0-9]{1,2}(?:.[0-9]{0,4})?$",
                "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."
              }
            }
          }
        }
      }
    }
  }
}