List plans
curl --request GET \
--url https://coreapi.io/api/plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/plans"
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', 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",
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;
}{
"data": [
{
"id": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
"code": "pro-plan",
"name": "Pro Plan",
"status": "draft",
"currency": "EUR",
"tierCount": 3,
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"count": 123,
"total": 123
},
"pagination": {
"cursor": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"prevCursor": "<string>",
"limit": 20,
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"totalPages": 123,
"pageTotalItems": 123
}
}{
"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
List plans
List the plans of your Organisation. Without a status filter all statuses are returned. Supports cursor based pagination by default and page based pagination when you pass page or offset.
GET
/
api
/
plans
List plans
curl --request GET \
--url https://coreapi.io/api/plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/plans"
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', 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",
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;
}{
"data": [
{
"id": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
"code": "pro-plan",
"name": "Pro Plan",
"status": "draft",
"currency": "EUR",
"tierCount": 3,
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"count": 123,
"total": 123
},
"pagination": {
"cursor": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"prevCursor": "<string>",
"limit": 20,
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"totalPages": 123,
"pageTotalItems": 123
}
}{
"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.
Abfrageparameter
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 Filter by a code substring.
Verfügbare Optionen:
updatedAt, createdAt, code, name Verfügbare Optionen:
asc, desc Switches to page based pagination.
War diese Seite hilfreich?