> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unibee.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Plan List

## Endpoint Overview

**GET** `https://api.unibee.dev/merchant/plan/list`

Get Plan List

***

## Authorization

All UniBee Merchant API requests require authentication via API key.

| Header          | Required | Description                           |
| --------------- | -------- | ------------------------------------- |
| `Authorization` | Yes      | Bearer `<your_api_key>`               |
| `Content-Type`  | Yes      | `application/json` (for request body) |

***

## Parameters

Parameters for this endpoint are listed below. The schema is also shown in the Try it panel.

### Query parameters

| Name                 | Type    | Required | Description                                                                                            |
| -------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `planIds`            | array   | No       | filter id list of plan, default all                                                                    |
| `productIds`         | array   | No       | filter id list of product, default all product(0) used if not specified                                |
| `type`               | array   | No       | 1-main plan，2-addon plan,3-onetime                                                                     |
| `status`             | array   | No       | Filter, Default All，,Status，1-Editing，2-Active，3-InActive，4-SoftArchive, 5-HardArchive                 |
| `publishStatus`      | integer | No       | Filter, Default All，PublishStatus，1-UnPublished，2-Published                                            |
| `currency`           | string  | No       | Filter Currency                                                                                        |
| `intervalUnits`      | array   | No       | Filter by interval unit (day\|week\|month\|year); ignored when billingIntervalMin is provided          |
| `intervalCounts`     | array   | No       | Filter by interval count; ignored when billingIntervalMin is provided                                  |
| `billingIntervalMin` | string  | No       | Minimum billing interval in ISO 8601 duration (date part only, Y/M/W/D), e.g. P1M, P6M, P1Y, P2W, P10D |
| `searchKey`          | string  | No       | Search Key, plan name or description                                                                   |
| `sortField`          | string  | No       | Sort Field，plan\_name\|gmt\_create\|gmt\_modify，Default gmt\_create                                    |
| `sortType`           | string  | No       | Sort Type，asc\|desc，Default desc                                                                       |
| `page`               | integer | No       | Page, Start 0                                                                                          |
| `count`              | integer | No       | Count Of Per Page, Default 100                                                                         |

***

## Request examples

### cURL

```bash theme={null}
curl -X GET "https://api.unibee.dev/merchant/plan/list" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
```

### Sandbox

```bash theme={null}
curl -X GET "https://api-sandbox.unibee.top/merchant/plan/list" \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json"
```

***

## Response

Success responses return a JSON envelope with `code`, `data`, `message`, `redirect`, and `requestId`. `code` `0` indicates success.

| Field        | Type    | Description                  |
| ------------ | ------- | ---------------------------- |
| `code`       | integer | Response code. `0` = success |
| `data`       | object  | Response payload             |
| `data.plans` | array   | Plans                        |
| `data.total` | integer | Total                        |
| `message`    | string  | Human-readable message       |
| `requestId`  | string  | Request ID for support       |

***

## Error handling

| HTTP status | Meaning                                                                   |
| ----------- | ------------------------------------------------------------------------- |
| 400         | Bad request — invalid or missing parameters. Check `message` in the body. |
| 401         | Unauthorized — missing or invalid API key.                                |
| 404         | Not found — invalid path or resource.                                     |
| 500         | Server error — retry with backoff.                                        |

When `code` in the response body is non-zero, check `message` for details. Use `requestId` when contacting support.


## OpenAPI

````yaml get /merchant/plan/list
openapi: 3.0.0
info:
  description: UniBee Api Server
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: OpenAPI UniBee
  version: daily,buildtime:202603161017
servers:
  - url: https://api.unibee.dev
  - url: https://api-sandbox.unibee.top
security:
  - Authorization: []
paths:
  /merchant/plan/list:
    get:
      tags:
        - Plan
      summary: Get Plan List
      parameters:
        - description: filter id list of plan, default all
          in: query
          name: planIds
          schema:
            description: filter id list of plan, default all
            format: '[]int64'
            items:
              format: int64
              properties: {}
              type: integer
            properties: {}
            type: array
        - description: >-
            filter id list of product, default all product(0) used if not
            specified
          in: query
          name: productIds
          schema:
            description: >-
              filter id list of product, default all product(0) used if not
              specified
            format: '[]int64'
            items:
              format: int64
              properties: {}
              type: integer
            properties: {}
            type: array
        - description: 1-main plan，2-addon plan,3-onetime
          in: query
          name: type
          schema:
            description: 1-main plan，2-addon plan,3-onetime
            format: '[]int'
            items:
              format: int
              properties: {}
              type: integer
            properties: {}
            type: array
        - description: >-
            Filter, Default
            All，,Status，1-Editing，2-Active，3-InActive，4-SoftArchive,
            5-HardArchive
          in: query
          name: status
          schema:
            description: >-
              Filter, Default
              All，,Status，1-Editing，2-Active，3-InActive，4-SoftArchive,
              5-HardArchive
            format: '[]int'
            items:
              format: int
              properties: {}
              type: integer
            properties: {}
            type: array
        - description: Filter, Default All，PublishStatus，1-UnPublished，2-Published
          in: query
          name: publishStatus
          schema:
            description: Filter, Default All，PublishStatus，1-UnPublished，2-Published
            format: int
            properties: {}
            type: integer
        - description: Filter Currency
          in: query
          name: currency
          schema:
            description: Filter Currency
            format: string
            properties: {}
            type: string
        - description: >-
            Filter by interval unit (day|week|month|year); ignored when
            billingIntervalMin is provided
          in: query
          name: intervalUnits
          schema:
            description: >-
              Filter by interval unit (day|week|month|year); ignored when
              billingIntervalMin is provided
            format: '[]string'
            items:
              format: string
              properties: {}
              type: string
            properties: {}
            type: array
        - description: >-
            Filter by interval count; ignored when billingIntervalMin is
            provided
          in: query
          name: intervalCounts
          schema:
            description: >-
              Filter by interval count; ignored when billingIntervalMin is
              provided
            format: '[]int'
            items:
              format: int
              properties: {}
              type: integer
            properties: {}
            type: array
        - description: >-
            Minimum billing interval in ISO 8601 duration (date part only,
            Y/M/W/D), e.g. P1M, P6M, P1Y, P2W, P10D
          in: query
          name: billingIntervalMin
          schema:
            description: >-
              Minimum billing interval in ISO 8601 duration (date part only,
              Y/M/W/D), e.g. P1M, P6M, P1Y, P2W, P10D
            format: string
            properties: {}
            type: string
        - description: Search Key, plan name or description
          in: query
          name: searchKey
          schema:
            description: Search Key, plan name or description
            format: string
            properties: {}
            type: string
        - description: Sort Field，plan_name|gmt_create|gmt_modify，Default gmt_create
          in: query
          name: sortField
          schema:
            description: Sort Field，plan_name|gmt_create|gmt_modify，Default gmt_create
            format: string
            properties: {}
            type: string
        - description: Sort Type，asc|desc，Default desc
          in: query
          name: sortType
          schema:
            description: Sort Type，asc|desc，Default desc
            format: string
            properties: {}
            type: string
        - description: Page, Start 0
          in: query
          name: page
          schema:
            description: Page, Start 0
            format: int
            properties: {}
            type: integer
        - description: Count Of Per Page, Default 100
          in: query
          name: count
          schema:
            description: Count Of Per Page, Default 100
            format: int
            properties: {}
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      plans:
                        description: Plans
                        format: '[]*detail.PlanDetail'
                        items:
                          $ref: >-
                            #/components/schemas/unibee.api.bean.detail.PlanDetail
                        properties: {}
                        type: array
                      total:
                        description: Total
                        format: int
                        properties: {}
                        type: integer
                    type: object
                  merchantId:
                    format: int64
                    properties: {}
                    type: integer
                  message:
                    format: string
                    properties: {}
                    type: string
                  redirect:
                    format: string
                    properties: {}
                    type: string
                  requestId:
                    format: string
                    properties: {}
                    type: string
                type: object
          description: ''
components:
  schemas:
    unibee.api.bean.detail.PlanDetail:
      properties:
        addonIds:
          description: AddonIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        addons:
          description: Addons
          format: '[]*bean.Plan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Plan'
          properties: {}
          type: array
        checkAddressViaGateway:
          format: bool
          properties: {}
          type: boolean
        globalUSVATActive:
          format: bool
          properties: {}
          type: boolean
        metricMeteredCharge:
          description: Plan's MetricMeteredCharge
          format: '[]*detail.MerchantMetricPlanChargeDetail'
          items:
            $ref: >-
              #/components/schemas/unibee.api.bean.detail.MerchantMetricPlanChargeDetail
          properties: {}
          type: array
        metricPlanLimits:
          description: MetricPlanLimits
          format: '[]*detail.MerchantMetricPlanLimitDetail'
          items:
            $ref: >-
              #/components/schemas/unibee.api.bean.detail.MerchantMetricPlanLimitDetail
          properties: {}
          type: array
        metricRecurringCharge:
          description: Plan's MetricRecurringCharge
          format: '[]*detail.MerchantMetricPlanChargeDetail'
          items:
            $ref: >-
              #/components/schemas/unibee.api.bean.detail.MerchantMetricPlanChargeDetail
          properties: {}
          type: array
        onetimeAddonIds:
          description: OneTimeAddonIds
          format: '[]int64'
          items:
            format: int64
            properties: {}
            type: integer
          properties: {}
          type: array
        onetimeAddons:
          description: OneTimeAddons
          format: '[]*bean.Plan'
          items:
            $ref: '#/components/schemas/unibee.api.bean.Plan'
          properties: {}
          type: array
        plan:
          $ref: '#/components/schemas/unibee.api.bean.Plan'
        product:
          $ref: '#/components/schemas/unibee.api.bean.Product'
        sellOnUSOnly:
          description: >-
            SellOnUSOnly, customer must select US Country And provider US
            Address when its true
          format: bool
          properties: {}
          type: boolean
      type: object
    unibee.api.bean.Plan:
      properties:
        amount:
          description: amount, cent, without tax
          format: int64
          properties: {}
          type: integer
        bindingAddonIds:
          description: binded recurring addon planIds，split with ,
          format: string
          properties: {}
          type: string
        bindingOnetimeAddonIds:
          description: binded onetime addon planIds，split with ,
          format: string
          properties: {}
          type: string
        cancelAtTrialEnd:
          description: >-
            whether cancel at subscription first trial end，0-false | 1-true,
            will pass to cancelAtPeriodEnd of subscription
          format: int
          properties: {}
          type: integer
        checkoutUrl:
          description: CheckoutUrl
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        description:
          description: description
          format: string
          properties: {}
          type: string
        disableAutoCharge:
          description: disable auto-charge, 0-false,1-true
          format: int
          properties: {}
          type: integer
        externalPlanId:
          description: external_user_id
          format: string
          properties: {}
          type: string
        extraMetricData:
          format: string
          properties: {}
          type: string
        gasPayer:
          description: who pay the gas, merchant|user
          format: string
          properties: {}
          type: string
        homeUrl:
          description: home_url
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        imageUrl:
          description: image_url
          format: string
          properties: {}
          type: string
        internalName:
          description: PlanInternalName
          format: string
          properties: {}
          type: string
        intervalCount:
          description: period unit count
          format: int
          properties: {}
          type: integer
        intervalUnit:
          description: period unit,day|month|year|week
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        metricLimits:
          description: Plan's MetricLimit List
          format: '[]*bean.PlanMetricLimitParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricLimitParam'
          properties: {}
          type: array
        metricMeteredCharge:
          description: Plan's MetricMeteredCharge
          format: '[]*bean.PlanMetricMeteredChargeParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
          properties: {}
          type: array
        metricRecurringCharge:
          description: Plan's MetricRecurringCharge
          format: '[]*bean.PlanMetricMeteredChargeParam'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMetricMeteredChargeParam'
          properties: {}
          type: array
        multiCurrencies:
          description: Plan's MultiCurrencies
          format: '[]*bean.PlanMultiCurrency'
          items:
            $ref: '#/components/schemas/unibee.api.bean.PlanMultiCurrency'
          properties: {}
          type: array
        planName:
          description: PlanName
          format: string
          properties: {}
          type: string
        productId:
          description: product id
          format: int64
          properties: {}
          type: integer
        publishStatus:
          description: 1-UnPublish,2-Publish, Use For Display Plan At UserPortal
          format: int
          properties: {}
          type: integer
        status:
          description: status，1-editing，2-active，3-inactive，4-soft archive, 5-hard archive
          format: int
          properties: {}
          type: integer
        taxPercentage:
          description: TaxPercentage 1000 = 10%
          format: int
          properties: {}
          type: integer
        trialAmount:
          description: price of trial period
          format: int64
          properties: {}
          type: integer
        trialDemand:
          format: string
          properties: {}
          type: string
        trialDurationTime:
          description: duration of trial
          format: int64
          properties: {}
          type: integer
        type:
          description: type，1-main plan，2-addon plan
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      type: object
    unibee.api.bean.detail.MerchantMetricPlanChargeDetail:
      properties:
        chargeType:
          description: ChargeType,0-standard pricing 1-graduated pricing
          format: int
          properties: {}
          type: integer
        graduatedAmounts:
          description: GraduatedAmounts
          format: '[]*bean.MetricPlanChargeGraduatedStep'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
          properties: {}
          type: array
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        standardAmount:
          description: StandardAmount, used for standard pricing,cent
          format: int64
          properties: {}
          type: integer
        standardStartValue:
          description: StandardStartValue, used for standard pricing
          format: int64
          properties: {}
          type: integer
      required:
        - metricId
      type: object
    unibee.api.bean.detail.MerchantMetricPlanLimitDetail:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gmtModify:
          description: update time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        merchantMetric:
          $ref: '#/components/schemas/unibee.api.bean.MerchantMetric'
        metricId:
          description: metricId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: plan metric limit
          format: int64
          properties: {}
          type: integer
        planId:
          description: plan_id
          format: int64
          properties: {}
          type: integer
        quantity:
          description: quantity for this plan
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.Product:
      properties:
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        description:
          description: description
          format: string
          properties: {}
          type: string
        homeUrl:
          description: home_url
          format: string
          properties: {}
          type: string
        id:
          format: int64
          properties: {}
          type: integer
        imageUrl:
          description: image_url
          format: string
          properties: {}
          type: string
        isDeleted:
          description: 0-UnDeleted，1-Deleted
          format: int
          properties: {}
          type: integer
        merchantId:
          description: merchant id
          format: int64
          properties: {}
          type: integer
        metaData:
          description: meta_data(json)
          format: string
          properties: {}
          type: string
        productName:
          description: PlanName
          format: string
          properties: {}
          type: string
        status:
          description: status，1-active，2-inactive, default active
          format: int
          properties: {}
          type: integer
        usVATConfig:
          $ref: '#/components/schemas/unibee.api.bean.USVATConfig'
      type: object
    interface:
      properties: {}
      type: object
    unibee.api.bean.PlanMetricLimitParam:
      properties:
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        metricLimit:
          description: MetricLimit
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMetricMeteredChargeParam:
      properties:
        chargeType:
          description: ChargeType,0-standard pricing 1-graduated pricing
          format: int
          properties: {}
          type: integer
        graduatedAmounts:
          description: GraduatedAmounts, used for graduated pricing
          format: '[]*bean.MetricPlanChargeGraduatedStep'
          items:
            $ref: '#/components/schemas/unibee.api.bean.MetricPlanChargeGraduatedStep'
          properties: {}
          type: array
        metricId:
          description: MetricId
          format: int64
          properties: {}
          type: integer
        standardAmount:
          description: StandardAmount, cent, used for standard pricing,cent
          format: int64
          properties: {}
          type: integer
        standardStartValue:
          description: StandardStartValue, used for standard pricing
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.PlanMultiCurrency:
      properties:
        amount:
          description: the amount of exchange rate
          format: int64
          properties: {}
          type: integer
        autoExchange:
          description: >-
            using https://app.exchangerate-api.com/ to update exchange rate if
            true, the exchange APIKey need setup first
          format: bool
          properties: {}
          type: boolean
        currency:
          description: target currency
          format: string
          properties: {}
          type: string
        disable:
          description: disable currency exchange
          format: bool
          properties: {}
          type: boolean
        exchangeRate:
          description: exchange rate, no setup required if AutoExchange is true
          format: float64
          properties: {}
          type: number
      type: object
    unibee.api.bean.USVATConfig:
      properties:
        active:
          format: bool
          properties: {}
          type: boolean
        fromAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
        nexusAddresses:
          format: '[]*bean.USAddress'
          items:
            $ref: '#/components/schemas/unibee.api.bean.USAddress'
          properties: {}
          type: array
        sellOnUSOnly:
          format: bool
          properties: {}
          type: boolean
        taxCode:
          format: string
          properties: {}
          type: string
        toAddress:
          $ref: '#/components/schemas/unibee.api.bean.USAddress'
      type: object
    unibee.api.bean.MetricPlanChargeGraduatedStep:
      properties:
        endValue:
          description: EndValue, -1 = infinity value(∞)
          format: int64
          properties: {}
          type: integer
        flatAmount:
          description: FlatAmount,cent
          format: int64
          properties: {}
          type: integer
        perAmount:
          description: PerAmount,cent
          format: int64
          properties: {}
          type: integer
        startValue:
          description: StartValue
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.MerchantMetric:
      properties:
        aggregationProperty:
          description: aggregation property
          format: string
          properties: {}
          type: string
        aggregationType:
          description: 1-count，2-count unique, 3-latest, 4-max, 5-sum
          format: int
          properties: {}
          type: integer
        archived:
          description: archived
          format: bool
          properties: {}
          type: boolean
        carryoverProrationEnabled:
          description: Enable carryover proration for this metric (false when not set)
          format: bool
          properties: {}
          type: boolean
        code:
          description: code
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        gmtModify:
          description: update time
          format: int64
          properties: {}
          type: integer
        id:
          description: id
          format: int64
          properties: {}
          type: integer
        merchantId:
          description: merchantId
          format: int64
          properties: {}
          type: integer
        metaData:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: meta_data(json)
          format: map[string]interface {}
          properties: {}
          type: object
        metricDescription:
          description: metric description
          format: string
          properties: {}
          type: string
        metricName:
          description: metric name
          format: string
          properties: {}
          type: string
        prorationRefundEnabled:
          description: >-
            Enable proration refund for this metric, i.e. reclaim metric limit
            on upgrade (false when not set)
          format: bool
          properties: {}
          type: boolean
        type:
          description: 1-limit_metered，2-charge_metered,3-charge_recurring
          format: int
          properties: {}
          type: integer
        unit:
          description: unit
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.USAddress:
      properties:
        address:
          format: string
          properties: {}
          type: string
        city:
          format: string
          properties: {}
          type: string
        countryCode:
          format: string
          properties: {}
          type: string
        state:
          format: string
          properties: {}
          type: string
        verified:
          format: bool
          properties: {}
          type: boolean
        zipCode:
          format: string
          properties: {}
          type: string
      type: object
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````