{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcadiapower2/json-schema/arcadiapower2-bundle-enrollments-array-schema.json",
  "title": "BundleEnrollmentsArray",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcadiapower2-bundle-beta-api-openapi.yml#/components/schemas/BundleEnrollmentsArray",
  "type": "array",
  "items": {
    "$ref": "#/$defs/BundleEnrollment"
  },
  "$defs": {
    "BundleEnrollment": {
      "required": [
        "client_user_id",
        "utility_account_id",
        "product_key",
        "status",
        "ineligibility_reasons",
        "removal_reason",
        "start_date",
        "override_email",
        "sandboxed"
      ],
      "properties": {
        "client_user_id": {
          "description": "Your organization's unique key provided to associate Arcadia resources with your user.",
          "type": "string"
        },
        "utility_account_id": {
          "description": "Unique `id` generated by Arcadia to identify the Utility Account associated with this resource.",
          "type": "integer"
        },
        "product_key": {
          "type": "string",
          "enum": [
            "hosted_payments",
            "utility_remittance"
          ]
        },
        "status": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string",
              "enum": [
                "enrolled",
                "pending_enrollment",
                "ineligible",
                "pending_removal",
                "removed"
              ]
            }
          ]
        },
        "ineligibility_reasons": {
          "description": "Reasons, if any, that an Account was ineligible for Bundle. This array will always be present but may be empty.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/IneligibilityReason"
          }
        },
        "removal_reason": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string",
              "enum": [
                "organization_requested",
                "dropped_cant_login",
                "dropped_payment_decline",
                "dropped_no_remittance_scheduled",
                "moved"
              ]
            }
          ]
        },
        "start_date": {
          "description": "Date the Bundle Enrollment was approved.",
          "format": "date",
          "type": [
            "string",
            "null"
          ]
        },
        "override_email": {
          "description": "Email address generated by Arcadia to override the user's email address on file with their Utility.",
          "type": [
            "string",
            "null"
          ]
        },
        "sandboxed": {
          "description": "If `true`, this resource is in the sandboxed environment. If `false`, this resource is in the live environment.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "IneligibilityReason": {
      "required": [
        "resolvable",
        "reason"
      ],
      "properties": {
        "resolvable": {
          "type": "boolean",
          "description": "If `true`, signifies that corrective action can be taken to resolve this Ineligibility Reason. If `false`, this Ineligibility Reason cannot be resolved"
        },
        "reason": {
          "$ref": "#/$defs/IneligibilityReasonEnum"
        }
      },
      "additionalProperties": false
    },
    "IneligibilityReasonEnum": {
      "type": "string",
      "enum": [
        "2fa",
        "ebill_ineligible_incorrect_credentials",
        "ebill_ineligible_third_party",
        "gas_only",
        "inactive_utility_account",
        "incomplete_utility_account",
        "missing_payment_method",
        "past_due",
        "payment_arrangement",
        "sdg&e_paperless_gas_account",
        "sibling_account_ineligible",
        "solar_non_approved_utility",
        "enrolled_in_mutually_exclusive_bundle_feature"
      ]
    }
  }
}