{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/fuel_transaction/v2.json",
  "title": "fuel_transaction contract v2",
  "type": "object",
  "required": [
    "asset",
    "quantity",
    "transacted_at"
  ],
  "properties": {
    "cost": {
      "type": "number",
      "description": "what the purchase cost",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "money"
    },
    "asset": {
      "type": "string",
      "description": "the vehicle or plant the fuel was bought for",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "driver": {
      "type": "string",
      "description": "the driver on the transaction",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "product": {
      "type": "string",
      "description": "the product bought, e.g. diesel",
      "x-demiton-requiredness": "optional"
    },
    "consumer": {
      "type": "string",
      "description": "what consumed the fuel: the vehicle itself or ancillary equipment",
      "x-demiton-requiredness": "optional"
    },
    "currency": {
      "type": "currency",
      "description": "the currency of the cost",
      "x-demiton-requiredness": "optional"
    },
    "odometer": {
      "type": "number",
      "description": "the odometer reading at purchase",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "km",
      "x-demiton-type": "decimal"
    },
    "quantity": {
      "type": "number",
      "description": "the amount of product bought",
      "x-demiton-requiredness": "required",
      "x-demiton-type": "decimal"
    },
    "supplier": {
      "type": "string",
      "description": "the fuel supplier or card provider",
      "x-demiton-requiredness": "optional"
    },
    "tax_paid": {
      "type": "boolean",
      "description": "whether fuel tax was paid on the purchase",
      "x-demiton-requiredness": "optional"
    },
    "site_name": {
      "type": "string",
      "description": "where the fuel was bought",
      "x-demiton-requiredness": "optional"
    },
    "external_id": {
      "type": "string",
      "description": "the source system's own transaction id",
      "x-demiton-requiredness": "optional"
    },
    "quantity_unit": {
      "type": "string",
      "description": "the unit of the quantity, e.g. litre or kilogram",
      "x-demiton-requiredness": "optional"
    },
    "transacted_at": {
      "type": "string",
      "description": "when the purchase happened",
      "x-demiton-requiredness": "required",
      "format": "date-time",
      "x-demiton-type": "datetime"
    },
    "purchase_source": {
      "type": "string",
      "description": "whether the fuel came from a retail site or bulk storage",
      "x-demiton-requiredness": "optional"
    },
    "transaction_type": {
      "type": "string",
      "description": "a purchase, or a void that reverses one",
      "x-demiton-requiredness": "optional"
    }
  },
  "x-demiton-register-type": "fuel_transaction",
  "x-demiton-contract-version": "2.0.2",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "ISO/TS 15143-3",
        "title": "Earth-moving machinery and mobile road construction machinery - Worksite data exchange - Telematics data (AEMP 2.0)",
        "access": "paywalled_secondary",
        "region": "International",
        "edition": "2020 (SA TS ISO 15143.3:2021 AU and PD ISO/TS 15143-3:2020 UK identical adoptions)",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Individual fuel purchases and fills from fleet systems.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/fuel_transaction/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}