Pricing Catalog

Manage the platform pricing catalog used for public price snapshots.

Internal management API. These endpoints are authenticated via TutorFlow admin auth, not via Platform API keys.

GET /v1/platform/pricing-catalog

List all pricing catalog entries.

Example Request

curl https://api.tutorflow.io/v1/platform/pricing-catalog \
  -H "Authorization: Bearer tf_platform_..."

Response

[
  {
    "id": "uuid",
    "category": "evaluation",
    "tier": "standard",
    "catalogKey": "evaluation.standard",
    "amountUsd": 0.15,
    "unit": "per evaluation",
    "currency": "USD",
    "source": "platform_pricing_catalog_v1",
    "stripeLookupKey": null,
    "stripeMeterEventName": null,
    "isActive": true,
    "createdAt": "2025-01-15T10:00:00Z",
    "updatedAt": "2025-01-15T10:00:00Z"
  }
]

GET /v1/platform/pricing-catalog/:category/:tier

Get a single pricing catalog entry by category and tier.

Path Parameters

ParameterTypeDescription
categorystringPricing category (e.g., evaluation, course_creation)
tierstringTier level (e.g., fast, standard, advanced)

Example Request

curl https://api.tutorflow.io/v1/platform/pricing-catalog/evaluation/standard \
  -H "Authorization: Bearer tf_platform_..."

Response

Returns a single pricing catalog entry (same schema as the list items above).


PUT /v1/platform/pricing-catalog/:category/:tier

Create or update a pricing catalog entry. If an entry with the given category and tier already exists, it is updated. Otherwise a new entry is created.

Path Parameters

ParameterTypeDescription
categorystringPricing category (e.g., evaluation, course_creation)
tierstringTier level (e.g., fast, standard, advanced)

Request Body

FieldTypeRequiredDescription
categorystringYesPricing category
tierstringYesTier level
catalogKeystringNoExplicit catalog key. Defaults to category.tier
amountUsdnumberYesPublic billable amount in USD
unitstringNoUnit label (e.g., per evaluation)
currencystringNoCurrency code. Defaults to USD
sourcestringNoSnapshot source marker. Defaults to platform_pricing_catalog_v1
stripeLookupKeystringNoStripe lookup key for billing alignment
stripeMeterEventNamestringNoStripe meter event name for usage-based billing
isActivebooleanNoWhether the entry is active. Defaults to true

Example Request

curl -X PUT https://api.tutorflow.io/v1/platform/pricing-catalog/evaluation/standard \
  -H "Authorization: Bearer tf_platform_..." \
  -H "Content-Type: application/json" \
  -d '{
    "category": "evaluation",
    "tier": "standard",
    "amountUsd": 0.15,
    "unit": "per evaluation",
    "isActive": true
  }'

Response

Returns the created or updated pricing catalog entry.

{
  "id": "uuid",
  "category": "evaluation",
  "tier": "standard",
  "catalogKey": "evaluation.standard",
  "amountUsd": 0.15,
  "unit": "per evaluation",
  "currency": "USD",
  "source": "platform_pricing_catalog_v1",
  "stripeLookupKey": null,
  "stripeMeterEventName": null,
  "isActive": true,
  "createdAt": "2025-01-15T10:00:00Z",
  "updatedAt": "2025-01-15T10:00:00Z"
}