Zum Inhalt
HALOWERK

Finopswerk

meter cancellation usage provenance

From supplied original meter events and cancellation-effect captures, reconstruct selected meter-period signed usage, zero-floored quantity and active count. Null effects preserve correlated possible worlds; known impossible joint claims remain negative. No real provider acceptance, invoice freshness or cancellation eligibility claim. A schema-valid unknown is a successful result at the same fixed price. Invalid input raises native HTTP400 before settlement. Serialized input limit 16384.

POST https://finops.halowerk.com/v1/meter-cancellation-usage-provenance

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
event_namestringJa
period_startintegerJa
period_endintegerJa
eventsarrayJa
adjustmentsarrayJa
reportobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "event_name": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,15}$",
      "minLength": 1,
      "maxLength": 16
    },
    "period_start": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "period_end": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_name": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,15}$",
            "minLength": 1,
            "maxLength": 16
          },
          "identifier": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,15}$",
            "minLength": 1,
            "maxLength": 16
          },
          "timestamp": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "value": {
            "type": "integer",
            "minimum": -10000,
            "maximum": 10000
          }
        },
        "required": [
          "event_name",
          "identifier",
          "timestamp",
          "value"
        ],
        "additionalProperties": false
      },
      "minItems": 0,
      "maxItems": 8
    },
    "adjustments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_name": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,15}$",
            "minLength": 1,
            "maxLength": 16
          },
          "identifier": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,15}$",
            "minLength": 1,
            "maxLength": 16
          },
          "effective": {
            "enum": [
              true,
              false,
              null
            ]
          }
        },
        "required": [
          "event_name",
          "identifier",
          "effective"
        ],
        "additionalProperties": false
      },
      "minItems": 0,
      "maxItems": 6
    },
    "report": {
      "type": "object",
      "properties": {
        "raw_sum": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -80000,
              "maximum": 80000
            },
            {
              "type": "null"
            }
          ]
        },
        "billed_quantity": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 80000
            },
            {
              "type": "null"
            }
          ]
        },
        "active_count": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 8
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "raw_sum",
        "billed_quantity",
        "active_count"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "event_name",
    "period_start",
    "period_end",
    "events",
    "adjustments",
    "report"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "event_name": "tokens",
  "period_start": 0,
  "period_end": 100,
  "events": [
    {
      "event_name": "tokens",
      "identifier": "a",
      "timestamp": 0,
      "value": 7
    },
    {
      "event_name": "tokens",
      "identifier": "b",
      "timestamp": 99,
      "value": 3
    },
    {
      "event_name": "other",
      "identifier": "a",
      "timestamp": 20,
      "value": 999
    },
    {
      "event_name": "tokens",
      "identifier": "outside",
      "timestamp": 100,
      "value": 500
    }
  ],
  "adjustments": [
    {
      "event_name": "tokens",
      "identifier": "b",
      "effective": false
    }
  ],
  "report": {
    "raw_sum": 10,
    "billed_quantity": 10,
    "active_count": 2
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →