Retrieve a plan
curl --request GET \
--url https://coreapi.io/api/plans/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/plans/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/plans/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/api/plans/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
"code": "pro-plan",
"name": "Pro Plan",
"status": "draft",
"currency": "EUR",
"tiers": [
{
"id": "<string>",
"position": 1,
"name": "Pro",
"upgradeable": true,
"downgradeable": true,
"changeTiming": "immediately",
"creditType": "pro_rata",
"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"
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}Plan-Verwaltung
Retrieve a plan
Retrieve a single plan with all tiers and items.
GET
/
api
/
plans
/
{id}
Retrieve a plan
curl --request GET \
--url https://coreapi.io/api/plans/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/plans/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/plans/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/api/plans/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
"code": "pro-plan",
"name": "Pro Plan",
"status": "draft",
"currency": "EUR",
"tiers": [
{
"id": "<string>",
"position": 1,
"name": "Pro",
"upgradeable": true,
"downgradeable": true,
"changeTiming": "immediately",
"creditType": "pro_rata",
"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"
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}{
"status": 404,
"type": "PLAN__NOT_FOUND",
"title": "An error occurred",
"detail": "Plan not found."
}Autorisierungen
Organisation API token. Send it as Authorization: Bearer api_... The token is scoped to a single Organisation.
Pfadparameter
The plan UUID.
Beispiel:
"1280792f-4e23-793d-8e9c-3a1bf36630bd"
Antwort
The plan.
Beispiel:
"1280792f-4e23-793d-8e9c-3a1bf36630bd"
Beispiel:
"pro-plan"
Beispiel:
"Pro Plan"
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 derived from the price plans, null when the plan has no items yet.
Beispiel:
"EUR"
Show child attributes
Show child attributes
War diese Seite hilfreich?