openapi: 3.0.0 info: title: Schematic accesstokens entitlements API version: '0.1' description: Schematic API x-rules-engine-schema-version: v97288f60 servers: - url: https://api.schematichq.com security: - ApiKeyAuth: [] tags: - name: entitlements paths: /company-overrides: get: operationId: listCompanyOverrides summary: List company overrides tags: - entitlements parameters: - name: company_id in: query description: Filter company overrides by a single company ID (starting with comp_) schema: type: string description: Filter company overrides by a single company ID (starting with comp_) - name: company_ids in: query description: Filter company overrides by multiple company IDs (starting with comp_) schema: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 - name: feature_id in: query description: Filter company overrides by a single feature ID (starting with feat_) schema: type: string description: Filter company overrides by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter company overrides by multiple feature IDs (starting with feat_) schema: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter company overrides by multiple company override IDs (starting with cmov_) schema: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 - name: without_expired in: query description: Filter company overrides by whether they have not expired schema: type: boolean description: Filter company overrides by whether they have not expired - name: q in: query description: Search for company overrides by feature or company name schema: type: string description: Search for company overrides by feature or company name - 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/CompanyOverrideResponseData' title: ListCompanyOverridesResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string description: Filter company overrides by a single company ID (starting with comp_) company_ids: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 feature_id: type: string description: Filter company overrides by a single feature ID (starting with feat_) feature_ids: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 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 description: Search for company overrides by feature or company name without_expired: type: boolean description: Filter company overrides by whether they have not expired title: ListCompanyOverridesParams required: - data - params title: ListCompanyOverridesResponse '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: createCompanyOverride summary: Create company override tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCompanyOverrideRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyOverrideResponseData' params: type: object description: Input parameters title: CreateCompanyOverrideParams required: - data - params title: CreateCompanyOverrideResponse '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' /company-overrides/{company_override_id}: get: operationId: getCompanyOverride summary: Get company override tags: - entitlements parameters: - name: company_override_id in: path description: company_override_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyOverrideResponseData' params: type: object description: Input parameters title: GetCompanyOverrideParams required: - data - params title: GetCompanyOverrideResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateCompanyOverride summary: Update company override tags: - entitlements parameters: - name: company_override_id in: path description: company_override_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCompanyOverrideRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyOverrideResponseData' params: type: object description: Input parameters title: UpdateCompanyOverrideParams required: - data - params title: UpdateCompanyOverrideResponse '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: deleteCompanyOverride summary: Delete company override tags: - entitlements parameters: - name: company_override_id in: path description: company_override_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: DeleteCompanyOverrideParams required: - data - params title: DeleteCompanyOverrideResponse '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' /company-overrides/count: get: operationId: countCompanyOverrides summary: Count company overrides tags: - entitlements parameters: - name: company_id in: query description: Filter company overrides by a single company ID (starting with comp_) schema: type: string description: Filter company overrides by a single company ID (starting with comp_) - name: company_ids in: query description: Filter company overrides by multiple company IDs (starting with comp_) schema: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 - name: feature_id in: query description: Filter company overrides by a single feature ID (starting with feat_) schema: type: string description: Filter company overrides by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter company overrides by multiple feature IDs (starting with feat_) schema: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter company overrides by multiple company override IDs (starting with cmov_) schema: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 - name: without_expired in: query description: Filter company overrides by whether they have not expired schema: type: boolean description: Filter company overrides by whether they have not expired - name: q in: query description: Search for company overrides by feature or company name schema: type: string description: Search for company overrides by feature or company name - 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: company_id: type: string description: Filter company overrides by a single company ID (starting with comp_) company_ids: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 feature_id: type: string description: Filter company overrides by a single feature ID (starting with feat_) feature_ids: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 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 description: Search for company overrides by feature or company name without_expired: type: boolean description: Filter company overrides by whether they have not expired title: CountCompanyOverridesParams required: - data - params title: CountCompanyOverridesResponse '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' /feature-companies: get: operationId: listFeatureCompanies summary: List feature companies tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - 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/FeatureCompanyResponseData' title: ListFeatureCompaniesResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string 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 title: ListFeatureCompaniesParams required: - data - params title: ListFeatureCompaniesResponse '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' /feature-companies/count: get: operationId: countFeatureCompanies summary: Count feature companies tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - 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: feature_id: type: string 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 title: CountFeatureCompaniesParams required: - data - params title: CountFeatureCompaniesResponse '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' /feature-usage: get: operationId: listFeatureUsage summary: List feature usage tags: - entitlements parameters: - name: company_id in: query schema: type: string - name: company_keys in: query schema: additionalProperties: type: string type: object - name: feature_ids in: query schema: type: array items: type: string maxItems: 100 - name: include_usage_aggregation in: query description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. schema: type: boolean description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. - name: q in: query schema: type: string - name: without_negative_entitlements in: query schema: type: boolean - 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/FeatureUsageResponseData' title: ListFeatureUsageResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string company_keys: additionalProperties: type: string type: object feature_ids: type: array items: type: string maxItems: 100 include_usage_aggregation: type: boolean description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. 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 without_negative_entitlements: type: boolean title: ListFeatureUsageParams required: - data - params title: ListFeatureUsageResponse '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' /feature-usage-timeseries: get: operationId: getFeatureUsageTimeSeries summary: Get feature usage time series tags: - entitlements parameters: - name: company_id in: query required: true schema: type: string - name: end_time in: query required: true schema: type: string format: date-time - name: feature_id in: query required: true schema: type: string - name: granularity in: query schema: $ref: '#/components/schemas/TimeSeriesGranularity' - name: start_time in: query required: true schema: type: string format: date-time responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureUsageTimeSeriesResponseData' params: type: object description: Input parameters properties: company_id: type: string end_time: type: string format: date-time feature_id: type: string granularity: $ref: '#/components/schemas/TimeSeriesGranularity' start_time: type: string format: date-time title: GetFeatureUsageTimeSeriesParams required: - data - params title: GetFeatureUsageTimeSeriesResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /feature-usage/count: get: operationId: countFeatureUsage summary: Count feature usage tags: - entitlements parameters: - name: company_id in: query schema: type: string - name: company_keys in: query schema: additionalProperties: type: string type: object - name: feature_ids in: query schema: type: array items: type: string maxItems: 100 - name: include_usage_aggregation in: query description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. schema: type: boolean description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. - name: q in: query schema: type: string - name: without_negative_entitlements in: query schema: type: boolean - 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: company_id: type: string company_keys: additionalProperties: type: string type: object feature_ids: type: array items: type: string maxItems: 100 include_usage_aggregation: type: boolean description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. 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 without_negative_entitlements: type: boolean title: CountFeatureUsageParams required: - data - params title: CountFeatureUsageResponse '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' /feature-users: get: operationId: listFeatureUsers summary: List feature users tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - 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/FeatureCompanyUserResponseData' title: ListFeatureUsersResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string 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 title: ListFeatureUsersParams required: - data - params title: ListFeatureUsersResponse '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' /feature-users/count: get: operationId: countFeatureUsers summary: Count feature users tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - 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: feature_id: type: string 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 title: CountFeatureUsersParams required: - data - params title: CountFeatureUsersResponse '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' /plan-entitlements: get: operationId: listPlanEntitlements summary: List plan entitlements tags: - entitlements parameters: - name: feature_id in: query description: Filter plan entitlements by a single feature ID (starting with feat_) schema: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter plan entitlements by multiple feature IDs (starting with feat_) schema: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) schema: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 - name: plan_id in: query description: Filter plan entitlements by a single plan ID (starting with plan_) schema: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) - name: plan_ids in: query description: Filter plan entitlements by multiple plan IDs (starting with plan_) schema: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 - name: plan_version_id in: query description: Filter plan entitlements by a single plan version ID (starting with plvr_) schema: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) - name: plan_version_ids in: query description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) schema: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 - name: q in: query description: Search for plan entitlements by feature or company name schema: type: string description: Search for plan entitlements by feature or company name - name: with_metered_products in: query description: Filter plan entitlements only with metered products schema: type: boolean description: Filter plan entitlements only with metered products - 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/PlanEntitlementResponseData' title: ListPlanEntitlementsResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) feature_ids: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_id: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) plan_ids: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 plan_version_id: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) plan_version_ids: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 q: type: string description: Search for plan entitlements by feature or company name with_metered_products: type: boolean description: Filter plan entitlements only with metered products title: ListPlanEntitlementsParams required: - data - params title: ListPlanEntitlementsResponse '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: createPlanEntitlement summary: Create plan entitlement tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePlanEntitlementRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: CreatePlanEntitlementParams required: - data - params title: CreatePlanEntitlementResponse '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' /plan-entitlements/{plan_entitlement_id}: get: operationId: getPlanEntitlement summary: Get plan entitlement tags: - entitlements parameters: - name: plan_entitlement_id in: path description: plan_entitlement_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: GetPlanEntitlementParams required: - data - params title: GetPlanEntitlementResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updatePlanEntitlement summary: Update plan entitlement tags: - entitlements parameters: - name: plan_entitlement_id in: path description: plan_entitlement_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanEntitlementRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: UpdatePlanEntitlementParams required: - data - params title: UpdatePlanEntitlementResponse '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: deletePlanEntitlement summary: Delete plan entitlement tags: - entitlements parameters: - name: plan_entitlement_id in: path description: plan_entitlement_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: DeletePlanEntitlementParams required: - data - params title: DeletePlanEntitlementResponse '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' /plan-entitlements/billing-linked: post: operationId: upsertPlanEntitlementForBillingProduct summary: Upsert plan entitlement for billing product tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingLinkedPlanEntitlementRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: UpsertPlanEntitlementForBillingProductParams required: - data - params title: UpsertPlanEntitlementForBillingProductResponse '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' /plan-entitlements/count: get: operationId: countPlanEntitlements summary: Count plan entitlements tags: - entitlements parameters: - name: feature_id in: query description: Filter plan entitlements by a single feature ID (starting with feat_) schema: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter plan entitlements by multiple feature IDs (starting with feat_) schema: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) schema: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 - name: plan_id in: query description: Filter plan entitlements by a single plan ID (starting with plan_) schema: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) - name: plan_ids in: query description: Filter plan entitlements by multiple plan IDs (starting with plan_) schema: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 - name: plan_version_id in: query description: Filter plan entitlements by a single plan version ID (starting with plvr_) schema: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) - name: plan_version_ids in: query description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) schema: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 - name: q in: query description: Search for plan entitlements by feature or company name schema: type: string description: Search for plan entitlements by feature or company name - name: with_metered_products in: query description: Filter plan entitlements only with metered products schema: type: boolean description: Filter plan entitlements only with metered products - 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: feature_id: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) feature_ids: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_id: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) plan_ids: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 plan_version_id: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) plan_version_ids: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 q: type: string description: Search for plan entitlements by feature or company name with_metered_products: type: boolean description: Filter plan entitlements only with metered products title: CountPlanEntitlementsParams required: - data - params title: CountPlanEntitlementsResponse '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' /plan-entitlements/duplicate: post: operationId: duplicatePlanEntitlements summary: Duplicate plan entitlements tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/DuplicatePlanEntitlementsRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DuplicatePlanEntitlementsResponseResponseData' params: type: object description: Input parameters title: DuplicatePlanEntitlementsParams required: - data - params title: DuplicatePlanEntitlementsResponse '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' /usage-by-company: get: operationId: getFeatureUsageByCompany summary: Get feature usage by company tags: - entitlements parameters: - name: keys in: query description: Key/value pairs required: true schema: additionalProperties: type: string type: object responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureUsageDetailResponseData' params: type: object description: Input parameters properties: keys: additionalProperties: type: string type: object title: GetFeatureUsageByCompanyParams required: - data - params title: GetFeatureUsageByCompanyResponse '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 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 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 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 UserResponseData: type: object properties: created_at: type: string format: date-time environment_id: type: string id: type: string last_seen_at: type: string format: date-time nullable: true name: type: string updated_at: type: string format: date-time required: - id - environment_id - name - created_at - updated_at title: UserResponseData 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 FeatureUsageTimeSeriesResponseData: type: object properties: feature_id: type: string feature_type: $ref: '#/components/schemas/FeatureType' limits: type: array items: $ref: '#/components/schemas/LimitTimeSeriesPointResponseData' maxItems: 1000 period_type: type: string nullable: true usage_points: type: array items: $ref: '#/components/schemas/UsageTimeSeriesPointResponseData' maxItems: 1000 required: - feature_id - feature_type - limits - usage_points title: FeatureUsageTimeSeriesResponseData 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 UpdatePlanEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - value_type title: UpdatePlanEntitlementRequestBody 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 FeatureDetailResponseData: 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/FlagDetailResponseData' maxItems: 1000 icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer: $ref: '#/components/schemas/AccountMemberResponseData' 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: FeatureDetailResponseData BillingPriceScheme: type: string enum: - per_unit - tiered SkippedEntitlementResponseData: type: object properties: entitlement_id: type: string errors: type: array items: $ref: '#/components/schemas/SkippedEntitlementErrorResponseData' maxItems: 1000 feature_id: type: string feature_name: type: string required: - entitlement_id - feature_id - feature_name - errors title: SkippedEntitlementResponseData 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 EntitlementValueType: type: string enum: - boolean - credit - numeric - trait - unknown - unlimited 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 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 TimeSeriesGranularity: type: string enum: - daily - hourly - monthly - weekly EntityType: type: string enum: - company - user MetricPeriodMonthReset: type: string enum: - billing_cycle - first_of_month 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 AccountMemberResponseData: type: object properties: created_at: type: string format: date-time email: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string nullable: true permissions: additionalProperties: type: array items: $ref: '#/components/schemas/AccountMemberPermission' maxItems: 64 type: object role: allOf: - $ref: '#/components/schemas/AccountMemberRole' nullable: true updated_at: type: string format: date-time required: - created_at - id - permissions - updated_at title: AccountMemberResponseData FeatureCompanyResponseData: 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: $ref: '#/components/schemas/CompanyDetailResponseData' 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: $ref: '#/components/schemas/CreditUsage' 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: FeatureCompanyResponseData 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 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 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 CreatePlanEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true plan_id: type: string plan_version_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - plan_id - feature_id - value_type title: CreatePlanEntitlementRequestBody 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 FeatureCompanyUserResponseData: 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. format: int64 nullable: true allocation_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of allocation that is being used. company: $ref: '#/components/schemas/CompanyDetailResponseData' entitlement_id: type: string entitlement_type: $ref: '#/components/schemas/EntitlementType' feature: $ref: '#/components/schemas/FeatureDetailResponseData' metric_reset_at: type: string description: The time at which the metric will resets. 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 period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: The period over which usage is measured. nullable: true plan: $ref: '#/components/schemas/PlanResponseData' usage: type: integer description: The amount of usage that has been consumed; a null value indicates that usage is not being measured. format: int64 nullable: true user: $ref: '#/components/schemas/UserResponseData' required: - access - allocation_type - entitlement_id - entitlement_type title: FeatureCompanyUserResponseData ConditionGroup: type: object properties: conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 required: - conditions title: ConditionGroup UsageTimeSeriesPointResponseData: type: object properties: period_end: type: string format: date-time nullable: true period_start: type: string format: date-time nullable: true timestamp: type: string format: date-time usage: type: integer format: int64 required: - timestamp - usage title: UsageTimeSeriesPointResponseData DuplicatePlanEntitlementsRequestBody: type: object properties: source_plan_id: type: string target_plan_id: type: string required: - source_plan_id - target_plan_id title: DuplicatePlanEntitlementsRequestBody EntitlementType: type: string enum: - company_override - plan_entitlement - unknown 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 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 LimitTimeSeriesPointResponseData: type: object properties: effective_at: type: string format: date-time is_soft_limit: type: boolean limit_source: $ref: '#/components/schemas/EntitlementType' limit_value: type: integer format: int64 nullable: true plan_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true required: - effective_at - is_soft_limit - limit_source title: LimitTimeSeriesPointResponseData CreateCompanyOverrideRequestBody: type: object properties: company_id: type: string credit_consumption_rate: type: number nullable: true expiration_date: type: string format: date-time nullable: true feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true note: type: string nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - company_id - feature_id - value_type title: CreateCompanyOverrideRequestBody 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 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 BillingCreditExpiryUnit: type: string enum: - billing_periods - days CreditUsage: type: object properties: credit_consumption_rate: type: number nullable: true credit_grant_counts: additionalProperties: type: number type: object credit_grant_details: type: array items: $ref: '#/components/schemas/CreditGrantDetail' maxItems: 1000 credit_remaining: type: number nullable: true credit_total: type: number nullable: true credit_type_icon: type: string nullable: true credit_type_name: type: string nullable: true credit_used: type: number nullable: true usage_aggregation: $ref: '#/components/schemas/CreditUsageAggregation' title: CreditUsage 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 RuleType: type: string enum: - company_override - company_override_usage_exceeded - default - global_override - plan_entitlement - plan_entitlement_usage_exceeded - standard 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 BillingTiersMode: type: string enum: - graduated - volume 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 UpdateCompanyOverrideRequestBody: type: object properties: credit_consumption_rate: type: number nullable: true expiration_date: type: string format: date-time nullable: true metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true note: type: string nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - value_type title: UpdateCompanyOverrideRequestBody CurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - currency title: CurrencyPriceRequestBody 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 AccountMemberPermission: type: string enum: - billing_credits_edit - companies_edit - company_users_edit - components_edit - data_exports_edit - features_edit - flag_rules_edit - flags_edit - overrides_edit - plan_billing_edit - plan_entitlements_edit - plan_versions_edit - plans_edit - webhooks_edit - webhooks_reveal_secret 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 TraitType: type: string enum: - boolean - currency - date - number - string - url AccountMemberRole: type: string enum: - admin - member PlanType: type: string enum: - plan - add_on BillingSubscriptionTrialEndSetting: type: string enum: - cancel - subscribe 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 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 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 BillingProviderType: type: string enum: - orb - schematic - stripe BillingPlanCreditGrantResetCadence: type: string enum: - daily - monthly - weekly - yearly SkippedEntitlementErrorResponseData: type: object properties: message: type: string required: - message title: SkippedEntitlementErrorResponseData CreatePriceTierRequestBody: 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: CreatePriceTierRequestBody 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 FlagDetailResponseData: 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: $ref: '#/components/schemas/AccountMemberResponseData' 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: FlagDetailResponseData DuplicatePlanEntitlementsResponseResponseData: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 skipped: type: array items: $ref: '#/components/schemas/SkippedEntitlementResponseData' maxItems: 1000 required: - data - skipped title: DuplicatePlanEntitlementsResponseResponseData 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 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 CreateBillingLinkedPlanEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_provider: $ref: '#/components/schemas/BillingProviderType' billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 external_resource_id: type: string maxLength: 255 feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true plan_id: type: string plan_version_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - plan_id - feature_id - value_type - billing_provider - external_resource_id title: CreateBillingLinkedPlanEntitlementRequestBody securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Schematic-Api-Key