---
title: "Update Plan"
method: PATCH
path: "/api/v1/admin/plans/{id}"
tags: ["Plans"]
---

# Update Plan

`PATCH /api/v1/admin/plans/{id}`

## Path parameters

- `id` string, required

## Request body

- union
  - object
    - `slug` string
    - `primaryLocale` 'zh' | 'en'
    - `supportedLocales` string[]
    - `translations` object — Translations by locale key (e.g. { zh: {...}, en: {...} })
    - `currency` string
    - `priceCents` integer
    - `billingCycle` string
    - `features` object
    - `purchaseFormFieldIds` integer[]
    - `certificateTemplateId` unknown
  - string — JSON string of update object

## Response `200`

Updated

- object — Updated
  - `success` boolean, required
  - `data` object, required
    - `id` integer
    - `slug` string
    - `primaryLocale` string
    - `supportedLocales` string[]
    - `translations` object
    - `currency` string
    - `priceCents` integer
    - `billingCycle` string
    - `status` 'on_shelf' | 'off_shelf' — on_shelf=上架, off_shelf=下架
    - `hasBeenOrdered` boolean — Whether this plan has been ordered
    - `features` object
    - `highlight` boolean — Whether this plan is highlighted as default on the pricing page
    - `purchaseFormFields` object[]
    - `purchaseFormFieldIds` integer[]
    - `certificateTemplateId` unknown
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400` — Validation failed
- `404` — Plan not found

---

[API](https://skmtc.dev/newapi/apis/qn-platform-api.md) · [All operations](https://skmtc.dev/newapi/apis/qn-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/newapi/qn-platform-api/revisions/d61f11e363ff/schema)
