{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wall-marketing/json-schema/wall-marketing-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wall-marketing-openapi.json#/components/schemas/Account",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "description": "Always \"account\"."
    },
    "id": {
      "type": "string",
      "description": "The account id."
    },
    "email": {
      "type": "string",
      "description": "The account holder's email."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The account name."
    },
    "livemode": {
      "type": "boolean",
      "description": "False for a sandbox connection."
    },
    "key": {
      "type": "object",
      "description": "The key or connection in use.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Key or connection id."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its name."
        },
        "scope": {
          "type": "string",
          "description": "read, quote or book."
        },
        "kind": {
          "type": "string",
          "description": "key or oauth."
        }
      }
    },
    "limits": {
      "type": "object",
      "description": "Spending limits and approval rules, in US dollars.",
      "properties": {
        "per_booking_usd": {
          "type": "number",
          "description": "Most one booking may cost."
        },
        "monthly_usd": {
          "type": "number",
          "description": "Most that may be spent in a calendar month."
        },
        "total_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Most that may ever be spent; null for no limit."
        },
        "auto_approve_under_usd": {
          "type": "number",
          "description": "Bookings up to this go ahead without the account holder's approval."
        },
        "approve_new_venues": {
          "type": "boolean",
          "description": "Whether a booking with a venue never paid for before always waits for approval."
        }
      }
    },
    "spend": {
      "type": "object",
      "description": "Committed spend.",
      "properties": {
        "this_month_usd": {
          "type": "number",
          "description": "Spent this month."
        },
        "total_usd": {
          "type": "number",
          "description": "Spent in all."
        }
      }
    },
    "remaining": {
      "type": "object",
      "description": "What can still be spent.",
      "properties": {
        "this_month_usd": {
          "type": "number",
          "description": "Left this month."
        },
        "total_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Left overall; null for no limit."
        }
      }
    },
    "payment": {
      "type": "object",
      "description": "Saved payment method.",
      "properties": {
        "card_on_file": {
          "type": "boolean",
          "description": "Whether bookings can be paid automatically."
        },
        "card": {
          "type": [
            "string",
            "null"
          ],
          "description": "The saved card, e.g. \"Visa •••• 4242\"."
        }
      }
    },
    "approval_policy": {
      "type": "string",
      "description": "The approval rules in plain language."
    }
  }
}