{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-3scale/json-schema/red-hat-3scale-transactions-schema.json",
  "title": "Transactions",
  "description": "Array of transaction details (see <a href=\"#model-Transaction\">Transaction</a> definition). All transactions must include either `user_key` or `app_id` (the same for all transactions), depending on the API's authentication pattern. Transactions may optionally include the `timestamp` field.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-3scale-service-management-porta-openapi.yml#/components/schemas/Transactions",
  "type": "array",
  "items": {
    "$ref": "#/$defs/Transaction"
  },
  "$defs": {
    "Log": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      }
    },
    "Transaction": {
      "type": "object",
      "properties": {
        "user_key": {
          "type": "string",
          "description": "User Key (API key) - identifier and shared secret of the application if the authentication pattern is API Key.",
          "x-data-threescale-name": "user_keys"
        },
        "app_id": {
          "type": "string",
          "description": "App Id (identifier of the application if the authentication pattern is App ID / App Key).",
          "x-data-threescale-name": "app_ids"
        },
        "timestamp": {
          "type": "string",
          "description": "If passed, it should be the time when the transaction took place.\nTimestamp must be within the following range: 24 hours before and 1\nhour after the current time. Two formats are supported:\n- `YYYY-MM-DD HH:MM:SS` for UTC, add `-HH:MM` or `+HH:MM` for time offset, e.g. `2022-02-01 22:15:31 -08:00`\n- Unix epoch timestamp in seconds, e.g. `1643750131`"
        },
        "usage": {
          "$ref": "#/$defs/Usage"
        },
        "log": {
          "$ref": "#/$defs/Log"
        }
      }
    },
    "Usage": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    }
  }
}