openapi: 3.0.0 info: title: Schematic accesstokens components API version: '0.1' description: Schematic API x-rules-engine-schema-version: v97288f60 servers: - url: https://api.schematichq.com security: - ApiKeyAuth: [] tags: - name: components paths: /components: get: operationId: listComponents summary: List components tags: - components parameters: - name: q in: query schema: type: string maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/ComponentResponseData' title: ListComponentsResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' q: type: string maxLength: 512 title: ListComponentsParams required: - data - params title: ListComponentsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' post: operationId: createComponent summary: Create component tags: - components requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateComponentRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentResponseData' params: type: object description: Input parameters title: CreateComponentParams required: - data - params title: CreateComponentResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /components/{component_id}: get: operationId: getComponent summary: Get component tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentResponseData' params: type: object description: Input parameters title: GetComponentParams required: - data - params title: GetComponentResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateComponent summary: Update component tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateComponentRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentResponseData' params: type: object description: Input parameters title: UpdateComponentParams required: - data - params title: UpdateComponentResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' delete: operationId: deleteComponent summary: Delete component tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteComponentParams required: - data - params title: DeleteComponentResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /components/count: get: operationId: countComponents summary: Count components tags: - components parameters: - name: q in: query schema: type: string maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' q: type: string maxLength: 512 title: CountComponentsParams required: - data - params title: CountComponentsResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /components/preview-data: get: operationId: previewComponentData summary: Preview component data tags: - components parameters: - name: company_id in: query schema: type: string - name: component_id in: query schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentPreviewResponseData' params: type: object description: Input parameters properties: company_id: type: string component_id: type: string title: PreviewComponentDataParams required: - data - params title: PreviewComponentDataResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' components: responses: Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ApiError' BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/ApiError' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ApiError' ServerError: description: Server error content: application/json: schema: $ref: '#/components/schemas/ApiError' NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/ApiError' schemas: CreditCurrencyPriceResponseData: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: CreditCurrencyPriceResponseData BillingPriceView: type: object properties: billing_scheme: $ref: '#/components/schemas/BillingPriceScheme' created_at: type: string format: date-time currency: type: string id: type: string interval: $ref: '#/components/schemas/BillingProductPriceInterval' is_active: type: boolean meter_event_name: type: string nullable: true meter_event_payload_key: type: string nullable: true meter_id: type: string nullable: true nickname: type: string nullable: true package_size: type: integer format: int64 price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string price_id: type: string price_tier: type: array items: $ref: '#/components/schemas/BillingProductPriceTierResponseData' maxItems: 100 product_external_id: type: string product_id: type: string product_name: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' tiers_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true updated_at: type: string format: date-time usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - id - billing_scheme - created_at - currency - interval - is_active - package_size - price - price_external_id - product_external_id - provider_type - updated_at - usage_type - price_id - product_id - product_name - price_tier title: BillingPriceView ComponentCapabilities: type: object properties: badge_visibility: type: boolean checkout: type: boolean required: - checkout - badge_visibility title: ComponentCapabilities BillingProductForSubscriptionResponseData: type: object properties: billing_scheme: $ref: '#/components/schemas/BillingPriceScheme' billing_threshold: type: integer format: int64 nullable: true created_at: type: string format: date-time currency: type: string environment_id: type: string external_id: type: string id: type: string interval: type: string meter_id: type: string nullable: true name: type: string package_size: type: integer format: int64 price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string price_id: type: string price_tier: type: array items: $ref: '#/components/schemas/BillingProductPriceTierResponseData' maxItems: 100 provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number subscription_id: type: string subscription_item_external_id: type: string nullable: true updated_at: type: string format: date-time usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - id - created_at - currency - environment_id - external_id - interval - name - package_size - price - price_external_id - price_id - price_tier - provider_type - quantity - billing_scheme - subscription_id - updated_at - usage_type title: BillingProductForSubscriptionResponseData BillingPlanCreditGrantResetStart: type: string enum: - billing_period - first_of_month CompanyPlanInvalidReason: type: string enum: - downgrade_not_permitted - feature_usage_exceeded BillingProductPriceResponseData: type: object properties: billing_scheme: $ref: '#/components/schemas/BillingPriceScheme' created_at: type: string format: date-time currency: type: string id: type: string interval: $ref: '#/components/schemas/BillingProductPriceInterval' is_active: type: boolean meter_id: type: string nullable: true nickname: type: string nullable: true package_size: type: integer format: int64 price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string product_external_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' tiers_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true updated_at: type: string format: date-time usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - id - billing_scheme - created_at - currency - interval - is_active - package_size - price - price_external_id - product_external_id - provider_type - updated_at - usage_type title: BillingProductPriceResponseData FeatureUsageDetailResponseData: type: object properties: features: type: array items: $ref: '#/components/schemas/FeatureUsageResponseData' maxItems: 1000 required: - features title: FeatureUsageDetailResponseData CompanyDetailResponseData: type: object properties: add_ons: type: array items: $ref: '#/components/schemas/CompanyPlanWithBillingSubView' maxItems: 1000 billing_credit_balances: additionalProperties: type: number type: object nullable: true billing_subscription: $ref: '#/components/schemas/BillingSubscriptionView' billing_subscriptions: type: array items: $ref: '#/components/schemas/BillingSubscriptionView' maxItems: 1000 created_at: type: string format: date-time custom_plan_billings: type: array items: $ref: '#/components/schemas/CustomPlanBillingResponseData' maxItems: 1000 default_payment_method: $ref: '#/components/schemas/PaymentMethodResponseData' entitlements: type: array items: $ref: '#/components/schemas/FeatureEntitlement' maxItems: 1000 entity_traits: type: array items: $ref: '#/components/schemas/EntityTraitDetailResponseData' maxItems: 1000 environment_id: type: string id: type: string keys: type: array items: $ref: '#/components/schemas/EntityKeyDetailResponseData' maxItems: 1000 last_seen_at: type: string format: date-time nullable: true logo_url: type: string nullable: true metrics: type: array items: $ref: '#/components/schemas/CompanyEventPeriodMetricsResponseData' maxItems: 1000 name: type: string payment_methods: type: array items: $ref: '#/components/schemas/PaymentMethodResponseData' maxItems: 1000 plan: $ref: '#/components/schemas/CompanyPlanWithBillingSubView' plans: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 rules: type: array items: $ref: '#/components/schemas/Rule' maxItems: 1000 scheduled_downgrade: $ref: '#/components/schemas/ScheduledDowngradeResponseData' traits: type: object description: A map of trait names to trait values updated_at: type: string format: date-time user_count: type: integer format: int64 required: - created_at - environment_id - id - name - updated_at - add_ons - billing_subscriptions - custom_plan_billings - entitlements - entity_traits - keys - metrics - payment_methods - plans - rules - user_count title: CompanyDetailResponseData CompanyOverrideNoteResponseData: type: object properties: created_at: type: string format: date-time external_user_id: type: string external_user_name: type: string id: type: string note: type: string updated_at: type: string format: date-time required: - id - external_user_id - external_user_name - note - created_at - updated_at title: CompanyOverrideNoteResponseData BillingCreditGrantReason: type: string enum: - adjustment - billing_credit_auto_topup - free - plan - purchased BillingPlanCreditGrantResetType: type: string enum: - no_reset - plan_period EventSummaryResponseData: type: object properties: company_count: type: integer format: int64 environment_id: type: string event_count: type: integer format: int64 event_subtype: type: string last_seen_at: type: string format: date-time nullable: true user_count: type: integer format: int64 required: - company_count - environment_id - event_count - event_subtype - user_count title: EventSummaryResponseData BillingCreditBurnStrategy: type: string enum: - expiration_priority - first_in_first_out - last_in_first_out - plan_first_then_credit_bundles_first_in_first_out PlanCurrencyPricesResponseData: type: object properties: currency: type: string monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: PlanCurrencyPricesResponseData BillingPriceResponseData: type: object properties: currency: type: string external_price_id: type: string id: type: string interval: $ref: '#/components/schemas/BillingProductPriceInterval' nickname: type: string nullable: true price: type: integer format: int64 price_decimal: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' scheme: $ref: '#/components/schemas/BillingPriceScheme' required: - currency - external_price_id - id - interval - price - provider_type - scheme title: BillingPriceResponseData CustomPlanBillingResponseData: type: object properties: activation_strategy: $ref: '#/components/schemas/CustomPlanActivationStrategy' company_id: type: string created_at: type: string format: date-time days_until_due: type: integer format: int64 id: type: string paid_at: type: string format: date-time nullable: true plan_id: type: string published_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/CustomPlanBillingStatus' stripe_invoice_url: type: string nullable: true updated_at: type: string format: date-time required: - activation_strategy - company_id - created_at - days_until_due - id - plan_id - status - updated_at title: CustomPlanBillingResponseData CompanyEventPeriodMetricsResponseData: type: object properties: account_id: type: string captured_at_max: type: string format: date-time captured_at_min: type: string format: date-time company_id: type: string created_at: type: string format: date-time environment_id: type: string event_subtype: type: string month_reset: $ref: '#/components/schemas/MetricPeriodMonthReset' period: $ref: '#/components/schemas/MetricPeriod' valid_until: type: string format: date-time nullable: true value: type: integer format: int64 required: - account_id - captured_at_max - captured_at_min - company_id - created_at - environment_id - event_subtype - month_reset - period - value title: CompanyEventPeriodMetricsResponseData CompanyPlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_can_trial: type: boolean company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true compatible_plan_ids: type: array items: type: string maxItems: 1000 controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 current: type: boolean custom: type: boolean custom_plan_config: $ref: '#/components/schemas/CustomPlanConfig' description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/PlanCreditGrantView' maxItems: 1000 invalid_reason: allOf: - $ref: '#/components/schemas/CompanyPlanInvalidReason' nullable: true is_custom: type: boolean is_default: type: boolean deprecated: true is_free: type: boolean is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time usage_violations: type: array items: $ref: '#/components/schemas/FeatureUsageResponseData' maxItems: 1000 valid: type: boolean versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions - is_custom - entitlements - compatible_plan_ids - company_can_trial - current - custom - included_credit_grants - usage_violations - valid title: CompanyPlanDetailResponseData FeatureEntitlement: type: object properties: allocation: type: integer description: If the company has a numeric entitlement for this feature, the allocated amount format: int64 nullable: true credit_id: type: string description: If the company has a credit-based entitlement for this feature, the ID of the credit nullable: true credit_remaining: type: number description: If the company has a credit-based entitlement for this feature, the remaining credit amount nullable: true credit_total: type: number description: If the company has a credit-based entitlement for this feature, the total credit amount nullable: true credit_used: type: number description: If the company has a credit-based entitlement for this feature, the amount of credit used nullable: true event_name: type: string description: If the feature is event-based, the name of the event tracked for usage nullable: true feature_id: type: string description: The ID of the feature feature_key: type: string description: The key of the flag associated with the feature metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: For event-based feature entitlements, the period over which usage is tracked nullable: true metric_reset_at: type: string description: For event-based feature entitlements, when the usage period will reset format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle nullable: true soft_limit: type: integer description: For usage-based pricing, the soft limit for overage charges or the next tier boundary format: int64 nullable: true usage: type: integer description: If the company has a numeric entitlement for this feature, the current usage amount format: int64 nullable: true value_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of the entitlement value required: - feature_id - feature_key - value_type title: FeatureEntitlement FlagType: type: string enum: - boolean CreditCurrencyPrice: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: CreditCurrencyPrice BillingProductResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - product_id - provider_type - quantity - updated_at title: BillingProductResponseData EntitlementCurrencyPricesResponseData: type: object properties: currency: type: string monthly_price: $ref: '#/components/schemas/BillingPriceView' yearly_price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: EntitlementCurrencyPricesResponseData CustomPlanBillingStatus: type: string enum: - active - expired - paid - pending EntityKeyDefinitionResponseData: type: object properties: created_at: type: string format: date-time entity_type: $ref: '#/components/schemas/EntityType' id: type: string key: type: string updated_at: type: string format: date-time required: - id - entity_type - key - created_at - updated_at title: EntityKeyDefinitionResponseData ComponentEntityType: type: string enum: - billing - entitlement BillingPriceScheme: type: string enum: - per_unit - tiered BillingProductPriceTierResponseData: type: object properties: flat_amount: type: integer format: int64 nullable: true per_unit_price: type: integer format: int64 nullable: true per_unit_price_decimal: type: string nullable: true up_to: type: integer format: int64 nullable: true title: BillingProductPriceTierResponseData ChargeType: type: string enum: - free - one_time - recurring EntitlementValueType: type: string enum: - boolean - credit - numeric - trait - unknown - unlimited BillingCreditBundleStatus: type: string enum: - active - inactive FeatureResponseData: type: object properties: created_at: type: string format: date-time description: type: string event_subtype: type: string nullable: true feature_type: $ref: '#/components/schemas/FeatureType' icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string plural_name: type: string nullable: true singular_name: type: string nullable: true trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - feature_type - icon - created_at - updated_at title: FeatureResponseData BillingCreditBundleType: type: string enum: - fixed FeatureUsageResponseData: type: object properties: access: type: boolean description: Whether further usage is permitted. allocation: type: integer description: The maximum amount of usage that is permitted; a null value indicates that unlimited usage is permitted or that this is a credit-based entitlement (use credit_remaining instead). format: int64 nullable: true allocation_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of allocation that is being used. company_override: $ref: '#/components/schemas/CompanyOverrideResponseData' credit_consumption_rate: type: number description: The rate at which credits are consumed per unit of usage nullable: true credit_grant_counts: additionalProperties: type: number type: object credit_grant_details: type: array items: $ref: '#/components/schemas/CreditGrantDetail' maxItems: 1000 credit_grant_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantReason' description: Reason for the credit grant nullable: true credit_remaining: type: number nullable: true credit_total: type: number description: 'Deprecated: Use credit_remaining instead.' nullable: true deprecated: true credit_type_icon: type: string description: Icon identifier for the credit type nullable: true credit_usage_aggregation: allOf: - $ref: '#/components/schemas/CreditUsageAggregation' description: Aggregated credit usage by time period (day, week, month, billing period) credit_used: type: number nullable: true effective_limit: type: integer description: Effective limit for usage calculations. For overage pricing, this is the soft limit where overage charges begin. For tiered pricing, this is the first tier boundary. For other pricing models, this is the base allocation. Used to calculate usage percentages and determine access thresholds. format: int64 nullable: true effective_price: type: number description: Per-unit price for current usage scenario nullable: true entitlement_expiration_date: type: string format: date-time nullable: true entitlement_id: type: string entitlement_source: type: string description: Source of the entitlement (plan or company_override) nullable: true entitlement_type: $ref: '#/components/schemas/EntitlementType' feature: $ref: '#/components/schemas/FeatureInPlanResponseData' has_valid_allocation: type: boolean description: Whether a valid allocation exists nullable: true is_unlimited: type: boolean description: Whether this is an unlimited allocation nullable: true metric_reset_at: type: string description: The time at which the metric will reset. format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: If the period is current_month, when the month resets. nullable: true monthly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' overuse: type: integer description: Amount of usage exceeding soft limit (overage pricing only) format: int64 nullable: true percent_used: type: number description: Percentage of allocation consumed (0-100+) nullable: true period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: The period over which usage is measured. nullable: true plan: $ref: '#/components/schemas/PlanResponseData' plan_entitlement: $ref: '#/components/schemas/PlanEntitlementResponseData' price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true soft_limit: type: integer description: The soft limit for the feature usage. Available only for overage price behavior format: int64 nullable: true usage: type: integer description: The amount of usage that has been consumed; a null value indicates that usage is not being measured or that this is a credit-based entitlement (use credit_used instead). format: int64 nullable: true yearly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' required: - access - allocation_type - entitlement_id - entitlement_type title: FeatureUsageResponseData EntityType: type: string enum: - company - user MetricPeriodMonthReset: type: string enum: - billing_cycle - first_of_month UsageBasedEntitlementResponseData: type: object properties: billing_threshold: type: integer format: int64 nullable: true consumption_rate: type: number nullable: true feature_id: type: string metered_price: $ref: '#/components/schemas/BillingPriceView' metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true value_bool: type: boolean nullable: true value_numeric: type: integer format: int64 nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' required: - feature_id - value_type title: UsageBasedEntitlementResponseData RuleDetailResponseData: type: object properties: condition_groups: type: array items: $ref: '#/components/schemas/RuleConditionGroupDetailResponseData' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/RuleConditionDetailResponseData' maxItems: 1000 created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true id: type: string name: type: string priority: type: integer format: int64 rule_type: $ref: '#/components/schemas/RuleType' updated_at: type: string format: date-time value: type: boolean required: - id - environment_id - priority - name - rule_type - value - created_at - updated_at - conditions - condition_groups title: RuleDetailResponseData PlanIcon: type: string enum: - amber - blue - blueGray - blueGreen - cyan - emerald - fuchsia - gray - green - indigo - lightBlue - lime - orange - pink - purple - red - redOrange - rose - sky - slate - teal - trueGray - violet - warmGray - yellow EntityTraitDefinitionResponseData: type: object properties: created_at: type: string format: date-time display_name: type: string entity_type: $ref: '#/components/schemas/EntityType' hierarchy: type: array items: type: string maxItems: 1000 id: type: string trait_type: $ref: '#/components/schemas/TraitType' updated_at: type: string format: date-time required: - created_at - display_name - entity_type - hierarchy - id - trait_type - updated_at title: EntityTraitDefinitionResponseData FeatureInPlanResponseData: type: object properties: billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' created_at: type: string format: date-time description: type: string event_subtype: type: string nullable: true event_summary: $ref: '#/components/schemas/EventSummaryResponseData' feature_type: $ref: '#/components/schemas/FeatureType' flags: type: array items: $ref: '#/components/schemas/FlagInPlanResponseData' maxItems: 1000 icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string plans: type: array items: $ref: '#/components/schemas/PreviewObject' maxItems: 1000 plural_name: type: string nullable: true singular_name: type: string nullable: true trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - feature_type - icon - created_at - updated_at - flags - plans title: FeatureInPlanResponseData Rule: type: object properties: account_id: type: string condition_groups: type: array items: $ref: '#/components/schemas/ConditionGroup' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 environment_id: type: string flag_id: type: string nullable: true id: type: string name: type: string priority: type: integer format: int64 rule_type: $ref: '#/components/schemas/RuleType' value: type: boolean required: - id - account_id - environment_id - rule_type - name - priority - conditions - condition_groups - value title: Rule BillingPlanCreditGrantResponseData: type: object properties: auto_topup_amount: type: integer format: int64 nullable: true auto_topup_amount_type: type: string nullable: true auto_topup_enabled: type: boolean auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true auto_topup_threshold_credits: type: integer format: int64 nullable: true auto_topup_threshold_percent: type: integer format: int64 nullable: true created_at: type: string format: date-time credit: $ref: '#/components/schemas/BillingCreditResponseData' credit_amount: type: integer format: int64 credit_id: type: string credit_name: type: string description: Use credit.name from the nested credit object instead deprecated: true credit_plural_name: type: string description: Use plural_name from the nested credit object instead nullable: true deprecated: true credit_singular_name: type: string description: Use singular_name from the nested credit object instead nullable: true deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/PreviewObjectResponseData' plan_id: type: string plan_name: type: string description: Use plan.name from the nested plan object instead deprecated: true plan_version_id: type: string nullable: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - plan_name - credit_amount - credit_name - auto_topup_enabled - created_at - updated_at title: BillingPlanCreditGrantResponseData DeleteResponse: type: object properties: deleted: type: boolean description: Whether the delete was successful ComparableOperator: type: string enum: - eq - gt - gte - is_empty - lt - lte - not_empty - ne EntityKeyDetailResponseData: type: object properties: created_at: type: string format: date-time definition: $ref: '#/components/schemas/EntityKeyDefinitionResponseData' definition_id: type: string entity_id: type: string entity_type: $ref: '#/components/schemas/EntityType' environment_id: type: string id: type: string key: type: string updated_at: type: string format: date-time value: type: string required: - id - environment_id - definition_id - entity_type - entity_id - key - value - created_at - updated_at title: EntityKeyDetailResponseData StripeEmbedInfo: type: object properties: account_id: type: string nullable: true publishable_key: type: string nullable: true schematic_publishable_key: type: string setup_intent_client_secret: type: string nullable: true required: - schematic_publishable_key title: StripeEmbedInfo ConditionGroup: type: object properties: conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 required: - conditions title: ConditionGroup ComponentResponseData: type: object properties: ast: additionalProperties: type: number type: object created_at: type: string format: date-time id: type: string name: type: string state: $ref: '#/components/schemas/ComponentState' type: $ref: '#/components/schemas/ComponentEntityType' updated_at: type: string format: date-time required: - id - name - type - state - created_at - updated_at title: ComponentResponseData EntitlementType: type: string enum: - company_override - plan_entitlement - unknown BillingCreditBundleView: type: object properties: bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' created_at: type: string format: date-time credit_description: type: string credit_icon: type: string nullable: true credit_id: type: string credit_name: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPrice' maxItems: 256 expiry_type: $ref: '#/components/schemas/BillingCreditExpiryType' expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' expiry_unit_count: type: integer format: int64 nullable: true has_grants: type: boolean id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingProductPriceResponseData' quantity: type: integer format: int64 nullable: true singular_name: type: string nullable: true status: $ref: '#/components/schemas/BillingCreditBundleStatus' unit_price: $ref: '#/components/schemas/BillingProductPriceResponseData' updated_at: type: string format: date-time required: - id - credit_id - name - status - bundle_type - expiry_unit - expiry_type - credit_name - currency_prices - has_grants - created_at - updated_at title: BillingCreditBundleView BillingSubscriptionDiscountView: type: object properties: amount_off: type: integer format: int64 nullable: true coupon_id: type: string coupon_name: type: string currency: type: string nullable: true customer_facing_code: type: string nullable: true discount_external_id: type: string duration: type: string duration_in_months: type: integer format: int64 nullable: true ended_at: type: string format: date-time nullable: true is_active: type: boolean percent_off: type: number nullable: true promo_code_external_id: type: string nullable: true started_at: type: string format: date-time subscription_external_id: type: string required: - discount_external_id - subscription_external_id - coupon_id - started_at - coupon_name - duration - is_active title: BillingSubscriptionDiscountView PreviewObjectResponseData: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: PreviewObjectResponseData EntitlementPriceBehavior: type: string enum: - credit_burndown - overage - pay_as_you_go - pay_in_advance - tier ScheduledDowngradeResponseData: type: object properties: currency: type: string effective_after: type: string format: date-time from_plan_id: type: string from_plan_name: type: string from_subscription_price: type: integer format: int64 id: type: string interval: type: string scheduled_interval: type: string nullable: true scheduled_price: type: integer format: int64 nullable: true to_plan_id: type: string to_plan_name: type: string required: - currency - effective_after - from_plan_id - from_plan_name - from_subscription_price - id - interval - to_plan_id - to_plan_name title: ScheduledDowngradeResponseData BillingProductDetailResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true prices: type: array items: $ref: '#/components/schemas/BillingPriceResponseData' maxItems: 1000 product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number subscription_count: type: integer format: int64 updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - product_id - provider_type - quantity - updated_at - prices - subscription_count title: BillingProductDetailResponseData CreditUsageAggregation: type: object properties: usage_this_billing_period: type: number description: Credit usage within the current billing period nullable: true usage_this_calendar_month: type: number description: Credit usage within the current calendar month nullable: true usage_this_week: type: number description: Credit usage within the current calendar week (Monday to Sunday) nullable: true usage_today: type: number description: Credit usage for the current day nullable: true title: CreditUsageAggregation PlanResponseData: type: object properties: audience_type: type: string nullable: true deprecated: true company_id: type: string nullable: true copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time description: type: string icon: $ref: '#/components/schemas/PlanIcon' id: type: string name: type: string plan_type: $ref: '#/components/schemas/PlanType' updated_at: type: string format: date-time required: - created_at - description - icon - id - name - plan_type - updated_at title: PlanResponseData MetricPeriod: type: string enum: - all_time - current_day - current_month - current_week GenericPreviewObject: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: GenericPreviewObject BillingPriceUsageType: type: string enum: - licensed - metered ComponentState: type: string enum: - draft - live ComponentDisplaySettings: type: object properties: show_as_monthly_prices: type: boolean show_credits: type: boolean show_feature_description: type: boolean show_hard_limit: type: boolean show_period_toggle: type: boolean show_zero_price_as_free: type: boolean required: - show_as_monthly_prices - show_credits - show_feature_description - show_hard_limit - show_period_toggle - show_zero_price_as_free title: ComponentDisplaySettings BillingSubscriptionView: type: object properties: application_id: type: string nullable: true cancel_at: type: integer format: int64 nullable: true cancel_at_period_end: type: boolean company_id: type: string nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string default_payment_method_id: type: string nullable: true discounts: type: array items: $ref: '#/components/schemas/BillingSubscriptionDiscountView' maxItems: 1000 expired_at: type: string format: date-time nullable: true id: type: string interval: type: string latest_invoice: $ref: '#/components/schemas/InvoiceResponseData' metadata: type: object payment_method: $ref: '#/components/schemas/PaymentMethodResponseData' period_end: type: integer format: int64 period_start: type: integer format: int64 products: type: array items: $ref: '#/components/schemas/BillingProductForSubscriptionResponseData' maxItems: 1000 provider_type: $ref: '#/components/schemas/BillingProviderType' status: type: string subscription_external_id: type: string total_price: type: integer format: int64 trial_end: type: integer format: int64 nullable: true trial_end_setting: allOf: - $ref: '#/components/schemas/BillingSubscriptionTrialEndSetting' nullable: true required: - cancel_at_period_end - created_at - currency - customer_external_id - subscription_external_id - id - interval - period_end - period_start - total_price - provider_type - status - products - discounts title: BillingSubscriptionView BillingLinkedResourceResponseData: type: object properties: billing_provider: $ref: '#/components/schemas/BillingProviderType' external_resource_id: type: string originator: $ref: '#/components/schemas/BillingProviderType' required: - billing_provider - external_resource_id - originator title: BillingLinkedResourceResponseData ApiError: type: object properties: error: type: string description: Error message required: - error ComponentCheckoutSettings: type: object properties: collect_address: type: boolean collect_email: type: boolean collect_phone: type: boolean tax_collection_enabled: type: boolean required: - collect_email - collect_address - collect_phone - tax_collection_enabled title: ComponentCheckoutSettings BillingCreditExpiryUnit: type: string enum: - billing_periods - days BillingCreditExpiryType: type: string enum: - duration - end_of_billing_period - end_of_next_billing_period - end_of_trial - no_expiry PlanCreditGrantView: type: object properties: billing_credit_auto_topup_amount: type: integer format: int64 nullable: true billing_credit_auto_topup_amount_type: type: string nullable: true billing_credit_auto_topup_enabled: type: boolean billing_credit_auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true billing_credit_auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true billing_credit_auto_topup_expiry_unit_count: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_credits: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_percent: type: integer format: int64 nullable: true created_at: type: string format: date-time credit: $ref: '#/components/schemas/BillingCreditView' credit_amount: type: integer format: int64 credit_description: type: string description: Deprecated field, will be removed in the future. Use Credit.Description instead. deprecated: true credit_icon: type: string description: Deprecated field, will be removed in the future. Use Credit.Icon instead. nullable: true deprecated: true credit_id: type: string credit_name: type: string description: Deprecated field, will be removed in the future. Use Credit.Name instead. deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/GenericPreviewObject' plan_id: type: string plan_version_id: type: string nullable: true plural_name: type: string description: Deprecated field, will be removed in the future. Use Credit.PluralName instead. nullable: true deprecated: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: $ref: '#/components/schemas/BillingPlanCreditGrantResetType' singular_name: type: string description: Deprecated field, will be removed in the future. Use Credit.SingularName instead. nullable: true deprecated: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - credit_amount - credit_name - credit_description - reset_type - billing_credit_auto_topup_enabled - created_at - updated_at title: PlanCreditGrantView FlagInPlanResponseData: type: object properties: created_at: type: string format: date-time default_value: type: boolean description: type: string feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string key: type: string last_checked_at: type: string format: date-time nullable: true maintainer_account_member_id: type: string nullable: true name: type: string rules: type: array items: $ref: '#/components/schemas/RuleDetailResponseData' maxItems: 1000 updated_at: type: string format: date-time required: - created_at - default_value - description - flag_type - id - key - name - updated_at - rules title: FlagInPlanResponseData RuleType: type: string enum: - company_override - company_override_usage_exceeded - default - global_override - plan_entitlement - plan_entitlement_usage_exceeded - standard BillingTiersMode: type: string enum: - graduated - volume ComponentPreviewResponseData: type: object properties: active_add_ons: type: array items: $ref: '#/components/schemas/CompanyPlanDetailResponseData' maxItems: 1000 active_plans: type: array items: $ref: '#/components/schemas/CompanyPlanDetailResponseData' maxItems: 1000 active_usage_based_entitlements: type: array items: $ref: '#/components/schemas/UsageBasedEntitlementResponseData' maxItems: 1000 add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlans' maxItems: 1000 capabilities: $ref: '#/components/schemas/ComponentCapabilities' checkout_settings: $ref: '#/components/schemas/ComponentCheckoutSettings' company: $ref: '#/components/schemas/CompanyDetailResponseData' component: $ref: '#/components/schemas/ComponentResponseData' credit_bundles: type: array items: $ref: '#/components/schemas/BillingCreditBundleView' maxItems: 1000 credit_grants: type: array items: $ref: '#/components/schemas/CreditCompanyGrantView' maxItems: 1000 default_plan: $ref: '#/components/schemas/PlanDetailResponseData' display_settings: $ref: '#/components/schemas/ComponentDisplaySettings' feature_usage: $ref: '#/components/schemas/FeatureUsageDetailResponseData' invoices: type: array items: $ref: '#/components/schemas/InvoiceResponseData' maxItems: 1000 post_trial_plan: $ref: '#/components/schemas/PlanDetailResponseData' prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true prevent_self_service_downgrade_url: type: string nullable: true scheduled_downgrade: $ref: '#/components/schemas/ScheduledDowngradeResponseData' show_as_monthly_prices: type: boolean deprecated: true show_credits: type: boolean deprecated: true show_period_toggle: type: boolean deprecated: true show_zero_price_as_free: type: boolean deprecated: true stripe_embed: $ref: '#/components/schemas/StripeEmbedInfo' subscription: $ref: '#/components/schemas/CompanySubscriptionResponseData' trial_payment_method_required: type: boolean nullable: true upcoming_invoice: $ref: '#/components/schemas/InvoiceResponseData' required: - active_add_ons - active_plans - active_usage_based_entitlements - add_on_compatibilities - credit_bundles - credit_grants - prevent_self_service_downgrade - show_as_monthly_prices - show_credits - show_period_toggle - show_zero_price_as_free - checkout_settings - display_settings - invoices title: ComponentPreviewResponseData BillingCreditResponseData: type: object properties: burn_strategy: $ref: '#/components/schemas/BillingCreditBurnStrategy' cost_editable: type: boolean created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPriceResponseData' maxItems: 256 default_expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' default_expiry_unit_count: type: integer format: int64 nullable: true default_rollover_policy: $ref: '#/components/schemas/BillingCreditRolloverPolicy' description: type: string icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' product: $ref: '#/components/schemas/BillingProductResponseData' singular_name: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - default_expiry_unit - default_rollover_policy - burn_strategy - cost_editable - currency_prices - created_at - updated_at title: BillingCreditResponseData UpdateComponentRequestBody: type: object properties: ast: additionalProperties: type: number type: object entity_type: allOf: - $ref: '#/components/schemas/ComponentEntityType' nullable: true name: type: string nullable: true maxLength: 256 minLength: 1 state: allOf: - $ref: '#/components/schemas/ComponentState' nullable: true title: UpdateComponentRequestBody ConditionType: type: string enum: - base_plan - billing_product - company - credit - metric - plan - plan_version - trait - user EntityTraitDetailResponseData: type: object properties: created_at: type: string format: date-time definition: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' definition_id: type: string environment_id: type: string id: type: string updated_at: type: string format: date-time value: type: string required: - id - environment_id - definition_id - value - created_at - updated_at title: EntityTraitDetailResponseData PreviewObject: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: PreviewObject PaymentMethodResponseData: type: object properties: account_last4: type: string nullable: true account_name: type: string nullable: true bank_name: type: string nullable: true billing_email: type: string nullable: true billing_name: type: string nullable: true card_brand: type: string nullable: true card_exp_month: type: integer format: int64 nullable: true card_exp_year: type: integer format: int64 nullable: true card_last4: type: string nullable: true company_id: type: string nullable: true created_at: type: string format: date-time customer_external_id: type: string environment_id: type: string external_id: type: string id: type: string payment_method_type: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' updated_at: type: string format: date-time required: - id - created_at - customer_external_id - environment_id - external_id - payment_method_type - provider_type - updated_at title: PaymentMethodResponseData CompanyPlanWithBillingSubView: type: object properties: added_on: type: string format: date-time nullable: true billing_product_external_id: type: string nullable: true billing_product_id: type: string nullable: true description: type: string nullable: true id: type: string image_url: type: string nullable: true included_credit_grants: type: array items: $ref: '#/components/schemas/PlanCreditGrantView' maxItems: 1000 name: type: string plan_period: type: string nullable: true plan_price: type: integer format: int64 nullable: true plan_version_id: type: string nullable: true required: - id - name - included_credit_grants title: CompanyPlanWithBillingSubView BillingProductPriceInterval: type: string enum: - day - month - one-time - year CreditTransferView: type: object properties: amount: type: number created_at: type: string format: date-time direction: type: string id: type: string reason: type: string related_grant_id: type: string required: - id - amount - created_at - direction - related_grant_id - reason title: CreditTransferView TraitType: type: string enum: - boolean - currency - date - number - string - url CreateComponentRequestBody: type: object properties: ast: additionalProperties: type: number type: object entity_type: $ref: '#/components/schemas/ComponentEntityType' name: type: string maxLength: 256 minLength: 1 required: - name - entity_type title: CreateComponentRequestBody PlanType: type: string enum: - plan - add_on RuleConditionGroupDetailResponseData: type: object properties: conditions: type: array items: $ref: '#/components/schemas/RuleConditionDetailResponseData' maxItems: 1000 created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true id: type: string rule_id: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - created_at - updated_at - conditions title: RuleConditionGroupDetailResponseData BillingSubscriptionTrialEndSetting: type: string enum: - cancel - subscribe FeatureLifecyclePhase: type: string enum: - add_on - alpha - beta - deprecated - ga - inactive - in_plan - internal_testing - legacy BillingCreditRolloverPolicy: type: string enum: - expire - none - rollover PlanEntitlementResponseData: type: object properties: billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_threshold: type: integer format: int64 nullable: true consumption_rate: type: number nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/EntitlementCurrencyPricesResponseData' maxItems: 1000 environment_id: type: string feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string id: type: string metered_monthly_price: $ref: '#/components/schemas/BillingPriceView' metered_yearly_price: $ref: '#/components/schemas/BillingPriceView' metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true plan: $ref: '#/components/schemas/PlanResponseData' plan_id: type: string price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true rule_id: type: string rule_id_usage_exceeded: type: string nullable: true soft_limit: type: integer format: int64 nullable: true updated_at: type: string format: date-time usage_based_product: $ref: '#/components/schemas/BillingProductResponseData' value_bool: type: boolean nullable: true value_credit: $ref: '#/components/schemas/BillingCreditResponseData' value_numeric: type: integer format: int64 nullable: true value_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - created_at - currency_prices - environment_id - feature_id - id - plan_id - rule_id - updated_at - value_type title: PlanEntitlementResponseData CompatiblePlans: type: object properties: compatible_plan_ids: type: array items: type: string maxItems: 1000 source_plan_id: type: string required: - source_plan_id - compatible_plan_ids title: CompatiblePlans CreditGrantDetail: type: object properties: credit_type_icon: type: string nullable: true expires_at: type: string format: date-time nullable: true grant_reason: $ref: '#/components/schemas/BillingCreditGrantReason' quantity: type: number required: - grant_reason - quantity title: CreditGrantDetail InvoiceStatus: type: string enum: - draft - open - paid - uncollectible - void FeatureType: type: string enum: - boolean - event - trait CustomPlanConfig: type: object properties: cta_text: type: string cta_web_site: type: string price_text: type: string required: - cta_web_site - cta_text - price_text title: CustomPlanConfig BillingProviderType: type: string enum: - orb - schematic - stripe BillingPlanCreditGrantResetCadence: type: string enum: - daily - monthly - weekly - yearly CreditCompanyGrantView: type: object properties: billing_credit_bundle_id: type: string nullable: true billing_credit_id: type: string company_id: type: string company_name: type: string created_at: type: string format: date-time credit_description: type: string credit_icon: type: string nullable: true credit_name: type: string currency: type: string nullable: true exhausted_at: type: string format: date-time nullable: true expires_at: type: string format: date-time nullable: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true grant_reason: $ref: '#/components/schemas/BillingCreditGrantReason' id: type: string plan_id: type: string nullable: true plan_name: type: string nullable: true plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingProductPriceResponseData' quantity: type: integer format: int64 quantity_remaining: type: number quantity_used: type: number renewal_enabled: type: boolean renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true singular_name: type: string nullable: true source_label: type: string transfers: type: array items: $ref: '#/components/schemas/CreditTransferView' maxItems: 1000 updated_at: type: string format: date-time valid_from: type: string format: date-time nullable: true zeroed_out_date: type: string format: date-time nullable: true zeroed_out_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true required: - id - quantity - quantity_remaining - quantity_used - company_id - company_name - billing_credit_id - credit_name - credit_description - source_label - created_at - updated_at - grant_reason - renewal_enabled title: CreditCompanyGrantView PlanVersionStatus: type: string enum: - published - draft - archived Condition: type: object properties: account_id: type: string comparison_trait_definition: $ref: '#/components/schemas/TraitDefinition' condition_type: $ref: '#/components/schemas/ConditionType' consumption_rate: type: number nullable: true credit_id: type: string nullable: true environment_id: type: string event_subtype: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 trait_definition: $ref: '#/components/schemas/TraitDefinition' trait_value: type: string required: - id - account_id - environment_id - condition_type - operator - resource_ids - trait_value title: Condition InvoiceResponseData: type: object properties: amount_due: type: integer format: int64 amount_paid: type: integer format: int64 amount_remaining: type: integer format: int64 collection_method: type: string company_id: type: string nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string due_date: type: string format: date-time nullable: true environment_id: type: string external_id: type: string nullable: true id: type: string payment_method_external_id: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' status: allOf: - $ref: '#/components/schemas/InvoiceStatus' nullable: true subscription_external_id: type: string nullable: true subtotal: type: integer format: int64 updated_at: type: string format: date-time url: type: string nullable: true required: - id - amount_due - amount_paid - amount_remaining - collection_method - created_at - currency - customer_external_id - environment_id - provider_type - subtotal - updated_at title: InvoiceResponseData BillingCreditView: type: object properties: account_id: type: string burn_strategy: $ref: '#/components/schemas/BillingCreditBurnStrategy' cost_editable: type: boolean created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPrice' maxItems: 1000 default_expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' default_expiry_unit_count: type: integer format: int64 nullable: true default_rollover_policy: $ref: '#/components/schemas/BillingCreditRolloverPolicy' description: type: string environment_id: type: string icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceView' price_per_unit: type: integer format: int64 nullable: true price_per_unit_decimal: type: string nullable: true product: $ref: '#/components/schemas/BillingProductResponseData' singular_name: type: string nullable: true updated_at: type: string format: date-time required: - id - account_id - environment_id - name - description - default_expiry_unit - default_rollover_policy - burn_strategy - cost_editable - currency_prices - created_at - updated_at title: BillingCreditView CreditBundleCurrencyPrice: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: CreditBundleCurrencyPrice BillingCreditGrantZeroedOutReason: type: string enum: - expired - manual - plan_change - plan_period_reset PlanVersionResponseData: type: object properties: created_at: type: string format: date-time description: type: string environment_id: type: string icon: $ref: '#/components/schemas/PlanIcon' id: type: string name: type: string original_plan_id: type: string nullable: true plan_type: $ref: '#/components/schemas/PlanType' status: $ref: '#/components/schemas/PlanVersionStatus' updated_at: type: string format: date-time version: type: integer format: int64 required: - created_at - description - environment_id - icon - id - name - plan_type - status - updated_at - version title: PlanVersionResponseData TraitDefinition: type: object properties: comparable_type: type: string enum: - bool - date - int - string entity_type: $ref: '#/components/schemas/EntityType' id: type: string required: - id - comparable_type - entity_type title: TraitDefinition RuleConditionDetailResponseData: type: object properties: comparison_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' comparison_trait_id: type: string nullable: true condition_group_id: type: string nullable: true condition_type: $ref: '#/components/schemas/ConditionType' created_at: type: string format: date-time environment_id: type: string event_subtype: type: string nullable: true flag_id: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 resources: type: array items: $ref: '#/components/schemas/PreviewObjectResponseData' maxItems: 1000 rule_id: type: string trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_entity_type: allOf: - $ref: '#/components/schemas/EntityType' nullable: true trait_id: type: string nullable: true trait_value: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - condition_type - operator - created_at - updated_at - resource_ids - trait_value - resources title: RuleConditionDetailResponseData CompanyOverrideResponseData: type: object properties: company: $ref: '#/components/schemas/CompanyDetailResponseData' company_id: type: string consumption_rate: type: number nullable: true created_at: type: string format: date-time environment_id: type: string expiration_date: type: string format: date-time nullable: true feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true notes: type: array items: $ref: '#/components/schemas/CompanyOverrideNoteResponseData' maxItems: 1000 rule_id: type: string nullable: true rule_id_usage_exceeded: type: string nullable: true updated_at: type: string format: date-time value_bool: type: boolean nullable: true value_numeric: type: integer format: int64 nullable: true value_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - company_id - created_at - environment_id - feature_id - id - updated_at - value_type - notes title: CompanyOverrideResponseData CustomPlanActivationStrategy: type: string enum: - on_payment - on_publish CountResponse: type: object properties: count: type: integer description: The number of resources PlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' maxItems: 1000 is_default: type: boolean deprecated: true is_free: type: boolean is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions title: PlanDetailResponseData CompanySubscriptionResponseData: type: object properties: cancel_at: type: string format: date-time nullable: true cancel_at_period_end: type: boolean currency: type: string customer_external_id: type: string discounts: type: array items: $ref: '#/components/schemas/BillingSubscriptionDiscountView' maxItems: 1000 expired_at: type: string format: date-time nullable: true interval: type: string latest_invoice: $ref: '#/components/schemas/InvoiceResponseData' payment_method: $ref: '#/components/schemas/PaymentMethodResponseData' products: type: array items: $ref: '#/components/schemas/BillingProductForSubscriptionResponseData' maxItems: 1000 provider_type: $ref: '#/components/schemas/BillingProviderType' status: type: string subscription_external_id: type: string total_price: type: integer format: int64 trial_end: type: string format: date-time nullable: true required: - customer_external_id - interval - products - discounts - provider_type - subscription_external_id - total_price - status - currency - cancel_at_period_end title: CompanySubscriptionResponseData securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Schematic-Api-Key