openapi: 3.0.0 info: title: Schematic accesstokens plans API version: '0.1' description: Schematic API x-rules-engine-schema-version: v97288f60 servers: - url: https://api.schematichq.com security: - ApiKeyAuth: [] tags: - name: plans paths: /company-plans/{company_plan_id}: put: operationId: updateCompanyPlans summary: Update company plans tags: - plans parameters: - name: company_plan_id in: path description: company_plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCompanyPlansRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters title: UpdateCompanyPlansParams required: - data - params title: UpdateCompanyPlansResponse '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' /custom-plan-billings: get: operationId: listCustomPlanBillings summary: List custom plan billings tags: - plans parameters: - name: company_id in: query description: Filter by company ID schema: type: string description: Filter by company ID - name: plan_id in: query description: Filter by plan ID schema: type: string description: Filter by plan ID - name: status in: query description: Filter by billing status schema: allOf: - $ref: '#/components/schemas/CustomPlanBillingStatus' description: Filter by billing status - name: statuses in: query description: Filter by multiple billing statuses schema: type: array description: Filter by multiple billing statuses items: $ref: '#/components/schemas/CustomPlanBillingStatus' maxItems: 10 - 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/CustomPlanBillingResponseData' title: ListCustomPlanBillingsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string description: Filter by company ID 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 by plan ID status: allOf: - $ref: '#/components/schemas/CustomPlanBillingStatus' description: Filter by billing status statuses: type: array description: Filter by multiple billing statuses items: $ref: '#/components/schemas/CustomPlanBillingStatus' maxItems: 10 title: ListCustomPlanBillingsParams required: - data - params title: ListCustomPlanBillingsResponse '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' /custom-plan-billings/{custom_plan_billing_id}/retry: put: operationId: retryCustomPlanBilling summary: Retry custom plan billing tags: - plans parameters: - name: custom_plan_billing_id in: path description: custom_plan_billing_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RetryCustomPlanBillingRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CustomPlanBillingResponseData' params: type: object description: Input parameters title: RetryCustomPlanBillingParams required: - data - params title: RetryCustomPlanBillingResponse '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' /custom-plans: post: operationId: createCustomPlan summary: Create custom plan tags: - plans requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCustomPlanRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: CreateCustomPlanParams required: - data - params title: CreateCustomPlanResponse '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' /plans: get: operationId: listPlans summary: List plans tags: - plans parameters: - name: company_id in: query schema: type: string - name: exclude_company_scoped in: query description: Exclude plans that are scoped to a company (custom plans assigned to a company) schema: type: boolean description: Exclude plans that are scoped to a company (custom plans assigned to a company) - name: for_fallback_plan in: query description: Filter for plans valid as fallback plans (not linked to billing) schema: type: boolean description: Filter for plans valid as fallback plans (not linked to billing) - name: for_initial_plan in: query description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) schema: type: boolean description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) - name: for_trial_expiry_plan in: query description: Filter for plans valid as trial expiry plans (not linked to billing or free) schema: type: boolean description: Filter for plans valid as trial expiry plans (not linked to billing or free) - name: has_product_id in: query description: Filter out plans that do not have a billing product ID schema: type: boolean description: Filter out plans that do not have a billing product ID - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: include_draft_versions in: query description: Include billing settings from draft versions for plans which have draft version schema: type: boolean description: Include billing settings from draft versions for plans which have draft version - name: plan_type in: query description: Filter by plan type schema: allOf: - $ref: '#/components/schemas/PlanType' description: Filter by plan type - name: q in: query schema: type: string - name: scoped_to_company_id in: query description: Filter plans scoped to a specific company (custom plans) schema: type: string description: Filter plans scoped to a specific company (custom plans) - name: without_entitlement_for in: query description: Filter out plans that already have a plan entitlement for the specified feature ID schema: type: string description: Filter out plans that already have a plan entitlement for the specified feature ID - name: without_paid_product_id in: query description: Filter out plans that have a paid billing product ID schema: type: boolean description: Filter out plans that have a paid billing product ID - 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/PlanDetailResponseData' title: ListPlansResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string exclude_company_scoped: type: boolean description: Exclude plans that are scoped to a company (custom plans assigned to a company) for_fallback_plan: type: boolean description: Filter for plans valid as fallback plans (not linked to billing) for_initial_plan: type: boolean description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) for_trial_expiry_plan: type: boolean description: Filter for plans valid as trial expiry plans (not linked to billing or free) has_product_id: type: boolean description: Filter out plans that do not have a billing product ID ids: type: array items: type: string maxItems: 100 include_draft_versions: type: boolean description: Include billing settings from draft versions for plans which have draft version 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_type: allOf: - $ref: '#/components/schemas/PlanType' description: Filter by plan type q: type: string scoped_to_company_id: type: string description: Filter plans scoped to a specific company (custom plans) without_entitlement_for: type: string description: Filter out plans that already have a plan entitlement for the specified feature ID without_paid_product_id: type: boolean description: Filter out plans that have a paid billing product ID title: ListPlansParams required: - data - params title: ListPlansResponse '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: createPlan summary: Create plan tags: - plans requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePlanRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: CreatePlanParams required: - data - params title: CreatePlanResponse '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' /plans/{plan_id}: get: operationId: getPlan summary: Get plan tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string - name: plan_version_id in: query description: Fetch billing settings for a specific plan version schema: type: string description: Fetch billing settings for a specific plan version responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters properties: plan_version_id: type: string description: Fetch billing settings for a specific plan version title: GetPlanParams required: - data - params title: GetPlanResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updatePlan summary: Update plan tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: UpdatePlanParams required: - data - params title: UpdatePlanResponse '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: deletePlan summary: Delete plan tags: - plans parameters: - name: plan_id in: path description: plan_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: DeletePlanParams required: - data - params title: DeletePlanResponse '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' /plans/{plan_id}/billing_products: put: operationId: upsertBillingProductPlan summary: Upsert billing product plan tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertBillingProductRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingProductPlanResponseData' params: type: object description: Input parameters title: UpsertBillingProductPlanParams required: - data - params title: UpsertBillingProductPlanResponse '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' /plans/billing-linked: post: operationId: upsertPlanForBillingProduct summary: Upsert plan for billing product tags: - plans requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingLinkedPlanRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: UpsertPlanForBillingProductParams required: - data - params title: UpsertPlanForBillingProductResponse '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' /plans/billing-product-match-companies: get: operationId: listBillingProductMatchCompanies summary: List billing product match companies tags: - plans parameters: - name: plan_id in: query description: The plan ID to find billing product match companies for required: true schema: type: string description: The plan ID to find billing product match companies for - name: q in: query description: Search for companies by name, keys or string traits schema: type: string description: Search for companies by name, keys or string traits maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyDetailResponseData' title: ListBillingProductMatchCompaniesResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_id: type: string description: The plan ID to find billing product match companies for q: type: string description: Search for companies by name, keys or string traits maxLength: 512 title: ListBillingProductMatchCompaniesParams required: - data - params title: ListBillingProductMatchCompaniesResponse '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' /plans/billing-product-match-companies/count: get: operationId: countBillingProductMatchCompanies summary: Count billing product match companies tags: - plans parameters: - name: plan_id in: query description: The plan ID to find billing product match companies for required: true schema: type: string description: The plan ID to find billing product match companies for - name: q in: query description: Search for companies by name, keys or string traits schema: type: string description: Search for companies by name, keys or string traits maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: '0' responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: '100' offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_id: type: string description: The plan ID to find billing product match companies for q: type: string description: Search for companies by name, keys or string traits maxLength: 512 title: CountBillingProductMatchCompaniesParams required: - data - params title: CountBillingProductMatchCompaniesResponse '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' /plans/count: get: operationId: countPlans summary: Count plans tags: - plans parameters: - name: company_id in: query schema: type: string - name: exclude_company_scoped in: query description: Exclude plans that are scoped to a company (custom plans assigned to a company) schema: type: boolean description: Exclude plans that are scoped to a company (custom plans assigned to a company) - name: for_fallback_plan in: query description: Filter for plans valid as fallback plans (not linked to billing) schema: type: boolean description: Filter for plans valid as fallback plans (not linked to billing) - name: for_initial_plan in: query description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) schema: type: boolean description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) - name: for_trial_expiry_plan in: query description: Filter for plans valid as trial expiry plans (not linked to billing or free) schema: type: boolean description: Filter for plans valid as trial expiry plans (not linked to billing or free) - name: has_product_id in: query description: Filter out plans that do not have a billing product ID schema: type: boolean description: Filter out plans that do not have a billing product ID - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: include_draft_versions in: query description: Include billing settings from draft versions for plans which have draft version schema: type: boolean description: Include billing settings from draft versions for plans which have draft version - name: plan_type in: query description: Filter by plan type schema: allOf: - $ref: '#/components/schemas/PlanType' description: Filter by plan type - name: q in: query schema: type: string - name: scoped_to_company_id in: query description: Filter plans scoped to a specific company (custom plans) schema: type: string description: Filter plans scoped to a specific company (custom plans) - name: without_entitlement_for in: query description: Filter out plans that already have a plan entitlement for the specified feature ID schema: type: string description: Filter out plans that already have a plan entitlement for the specified feature ID - name: without_paid_product_id in: query description: Filter out plans that have a paid billing product ID schema: type: boolean description: Filter out plans that have a paid billing product ID - 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 exclude_company_scoped: type: boolean description: Exclude plans that are scoped to a company (custom plans assigned to a company) for_fallback_plan: type: boolean description: Filter for plans valid as fallback plans (not linked to billing) for_initial_plan: type: boolean description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) for_trial_expiry_plan: type: boolean description: Filter for plans valid as trial expiry plans (not linked to billing or free) has_product_id: type: boolean description: Filter out plans that do not have a billing product ID ids: type: array items: type: string maxItems: 100 include_draft_versions: type: boolean description: Include billing settings from draft versions for plans which have draft version 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_type: allOf: - $ref: '#/components/schemas/PlanType' description: Filter by plan type q: type: string scoped_to_company_id: type: string description: Filter plans scoped to a specific company (custom plans) without_entitlement_for: type: string description: Filter out plans that already have a plan entitlement for the specified feature ID without_paid_product_id: type: boolean description: Filter out plans that have a paid billing product ID title: CountPlansParams required: - data - params title: CountPlansResponse '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' /plans/issues: get: operationId: listPlanIssues summary: List plan issues tags: - plans parameters: - name: plan_id in: query required: true schema: type: string - name: plan_version_id in: query schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanIssueResponseData' title: ListPlanIssuesResponseData maxItems: 250 params: type: object description: Input parameters properties: plan_id: type: string plan_version_id: type: string title: ListPlanIssuesParams required: - data - params title: ListPlanIssuesResponse '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' /plans/version/{plan_id}: delete: operationId: deletePlanVersion summary: Delete plan version tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string - name: promote_archived_version in: query schema: type: boolean responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters properties: promote_archived_version: type: boolean title: DeletePlanVersionParams required: - data - params title: DeletePlanVersionResponse '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' /plans/version/{plan_id}/publish: put: operationId: publishPlanVersion summary: Publish plan version tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PublishPlanVersionRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanVersionResponseData' params: type: object description: Input parameters title: PublishPlanVersionParams required: - data - params title: PublishPlanVersionResponse '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' components: 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 PublishPlanVersionRequestBody: type: object properties: activation_strategy: allOf: - $ref: '#/components/schemas/CustomPlanActivationStrategy' nullable: true customer_email: type: string nullable: true maxLength: 255 days_until_due: type: integer format: int64 nullable: true maximum: 365 excluded_company_ids: type: array items: type: string maxItems: 1000 migration_strategy: $ref: '#/components/schemas/PlanVersionMigrationStrategy' pay_in_advance: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 required: - excluded_company_ids - migration_strategy - pay_in_advance title: PublishPlanVersionRequestBody BillingPlanCreditGrantResetStart: type: string enum: - billing_period - first_of_month 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 RetryCustomPlanBillingRequestBody: type: object properties: activation_strategy: allOf: - $ref: '#/components/schemas/CustomPlanActivationStrategy' nullable: true customer_email: type: string maxLength: 255 days_until_due: type: integer format: int64 nullable: true maximum: 365 pay_in_advance: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 required: - customer_email - pay_in_advance title: RetryCustomPlanBillingRequestBody 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 PlanCurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 monthly_price: type: integer format: int64 nullable: true one_time_price: type: integer format: int64 nullable: true yearly_price: type: integer format: int64 nullable: true required: - currency title: PlanCurrencyPriceRequestBody BillingCreditBurnStrategy: type: string enum: - expiration_priority - first_in_first_out - last_in_first_out - plan_first_then_credit_bundles_first_in_first_out PlanCurrencyPricesResponseData: type: object properties: currency: type: string monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: PlanCurrencyPricesResponseData BillingPriceResponseData: type: object properties: currency: type: string external_price_id: type: string id: type: string interval: $ref: '#/components/schemas/BillingProductPriceInterval' nickname: type: string nullable: true price: type: integer format: int64 price_decimal: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' scheme: $ref: '#/components/schemas/BillingPriceScheme' required: - currency - external_price_id - id - interval - price - provider_type - scheme title: BillingPriceResponseData PlanIssueResponseData: type: object properties: code: type: string description: type: string detail: type: string id: type: string required: - code - description title: PlanIssueResponseData 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 CreatePlanRequestBody: type: object properties: description: type: string maxLength: 1024 minLength: 0 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 plan_type: $ref: '#/components/schemas/PlanType' required: - description - name - plan_type title: CreatePlanRequestBody FeatureEntitlement: type: object properties: allocation: type: integer description: If the company has a numeric entitlement for this feature, the allocated amount format: int64 nullable: true credit_id: type: string description: If the company has a credit-based entitlement for this feature, the ID of the credit nullable: true credit_remaining: type: number description: If the company has a credit-based entitlement for this feature, the remaining credit amount nullable: true credit_total: type: number description: If the company has a credit-based entitlement for this feature, the total credit amount nullable: true credit_used: type: number description: If the company has a credit-based entitlement for this feature, the amount of credit used nullable: true event_name: type: string description: If the feature is event-based, the name of the event tracked for usage nullable: true feature_id: type: string description: The ID of the feature feature_key: type: string description: The key of the flag associated with the feature metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: For event-based feature entitlements, the period over which usage is tracked nullable: true metric_reset_at: type: string description: For event-based feature entitlements, when the usage period will reset format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle nullable: true soft_limit: type: integer description: For usage-based pricing, the soft limit for overage charges or the next tier boundary format: int64 nullable: true usage: type: integer description: If the company has a numeric entitlement for this feature, the current usage amount format: int64 nullable: true value_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of the entitlement value required: - feature_id - feature_key - value_type title: FeatureEntitlement FlagType: type: string enum: - boolean CreditCurrencyPrice: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: CreditCurrencyPrice BillingProductResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - product_id - provider_type - quantity - updated_at title: BillingProductResponseData 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 BillingPriceScheme: type: string enum: - per_unit - tiered BillingProductPriceTierResponseData: type: object properties: flat_amount: type: integer format: int64 nullable: true per_unit_price: type: integer format: int64 nullable: true per_unit_price_decimal: type: string nullable: true up_to: type: integer format: int64 nullable: true title: BillingProductPriceTierResponseData ChargeType: type: string enum: - free - one_time - recurring EntitlementValueType: type: string enum: - boolean - credit - numeric - trait - unknown - unlimited 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 UpsertBillingProductRequestBody: type: object properties: billing_product_id: type: string nullable: true charge_type: $ref: '#/components/schemas/ChargeType' currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPriceRequestBody' nullable: true maxItems: 50 is_trialable: type: boolean monthly_price: type: integer format: int64 nullable: true monthly_price_id: type: string nullable: true one_time_price: type: integer format: int64 nullable: true one_time_price_id: type: string nullable: true trial_days: type: integer format: int64 nullable: true yearly_price: type: integer format: int64 nullable: true yearly_price_id: type: string nullable: true required: - charge_type - is_trialable title: UpsertBillingProductRequestBody 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 PlanIcon: type: string enum: - amber - blue - blueGray - blueGreen - cyan - emerald - fuchsia - gray - green - indigo - lightBlue - lime - orange - pink - purple - red - redOrange - rose - sky - slate - teal - trueGray - violet - warmGray - yellow EntityTraitDefinitionResponseData: type: object properties: created_at: type: string format: date-time display_name: type: string entity_type: $ref: '#/components/schemas/EntityType' hierarchy: type: array items: type: string maxItems: 1000 id: type: string trait_type: $ref: '#/components/schemas/TraitType' updated_at: type: string format: date-time required: - created_at - display_name - entity_type - hierarchy - id - trait_type - updated_at title: EntityTraitDefinitionResponseData FeatureInPlanResponseData: type: object properties: billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' created_at: type: string format: date-time description: type: string event_subtype: type: string nullable: true event_summary: $ref: '#/components/schemas/EventSummaryResponseData' feature_type: $ref: '#/components/schemas/FeatureType' flags: type: array items: $ref: '#/components/schemas/FlagInPlanResponseData' maxItems: 1000 icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string plans: type: array items: $ref: '#/components/schemas/PreviewObject' maxItems: 1000 plural_name: type: string nullable: true singular_name: type: string nullable: true trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - feature_type - icon - created_at - updated_at - flags - plans title: FeatureInPlanResponseData Rule: type: object properties: account_id: type: string condition_groups: type: array items: $ref: '#/components/schemas/ConditionGroup' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 environment_id: type: string flag_id: type: string nullable: true id: type: string name: type: string priority: type: integer format: int64 rule_type: $ref: '#/components/schemas/RuleType' value: type: boolean required: - id - account_id - environment_id - rule_type - name - priority - conditions - condition_groups - value title: Rule BillingPlanCreditGrantResponseData: type: object properties: auto_topup_amount: type: integer format: int64 nullable: true auto_topup_amount_type: type: string nullable: true auto_topup_enabled: type: boolean auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true auto_topup_threshold_credits: type: integer format: int64 nullable: true auto_topup_threshold_percent: type: integer format: int64 nullable: true created_at: type: string format: date-time credit: $ref: '#/components/schemas/BillingCreditResponseData' credit_amount: type: integer format: int64 credit_id: type: string credit_name: type: string description: Use credit.name from the nested credit object instead deprecated: true credit_plural_name: type: string description: Use plural_name from the nested credit object instead nullable: true deprecated: true credit_singular_name: type: string description: Use singular_name from the nested credit object instead nullable: true deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/PreviewObjectResponseData' plan_id: type: string plan_name: type: string description: Use plan.name from the nested plan object instead deprecated: true plan_version_id: type: string nullable: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - plan_name - credit_amount - credit_name - auto_topup_enabled - created_at - updated_at title: BillingPlanCreditGrantResponseData DeleteResponse: type: object properties: deleted: type: boolean description: Whether the delete was successful ComparableOperator: type: string enum: - eq - gt - gte - is_empty - lt - lte - not_empty - ne EntityKeyDetailResponseData: type: object properties: created_at: type: string format: date-time definition: $ref: '#/components/schemas/EntityKeyDefinitionResponseData' definition_id: type: string entity_id: type: string entity_type: $ref: '#/components/schemas/EntityType' environment_id: type: string id: type: string key: type: string updated_at: type: string format: date-time value: type: string required: - id - environment_id - definition_id - entity_type - entity_id - key - value - created_at - updated_at title: EntityKeyDetailResponseData ConditionGroup: type: object properties: conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 required: - conditions title: ConditionGroup 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 ScheduledDowngradeResponseData: type: object properties: currency: type: string effective_after: type: string format: date-time from_plan_id: type: string from_plan_name: type: string from_subscription_price: type: integer format: int64 id: type: string interval: type: string scheduled_interval: type: string nullable: true scheduled_price: type: integer format: int64 nullable: true to_plan_id: type: string to_plan_name: type: string required: - currency - effective_after - from_plan_id - from_plan_name - from_subscription_price - id - interval - to_plan_id - to_plan_name title: ScheduledDowngradeResponseData BillingProductDetailResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true prices: type: array items: $ref: '#/components/schemas/BillingPriceResponseData' maxItems: 1000 product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number subscription_count: type: integer format: int64 updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - product_id - provider_type - quantity - updated_at - prices - subscription_count title: BillingProductDetailResponseData MetricPeriod: type: string enum: - all_time - current_day - current_month - current_week GenericPreviewObject: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: GenericPreviewObject UpdatePlanRequestBody: type: object properties: description: type: string nullable: true maxLength: 1024 minLength: 0 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 required: - name title: UpdatePlanRequestBody 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 BillingCreditExpiryType: type: string enum: - duration - end_of_billing_period - end_of_next_billing_period - end_of_trial - no_expiry PlanCreditGrantView: type: object properties: billing_credit_auto_topup_amount: type: integer format: int64 nullable: true billing_credit_auto_topup_amount_type: type: string nullable: true billing_credit_auto_topup_enabled: type: boolean billing_credit_auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true billing_credit_auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true billing_credit_auto_topup_expiry_unit_count: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_credits: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_percent: type: integer format: int64 nullable: true created_at: type: string format: date-time credit: $ref: '#/components/schemas/BillingCreditView' credit_amount: type: integer format: int64 credit_description: type: string description: Deprecated field, will be removed in the future. Use Credit.Description instead. deprecated: true credit_icon: type: string description: Deprecated field, will be removed in the future. Use Credit.Icon instead. nullable: true deprecated: true credit_id: type: string credit_name: type: string description: Deprecated field, will be removed in the future. Use Credit.Name instead. deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/GenericPreviewObject' plan_id: type: string plan_version_id: type: string nullable: true plural_name: type: string description: Deprecated field, will be removed in the future. Use Credit.PluralName instead. nullable: true deprecated: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: $ref: '#/components/schemas/BillingPlanCreditGrantResetType' singular_name: type: string description: Deprecated field, will be removed in the future. Use Credit.SingularName instead. nullable: true deprecated: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - credit_amount - credit_name - credit_description - reset_type - billing_credit_auto_topup_enabled - created_at - updated_at title: PlanCreditGrantView FlagInPlanResponseData: type: object properties: created_at: type: string format: date-time default_value: type: boolean description: type: string feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string key: type: string last_checked_at: type: string format: date-time nullable: true maintainer_account_member_id: type: string nullable: true name: type: string rules: type: array items: $ref: '#/components/schemas/RuleDetailResponseData' maxItems: 1000 updated_at: type: string format: date-time required: - created_at - default_value - description - flag_type - id - key - name - updated_at - rules title: FlagInPlanResponseData RuleType: type: string enum: - company_override - company_override_usage_exceeded - default - global_override - plan_entitlement - plan_entitlement_usage_exceeded - standard 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 ConditionType: type: string enum: - base_plan - billing_product - company - credit - metric - plan - plan_version - trait - user CreateCustomPlanRequestBody: type: object properties: company_id: type: string copied_from_plan_id: type: string nullable: true description: type: string maxLength: 1024 minLength: 0 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 required: - company_id - description - name title: CreateCustomPlanRequestBody EntityTraitDetailResponseData: type: object properties: created_at: type: string format: date-time definition: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' definition_id: type: string environment_id: type: string id: type: string updated_at: type: string format: date-time value: type: string required: - id - environment_id - definition_id - value - created_at - updated_at title: EntityTraitDetailResponseData PreviewObject: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: PreviewObject PaymentMethodResponseData: type: object properties: account_last4: type: string nullable: true account_name: type: string nullable: true bank_name: type: string nullable: true billing_email: type: string nullable: true billing_name: type: string nullable: true card_brand: type: string nullable: true card_exp_month: type: integer format: int64 nullable: true card_exp_year: type: integer format: int64 nullable: true card_last4: type: string nullable: true company_id: type: string nullable: true created_at: type: string format: date-time customer_external_id: type: string environment_id: type: string external_id: type: string id: type: string payment_method_type: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' updated_at: type: string format: date-time required: - id - created_at - customer_external_id - environment_id - external_id - payment_method_type - provider_type - updated_at title: PaymentMethodResponseData CompanyPlanWithBillingSubView: type: object properties: added_on: type: string format: date-time nullable: true billing_product_external_id: type: string nullable: true billing_product_id: type: string nullable: true description: type: string nullable: true id: type: string image_url: type: string nullable: true included_credit_grants: type: array items: $ref: '#/components/schemas/PlanCreditGrantView' maxItems: 1000 name: type: string plan_period: type: string nullable: true plan_price: type: integer format: int64 nullable: true plan_version_id: type: string nullable: true required: - id - name - included_credit_grants title: CompanyPlanWithBillingSubView BillingProductPriceInterval: type: string enum: - day - month - one-time - year TraitType: type: string enum: - boolean - currency - date - number - string - url 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 BillingProductPlanResponseData: type: object properties: account_id: type: string billing_product_id: type: string charge_type: $ref: '#/components/schemas/ChargeType' controlled_by: $ref: '#/components/schemas/BillingProviderType' environment_id: type: string is_trialable: type: boolean monthly_price_id: type: string nullable: true one_time_price_id: type: string nullable: true plan_id: type: string trial_days: type: integer format: int64 nullable: true yearly_price_id: type: string nullable: true required: - account_id - charge_type - environment_id - plan_id - billing_product_id - controlled_by - is_trialable title: BillingProductPlanResponseData CreateBillingLinkedPlanRequestBody: type: object properties: billing_provider: $ref: '#/components/schemas/BillingProviderType' description: type: string maxLength: 1024 minLength: 0 external_resource_id: type: string maxLength: 255 external_resource_version: type: string nullable: true maxLength: 64 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 plan_type: $ref: '#/components/schemas/PlanType' required: - description - name - plan_type - billing_provider - external_resource_id title: CreateBillingLinkedPlanRequestBody InvoiceStatus: type: string enum: - draft - open - paid - uncollectible - void FeatureType: type: string enum: - boolean - event - trait PlanVersionMigrationStrategy: type: string enum: - immediate - leave BillingProviderType: type: string enum: - orb - schematic - stripe BillingPlanCreditGrantResetCadence: type: string enum: - daily - monthly - weekly - yearly PlanVersionStatus: type: string enum: - published - draft - archived Condition: type: object properties: account_id: type: string comparison_trait_definition: $ref: '#/components/schemas/TraitDefinition' condition_type: $ref: '#/components/schemas/ConditionType' consumption_rate: type: number nullable: true credit_id: type: string nullable: true environment_id: type: string event_subtype: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 trait_definition: $ref: '#/components/schemas/TraitDefinition' trait_value: type: string required: - id - account_id - environment_id - condition_type - operator - resource_ids - trait_value title: Condition InvoiceResponseData: type: object properties: amount_due: type: integer format: int64 amount_paid: type: integer format: int64 amount_remaining: type: integer format: int64 collection_method: type: string company_id: type: string nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string due_date: type: string format: date-time nullable: true environment_id: type: string external_id: type: string nullable: true id: type: string payment_method_external_id: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' status: allOf: - $ref: '#/components/schemas/InvoiceStatus' nullable: true subscription_external_id: type: string nullable: true subtotal: type: integer format: int64 updated_at: type: string format: date-time url: type: string nullable: true required: - id - amount_due - amount_paid - amount_remaining - collection_method - created_at - currency - customer_external_id - environment_id - provider_type - subtotal - updated_at title: InvoiceResponseData BillingCreditView: type: object properties: account_id: type: string burn_strategy: $ref: '#/components/schemas/BillingCreditBurnStrategy' cost_editable: type: boolean created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPrice' maxItems: 1000 default_expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' default_expiry_unit_count: type: integer format: int64 nullable: true default_rollover_policy: $ref: '#/components/schemas/BillingCreditRolloverPolicy' description: type: string environment_id: type: string icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceView' price_per_unit: type: integer format: int64 nullable: true price_per_unit_decimal: type: string nullable: true product: $ref: '#/components/schemas/BillingProductResponseData' singular_name: type: string nullable: true updated_at: type: string format: date-time required: - id - account_id - environment_id - name - description - default_expiry_unit - default_rollover_policy - burn_strategy - cost_editable - currency_prices - created_at - updated_at title: BillingCreditView UpdateCompanyPlansRequestBody: type: object properties: add_on_ids: type: array items: type: string maxItems: 100 base_plan_id: type: string nullable: true required: - add_on_ids title: UpdateCompanyPlansRequestBody UpdatePayInAdvanceRequestBody: type: object properties: price_id: type: string quantity: type: integer format: int64 required: - price_id - quantity title: UpdatePayInAdvanceRequestBody PlanVersionResponseData: type: object properties: created_at: type: string format: date-time description: type: string environment_id: type: string icon: $ref: '#/components/schemas/PlanIcon' id: type: string name: type: string original_plan_id: type: string nullable: true plan_type: $ref: '#/components/schemas/PlanType' status: $ref: '#/components/schemas/PlanVersionStatus' updated_at: type: string format: date-time version: type: integer format: int64 required: - created_at - description - environment_id - icon - id - name - plan_type - status - updated_at - version title: PlanVersionResponseData TraitDefinition: type: object properties: comparable_type: type: string enum: - bool - date - int - string entity_type: $ref: '#/components/schemas/EntityType' id: type: string required: - id - comparable_type - entity_type title: TraitDefinition RuleConditionDetailResponseData: type: object properties: comparison_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' comparison_trait_id: type: string nullable: true condition_group_id: type: string nullable: true condition_type: $ref: '#/components/schemas/ConditionType' created_at: type: string format: date-time environment_id: type: string event_subtype: type: string nullable: true flag_id: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 resources: type: array items: $ref: '#/components/schemas/PreviewObjectResponseData' maxItems: 1000 rule_id: type: string trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_entity_type: allOf: - $ref: '#/components/schemas/EntityType' nullable: true trait_id: type: string nullable: true trait_value: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - condition_type - operator - created_at - updated_at - resource_ids - trait_value - resources title: RuleConditionDetailResponseData CustomPlanActivationStrategy: type: string enum: - on_payment - on_publish CountResponse: type: object properties: count: type: integer description: The number of resources PlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' maxItems: 1000 is_default: type: boolean deprecated: true is_free: type: boolean is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions title: PlanDetailResponseData 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 securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Schematic-Api-Key