{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-driver-deduction-schema.json",
  "title": "driverDeduction",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-truckmate-finance-openapi.yml#/components/schemas/driverDeduction",
  "type": "object",
  "properties": {
    "driverId": {
      "type": "string",
      "maxLength": 10
    },
    "driverDeductionId": {
      "type": "integer"
    },
    "deductionCode": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 10
    },
    "deductionDescription": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 50
    },
    "deductionOverriden": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "False",
        "True",
        ""
      ]
    },
    "deductionState": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "approved",
        "onCheque",
        "exported",
        "hold",
        "owed",
        "posted",
        "quote",
        "unapproved",
        "paid",
        "wait",
        ""
      ]
    },
    "deductionDate": {
      "type": [
        "string",
        "null"
      ],
      "oneOf": [
        {
          "enum": [
            ""
          ]
        },
        {
          "pattern": "^\\d{4}-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12]\\d)((T| )([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d))?$"
        }
      ]
    },
    "taxable": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "False",
        "True",
        ""
      ]
    },
    "currencyCode": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 3
    },
    "deductionQuantity": {
      "type": [
        "number",
        "null"
      ]
    },
    "deductionRate": {
      "type": [
        "number",
        "null"
      ]
    },
    "deductionAmount": {
      "type": [
        "number",
        "null"
      ]
    },
    "tax1": {
      "type": [
        "number",
        "null"
      ]
    },
    "tax2": {
      "type": [
        "number",
        "null"
      ]
    },
    "deductionTotal": {
      "type": [
        "number",
        "null"
      ]
    },
    "deductionFunctionalTotal": {
      "type": [
        "number",
        "null"
      ]
    },
    "datePaid": {
      "type": [
        "string",
        "null"
      ],
      "oneOf": [
        {
          "enum": [
            ""
          ]
        },
        {
          "pattern": "^\\d{4}-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12]\\d)((T| )([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d))?$"
        }
      ]
    },
    "checkDate": {
      "type": [
        "string",
        "null"
      ],
      "oneOf": [
        {
          "enum": [
            ""
          ]
        },
        {
          "pattern": "^\\d{4}-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12]\\d)((T| )([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d))?$"
        }
      ]
    },
    "transactionDate": {
      "type": [
        "string",
        "null"
      ],
      "oneOf": [
        {
          "enum": [
            ""
          ]
        },
        {
          "pattern": "^\\d{4}-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12]\\d)((T| )([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d))?$"
        }
      ]
    },
    "glAccount": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 50,
      "oneOf": [
        {
          "enum": [
            ""
          ]
        },
        {
          "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+){0,4}$"
        }
      ]
    },
    "contractId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "statementId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "tripNumber": {
      "type": "integer"
    },
    "orderId": {
      "type": "integer"
    },
    "freightBillNumber": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20
    },
    "user1": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 40
    },
    "user2": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 40
    },
    "user3": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 40
    }
  }
}