## List Available Plans `client.Zones.Plans.List(ctx, query) (*SinglePage[AvailableRatePlan], error)` **get** `/zones/{zone_id}/available_plans` Lists available plans the zone can subscribe to. ### Parameters - `query PlanListParams` - `ZoneID param.Field[string]` Identifier ### Returns - `type AvailableRatePlan struct{…}` - `ID string` Identifier - `CanSubscribe bool` Indicates whether you can subscribe to this plan. - `Currency string` The monetary unit in which pricing information is displayed. - `ExternallyManaged bool` Indicates whether this plan is managed externally. - `Frequency AvailableRatePlanFrequency` The frequency at which you will be billed for this plan. - `const AvailableRatePlanFrequencyWeekly AvailableRatePlanFrequency = "weekly"` - `const AvailableRatePlanFrequencyMonthly AvailableRatePlanFrequency = "monthly"` - `const AvailableRatePlanFrequencyQuarterly AvailableRatePlanFrequency = "quarterly"` - `const AvailableRatePlanFrequencyYearly AvailableRatePlanFrequency = "yearly"` - `IsSubscribed bool` Indicates whether you are currently subscribed to this plan. - `LegacyDiscount bool` Indicates whether this plan has a legacy discount applied. - `LegacyID string` The legacy identifier for this rate plan, if any. - `Name string` The plan name. - `Price float64` The amount you will be billed for this plan. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zones" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.Zones.Plans.List(context.TODO(), zones.PlanListParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "can_subscribe": true, "currency": "USD", "externally_managed": false, "frequency": "monthly", "is_subscribed": false, "legacy_discount": false, "legacy_id": "free", "name": "Free Plan", "price": 0 } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } } ```