{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-site-schema.json",
  "title": "Site",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-site-api-openapi.yml#/components/schemas/Site",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "title": "Site ID",
      "readOnly": true,
      "maxLength": 13
    },
    "object": {
      "type": "string",
      "title": "Object type",
      "readOnly": true
    },
    "subdomain": {
      "type": "string",
      "readOnly": true,
      "maxLength": 100
    },
    "public_api_key": {
      "type": "string",
      "title": "Public API Key",
      "readOnly": true,
      "maxLength": 50,
      "description": "This value is used to configure RecurlyJS to submit tokenized billing information."
    },
    "mode": {
      "title": "Mode",
      "maxLength": 15,
      "readOnly": true,
      "$ref": "#/$defs/SiteModeEnum"
    },
    "address": {
      "$ref": "#/$defs/Address"
    },
    "settings": {
      "$ref": "#/$defs/Settings"
    },
    "features": {
      "type": "array",
      "title": "Features",
      "description": "A list of features enabled for the site.",
      "items": {
        "readOnly": true,
        "$ref": "#/$defs/FeaturesEnum"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created at",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated at",
      "readOnly": true
    },
    "deleted_at": {
      "type": "string",
      "format": "date-time",
      "title": "Deleted at",
      "readOnly": true
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "phone": {
          "type": "string",
          "title": "Phone number"
        },
        "street1": {
          "type": "string",
          "title": "Street 1",
          "maxLength": 50
        },
        "street2": {
          "type": "string",
          "title": "Street 2",
          "maxLength": 50
        },
        "city": {
          "type": "string",
          "title": "City"
        },
        "region": {
          "type": "string",
          "title": "State/Province",
          "description": "State or province."
        },
        "postal_code": {
          "type": "string",
          "title": "Zip/Postal code",
          "description": "Zip or postal code."
        },
        "country": {
          "type": "string",
          "title": "Country",
          "description": "Country, 2-letter ISO 3166-1 alpha-2 code."
        },
        "geo_code": {
          "type": "string",
          "maxLength": 20,
          "description": "Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled."
        }
      }
    },
    "AddressRequirementEnum": {
      "type": "string",
      "enum": [
        "full",
        "none",
        "streetzip",
        "zip"
      ]
    },
    "FeaturesEnum": {
      "type": "string",
      "enum": [
        "credit_memos",
        "manual_invoicing",
        "only_bill_what_changed",
        "subscription_terms"
      ]
    },
    "Settings": {
      "type": "object",
      "properties": {
        "billing_address_requirement": {
          "description": "- full:      Full Address (Street, City, State, Postal Code and Country)\n- streetzip: Street and Postal Code only\n- zip:       Postal Code only\n- none:      No Address\n",
          "readOnly": true,
          "$ref": "#/$defs/AddressRequirementEnum"
        },
        "accepted_currencies": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "3-letter ISO 4217 currency code."
          },
          "readOnly": true
        },
        "default_currency": {
          "type": "string",
          "description": "The default 3-letter ISO 4217 currency code.",
          "readOnly": true
        }
      }
    },
    "SiteModeEnum": {
      "type": "string",
      "enum": [
        "development",
        "production",
        "sandbox"
      ]
    }
  }
}