{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-work-order-quotes-with-keys-schema.json",
  "title": "data_work_order_quotes_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_order_quotes_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_order_quotes"
    }
  ],
  "$defs": {
    "data_work_order_quotes": {
      "required": [
        "SMWorkOrderQuoteID",
        "SMCo",
        "WorkOrderQuote",
        "Status"
      ],
      "type": "object",
      "properties": {
        "SMWorkOrderQuoteID": {
          "type": "integer",
          "description": ""
        },
        "SMWorkOrderID": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "SMCo": {
          "type": "integer",
          "description": ""
        },
        "WorkOrderQuote": {
          "maxLength": 15,
          "type": "string",
          "description": ""
        },
        "Description": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "EnteredBy": {
          "maxLength": 128,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "EnteredDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PRCo": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "SalesPerson": {
          "maxLength": 50,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedBy": {
          "maxLength": 50,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedPhone": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedDate": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "RequestedTime": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustGroup": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "Customer": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "CustomerName": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerAddress1": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerAddress2": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerCity": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerState": {
          "maxLength": 4,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerZip": {
          "maxLength": 12,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerCountry": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerContactName": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomerContactPhone": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceCenter": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSite": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteDescription": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteAddress1": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteAddress2": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteCity": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteState": {
          "maxLength": 4,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteZip": {
          "maxLength": 12,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ServiceSiteCountry": {
          "maxLength": 2,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "DateCanceled": {
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "DateApproved": {
          "type": [
            "string",
            "null"
          ],
          "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": ""
        },
        "WorkOrder": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "CreatedFromWorkOrder": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Status": {
          "maxLength": 1,
          "type": "string",
          "description": ""
        },
        "NewCustomer": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "ARCustomerCreated": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "SMCustomerCreated": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "NewSite": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "SiteCreated": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "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."
        },
        "ScopeDetails": {
          "type": "array",
          "items": {
            "required": [
              "SMWorkOrderQuoteScopeID",
              "WorkOrderQuoteScope",
              "DerivedEstimate",
              "CommonMarkupEst",
              "Approve",
              "UnApprove"
            ],
            "type": "object",
            "properties": {
              "SMWorkOrderQuoteScopeID": {
                "type": "integer",
                "description": ""
              },
              "WorkOrderQuoteScope": {
                "type": "integer",
                "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": ""
              },
              "CallType": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "CustomerPO": {
                "maxLength": 30,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Price": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "NotToExceed": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "PriceMethod": {
                "maxLength": 1,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "RateTemplate": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxSource": {
                "maxLength": 1,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxType": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxGroup": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "TaxCode": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxRate": {
                "pattern": "^[-+]?[0-9]{1,2}(?:.[0-9]{0,6})?$",
                "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": ""
              },
              "DueStartDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "DueEndDate": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "DerivedEstimate": {
                "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": ""
              },
              "LaborHours": {
                "pattern": "^[-+]?[0-9]{1,9}(?:.[0-9]{0,3})?$",
                "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"
                ],
                "type": "string",
                "description": ""
              },
              "Approve": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "DateApproved": {
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "UnApprove": {
                "enum": [
                  "Y",
                  "N"
                ],
                "type": "string",
                "description": ""
              },
              "BudgetCraft": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "BudgetClass": {
                "maxLength": 10,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "TaxTypeOverride": {
                "maxLength": 1,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "LaborTaxEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "MaterialTaxEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "EquipmentTaxEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "SubcontractTaxEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "OtherTaxEst": {
                "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Agreement": {
                "maxLength": 15,
                "type": [
                  "string",
                  "null"
                ],
                "description": ""
              },
              "Revision": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "CostEstTotal": {
                "pattern": "^[-+]?[0-9]{1,14}(?:.[0-9]{0,2})?$",
                "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."
              }
            }
          }
        }
      }
    }
  }
}