List active plans for the default or specified product
Resolves Product.is_default if no product (id/slug) is provided. Requires x-app-id (APP_ID).
GET
/
v1
/
pricing
/
plans
List active plans for the default or specified product
curl --request GET \
--url https://api.kerne.io/v1/pricing/plans \
--header 'x-app-id: <api-key>'import requests
url = "https://api.kerne.io/v1/pricing/plans"
headers = {"x-app-id": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-app-id': '<api-key>'}};
fetch('https://api.kerne.io/v1/pricing/plans', 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://api.kerne.io/v1/pricing/plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-app-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kerne.io/v1/pricing/plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-app-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kerne.io/v1/pricing/plans")
.header("x-app-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kerne.io/v1/pricing/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-app-id"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"is_default": true,
"trial_days": 123,
"sort_order": 123,
"highlight": "RECOMMENDED",
"contact_sales": true,
"prices": [
{
"id": "<string>",
"slug": "<string>",
"amount": 123,
"currency": "<string>",
"interval": "<string>",
"trial_days": 123,
"label": {
"slug": "<string>",
"name": "<string>",
"sort_order": 123,
"display_interval": "<string>"
}
}
],
"entitlements": [
{
"feature_key": "<string>",
"feature_name": "<string>",
"feature_type": "<string>",
"unit_label": "<string>",
"limit": 123,
"value": "<string>",
"overage": "BLOCK",
"limit_binding": "CUSTOMER",
"dimension_key": "<string>",
"quota_period": "<string>",
"reset_policy": "<string>",
"overage_cap_amount": 123,
"meter": {
"pricing": {
"transform": {
"block_size": 123,
"mode": "blocks",
"round": "up",
"block_label": "<string>"
},
"selection": {
"kind": "flat",
"unit_amount": 123,
"tiers": [
{
"up_to": 123,
"unit_amount": 123
}
]
},
"currency": "<string>"
}
},
"drivers": [
{
"interval": "<string>",
"step_units": 123,
"max_steps": 123,
"pricing": {
"transform": {
"block_size": 123,
"mode": "blocks",
"round": "up",
"block_label": "<string>"
},
"selection": {
"kind": "flat",
"unit_amount": 123,
"tiers": [
{
"up_to": 123,
"unit_amount": 123
}
]
},
"currency": "<string>"
}
}
]
}
]
}
]Authorizations
App identifier (App.id, sent as the x-app-id header)
Query Parameters
Response
200 - application/json
Active plans retrieved successfully
Available options:
RECOMMENDED, MOST_SUBSCRIBED Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
List active plans for the default or specified product
curl --request GET \
--url https://api.kerne.io/v1/pricing/plans \
--header 'x-app-id: <api-key>'import requests
url = "https://api.kerne.io/v1/pricing/plans"
headers = {"x-app-id": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-app-id': '<api-key>'}};
fetch('https://api.kerne.io/v1/pricing/plans', 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://api.kerne.io/v1/pricing/plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-app-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kerne.io/v1/pricing/plans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-app-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kerne.io/v1/pricing/plans")
.header("x-app-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kerne.io/v1/pricing/plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-app-id"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"is_default": true,
"trial_days": 123,
"sort_order": 123,
"highlight": "RECOMMENDED",
"contact_sales": true,
"prices": [
{
"id": "<string>",
"slug": "<string>",
"amount": 123,
"currency": "<string>",
"interval": "<string>",
"trial_days": 123,
"label": {
"slug": "<string>",
"name": "<string>",
"sort_order": 123,
"display_interval": "<string>"
}
}
],
"entitlements": [
{
"feature_key": "<string>",
"feature_name": "<string>",
"feature_type": "<string>",
"unit_label": "<string>",
"limit": 123,
"value": "<string>",
"overage": "BLOCK",
"limit_binding": "CUSTOMER",
"dimension_key": "<string>",
"quota_period": "<string>",
"reset_policy": "<string>",
"overage_cap_amount": 123,
"meter": {
"pricing": {
"transform": {
"block_size": 123,
"mode": "blocks",
"round": "up",
"block_label": "<string>"
},
"selection": {
"kind": "flat",
"unit_amount": 123,
"tiers": [
{
"up_to": 123,
"unit_amount": 123
}
]
},
"currency": "<string>"
}
},
"drivers": [
{
"interval": "<string>",
"step_units": 123,
"max_steps": 123,
"pricing": {
"transform": {
"block_size": 123,
"mode": "blocks",
"round": "up",
"block_label": "<string>"
},
"selection": {
"kind": "flat",
"unit_amount": 123,
"tiers": [
{
"up_to": 123,
"unit_amount": 123
}
]
},
"currency": "<string>"
}
}
]
}
]
}
]
