Zum Hauptinhalt springen
POST
/
api
/
plans
/
{id}
/
activate
Activate a plan
curl --request POST \
  --url https://coreapi.io/api/plans/{id}/activate \
  --header 'Authorization: Bearer <token>'
{
  "id": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
  "code": "pro-plan",
  "name": "Pro Plan",
  "currency": "EUR",
  "tiers": [
    {
      "id": "<string>",
      "position": 1,
      "name": "Pro",
      "upgradeable": true,
      "downgradeable": true,
      "commitmentPeriod": "P1Y",
      "items": [
        {
          "id": "<string>",
          "productId": "<string>",
          "productName": "Add-On",
          "pricePlanId": "<string>",
          "pricePlanName": "Add-On Monthly",
          "currency": "EUR",
          "defaultQuantity": 1,
          "minQuantity": 123,
          "maxQuantity": 123
        }
      ]
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Autorisierungen

Authorization
string
header
erforderlich

Organisation API token. Send it as Authorization: Bearer api_... The token is scoped to a single Organisation.

Pfadparameter

id
string<uuid>
erforderlich

The plan UUID.

Beispiel:

"1280792f-4e23-793d-8e9c-3a1bf36630bd"

Antwort

The activated plan.

id
string<uuid>
Beispiel:

"1280792f-4e23-793d-8e9c-3a1bf36630bd"

code
string
Beispiel:

"pro-plan"

name
string
Beispiel:

"Pro Plan"

status
enum<string>

Lifecycle status. A plan is created as draft, becomes active once you activate it, and can later be archived. Only active plans can be sold or switched into.

Verfügbare Optionen:
draft,
active,
archived
currency
string | null

Currency derived from the price plans, null when the plan has no items yet.

Beispiel:

"EUR"

tiers
object[]
createdAt
string<date-time>
updatedAt
string<date-time>