{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "IFTA Vehicle Month",
  "type": "object",
  "properties": {
    "connectionId": {
      "type": "string",
      "description": "The ID of the connection that this record belongs to."
    },
    "id": {
      "title": "IFTAReportId",
      "type": "string",
      "format": "ulid"
    },
    "provider": {
      "type": "string",
      "description": "Every provider has a unique code to identify it across Terminal's system. You can find each provider's code under [provider details](/providers)."
    },
    "vehicle": {
      "description": "The vehicle this IFTA report is for.",
      "title": "VehicleId",
      "type": "string",
      "format": "ulid",
      "pattern": "^vcl_[0-9A-HJKMNP-TV-Z]{26}$"
    },
    "month": {
      "title": "ISOMonth",
      "type": "string",
      "pattern": "^(\\d{4})-(0[1-9]|1[0-2])$",
      "description": "[ISO 8601](https://www.w3.org/TR/NOTE-datetime) month"
    },
    "jurisdiction": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "title": "State",
          "type": "string",
          "enum": [
            "AL",
            "AK",
            "AS",
            "AZ",
            "AR",
            "CA",
            "CO",
            "CT",
            "DE",
            "FL",
            "GA",
            "GU",
            "HI",
            "ID",
            "IL",
            "IN",
            "IA",
            "KS",
            "KY",
            "LA",
            "ME",
            "MD",
            "MA",
            "MI",
            "MN",
            "MP",
            "MS",
            "MO",
            "MT",
            "NE",
            "NV",
            "NH",
            "NJ",
            "NM",
            "NY",
            "NC",
            "ND",
            "OH",
            "OK",
            "OR",
            "PA",
            "PR",
            "RI",
            "SC",
            "SD",
            "TN",
            "TX",
            "UT",
            "VT",
            "VA",
            "WA",
            "WV",
            "WI",
            "WY",
            "VI",
            "AB",
            "BC",
            "MB",
            "NB",
            "NL",
            "NS",
            "ON",
            "PE",
            "QC",
            "SK",
            "NT",
            "NU",
            "UM",
            "YT",
            "DC"
          ],
          "description": "US State or Canadian Province"
        }
      ]
    },
    "distance": {
      "title": "Distance In Kilometers",
      "type": "number",
      "format": "double",
      "description": "Distance in kilometers"
    },
    "metadata": {
      "title": "EntityMetadata",
      "type": "object",
      "description": "Internal metadata about the record.",
      "required": ["addedAt", "modifiedAt"],
      "properties": {
        "addedAt": {
          "title": "AddedAt",
          "type": "string",
          "format": "date-time",
          "description": "The date and time the record was ingested into Terminal. Note: this is not the date and time the record was created in the provider's system."
        },
        "modifiedAt": {
          "title": "ModifiedAt",
          "type": "string",
          "format": "date-time",
          "description": "The date and time the record was last updated in Terminal. Note: this is not the date and time the record was updated in the provider's system."
        }
      }
    },
    "raw": {
      "title": "RawDataList",
      "type": "array",
      "items": {
        "title": "RawData",
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "schema": {
            "type": "string"
          },
          "extractedAt": {
            "type": "string"
          },
          "data": {
            "type": "object"
          }
        },
        "required": ["provider", "schema", "extractedAt", "data"]
      }
    }
  },
  "required": [
    "connectionId",
    "id",
    "provider",
    "vehicle",
    "month",
    "jurisdiction",
    "distance",
    "metadata"
  ]
}
