{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-cost-details-with-keys-schema.json",
  "title": "data_cost_details_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-em-openapi.yml#/components/schemas/data_cost_details_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_cost_details"
    }
  ],
  "$defs": {
    "data_cost_details": {
      "required": [
        "EMCo",
        "Mth",
        "EMTrans",
        "EMGroup",
        "Equipment",
        "CostCode",
        "EMCostType",
        "PostedDate",
        "ActualDate",
        "INStkUnitCost",
        "Units",
        "Dollars",
        "UnitPrice",
        "CurrentHourMeter",
        "CurrentTotalHourMeter",
        "CurrentOdometer",
        "CurrentTotalOdometer",
        "KeyID"
      ],
      "type": "object",
      "properties": {
        "EMCo": {
          "type": "integer",
          "description": ""
        },
        "Mth": {
          "pattern": "^([0-9]{4})-(1[0-2]|0[1-9])-01$",
          "type": "string",
          "description": "Format: YYYY-MM-01."
        },
        "EMTrans": {
          "type": "integer",
          "description": ""
        },
        "BatchId": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "EMGroup": {
          "type": "integer",
          "description": ""
        },
        "Equipment": {
          "maxLength": 10,
          "type": "string",
          "description": ""
        },
        "Component": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ComponentTypeCode": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Asset": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "WorkOrder": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "WOItem": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "CostCode": {
          "maxLength": 10,
          "type": "string",
          "description": ""
        },
        "EMCostType": {
          "type": "integer",
          "description": ""
        },
        "PostedDate": {
          "type": "string",
          "description": "Format: YYYY-MM-DD"
        },
        "ActualDate": {
          "type": "string",
          "description": "Format: YYYY-MM-DD"
        },
        "Source": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "EMTransType": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Description": {
          "maxLength": 60,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "InUseBatchID": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "GLCo": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "GLTransAcct": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "GLOffsetAcct": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ReversalStatus": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "PRCo": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "PREmployee": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "APCo": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "APTrans": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "APLine": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "VendorGrp": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "APVendor": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "APRef": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "MatlGroup": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "INCo": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "INLocation": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Material": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "INStkUM": {
          "maxLength": 3,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "INStkUnitCost": {
          "pattern": "^[-+]?[0-9]{1,11}(?:.[0-9]{0,5})?$",
          "type": "string",
          "description": ""
        },
        "INStkECM": {
          "maxLength": 1,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "SerialNo": {
          "maxLength": 20,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "UM": {
          "maxLength": 3,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Units": {
          "pattern": "^[-+]?[0-9]{1,9}(?:.[0-9]{0,3})?$",
          "type": "string",
          "description": ""
        },
        "Dollars": {
          "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
          "type": "string",
          "description": ""
        },
        "UnitPrice": {
          "pattern": "^[-+]?[0-9]{1,11}(?:.[0-9]{0,5})?$",
          "type": "string",
          "description": ""
        },
        "PerECM": {
          "maxLength": 1,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "TotalCost": {
          "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "AllocCode": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "TaxType": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "TaxCode": {
          "maxLength": 10,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "TaxGroup": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "TaxBasis": {
          "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "TaxRate": {
          "pattern": "^[-+]?[0-9]{1,2}(?:.[0-9]{0,6})?$",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "TaxAmount": {
          "pattern": "^[-+]?[0-9]{1,10}(?:.[0-9]{0,2})?$",
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CurrentHourMeter": {
          "pattern": "^[-+]?[0-9]{1,8}(?:.[0-9]{0,2})?$",
          "type": "string",
          "description": ""
        },
        "CurrentTotalHourMeter": {
          "pattern": "^[-+]?[0-9]{1,8}(?:.[0-9]{0,2})?$",
          "type": "string",
          "description": ""
        },
        "CurrentOdometer": {
          "pattern": "^[-+]?[0-9]{1,8}(?:.[0-9]{0,2})?$",
          "type": "string",
          "description": ""
        },
        "CurrentTotalOdometer": {
          "pattern": "^[-+]?[0-9]{1,8}(?:.[0-9]{0,2})?$",
          "type": "string",
          "description": ""
        },
        "PO": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "POItem": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "MeterTrans": {
          "type": [
            "integer",
            "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": ""
        },
        "POItemLine": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "MeterReadingId": {
          "type": [
            "integer",
            "null"
          ],
          "description": ""
        },
        "PurgeYN": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "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."
        }
      }
    }
  }
}