Skip to main content

Subscription Plans

List subscription plans​

GET /subscription-plans

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/subscription-plans \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Lists subscription plans for an organization. When name is supplied, only the matching plan (if any) is returned. Plan names are unique within an organization.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:subscription_plan:read`, `dp:subscription_plan:manage`

Parameters​

NameInTypeRequiredDescription
namequerystringfalseFilter by exact plan name. Returns an array of zero or one items.

Example responses

200 Response

{
"list": [
{
"id": "string",
"displayName": "string",
"description": "string",
"limits": [
{
"limitType": "REQUEST_COUNT",
"limitCount": 10000,
"timeUnit": "MONTH",
"timeAmount": 1
}
],
"refId": "string",
"orgId": "string",
"createdBy": "[email protected]",
"createdAt": "2026-05-07T08:30:00Z",
"updatedAt": "2026-05-07T08:30:00Z"
}
],
"count": 1,
"pagination": {
"total": 42,
"limit": 20,
"offset": 0
}
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKList of subscription plan DTOs. Empty array when no plans match.Inline
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
» list[SubscriptionPlanResponse]falsenonenone
»» idstringfalsenoneThe plan's handle (unique per org). Not the internal database uuid.
»» displayNamestringfalsenonenone
»» descriptionstringfalsenonenone
»» limits[object]falsenoneRate/quota limits enforced for this plan. Empty when the plan is unlimited.
»»» limitTypestringfalsenonenone
»»» limitCountanyfalsenoneReturned as a string when the stored count exceeds the safe integer range, otherwise a number. Unlimited plans have no limit entries — the limits array is empty.

oneOf

NameTypeRequiredRestrictionsDescription
»»»» anonymousintegerfalsenonenone

xor

NameTypeRequiredRestrictionsDescription
»»»» anonymousstringfalsenonenone

continued

NameTypeRequiredRestrictionsDescription
»»» timeUnitstring¦nullfalsenonenone
»»» timeAmountintegerfalsenonenone
»» refIdstring¦nullfalsenonePlatform API subscription plan UUID associated with this plan.
»» orgIdstringfalsenonenone
»» createdBystringfalsenoneIdentity of the user who created this subscription plan, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses and list items.
»» updatedBystringfalsenoneIdentity of the user who last updated this subscription plan, or deleted_user if that user's IDP reference no longer exists. Present on single-resource GET responses only, omitted on list items.
»» createdAtstring(date-time)falsenonenone
»» updatedAtstring(date-time)falsenonenone
» countintegerfalsenoneNumber of items returned in this page.
» paginationPaginationfalsenoneStandard pagination metadata returned with collection responses.
»» totalintegertruenoneTotal number of records matching the query.
»» limitintegertruenoneMaximum number of records returned in this response.
»» offsetintegertruenoneNumber of records skipped before this page.

Enumerated Values​

PropertyValue
limitTypeREQUEST_COUNT
limitTypeEVENT_COUNT
limitTypeBANDWIDTH
limitTypeTOTAL_TOKEN_COUNT
timeUnitMINUTE
timeUnitHOUR
timeUnitDAY
timeUnitMONTH
timeUnitnull

Enumerated Values​

PropertyValue
statuserror

Create subscription plans​

POST /subscription-plans

Code samples


curl -X POST https://localhost:9543/api-portal/api/v0.9/subscription-plans \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Creates one subscription plan when the request body is an object, or multiple subscription plans when the body is an array. Bulk creation returns a message instead of creating plans when generateDefaultSubPlans is enabled.

Payload

{
"id": "Gold",
"refId": "string",
"displayName": "string",
"description": "string",
"limits": [
{
"limitType": "REQUEST_COUNT",
"limitCount": 10000,
"timeUnit": "MINUTE",
"timeAmount": 1
}
]
}
id: Gold
refId: string
displayName: string
description: string
limits:
- limitType: REQUEST_COUNT
limitCount: 10000
timeUnit: MINUTE
timeAmount: 1

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:subscription_plan:create`, `dp:subscription_plan:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyanytrueSubscription plan payload. Send a single object for single create/upsert, or a non-empty array for bulk create/upsert; each object carries its rate/quota rules in limits. Alternatively, upload a YAML file in the subscriptionPlan multipart field; use kind: SubscriptionPlan for a single plan or kind: SubscriptionPlanList with an items array for bulk operations. YAML uploads may also use the shorthand type: requestcount or type: eventcount shorthand, which is converted into limits before storage.

Example responses

200 Response

{
"message": "string"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKJSON message response.MessageResponse
201CreatedSubscription plan create/update response for single or bulk operations.Inline
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
limitTypeREQUEST_COUNT
limitTypeEVENT_COUNT
limitTypeBANDWIDTH
limitTypeTOTAL_TOKEN_COUNT
timeUnitMINUTE
timeUnitHOUR
timeUnitDAY
timeUnitMONTH
timeUnitnull

Enumerated Values​

PropertyValue
statuserror

Upsert subscription plans​

PUT /subscription-plans

Code samples


curl -X PUT https://localhost:9543/api-portal/api/v0.9/subscription-plans \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Upserts one subscription plan when the request body is an object, or multiple plans when the body is an array. A single plan update returns 200 when an existing plan is updated and 201 when a new plan is created. Bulk updates return a message when generateDefaultSubPlans is enabled.

Payload

{
"id": "Gold",
"refId": "string",
"displayName": "string",
"description": "string",
"limits": [
{
"limitType": "REQUEST_COUNT",
"limitCount": 10000,
"timeUnit": "MINUTE",
"timeAmount": 1
}
]
}
id: Gold
refId: string
displayName: string
description: string
limits:
- limitType: REQUEST_COUNT
limitCount: 10000
timeUnit: MINUTE
timeAmount: 1

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:subscription_plan:update`, `dp:subscription_plan:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyanytrueSubscription plan payload. Send a single object for single create/upsert, or a non-empty array for bulk create/upsert; each object carries its rate/quota rules in limits. Alternatively, upload a YAML file in the subscriptionPlan multipart field; use kind: SubscriptionPlan for a single plan or kind: SubscriptionPlanList with an items array for bulk operations. YAML uploads may also use the shorthand type: requestcount or type: eventcount shorthand, which is converted into limits before storage.

Example responses

200 Response

{
"id": "string",
"displayName": "string",
"description": "string",
"limits": [
{
"limitType": "REQUEST_COUNT",
"limitCount": 10000,
"timeUnit": "MINUTE",
"timeAmount": 1
}
],
"refId": "string",
"orgId": "string",
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKSubscription plan update response. Bulk updates may return a list, and some configurations return a message.Inline
201CreatedSubscription plan create/update response for single or bulk operations.Inline
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
409ConflictThe request conflicts with an existing resource.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
limitTypeREQUEST_COUNT
limitTypeEVENT_COUNT
limitTypeBANDWIDTH
limitTypeTOTAL_TOKEN_COUNT
timeUnitMINUTE
timeUnitHOUR
timeUnitDAY
timeUnitMONTH
timeUnitnull

Enumerated Values​

PropertyValue
limitTypeREQUEST_COUNT
limitTypeEVENT_COUNT
limitTypeBANDWIDTH
limitTypeTOTAL_TOKEN_COUNT
timeUnitMINUTE
timeUnitHOUR
timeUnitDAY
timeUnitMONTH
timeUnitnull

Enumerated Values​

PropertyValue
statuserror

Get a subscription plan​

GET /subscription-plans/{planId}

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/subscription-plans/{planId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieves a single subscription plan by planId.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:subscription_plan:read`, `dp:subscription_plan:manage`

Parameters​

NameInTypeRequiredDescription
planIdpathstringtrueThe subscription plan's handle (unique per org).

Example responses

200 Response

{
"id": "string",
"displayName": "string",
"description": "string",
"limits": [
{
"limitType": "REQUEST_COUNT",
"limitCount": 10000,
"timeUnit": "MINUTE",
"timeAmount": 1
}
],
"refId": "string",
"orgId": "string",
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKSubscription plan DTO.SubscriptionPlanResponse
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Delete a subscription plan​

DELETE /subscription-plans/{planId}

Code samples


curl -X DELETE https://localhost:9543/api-portal/api/v0.9/subscription-plans/{planId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Deletes a subscription plan by planId.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:subscription_plan:delete`, `dp:subscription_plan:manage`

Parameters​

NameInTypeRequiredDescription
planIdpathstringtrueThe subscription plan's handle (unique per org).

Example responses

Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
204No ContentSubscription plan deleted successfully.None
400Bad RequestBad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object.Inline
404Not FoundResource not found.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Was this page helpful?