{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thevicinityapp-com/json-schema/thevicinityapp-com-account-schema.json",
  "title": "Account",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thevicinityapp-com-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "account_id",
    "standing",
    "balance_micro",
    "bond_held_micro",
    "max_open_intents",
    "next_intent",
    "rails",
    "topup"
  ],
  "properties": {
    "account_id": {
      "type": "string"
    },
    "standing": {
      "type": "string",
      "enum": [
        "good",
        "watching",
        "throttled",
        "suspended"
      ]
    },
    "balance_micro": {
      "type": "integer",
      "description": "Available credit balance in micro-units."
    },
    "bond_held_micro": {
      "type": "integer",
      "description": "Sum of currently-escrowed bond amounts across open intents."
    },
    "revoked": {
      "type": "boolean",
      "description": "True if the API key was revoked; the caller should re-purchase."
    },
    "open_intents": {
      "type": "integer"
    },
    "max_open_intents": {
      "type": "integer"
    },
    "next_intent": {
      "$ref": "#/$defs/IntentQuote"
    },
    "rails": {
      "$ref": "#/$defs/PaymentRails"
    },
    "topup": {
      "type": "object",
      "properties": {
        "min_amount_micro": {
          "type": "integer"
        },
        "max_amount_micro": {
          "type": "integer"
        },
        "unit_scale": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "IntentQuote": {
      "type": "object",
      "required": [
        "fee_micro",
        "bond_micro",
        "total_micro",
        "reputation_multiplier"
      ],
      "properties": {
        "fee_micro": {
          "type": "integer"
        },
        "bond_micro": {
          "type": "integer",
          "description": "Base bond × reputation multiplier at the moment of publish."
        },
        "total_micro": {
          "type": "integer"
        },
        "reputation_multiplier": {
          "type": "number",
          "minimum": 0.25,
          "maximum": 4
        }
      }
    },
    "PaymentRails": {
      "type": "object",
      "required": [
        "credit"
      ],
      "properties": {
        "credit": {
          "type": "boolean",
          "description": "Always true."
        },
        "x402": {
          "type": "boolean",
          "description": "True iff an x402 facilitator is configured server-side."
        },
        "stripe_checkout": {
          "type": "boolean",
          "description": "True iff Stripe is configured server-side."
        }
      }
    }
  }
}