# Get a product's plans

> Retrieves the plans of one product. Unlike `GET /v1/subscriptions/plans`, this endpoint requires both keys and does not fall back to the plans of a global product.

Source: https://help.boltapp.com/api-reference/subscriptions/plans-v2/listproductplansv2

`GET /v2/subscriptions/products/{productId}/plans`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Subscriptions API",
    "version": "v1",
    "description": "API for managing subscriptions and products."
  },
  "servers": [
    {
      "url": "https://api.boltapp.com",
      "description": "The Production URL (Live Data)."
    },
    {
      "url": "https://api-sandbox.boltapp.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://api-staging.boltapp.com",
      "description": "The Staging URL (Staged Data)."
    }
  ],
  "security": [
    {
      "X-API-Key": []
    },
    {
      "X-Publishable-Key": []
    }
  ],
  "paths": {
    "/v2/subscriptions/products/{productId}/plans": {
      "get": {
        "operationId": "listProductPlansV2",
        "summary": "Get a product's plans",
        "description": "Retrieves the plans of one product. Unlike `GET /v1/subscriptions/plans`, this endpoint requires both keys and does not fall back to the plans of a global product.",
        "tags": [
          "Plans v2"
        ],
        "security": [
          {
            "X-API-Key": []
          },
          {
            "X-Publishable-Key": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "productId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the product to retrieve plans for.",
            "examples": {
              "default": {
                "value": "sp_Tlj0Osm0N76T"
              }
            }
          },
          {
            "in": "query",
            "name": "seller_id",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Seller ID for Connect marketplace operations. Send it to read a product that belongs to a seller's Bolt Cart division."
          }
        ],
        "responses": {
          "200": {
            "description": "List of plans.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "plans": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlanV2"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. `seller_id` does not name a seller of your marketplace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "result": {
                        "success": false
                      },
                      "errors": [
                        {
                          "code": 50,
                          "message": "Could not find Seller ID"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "result": {
                        "success": false
                      },
                      "errors": [
                        {
                          "code": 1005,
                          "message": "X-API-Key header is missing, invalid, or associated with a merchant that is no longer active."
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Product not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "result": {
                        "success": false
                      },
                      "errors": [
                        {
                          "code": 24,
                          "message": "The requested entity was not found."
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PlanV2": {
        "type": "object",
        "description": "Plan object returned by the v2 product endpoints. It has no `checkout_link`. `GET /v1/subscriptions/plans` returns the checkout link of a plan.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the plan.",
            "examples": [
              "spl_ba_PpkW16oIW"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the plan.",
            "examples": [
              "Monthly"
            ]
          },
          "sku": {
            "type": "string",
            "description": "SKU of the plan.",
            "examples": [
              "CANVAS-AI-PRO-MONTHLY"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00Z"
            ]
          },
          "frequency": {
            "type": "integer",
            "format": "int64",
            "description": "Number of `frequency_unit` periods between renewals.",
            "examples": [
              1
            ]
          },
          "frequency_unit": {
            "type": "string",
            "description": "Unit of frequency.",
            "enum": [
              "day",
              "week",
              "month",
              "year",
              "one_time"
            ],
            "examples": [
              "month"
            ]
          },
          "base_price": {
            "type": "integer",
            "format": "int64",
            "description": "Base price stored on the plan, as an integer in minor units of `currency`. `0` on a plan with no base price. Renewals are not billed from this field.",
            "examples": [
              0
            ]
          },
          "product_id": {
            "type": "string",
            "description": "ID of the product associated with the plan.",
            "examples": [
              "sp_Tlj0Osm0N76T"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ],
            "description": "Status of the plan.",
            "examples": [
              "active"
            ]
          },
          "currency": {
            "type": "string",
            "description": "ISO4217 currency code of the plan. Absent on a plan that stores no currency.",
            "examples": [
              "USD"
            ]
          },
          "initial_period": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanInitialPeriod"
              }
            ],
            "description": "Present only when the plan has an initial period."
          },
          "trial": {
            "description": "Bolt Cart divisions only. `null` when the plan has no trial. Absent on other divisions.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlanTrial"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PlanInitialPeriod": {
        "type": "object",
        "description": "Duration of the initial period before the subscription moves to the plan's regular frequency.",
        "required": [
          "frequency",
          "frequency_unit"
        ],
        "properties": {
          "frequency": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 32767,
            "description": "Number of units the initial period lasts.",
            "examples": [
              2
            ]
          },
          "frequency_unit": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "description": "Unit of the initial period.",
            "examples": [
              "week"
            ]
          }
        }
      },
      "PlanTrial": {
        "type": "object",
        "description": "Free trial on a plan. Bolt Cart divisions only.",
        "required": [
          "trial_days"
        ],
        "properties": {
          "trial_days": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "maximum": 730,
            "description": "Length of the trial in days.",
            "examples": [
              14
            ]
          }
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "description": "Standard error envelope returned by every non-2xx response.",
        "required": [
          "result",
          "errors"
        ],
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Always `false` on an error.",
                "examples": [
                  false
                ]
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        },
        "examples": [
          {
            "result": {
              "success": false
            },
            "errors": [
              {
                "code": 15,
                "message": "A valid value must be provided.",
                "field": "frequency"
              }
            ]
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "description": "One error of a failed request.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Bolt error code.",
            "examples": [
              15
            ]
          },
          "message": {
            "type": "string",
            "description": "What went wrong.",
            "examples": [
              "A valid value must be provided."
            ]
          },
          "field": {
            "type": "string",
            "description": "Path of the request field the error is about, such as `product.taxable` or `plans[1].sku`. Absent when the error is not about one field.",
            "examples": [
              "frequency"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard. Send it together with `X-Publishable-Key`."
      },
      "X-Publishable-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Publishable-Key",
        "description": "The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard. Required. Send it together with `X-API-Key`."
      }
    }
  }
}
```
