Zum Hauptinhalt springen
GET
/
api
/
plans
List plans
curl --request GET \
  --url https://coreapi.io/api/plans \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "1280792f-4e23-793d-8e9c-3a1bf36630bd",
      "code": "pro-plan",
      "name": "Pro Plan",
      "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
  }
}

Autorisierungen

Authorization
string
header
erforderlich

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

Abfrageparameter

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
code
string

Filter by a code substring.

sort
enum<string>
Verfügbare Optionen:
updatedAt,
createdAt,
code,
name
order
enum<string>
Verfügbare Optionen:
asc,
desc
cursor
string
limit
integer
Standard:20
page
integer

Switches to page based pagination.

Antwort

A paginated list of plans.

data
object[]
meta
object
pagination
object

Pagination metadata. Cursor based fields are present for the default cursor mode, page based fields are present when you pass page or offset.