{"components":{"parameters":{"AddonOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"AddonOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/AddonOrderBy"},"style":"form"},"BillingProfileCustomerOverrideOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"BillingProfileCustomerOverrideOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideOrderBy"},"style":"form"},"BillingProfileListCustomerOverridesParams.billingProfile":{"description":"Filter by billing profile.","in":"query","name":"billingProfile","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},"BillingProfileListCustomerOverridesParams.customerId":{"description":"Filter by customer id.","in":"query","name":"customerId","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},"BillingProfileListCustomerOverridesParams.customerKey":{"description":"Filter by customer key","explode":false,"in":"query","name":"customerKey","schema":{"type":"string"},"style":"form"},"BillingProfileListCustomerOverridesParams.customerName":{"description":"Filter by customer name.","explode":false,"in":"query","name":"customerName","schema":{"type":"string"},"style":"form"},"BillingProfileListCustomerOverridesParams.customerPrimaryEmail":{"description":"Filter by customer primary email","explode":false,"in":"query","name":"customerPrimaryEmail","schema":{"type":"string"},"style":"form"},"BillingProfileListCustomerOverridesParams.customersWithoutPinnedProfile":{"description":"Only return customers without pinned billing profiles. This implicitly sets includeAllCustomers to true.","in":"query","name":"customersWithoutPinnedProfile","schema":{"type":"boolean"},"style":"form"},"BillingProfileListCustomerOverridesParams.expand":{"description":"Expand the response with additional details.","in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideExpand"},"type":"array"},"style":"form"},"BillingProfileListCustomerOverridesParams.includeAllCustomers":{"description":"Include customers without customer overrides.\n\nIf set to false only the customers specifically associated with a billing profile will be returned.\n\nIf set to true, in case of the default billing profile, all customers will be returned.","in":"query","name":"includeAllCustomers","schema":{"default":true,"type":"boolean"},"style":"form"},"BillingProfileOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"BillingProfileOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/BillingProfileOrderBy"},"style":"form"},"CursorPagination.cursor":{"description":"The cursor after which to start the pagination.","explode":false,"in":"query","name":"cursor","schema":{"type":"string"},"style":"form"},"CursorPagination.limit":{"description":"The limit of the pagination.","explode":false,"in":"query","name":"limit","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"},"style":"form"},"CustomerOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"CustomerOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/CustomerOrderBy"},"style":"form"},"CustomerSubscriptionOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"CustomerSubscriptionOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/CustomerSubscriptionOrderBy"},"style":"form"},"EntitlementOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"EntitlementOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/EntitlementOrderBy"},"style":"form"},"FeatureOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"FeatureOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/FeatureOrderBy"},"style":"form"},"GrantOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"GrantOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/GrantOrderBy"},"style":"form"},"InvoiceListParams.createdAfter":{"description":"Filter by invoice created time.\nInclusive.","in":"query","name":"createdAfter","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"InvoiceListParams.createdBefore":{"description":"Filter by invoice created time.\nInclusive.","in":"query","name":"createdBefore","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"InvoiceListParams.customers":{"description":"Filter by customer ID","in":"query","name":"customers","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},"InvoiceListParams.expand":{"description":"What parts of the list output to expand in listings","in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/InvoiceExpand"},"type":"array"},"style":"form"},"InvoiceListParams.extendedStatuses":{"description":"Filter by invoice extended statuses","in":"query","name":"extendedStatuses","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},"InvoiceListParams.includeDeleted":{"description":"Include deleted invoices","explode":false,"in":"query","name":"includeDeleted","schema":{"type":"boolean"},"style":"form"},"InvoiceListParams.issuedAfter":{"description":"Filter by invoice issued time.\nInclusive.","in":"query","name":"issuedAfter","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"InvoiceListParams.issuedBefore":{"description":"Filter by invoice issued time.\nInclusive.","in":"query","name":"issuedBefore","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"InvoiceListParams.periodStartAfter":{"description":"Filter by period start time.\nInclusive.","in":"query","name":"periodStartAfter","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"InvoiceListParams.periodStartBefore":{"description":"Filter by period start time.\nInclusive.","in":"query","name":"periodStartBefore","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"InvoiceListParams.statuses":{"description":"Filter by the invoice status.","in":"query","name":"statuses","schema":{"items":{"$ref":"#/components/schemas/InvoiceStatus"},"type":"array"},"style":"form"},"InvoiceOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"InvoiceOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/InvoiceOrderBy"},"style":"form"},"LimitOffset.limit":{"description":"Number of items to return.\n\nDefault is 100.","explode":false,"in":"query","name":"limit","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"},"style":"form"},"LimitOffset.offset":{"description":"Number of items to skip.\n\nDefault is 0.","explode":false,"in":"query","name":"offset","schema":{"default":0,"minimum":0,"type":"integer"},"style":"form"},"MarketplaceApiKeyInstallRequest.type":{"description":"The type of the app to install.","in":"path","name":"type","required":true,"schema":{"$ref":"#/components/schemas/AppType"}},"MarketplaceInstallRequest.type":{"description":"The type of the app to install.","in":"path","name":"type","required":true,"schema":{"$ref":"#/components/schemas/AppType"}},"MarketplaceOAuth2InstallAuthorizeRequest.type":{"description":"The type of the app to install.","in":"path","name":"type","required":true,"schema":{"$ref":"#/components/schemas/AppType"}},"MeterOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"MeterOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/MeterOrderBy"},"style":"form"},"MeterQuery.advancedMeterGroupByFilters":{"content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/FilterString"},"format":"application/json","title":"Advanced meter group by filters"}}},"description":"Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.","in":"query","name":"advancedMeterGroupByFilters"},"MeterQuery.clientId":{"description":"Client ID\nUseful to track progress of a query.","explode":false,"in":"query","name":"clientId","schema":{"maxLength":36,"minLength":1,"type":"string"},"style":"form"},"MeterQuery.filterCustomerId":{"description":"Filtering by multiple customers.\n\nFor example: ?filterCustomerId=customer-1\u0026filterCustomerId=customer-2","in":"query","name":"filterCustomerId","schema":{"items":{"type":"string"},"maxItems":100,"type":"array"},"style":"form"},"MeterQuery.filterGroupBy":{"deprecated":true,"description":"Simple filter for group bys with exact match.\n\nFor example: ?filterGroupBy[vendor]=openai\u0026filterGroupBy[model]=gpt-4-turbo\n\n⚠️ __Deprecated__: Use `advancedMeterGroupByFilters` instead","in":"query","name":"filterGroupBy","schema":{"additionalProperties":{"type":"string"},"type":"object"},"style":"deepObject"},"MeterQuery.from":{"description":"Start date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"MeterQuery.groupBy":{"description":"If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.\n\nFor example: ?groupBy=subject\u0026groupBy=model","in":"query","name":"groupBy","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},"MeterQuery.subject":{"description":"Filtering by multiple subjects.\n\nFor example: ?subject=subject-1\u0026subject=subject-2","in":"query","name":"subject","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},"MeterQuery.to":{"description":"End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},"MeterQuery.windowSize":{"description":"If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.\n\nFor example: ?windowSize=DAY","explode":false,"in":"query","name":"windowSize","schema":{"$ref":"#/components/schemas/WindowSize"},"style":"form"},"MeterQuery.windowTimeZone":{"description":"The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.\n\nFor example: ?windowTimeZone=UTC","explode":false,"in":"query","name":"windowTimeZone","schema":{"default":"UTC","type":"string"},"style":"form"},"NotificationChannelOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"NotificationChannelOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/NotificationChannelOrderBy"},"style":"form"},"NotificationEventOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"NotificationEventOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/NotificationEventOrderBy"},"style":"form"},"NotificationRuleOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"NotificationRuleOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/NotificationRuleOrderBy"},"style":"form"},"OAuth2AuthorizationCodeGrantErrorParams.error":{"description":"Error code.\nRequired with the error response.","explode":false,"in":"query","name":"error","schema":{"$ref":"#/components/schemas/OAuth2AuthorizationCodeGrantErrorType"},"style":"form"},"OAuth2AuthorizationCodeGrantErrorParams.error_description":{"description":"Optional human-readable text providing additional information,\nused to assist the client developer in understanding the error that occurred.","explode":false,"in":"query","name":"error_description","schema":{"type":"string"},"style":"form"},"OAuth2AuthorizationCodeGrantErrorParams.error_uri":{"description":"Optional uri identifying a human-readable web page with\ninformation about the error, used to provide the client\ndeveloper with additional information about the error","explode":false,"in":"query","name":"error_uri","schema":{"type":"string"},"style":"form"},"OAuth2AuthorizationCodeGrantSuccessParams.code":{"description":"Authorization code which the client will later exchange for an access token.\nRequired with the success response.","explode":false,"in":"query","name":"code","schema":{"type":"string"},"style":"form"},"OAuth2AuthorizationCodeGrantSuccessParams.state":{"description":"Required if the \"state\" parameter was present in the client authorization request.\nThe exact value received from the client:\n\nUnique, randomly generated, opaque, and non-guessable string that is sent\nwhen starting an authentication request and validated when processing the response.","explode":false,"in":"query","name":"state","schema":{"type":"string"},"style":"form"},"Pagination.page":{"description":"Page index.\n\nDefault is 1.","explode":false,"in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"},"style":"form"},"Pagination.pageSize":{"description":"The maximum number of items per page.\n\nDefault is 100.","explode":false,"in":"query","name":"pageSize","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"},"style":"form"},"PlanAddonOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"PlanAddonOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/PlanAddonOrderBy"},"style":"form"},"PlanOrderByOrdering.order":{"description":"The order direction.","explode":false,"in":"query","name":"order","schema":{"allOf":[{"$ref":"#/components/schemas/SortOrder"}],"default":"ASC"},"style":"form"},"PlanOrderByOrdering.orderBy":{"description":"The order by field.","explode":false,"in":"query","name":"orderBy","schema":{"$ref":"#/components/schemas/PlanOrderBy"},"style":"form"},"listCustomerAppDataParams.type":{"description":"Filter customer data by app type.","explode":false,"in":"query","name":"type","schema":{"$ref":"#/components/schemas/AppType"},"style":"form"},"queryCustomerGet":{"description":"What parts of the customer output to expand","in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/CustomerExpand"},"type":"array"},"style":"form"},"queryCustomerList.expand":{"description":"What parts of the list output to expand in listings","in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/CustomerExpand"},"type":"array"},"style":"form"},"queryCustomerList.includeDeleted":{"description":"Include deleted customers.","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},"queryCustomerList.key":{"description":"Filter customers by key.\nCase-insensitive partial match.","explode":false,"in":"query","name":"key","schema":{"type":"string"},"style":"form"},"queryCustomerList.name":{"description":"Filter customers by name.\nCase-insensitive partial match.","explode":false,"in":"query","name":"name","schema":{"type":"string"},"style":"form"},"queryCustomerList.planKey":{"description":"Filter customers by the plan key of their susbcription.","explode":false,"in":"query","name":"planKey","schema":{"type":"string"},"style":"form"},"queryCustomerList.primaryEmail":{"description":"Filter customers by primary email.\nCase-insensitive partial match.","explode":false,"in":"query","name":"primaryEmail","schema":{"type":"string"},"style":"form"},"queryCustomerList.subject":{"description":"Filter customers by usage attribution subject.\nCase-insensitive partial match.","explode":false,"in":"query","name":"subject","schema":{"type":"string"},"style":"form"},"queryMeterList.includeDeleted":{"description":"Include deleted meters.","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"}},"schemas":{"Addon":{"description":"Add-on allows extending subscriptions with compatible plans with additional ratecards.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The currency code of the add-on.","title":"Currency"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"effectiveFrom":{"description":"The date and time when the add-on becomes effective. When not specified, the add-on is a draft.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Effective start date","type":"string"},"effectiveTo":{"description":"The date and time when the add-on is no longer effective. When not specified, the add-on is effective indefinitely.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Effective end date","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"instanceType":{"allOf":[{"$ref":"#/components/schemas/AddonInstanceType"}],"description":"The instanceType of the add-ons. Can be \"single\" or \"multiple\".","title":"InstanceType"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"rateCards":{"description":"The rate cards of the add-on.","items":{"$ref":"#/components/schemas/RateCard"},"title":"Rate cards","type":"array"},"status":{"allOf":[{"$ref":"#/components/schemas/AddonStatus"}],"description":"The status of the add-on.\nComputed based on the effective start and end dates:\n- draft = no effectiveFrom\n- active = effectiveFrom \u003c= now \u003c effectiveTo\n- archived  = effectiveTo \u003c= now","readOnly":true,"title":"Status"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"validationErrors":{"description":"List of validation errors.","items":{"$ref":"#/components/schemas/ValidationError"},"nullable":true,"readOnly":true,"title":"Validation errors","type":"array"},"version":{"default":1,"description":"Version of the add-on. Incremented when the add-on is updated.","minimum":1,"readOnly":true,"title":"Version","type":"integer"}},"required":["id","name","createdAt","updatedAt","key","version","instanceType","currency","status","rateCards","validationErrors"],"type":"object"},"AddonCreate":{"description":"Resource create operation model.","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The currency code of the add-on.","title":"Currency"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"instanceType":{"allOf":[{"$ref":"#/components/schemas/AddonInstanceType"}],"description":"The instanceType of the add-ons. Can be \"single\" or \"multiple\".","title":"InstanceType"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"rateCards":{"description":"The rate cards of the add-on.","items":{"$ref":"#/components/schemas/RateCard"},"title":"Rate cards","type":"array"}},"required":["name","key","instanceType","currency","rateCards"],"type":"object"},"AddonInstanceType":{"description":"The instanceType of the add-on.\nSingle instance add-ons can be added to subscription only once while add-ons with multiple type can be added more then once.","enum":["single","multiple"],"type":"string"},"AddonOrderBy":{"description":"Order by options for add-ons.","enum":["id","key","version","created_at","updated_at"],"type":"string"},"AddonPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Addon"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"AddonReplaceUpdate":{"description":"Resource update operation model.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"instanceType":{"allOf":[{"$ref":"#/components/schemas/AddonInstanceType"}],"description":"The instanceType of the add-ons. Can be \"single\" or \"multiple\".","title":"InstanceType"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"rateCards":{"description":"The rate cards of the add-on.","items":{"$ref":"#/components/schemas/RateCard"},"title":"Rate cards","type":"array"}},"required":["name","instanceType","rateCards"],"type":"object"},"AddonStatus":{"description":"The status of the add-on defined by the effectiveFrom and effectiveTo properties.","enum":["draft","active","archived"],"type":"string"},"Address":{"description":"Address","properties":{"city":{"description":"City.","type":"string"},"country":{"allOf":[{"$ref":"#/components/schemas/CountryCode"}],"description":"Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 format."},"line1":{"description":"First line of the address.","type":"string"},"line2":{"description":"Second line of the address.","type":"string"},"phoneNumber":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"state":{"description":"State or province.","type":"string"}},"type":"object"},"Alignment":{"deprecated":true,"description":"Alignment configuration for a plan or subscription.","properties":{"billablesMustAlign":{"deprecated":true,"description":"Whether all Billable items and RateCards must align.\nAlignment means the Price's BillingCadence must align for both duration and anchor time.","type":"boolean"}},"type":"object"},"Annotations":{"additionalProperties":{},"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","example":{"externalId":"019142cc-a016-796a-8113-1a942fecd26d"},"type":"object"},"App":{"description":"App.\nOne of: stripe","discriminator":{"mapping":{"custom_invoicing":"#/components/schemas/CustomInvoicingApp","sandbox":"#/components/schemas/SandboxApp","stripe":"#/components/schemas/StripeApp"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/StripeApp"},{"$ref":"#/components/schemas/SandboxApp"},{"$ref":"#/components/schemas/CustomInvoicingApp"}],"type":"object"},"AppCapability":{"description":"App capability.\n\nCapabilities only exist in config so they don't extend the Resource model.","example":{"description":"Stripe payments collects outstanding revenue with Stripe customer's default payment method.","key":"stripe_collect_payment","name":"Collect Payments","type":"collectPayments"},"properties":{"description":{"description":"The capability description.","type":"string"},"key":{"description":"Key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"name":{"description":"The capability name.","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/AppCapabilityType"}],"description":"The capability type."}},"required":["type","key","name","description"],"type":"object"},"AppCapabilityType":{"description":"App capability type.","enum":["reportUsage","reportEvents","calculateTax","invoiceCustomers","collectPayments"],"type":"string"},"AppPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/App"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"AppReference":{"description":"App reference\n\nCan be used as a short reference to an app if the full app object is not needed.","properties":{"id":{"description":"The ID of the app.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["id"],"type":"object"},"AppReplaceUpdate":{"description":"App ReplaceUpdate Model","discriminator":{"mapping":{"custom_invoicing":"#/components/schemas/CustomInvoicingAppReplaceUpdate","sandbox":"#/components/schemas/SandboxAppReplaceUpdate","stripe":"#/components/schemas/StripeAppReplaceUpdate"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/StripeAppReplaceUpdate"},{"$ref":"#/components/schemas/SandboxAppReplaceUpdate"},{"$ref":"#/components/schemas/CustomInvoicingAppReplaceUpdate"}],"type":"object"},"AppStatus":{"description":"App installed status.","enum":["ready","unauthorized"],"type":"string"},"AppType":{"description":"Type of the app.","enum":["stripe","sandbox","custom_invoicing"],"type":"string"},"AuditRecord":{"description":"An audit record.","example":{"action":"create","authorized":true,"data":{},"id":"01f2bf2aac9c322362ac0361f9476e04","operation":"createMeter","resourceId":"01J4Q2BSK8RBB784DPJ0XRT5CF","resourceKind":"meter","sourceIp":"192.168.1.1","time":"2025-01-01T00:00:00Z","url":"https://openmeter.cloud/api/v1/meters","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","userId":"user_123"},"properties":{"action":{"description":"The action that was performed.","type":"string"},"authorized":{"description":"Whether the action was authorized.","type":"boolean"},"data":{"additionalProperties":{"type":"string"},"description":"Additional data about the audit record.","type":"object"},"id":{"description":"The ID of the audit record.","type":"string"},"operation":{"description":"The operation that was performed.","type":"string"},"resourceId":{"description":"The ID of the resource that was acted on.","type":"string"},"resourceKind":{"description":"The kind of resource that was acted on.","type":"string"},"sourceIp":{"description":"The source IP of the request.","type":"string"},"time":{"description":"The time the action was taken.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"url":{"description":"The URL of the request.","type":"string"},"userAgent":{"description":"The user agent of the request.","type":"string"},"userId":{"description":"The ID of the user that performed the action.","type":"string"}},"required":["id","time","action","authorized","operation","data"],"type":"object"},"AuditRecordCursorPaginatedResponse":{"description":"A response for cursor pagination.","properties":{"items":{"description":"The items in the response.","items":{"$ref":"#/components/schemas/AuditRecord"},"maxItems":100,"type":"array"},"nextCursor":{"description":"The cursor of the last item in the list.","type":"string"}},"required":["items"],"type":"object"},"BadRequestProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","type":"object"},"BalanceHistoryWindow":{"description":"The balance history window.","properties":{"balanceAtStart":{"description":"The entitlement balance at the start of the period.","example":100,"format":"double","readOnly":true,"type":"number"},"period":{"$ref":"#/components/schemas/Period"},"usage":{"description":"The total usage of the feature in the period.","example":100,"format":"double","readOnly":true,"type":"number"}},"required":["period","usage","balanceAtStart"],"type":"object"},"BillingCustomerProfile":{"description":"Customer specific merged profile.\n\nThis profile is calculated from the customer override and the billing profile it references or the default.\n\nThus this does not have any kind of resource fields, only the calculated values.","properties":{"apps":{"allOf":[{"$ref":"#/components/schemas/BillingProfileAppsOrReference"}],"description":"The applications used by this billing profile.\n\nExpand settings govern if this includes the whole app object or just the ID references.","readOnly":true},"supplier":{"allOf":[{"$ref":"#/components/schemas/BillingParty"}],"description":"The name and contact information for the supplier this billing profile represents","readOnly":true},"workflow":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflow"}],"description":"The billing workflow settings for this profile","readOnly":true}},"required":["supplier","workflow","apps"],"type":"object"},"BillingDiscountPercentage":{"description":"A percentage discount.","properties":{"correlationId":{"description":"Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"percentage":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"The percentage of the discount.","maximum":100,"minimum":0,"title":"Percentage"}},"required":["percentage"],"type":"object"},"BillingDiscountReason":{"description":"The reason for the discount.","discriminator":{"mapping":{"maximum_spend":"#/components/schemas/DiscountReasonMaximumSpend","ratecard_percentage":"#/components/schemas/DiscountReasonRatecardPercentage","ratecard_usage":"#/components/schemas/DiscountReasonRatecardUsage"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/DiscountReasonMaximumSpend"},{"$ref":"#/components/schemas/DiscountReasonRatecardPercentage"},{"$ref":"#/components/schemas/DiscountReasonRatecardUsage"}],"type":"object"},"BillingDiscountUsage":{"description":"A usage discount.","properties":{"correlationId":{"description":"Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the usage discount.\n\nMust be positive.","title":"Usage"}},"required":["quantity"],"type":"object"},"BillingDiscounts":{"description":"A discount by type.","properties":{"percentage":{"allOf":[{"$ref":"#/components/schemas/BillingDiscountPercentage"}],"description":"The percentage discount."},"usage":{"allOf":[{"$ref":"#/components/schemas/BillingDiscountUsage"}],"description":"The usage discount."}},"type":"object"},"BillingEngineKind":{"description":"Billing engine kind.","enum":["legacy","openmeter","disabled"],"type":"string"},"BillingInvoiceCustomerExtendedDetails":{"description":"BillingInvoiceCustomerExtendedDetails is a collection of fields that are used to extend the billing party details for invoices.\n\nThese fields contain the OpenMeter specific details for the customer, that are not strictly required for the invoice itself.","properties":{"addresses":{"description":"Regular post addresses for where information should be sent if needed.","items":{"$ref":"#/components/schemas/Address"},"maxItems":1,"type":"array"},"id":{"description":"Unique identifier for the party (if available)","readOnly":true,"type":"string"},"key":{"description":"An optional unique key of the party (if available)","maxLength":256,"minLength":1,"title":"Key","type":"string"},"name":{"description":"Legal name or representation of the organization.","type":"string"},"taxId":{"allOf":[{"$ref":"#/components/schemas/BillingPartyTaxIdentity"}],"description":"The entity's legal ID code used for tax purposes. They may have\nother numbers, but we're only interested in those valid for tax purposes."},"usageAttribution":{"allOf":[{"$ref":"#/components/schemas/CustomerUsageAttribution"}],"description":"Mapping to attribute metered usage to the customer","title":"Usage Attribution"}},"required":["usageAttribution"],"type":"object"},"BillingParty":{"description":"Party represents a person or business entity.","properties":{"addresses":{"description":"Regular post addresses for where information should be sent if needed.","items":{"$ref":"#/components/schemas/Address"},"maxItems":1,"type":"array"},"id":{"description":"Unique identifier for the party (if available)","readOnly":true,"type":"string"},"key":{"description":"An optional unique key of the party (if available)","maxLength":256,"minLength":1,"title":"Key","type":"string"},"name":{"description":"Legal name or representation of the organization.","type":"string"},"taxId":{"allOf":[{"$ref":"#/components/schemas/BillingPartyTaxIdentity"}],"description":"The entity's legal ID code used for tax purposes. They may have\nother numbers, but we're only interested in those valid for tax purposes."}},"type":"object"},"BillingPartyReplaceUpdate":{"description":"Resource update operation model.","properties":{"addresses":{"description":"Regular post addresses for where information should be sent if needed.","items":{"$ref":"#/components/schemas/Address"},"maxItems":1,"type":"array"},"key":{"description":"An optional unique key of the party (if available)","maxLength":256,"minLength":1,"title":"Key","type":"string"},"name":{"description":"Legal name or representation of the organization.","type":"string"},"taxId":{"allOf":[{"$ref":"#/components/schemas/BillingPartyTaxIdentity"}],"description":"The entity's legal ID code used for tax purposes. They may have\nother numbers, but we're only interested in those valid for tax purposes."}},"type":"object"},"BillingPartyTaxIdentity":{"description":"Identity stores the details required to identify an entity for tax purposes in a specific country.","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/BillingTaxIdentificationCode"}],"description":"Normalized tax code shown on the original identity document."}},"type":"object"},"BillingProfile":{"description":"BillingProfile represents a billing profile","properties":{"apps":{"allOf":[{"$ref":"#/components/schemas/BillingProfileAppsOrReference"}],"description":"The applications used by this billing profile.\n\nExpand settings govern if this includes the whole app object or just the ID references.","readOnly":true},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"default":{"description":"Is this the default profile?","type":"boolean"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"supplier":{"allOf":[{"$ref":"#/components/schemas/BillingParty"}],"description":"The name and contact information for the supplier this billing profile represents"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"workflow":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflow"}],"description":"The billing workflow settings for this profile","readOnly":true}},"required":["id","name","createdAt","updatedAt","supplier","workflow","apps","default"],"type":"object"},"BillingProfileAppReferences":{"description":"BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile","properties":{"invoicing":{"allOf":[{"$ref":"#/components/schemas/AppReference"}],"description":"The invoicing app used for this workflow","readOnly":true},"payment":{"allOf":[{"$ref":"#/components/schemas/AppReference"}],"description":"The payment app used for this workflow","readOnly":true},"tax":{"allOf":[{"$ref":"#/components/schemas/AppReference"}],"description":"The tax app used for this workflow","readOnly":true}},"required":["tax","invoicing","payment"],"type":"object"},"BillingProfileApps":{"description":"BillingProfileApps represents the applications used by a billing profile","properties":{"invoicing":{"allOf":[{"$ref":"#/components/schemas/App"}],"description":"The invoicing app used for this workflow","readOnly":true},"payment":{"allOf":[{"$ref":"#/components/schemas/App"}],"description":"The payment app used for this workflow","readOnly":true},"tax":{"allOf":[{"$ref":"#/components/schemas/App"}],"description":"The tax app used for this workflow","readOnly":true}},"required":["tax","invoicing","payment"],"type":"object"},"BillingProfileAppsCreate":{"description":"BillingProfileAppsCreate represents the input for creating a billing profile's apps","properties":{"invoicing":{"description":"The invoicing app used for this workflow","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string","x-go-type":"string"},"payment":{"description":"The payment app used for this workflow","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string","x-go-type":"string"},"tax":{"description":"The tax app used for this workflow","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string","x-go-type":"string"}},"required":["tax","invoicing","payment"],"type":"object"},"BillingProfileAppsOrReference":{"anyOf":[{"$ref":"#/components/schemas/BillingProfileApps"},{"$ref":"#/components/schemas/BillingProfileAppReferences"}],"description":"ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences\nfor a billing profile."},"BillingProfileCreate":{"description":"BillingProfileCreate represents the input for creating a billing profile","properties":{"apps":{"allOf":[{"$ref":"#/components/schemas/BillingProfileAppsCreate"}],"description":"The apps used by this billing profile."},"default":{"description":"Is this the default profile?","type":"boolean"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"supplier":{"allOf":[{"$ref":"#/components/schemas/BillingParty"}],"description":"The name and contact information for the supplier this billing profile represents"},"workflow":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowCreate"}],"description":"The billing workflow settings for this profile."}},"required":["name","supplier","default","workflow","apps"],"type":"object"},"BillingProfileCustomerOverride":{"description":"Customer override values.","properties":{"billingProfileId":{"description":"The billing profile this override is associated with.\n\nIf empty the default profile is looked up dynamically.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"customerId":{"description":"The customer id this override is associated with.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","customerId"],"type":"object"},"BillingProfileCustomerOverrideCreate":{"description":"Payload for creating a new or updating an existing customer override.","properties":{"billingProfileId":{"description":"The billing profile this override is associated with.\n\nIf not provided, the default billing profile is chosen if available.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"type":"object"},"BillingProfileCustomerOverrideExpand":{"description":"CustomerOverrideExpand specifies the parts of the profile to expand.","enum":["apps","customer"],"type":"string"},"BillingProfileCustomerOverrideOrderBy":{"description":"Order by options for customers.","enum":["customerId","customerName","customerKey","customerPrimaryEmail","customerCreatedAt"],"type":"string"},"BillingProfileCustomerOverrideWithDetails":{"description":"Customer specific workflow overrides.","properties":{"baseBillingProfileId":{"description":"The billing profile the customerProfile is associated with at the time of query.\n\ncustomerOverride contains the explicit mapping set in the customer override object. If that is\nempty, then the baseBillingProfileId is the default profile.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customer":{"allOf":[{"$ref":"#/components/schemas/Customer"}],"description":"The customer this override belongs to."},"customerOverride":{"allOf":[{"$ref":"#/components/schemas/BillingProfileCustomerOverride"}],"description":"The customer override values.\n\nIf empty the merged values are calculated based on the default profile."},"customerProfile":{"allOf":[{"$ref":"#/components/schemas/BillingCustomerProfile"}],"description":"Merged billing profile with the customer specific overrides."}},"required":["baseBillingProfileId"],"type":"object"},"BillingProfileCustomerOverrideWithDetailsPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideWithDetails"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"BillingProfileExpand":{"description":"BillingProfileExpand details what profile fields to expand","enum":["apps"],"type":"string"},"BillingProfileOrderBy":{"description":"BillingProfileOrderBy specifies the ordering options for profiles","enum":["createdAt","updatedAt","default","name"],"type":"string"},"BillingProfilePaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/BillingProfile"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"BillingProfileReplaceUpdateWithWorkflow":{"description":"BillingProfileReplaceUpdate represents the input for updating a billing profile\n\nThe apps field cannot be updated directly, if an app change is desired a new\nprofile should be created.","properties":{"default":{"description":"Is this the default profile?","type":"boolean"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"supplier":{"allOf":[{"$ref":"#/components/schemas/BillingParty"}],"description":"The name and contact information for the supplier this billing profile represents"},"workflow":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflow"}],"description":"The billing workflow settings for this profile."}},"required":["name","supplier","default","workflow"],"type":"object"},"BillingSettlementMode":{"description":"The settlement mode of a plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced. This is the default and most common settlement mode.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.","enum":["credit_then_invoice","credit_only"],"type":"string"},"BillingTaxIdentificationCode":{"description":"TaxIdentificationCode is a normalized tax code shown on the original identity document.","maxLength":32,"minLength":1,"type":"string"},"BillingWorkflow":{"description":"BillingWorkflow represents the settings for a billing workflow.","properties":{"collection":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowCollectionSettings"}],"description":"The collection settings for this workflow"},"invoicing":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowInvoicingSettings"}],"description":"The invoicing settings for this workflow"},"payment":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowPaymentSettings"}],"description":"The payment settings for this workflow"},"tax":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowTaxSettings"}],"description":"The tax settings for this workflow"}},"type":"object"},"BillingWorkflowCollectionAlignment":{"description":"The alignment for collecting the pending line items into an invoice.\n\nDefaults to subscription, which means that we are to create a new invoice every time the\na subscription period starts (for in advance items) or ends (for in arrears items).","discriminator":{"mapping":{"anchored":"#/components/schemas/BillingWorkflowCollectionAlignmentAnchored","subscription":"#/components/schemas/BillingWorkflowCollectionAlignmentSubscription"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/BillingWorkflowCollectionAlignmentSubscription"},{"$ref":"#/components/schemas/BillingWorkflowCollectionAlignmentAnchored"}],"type":"object"},"BillingWorkflowCollectionAlignmentAnchored":{"description":"BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items\ninto an invoice.","properties":{"recurringPeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodV2"}],"description":"The recurring period for the alignment."},"type":{"description":"The type of alignment.","enum":["anchored"],"type":"string"}},"required":["type","recurringPeriod"],"type":"object"},"BillingWorkflowCollectionAlignmentSubscription":{"description":"BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items\ninto an invoice.","properties":{"type":{"description":"The type of alignment.","enum":["subscription"],"type":"string"}},"required":["type"],"type":"object"},"BillingWorkflowCollectionSettings":{"description":"Workflow collection specifies how to collect the pending line items for an invoice","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowCollectionAlignment"}],"default":{"type":"subscription"},"description":"The alignment for collecting the pending line items into an invoice."},"interval":{"default":"PT1H","description":"This grace period can be used to delay the collection of the pending line items specified in\nalignment.\n\nThis is useful, in case of multiple subscriptions having slightly different billing periods.","example":"P1D","format":"ISO8601","type":"string"}},"type":"object"},"BillingWorkflowCreate":{"description":"Resource create operation model.","properties":{"collection":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowCollectionSettings"}],"description":"The collection settings for this workflow"},"invoicing":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowInvoicingSettings"}],"description":"The invoicing settings for this workflow"},"payment":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowPaymentSettings"}],"description":"The payment settings for this workflow"},"tax":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowTaxSettings"}],"description":"The tax settings for this workflow"}},"type":"object"},"BillingWorkflowInvoicingSettings":{"description":"BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow","properties":{"autoAdvance":{"default":true,"description":"Whether to automatically issue the invoice after the draftPeriod has passed.","type":"boolean"},"defaultTaxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"Default tax configuration to apply to the invoices.\n\nSetting a tax code (`stripe.code` / `taxCodeId`) on a profile's default tax config is\ndeprecated and can no longer be added or changed: the organization default tax code is\nused instead. Existing tax-code values may still be removed, and `behavior` remains\nfully supported."},"draftPeriod":{"default":"P0D","description":"The period for the invoice to be kept in draft status for manual reviews.","example":"P1D","format":"ISO8601","type":"string"},"dueAfter":{"default":"P30D","description":"The period after which the invoice is due.\nWith some payment solutions it's only applicable for manual collection method.","example":"P30D","format":"ISO8601","type":"string"},"progressiveBilling":{"default":true,"description":"Should progressive billing be allowed for this workflow?","type":"boolean"},"subscriptionEndProrationMode":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowInvoicingSubscriptionEndProrationMode"}],"default":"bill_actual_period","description":"Controls how subscription-ending shortened service periods are billed."}},"title":"Workflow invoice settings","type":"object"},"BillingWorkflowInvoicingSubscriptionEndProrationMode":{"description":"Billing workflow subscription end proration mode.","enum":["bill_full_period","bill_actual_period"],"type":"string"},"BillingWorkflowPaymentSettings":{"description":"BillingWorkflowPaymentSettings represents the payment settings for a billing workflow","properties":{"collectionMethod":{"allOf":[{"$ref":"#/components/schemas/CollectionMethod"}],"default":"charge_automatically","description":"The payment method for the invoice."}},"title":"Workflow payment settings","type":"object"},"BillingWorkflowTaxSettings":{"description":"BillingWorkflowTaxSettings represents the tax settings for a billing workflow","properties":{"enabled":{"default":true,"description":"Enable automatic tax calculation when tax is supported by the app.\nFor example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.","type":"boolean"},"enforced":{"default":false,"description":"Enforce tax calculation when tax is supported by the app.\nWhen enabled, OpenMeter will not allow to create an invoice without tax calculation.\nEnforcement is different per apps, for example, Stripe app requires customer\nto have a tax location when starting a paid subscription.","type":"boolean"}},"title":"Workflow tax settings","type":"object"},"CheckoutSessionCustomTextAfterSubmitParams":{"description":"Stripe CheckoutSession.custom_text","properties":{"afterSubmit":{"description":"Custom text that should be displayed after the payment confirmation button.","properties":{"message":{"maxLength":1200,"type":"string"}},"type":"object"},"shippingAddress":{"description":"Custom text that should be displayed alongside shipping address collection.","properties":{"message":{"maxLength":1200,"type":"string"}},"type":"object"},"submit":{"description":"Custom text that should be displayed alongside the payment confirmation button.","properties":{"message":{"maxLength":1200,"type":"string"}},"type":"object"},"termsOfServiceAcceptance":{"description":"Custom text that should be displayed in place of the default terms of service agreement text.","properties":{"message":{"maxLength":1200,"type":"string"}},"type":"object"}},"type":"object"},"CheckoutSessionUIMode":{"description":"Stripe CheckoutSession.ui_mode","enum":["embedded","hosted"],"type":"string"},"ClientAppStartResponse":{"description":"Response from the client app (OpenMeter backend) to start the OAuth2 flow.","properties":{"url":{"description":"The URL to start the OAuth2 authorization code grant flow.","type":"string"}},"required":["url"],"type":"object"},"CloudBillingChangeRequest":{"description":"The request to change the self-billed cloud subscription.","properties":{"checkoutSession":{"allOf":[{"$ref":"#/components/schemas/CloudBillingChangeRequestCheckoutSessionRequestParams"}],"description":"Checkout session preferences."},"targetPlanID":{"description":"The target plan ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["targetPlanID"],"type":"object"},"CloudBillingChangeRequestCheckoutSessionRequestParams":{"description":"Checkout session preferences.","properties":{"cancelUrlPath":{"description":"The path component of the cancel URL.","type":"string"},"force":{"description":"Whether to force the checkout session to be created. (debugging)","type":"boolean"},"redirectOnCompletion":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionRedirectOnCompletion"}],"description":"This parameter applies to ui_mode: embedded. Defaults to always.\nLearn more about the redirect behavior of embedded sessions at\nhttps://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form"},"returnUrlPath":{"description":"The path component of the return URL.","type":"string"},"successUrlPath":{"description":"The path component of the success URL.","type":"string"},"uiMode":{"allOf":[{"$ref":"#/components/schemas/CheckoutSessionUIMode"}],"description":"The UI mode to use for the checkout session."}},"required":["uiMode"],"type":"object"},"CloudBillingChangeResponse":{"anyOf":[{"$ref":"#/components/schemas/CloudBillingChangeResponseCheckoutRequired"},{"$ref":"#/components/schemas/CloudBillingChangeResponseApplied"},{"$ref":"#/components/schemas/CloudBillingChangeResponseWillApply"}],"description":"The response to a cloud billing change request."},"CloudBillingChangeResponseApplied":{"description":"The response to a cloud billing change request.","properties":{"type":{"enum":["applied"],"type":"string"}},"required":["type"],"type":"object"},"CloudBillingChangeResponseCheckoutRequired":{"description":"The response to a cloud billing change request.","properties":{"checkoutSession":{"$ref":"#/components/schemas/CreateStripeCheckoutSessionResult"},"type":{"enum":["checkout_required"],"type":"string"}},"required":["type","checkoutSession"],"type":"object"},"CloudBillingChangeResponseWillApply":{"description":"The response to a cloud billing change request.","properties":{"newSubscriptionStartsAt":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"type":{"enum":["will_apply"],"type":"string"}},"required":["type","newSubscriptionStartsAt"],"type":"object"},"CloudBillingCycle":{"description":"The subscription billing cycle.","properties":{"interval":{"allOf":[{"$ref":"#/components/schemas/CloudBillingCycleInterval"}],"readOnly":true},"intervalCount":{"minimum":0,"readOnly":true,"type":"integer"}},"required":["interval","intervalCount"],"type":"object"},"CloudBillingCycleInterval":{"description":"The subscription billing cycle interval.","enum":["month","year"],"type":"string"},"CloudBillingEntitlement":{"anyOf":[{"$ref":"#/components/schemas/EntitlementMetered"},{"$ref":"#/components/schemas/EntitlementStatic"},{"$ref":"#/components/schemas/EntitlementBoolean"}],"description":"The entitlement for the current organization.","x-go-type":"openmeter.Entitlement","x-go-type-import":{"path":"github.com/openmeterio/openmeter/api/client/go"}},"CloudBillingEntitlementValue":{"description":"The entitlement for the current organization.","properties":{"balance":{"description":"Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative.","example":100,"format":"double","readOnly":true,"type":"number"},"config":{"description":"Only available for static entitlements. The JSON parsable config of the entitlement.","example":"{ key: \"value\" }","readOnly":true,"type":"string"},"hasAccess":{"description":"Whether the subject has access to the feature. Shared accross all entitlement types.","example":true,"readOnly":true,"type":"boolean"},"overage":{"description":"Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage.","example":0,"format":"double","readOnly":true,"type":"number"},"totalAvailableGrantAmount":{"description":"Only available for metered entitlements. The summed amount of all grant active at query time PLUS the used amount of since inactive grants.","example":100,"format":"double","readOnly":true,"type":"number"},"usage":{"description":"Only available for metered entitlements. Returns the total feature usage in the current period.","example":50,"format":"double","readOnly":true,"type":"number"}},"required":["hasAccess"],"type":"object","x-go-type":"openmeter.EntitlementValue","x-go-type-import":{"path":"github.com/openmeterio/openmeter/api/client/go"}},"CloudBillingEntitlementWithValue":{"description":"The entitlement for the current organization.","properties":{"entitlement":{"allOf":[{"$ref":"#/components/schemas/CloudBillingEntitlement"}],"description":"The entitlement"},"value":{"allOf":[{"$ref":"#/components/schemas/CloudBillingEntitlementValue"}],"description":"The value of the entitlement."}},"required":["entitlement","value"],"type":"object"},"CloudBillingGetSubscriptionExpand":{"description":"The expand query parameter for the get subscription.","enum":["entitlements"],"type":"string"},"CloudBillingPlan":{"description":"A plan with allowed transitions.","properties":{"plan":{"allOf":[{"$ref":"#/components/schemas/Plan"}],"description":"The plan."},"transitions":{"description":"Allowed transitions (upgrades/downgrades).","items":{"$ref":"#/components/schemas/CloudBillingTransition"},"type":"array"}},"required":["plan","transitions"],"type":"object"},"CloudBillingPlanReference":{"description":"A reference to a plan.","properties":{"key":{"description":"The key of the plan we can upgrade/downgrade to.","type":"string"}},"required":["key"],"type":"object"},"CloudBillingSubscription":{"description":"The subscription for the current organization.","properties":{"entitlements":{"description":"The entitlements for the current organization.","items":{"$ref":"#/components/schemas/CloudBillingEntitlementWithValue"},"type":"array"},"subscription":{"allOf":[{"$ref":"#/components/schemas/CloudBillingSubscriptionExpanded"}],"description":"The subscription of the current organization."}},"required":["subscription","entitlements"],"type":"object"},"CloudBillingSubscriptionExpanded":{"description":"The subscription expanded.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"alignment":{"allOf":[{"$ref":"#/components/schemas/SubscriptionAlignment"}],"description":"Alignment details enriched with the current billing period."},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"billingAnchor":{"description":"The normalizedbilling anchor of the subscription.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Billing anchor","type":"string"},"billingCadence":{"description":"The billing cadence for the subscriptions.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","readOnly":true,"title":"Billing cadence","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls whether custom-currency cost bases are resolved dynamically or pinned\nwhen their currency pair is introduced to the subscription.","readOnly":true,"title":"Cost basis mode"},"costBasisPins":{"description":"Cost bases pinned to custom-currency pairs for this subscription.","items":{"$ref":"#/components/schemas/SubscriptionCostBasisPin"},"readOnly":true,"title":"Pinned cost bases","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The fiat currency in which the subscription is invoiced.","title":"Currency"},"customerId":{"description":"The customer ID of the subscription.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"phases":{"description":"The phases of the subscription.","items":{"$ref":"#/components/schemas/SubscriptionPhaseExpanded"},"type":"array"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanReference"}],"description":"The plan of the subscription."},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"The pro-rating configuration for the subscriptions.","readOnly":true,"title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the subscription.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","readOnly":true,"title":"Settlement mode"},"status":{"allOf":[{"$ref":"#/components/schemas/SubscriptionStatus"}],"description":"The status of the subscription.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","activeFrom","status","customerId","currency","costBasisMode","costBasisPins","billingCadence","billingAnchor","settlementMode","phases"],"type":"object","x-go-type":"openmeter.SubscriptionExpanded","x-go-type-import":{"path":"github.com/openmeterio/openmeter/api/client/go"}},"CloudBillingTransition":{"description":"Allowed transition between plans.","properties":{"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTimingEnum"}],"description":"The timing of the transition."},"to":{"allOf":[{"$ref":"#/components/schemas/CloudBillingPlanReference"}],"description":"What plan we can transition to."}},"required":["to","timing"],"type":"object"},"CloudSubscription":{"description":"The subscription information.","properties":{"currentPeriodEnd":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"currentPeriodStart":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"hasStripeSubscription":{"readOnly":true,"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/CloudSubscriptionItem"},"readOnly":true,"type":"array"},"plan":{"allOf":[{"$ref":"#/components/schemas/CloudSubscriptionPlan"}],"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/CloudSubscriptionStatus"}],"readOnly":true},"trialEligible":{"readOnly":true,"type":"boolean"},"trialEnd":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"}},"required":["plan","currentPeriodStart","currentPeriodEnd","status","items"],"type":"object"},"CloudSubscriptionItem":{"description":"The subscription item.","properties":{"description":{"readOnly":true,"type":"string"},"entitlement":{"allOf":[{"$ref":"#/components/schemas/Entitlement"}],"readOnly":true},"feature":{"allOf":[{"$ref":"#/components/schemas/Feature"}],"readOnly":true},"limit":{"minimum":0,"readOnly":true,"type":"number"},"unit":{"allOf":[{"$ref":"#/components/schemas/Unit"}],"readOnly":true},"value":{"allOf":[{"$ref":"#/components/schemas/EntitlementValue"}],"readOnly":true}},"required":["feature"],"type":"object"},"CloudSubscriptionPlan":{"description":"The subscription plan information.","properties":{"billingCycle":{"allOf":[{"$ref":"#/components/schemas/CloudBillingCycle"}],"readOnly":true},"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"key":{"description":"A key is a unique string that is used to identify a resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"},"trialPeriodDays":{"minimum":0,"readOnly":true,"type":"integer"}},"required":["id","key","name","billingCycle"],"type":"object"},"CloudSubscriptionStatus":{"description":"The status of the subscription.\n- trialing: The subscription is in a trial period\n- active: The customer has an active free or paid subscription","enum":["trialing","active"],"type":"string"},"CollectionMethod":{"description":"CollectionMethod specifies how the invoice should be collected (automatic vs manual)","enum":["charge_automatically","send_invoice"],"title":"Collection method","type":"string"},"ConflictProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The request could not be completed due to a conflict with the current state of the target resource.","type":"object"},"CorrelatedCustomerSubscription":{"description":"The correlated subscriptions for a customer.","properties":{"correlated":{"description":"The correlated subscriptions.\nEach array is a group of subscriptions that are correlated.","items":{"items":{"$ref":"#/components/schemas/Subscription"},"type":"array"},"type":"array"}},"required":["correlated"],"type":"object"},"CountryCode":{"description":"[ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code.\nCustom two-letter country codes are also supported for convenience.","example":"US","maxLength":2,"minLength":2,"pattern":"^[A-Z]{2}$","type":"string"},"CreateCheckoutSessionTaxIdCollection":{"description":"Create Stripe checkout session tax ID collection.","properties":{"enabled":{"description":"Enable tax ID collection during checkout. Defaults to false.","type":"boolean"},"required":{"allOf":[{"$ref":"#/components/schemas/CreateCheckoutSessionTaxIdCollectionRequired"}],"description":"Describes whether a tax ID is required during checkout. Defaults to never."}},"required":["enabled"],"type":"object"},"CreateCheckoutSessionTaxIdCollectionRequired":{"description":"Create Stripe checkout session tax ID collection required.","enum":["if_supported","never"],"type":"string"},"CreateStripeCheckoutSessionBillingAddressCollection":{"description":"Specify whether Checkout should collect the customer’s billing address.","enum":["auto","required"],"type":"string"},"CreateStripeCheckoutSessionConsentCollection":{"description":"Configure fields for the Checkout Session to gather active consent from customers.","properties":{"paymentMethodReuseAgreement":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement"}],"description":"Determines the position and visibility of the payment method reuse agreement in the UI.\nWhen set to auto, Stripe’s defaults will be used. When set to hidden, the payment method reuse agreement text will always be hidden in the UI."},"promotions":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPromotions"}],"description":"If set to auto, enables the collection of customer consent for promotional communications.\nThe Checkout Session will determine whether to display an option to opt into promotional\ncommunication from the merchant depending on the customer’s locale. Only available to US merchants."},"termsOfService":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionConsentCollectionTermsOfService"}],"description":"If set to required, it requires customers to check a terms of service checkbox before being able to pay.\nThere must be a valid terms of service URL set in your Stripe Dashboard settings.\nhttps://dashboard.stripe.com/settings/public"}},"type":"object"},"CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement":{"description":"Create Stripe checkout session payment method reuse agreement.","properties":{"position":{"$ref":"#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition"}},"type":"object"},"CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition":{"description":"Create Stripe checkout session consent collection agreement position.","enum":["auto","hidden"],"type":"string"},"CreateStripeCheckoutSessionConsentCollectionPromotions":{"description":"Create Stripe checkout session consent collection promotions.","enum":["auto","none"],"type":"string"},"CreateStripeCheckoutSessionConsentCollectionTermsOfService":{"description":"Create Stripe checkout session consent collection terms of service.","enum":["none","required"],"type":"string"},"CreateStripeCheckoutSessionCustomerUpdate":{"description":"Controls what fields on Customer can be updated by the Checkout Session.","properties":{"address":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior"}],"description":"Describes whether Checkout saves the billing address onto customer.address.\nTo always collect a full billing address, use billing_address_collection.\nDefaults to never."},"name":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior"}],"description":"Describes whether Checkout saves the name onto customer.name.\nDefaults to never."},"shipping":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior"}],"description":"Describes whether Checkout saves shipping information onto customer.shipping.\nTo collect shipping information, use shipping_address_collection.\nDefaults to never."}},"type":"object"},"CreateStripeCheckoutSessionCustomerUpdateBehavior":{"description":"Create Stripe checkout session customer update behavior.","enum":["auto","never"],"type":"string"},"CreateStripeCheckoutSessionRedirectOnCompletion":{"description":"Create Stripe checkout session redirect on completion.","enum":["always","if_required","never"],"type":"string"},"CreateStripeCheckoutSessionRequest":{"description":"Create Stripe checkout session request.","example":{"customer":{"currency":"USD","name":"ACME, Inc.","usageAttribution":{"subjectKeys":["my-identifier"]}},"options":{"billingAddressCollection":"required","currency":"USD","customerUpdate":{"address":"auto","name":"auto"},"successURL":"http://example.com","taxIdCollection":{"enabled":true,"required":"if_supported"}}},"properties":{"appId":{"description":"If not provided, the default Stripe app is used if any.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerId"},{"$ref":"#/components/schemas/CustomerKey"},{"$ref":"#/components/schemas/CustomerCreate"}],"description":"Provide a customer ID or key to use an existing OpenMeter customer.\nor provide a customer object to create a new customer."},"options":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionRequestOptions"}],"description":"Options passed to Stripe when creating the checkout session."},"stripeCustomerId":{"description":"Stripe customer ID.\nIf not provided OpenMeter creates a new Stripe customer or\nuses the OpenMeter customer's default Stripe customer ID.","type":"string"}},"required":["customer","options"],"type":"object"},"CreateStripeCheckoutSessionRequestOptions":{"description":"Create Stripe checkout session options\nSee https://docs.stripe.com/api/checkout/sessions/create","properties":{"billingAddressCollection":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionBillingAddressCollection"}],"description":"Specify whether Checkout should collect the customer’s billing address. Defaults to auto."},"cancelURL":{"description":"If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.\nThis parameter is not allowed if ui_mode is embedded.","type":"string"},"clientReferenceID":{"description":"A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.","type":"string"},"consentCollection":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionConsentCollection"}],"description":"Configure fields for the Checkout Session to gather active consent from customers."},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Three-letter ISO currency code, in lowercase."},"customText":{"allOf":[{"$ref":"#/components/schemas/CheckoutSessionCustomTextAfterSubmitParams"}],"description":"Display additional text for your customers using custom text."},"customerUpdate":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionCustomerUpdate"}],"description":"Controls what fields on Customer can be updated by the Checkout Session."},"expiresAt":{"description":"The Epoch time in seconds at which the Checkout Session will expire.\nIt can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.","format":"int64","type":"integer"},"locale":{"type":"string"},"metadata":{"additionalProperties":{"type":"string"},"description":"Set of key-value pairs that you can attach to an object.\nThis can be useful for storing additional information about the object in a structured format.\nIndividual keys can be unset by posting an empty value to them.\nAll keys can be unset by posting an empty value to metadata.","type":"object"},"paymentMethodTypes":{"description":"A list of the types of payment methods (e.g., card) this Checkout Session can accept.","items":{"type":"string"},"type":"array"},"redirectOnCompletion":{"allOf":[{"$ref":"#/components/schemas/CreateStripeCheckoutSessionRedirectOnCompletion"}],"description":"This parameter applies to ui_mode: embedded. Defaults to always.\nLearn more about the redirect behavior of embedded sessions at\nhttps://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form"},"returnURL":{"description":"The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site.\nThis parameter is required if ui_mode is embedded and redirect-based payment methods are enabled on the session.","type":"string"},"successURL":{"description":"The URL to which Stripe should send customers when payment or setup is complete.\nThis parameter is not allowed if ui_mode is embedded.\nIf you’d like to use information from the successful Checkout Session on your page, read the guide on customizing your success page:\nhttps://docs.stripe.com/payments/checkout/custom-success-page","type":"string"},"taxIdCollection":{"allOf":[{"$ref":"#/components/schemas/CreateCheckoutSessionTaxIdCollection"}],"description":"Controls tax ID collection during checkout."},"uiMode":{"allOf":[{"$ref":"#/components/schemas/CheckoutSessionUIMode"}],"description":"The UI mode of the Session. Defaults to hosted."}},"type":"object"},"CreateStripeCheckoutSessionResult":{"description":"Create Stripe Checkout Session response.","properties":{"cancelURL":{"description":"Cancel URL.","type":"string"},"clientReferenceId":{"description":"A unique string to reference the Checkout Session.\nThis can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.","type":"string"},"clientSecret":{"description":"The client secret of the checkout session.\nThis can be used to initialize Stripe.js for your client-side implementation.","type":"string"},"createdAt":{"description":"Timestamp at which the checkout session was created.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Three-letter ISO currency code, in lowercase."},"customerEmail":{"description":"Customer's email address provided to Stripe.","type":"string"},"customerId":{"description":"The OpenMeter customer ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"expiresAt":{"description":"Timestamp at which the checkout session will expire.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"metadata":{"additionalProperties":{"type":"string"},"description":"Set of key-value pairs attached to the checkout session.","type":"object"},"mode":{"allOf":[{"$ref":"#/components/schemas/StripeCheckoutSessionMode"}],"description":"Mode\nAlways `setup` for now."},"returnURL":{"description":"Return URL.","type":"string"},"sessionId":{"description":"The checkout session ID.","type":"string"},"setupIntentId":{"description":"The checkout session setup intent ID.","type":"string"},"status":{"description":"The status of the checkout session.","type":"string"},"stripeCustomerId":{"description":"The Stripe customer ID.","type":"string"},"successURL":{"description":"Success URL.","type":"string"},"url":{"description":"URL to show the checkout session.","type":"string"}},"required":["customerId","stripeCustomerId","sessionId","setupIntentId","createdAt","mode"],"type":"object"},"CreateStripeCustomerPortalSessionParams":{"description":"Stripe customer portal request params.","properties":{"configurationId":{"description":"The ID of an existing configuration to use for this session,\ndescribing its functionality and features.\nIf not specified, the session uses the default configuration.\n\nSee https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-configuration","title":"Configuration","type":"string"},"locale":{"description":"The IETF language tag of the locale customer portal is displayed in.\nIf blank or auto, the customer’s preferred_locales or browser’s locale is used.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale","title":"Locale","type":"string"},"returnUrl":{"description":"The URL to redirect the customer to after they have completed\ntheir requested actions.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url","title":"ReturnUrl","type":"string"}},"type":"object"},"CreditNoteOriginalInvoiceRef":{"allOf":[{"$ref":"#/components/schemas/InvoiceGenericDocumentRef"}],"description":"CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on.","properties":{"issuedAt":{"description":"IssueAt reflects the time the document was issued.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"number":{"allOf":[{"$ref":"#/components/schemas/InvoiceNumber"}],"description":"(Serial) Number of the referenced document.","readOnly":true},"type":{"description":"Type of the invoice.","enum":["credit_note_original_invoice"],"type":"string"},"url":{"description":"Link to the source document.","format":"uri","readOnly":true,"type":"string"}},"required":["type","url"],"type":"object"},"Currency":{"description":"Currency describes a currency supported by OpenMeter.","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency ISO code."},"name":{"description":"The currency name.","type":"string"},"subunits":{"description":"Subunit of the currency.","format":"uint32","type":"integer"},"symbol":{"description":"The currency symbol.","type":"string"}},"required":["code","name","symbol","subunits"],"type":"object"},"CurrencyCode":{"description":"Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.\nCustom three-letter currency codes are also supported for convenience.","example":"USD","maxLength":3,"minLength":3,"pattern":"^[A-Z]{3}$","type":"string"},"CurrencyCodeOrCustom":{"description":"Fiat or managed custom currency code.","maxLength":24,"minLength":3,"type":"string"},"CustomInvoicingApp":{"description":"Custom Invoicing app can be used for interface with any invoicing or payment system.\n\nThis app provides ways to manipulate invoices and payments, however the integration\nmust rely on Notifications API to get notified about invoice changes.","properties":{"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"enableDraftSyncHook":{"description":"Enable draft.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically.","type":"boolean"},"enableIssuingSyncHook":{"description":"Enable issuing.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically.","type":"boolean"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"listing":{"allOf":[{"$ref":"#/components/schemas/MarketplaceListing"}],"description":"The marketplace listing that this installed app is based on.","readOnly":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/AppStatus"}],"description":"Status of the app connection.","readOnly":true},"type":{"description":"The app's type is CustomInvoicing.","enum":["custom_invoicing"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","listing","status","type","enableDraftSyncHook","enableIssuingSyncHook"],"type":"object"},"CustomInvoicingAppReplaceUpdate":{"description":"Resource update operation model.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"enableDraftSyncHook":{"description":"Enable draft.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically.","type":"boolean"},"enableIssuingSyncHook":{"description":"Enable issuing.sync hook.\n\nIf the hook is not enabled, the invoice will be progressed to the next state automatically.","type":"boolean"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"type":{"description":"The app's type is CustomInvoicing.","enum":["custom_invoicing"],"type":"string"}},"required":["name","type","enableDraftSyncHook","enableIssuingSyncHook"],"type":"object"},"CustomInvoicingCustomerAppData":{"description":"Custom Invoicing Customer App Data.","properties":{"app":{"allOf":[{"$ref":"#/components/schemas/CustomInvoicingApp"}],"description":"The installed custom invoicing app this data belongs to.","readOnly":true},"id":{"description":"The app ID.\nIf not provided, it will use the global default for the app type.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"App ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Metadata to be used by the custom invoicing provider."},"type":{"description":"The app name.","enum":["custom_invoicing"],"title":"App Type","type":"string"}},"required":["type"],"type":"object"},"CustomInvoicingDraftSynchronizedRequest":{"description":"Information to finalize the draft details of an invoice.","properties":{"invoicing":{"allOf":[{"$ref":"#/components/schemas/CustomInvoicingSyncResult"}],"description":"The result of the synchronization."}},"type":"object"},"CustomInvoicingFinalizedInvoicingRequest":{"description":"Information to finalize the invoicing details of an invoice.","properties":{"invoiceNumber":{"allOf":[{"$ref":"#/components/schemas/InvoiceNumber"}],"description":"If set the invoice's number will be set to this value."},"sentToCustomerAt":{"description":"If set the invoice's sent to customer at will be set to this value.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"type":"object"},"CustomInvoicingFinalizedPaymentRequest":{"description":"Information to finalize the payment details of an invoice.","properties":{"externalId":{"description":"If set the invoice's payment external ID will be set to this value.","type":"string"}},"type":"object"},"CustomInvoicingFinalizedRequest":{"description":"Information to finalize the invoice.\n\nIf invoicing.invoiceNumber is not set, then a new invoice number will be generated (INV- prefix).","properties":{"invoicing":{"allOf":[{"$ref":"#/components/schemas/CustomInvoicingFinalizedInvoicingRequest"}],"description":"The result of the synchronization."},"payment":{"allOf":[{"$ref":"#/components/schemas/CustomInvoicingFinalizedPaymentRequest"}],"description":"The result of the payment synchronization."}},"type":"object"},"CustomInvoicingLineDiscountExternalIdMapping":{"description":"Mapping between line discounts and external IDs.","properties":{"externalId":{"description":"The external ID (e.g. custom invoicing system's ID).","type":"string"},"lineDiscountId":{"description":"The line discount ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["lineDiscountId","externalId"],"type":"object"},"CustomInvoicingLineExternalIdMapping":{"description":"Mapping between lines and external IDs.","properties":{"externalId":{"description":"The external ID (e.g. custom invoicing system's ID).","type":"string"},"lineId":{"description":"The line ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["lineId","externalId"],"type":"object"},"CustomInvoicingPaymentTrigger":{"description":"Payment trigger to execute on a finalized invoice.","enum":["paid","payment_failed","payment_uncollectible","payment_overdue","action_required","void"],"type":"string"},"CustomInvoicingSyncResult":{"description":"Information to synchronize the invoice.\n\nCan be used to store external app's IDs on the invoice or lines.","properties":{"externalId":{"description":"If set the invoice's invoicing external ID will be set to this value.","type":"string"},"invoiceNumber":{"allOf":[{"$ref":"#/components/schemas/InvoiceNumber"}],"description":"If set the invoice's number will be set to this value."},"lineDiscountExternalIds":{"description":"If set the invoice's line discount external IDs will be set to this value.\n\nThis can be used to reference the external system's entities in the\ninvoice.","items":{"$ref":"#/components/schemas/CustomInvoicingLineDiscountExternalIdMapping"},"type":"array"},"lineExternalIds":{"description":"If set the invoice's line external IDs will be set to this value.\n\nThis can be used to reference the external system's entities in the\ninvoice.","items":{"$ref":"#/components/schemas/CustomInvoicingLineExternalIdMapping"},"type":"array"}},"type":"object"},"CustomInvoicingTaxConfig":{"description":"Custom invoicing tax config.","properties":{"code":{"description":"Tax code.\n\nThe tax code should be interpreted by the custom invoicing provider.","title":"Tax code","type":"string"}},"required":["code"],"type":"object"},"CustomInvoicingUpdatePaymentStatusRequest":{"description":"Update payment status request.\n\nCan be used to manipulate invoice's payment status (when custominvoicing app is being used).","properties":{"trigger":{"allOf":[{"$ref":"#/components/schemas/CustomInvoicingPaymentTrigger"}],"description":"The trigger to be executed on the invoice."}},"required":["trigger"],"type":"object"},"CustomPlanInput":{"allOf":[{"description":"The template for omitting properties.","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"Alignment configuration for the plan."},"billingCadence":{"description":"The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","title":"Billing cadence","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The currency code of the plan.","title":"Currency"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"phases":{"description":"The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.","items":{"$ref":"#/components/schemas/PlanPhase"},"minItems":1,"title":"Plan phases","type":"array"},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"Default pro-rating configuration for subscriptions using this plan.","title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","title":"Settlement mode"}},"required":["name","currency","billingCadence","phases"],"type":"object"}],"description":"Plan input for custom subscription creation (without key and version).","type":"object"},"CustomSubscriptionChange":{"description":"Change a custom subscription.","properties":{"billingAnchor":{"description":"The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls how custom-currency cost bases are selected for the new subscription."},"customPlan":{"allOf":[{"$ref":"#/components/schemas/CustomPlanInput"}],"description":"The custom plan description which defines the Subscription."},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"description":"Timing configuration for the change, when the change should take effect.\nFor changing a subscription, the accepted values depend on the subscription configuration."}},"required":["timing","customPlan"],"type":"object"},"CustomSubscriptionCreate":{"description":"Create a custom subscription.","properties":{"billingAnchor":{"description":"The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls how custom-currency cost bases are selected for the new subscription."},"customPlan":{"allOf":[{"$ref":"#/components/schemas/CustomPlanInput"}],"description":"The custom plan description which defines the Subscription."},"customerId":{"description":"The ID of the customer. Provide either the key or ID. Has presedence over the key.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customerKey":{"description":"The key of the customer. Provide either the key or ID.","maxLength":256,"minLength":1,"type":"string"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"default":"immediate","description":"Timing configuration for the change, when the change should take effect.\nThe default is immediate."}},"required":["customPlan"],"title":"Create custom","type":"object"},"Customer":{"description":"A customer object.","example":{"createdAt":"2024-01-01T01:01:01.001Z","id":"01G65Z755AFWAKHE12NY0CQ9FH","name":"ACME Inc.","updatedAt":"2024-01-01T01:01:01.001Z","usageAttribution":{"subjectKeys":["my_subject_key"]}},"properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"billingAddress":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"The billing address of the customer.\nUsed for tax and invoicing.","title":"Billing Address"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Currency of the customer.\nUsed for billing, tax and invoicing.","title":"Currency"},"currentSubscriptionId":{"description":"The ID of the Subscription if the customer has one.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Current Subscription ID","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"key":{"description":"An optional unique key of the customer.\nEither key or usageAttribution.subjectKeys must be provided.\nUseful to reference the customer in external systems.\nFor example, your database ID.","maxLength":256,"minLength":1,"title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"primaryEmail":{"description":"The primary email address of the customer.","title":"Primary Email","type":"string"},"subscriptions":{"description":"The subscriptions of the customer.\nOnly with the `subscriptions` expand option.","items":{"$ref":"#/components/schemas/Subscription"},"readOnly":true,"title":"Subscriptions","type":"array"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usageAttribution":{"allOf":[{"$ref":"#/components/schemas/CustomerUsageAttribution"}],"description":"Mapping to attribute metered usage to the customer\nEither key or usageAttribution.subjectKeys must be provided.","title":"Usage Attribution"}},"required":["id","name","createdAt","updatedAt"],"type":"object"},"CustomerAccess":{"description":"CustomerAccess describes what features the customer has access to.","properties":{"entitlements":{"additionalProperties":{"$ref":"#/components/schemas/EntitlementValue"},"description":"Map of entitlements the customer has access to.\nThe key is the feature key, the value is the entitlement value + the entitlement ID.","readOnly":true,"type":"object"}},"required":["entitlements"],"type":"object"},"CustomerAppData":{"description":"CustomerAppData\nStores the app specific data for the customer.\nOne of: stripe, sandbox, custom_invoicing","discriminator":{"mapping":{"custom_invoicing":"#/components/schemas/CustomInvoicingCustomerAppData","sandbox":"#/components/schemas/SandboxCustomerAppData","stripe":"#/components/schemas/StripeCustomerAppData"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/StripeCustomerAppData"},{"$ref":"#/components/schemas/SandboxCustomerAppData"},{"$ref":"#/components/schemas/CustomInvoicingCustomerAppData"}],"type":"object"},"CustomerAppDataCreateOrUpdateItem":{"description":"CustomerAppData\nStores the app specific data for the customer.\nOne of: stripe, sandbox, custom_invoicing","discriminator":{"mapping":{"custom_invoicing":"#/components/schemas/CustomInvoicingCustomerAppData","sandbox":"#/components/schemas/SandboxCustomerAppData","stripe":"#/components/schemas/StripeCustomerAppDataCreateOrUpdateItem"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/StripeCustomerAppDataCreateOrUpdateItem"},{"$ref":"#/components/schemas/SandboxCustomerAppData"},{"$ref":"#/components/schemas/CustomInvoicingCustomerAppData"}],"type":"object"},"CustomerAppDataPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/CustomerAppData"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"CustomerCreate":{"description":"Resource create operation model.","properties":{"billingAddress":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"The billing address of the customer.\nUsed for tax and invoicing.","title":"Billing Address"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Currency of the customer.\nUsed for billing, tax and invoicing.","title":"Currency"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"key":{"description":"An optional unique key of the customer.\nEither key or usageAttribution.subjectKeys must be provided.\nUseful to reference the customer in external systems.\nFor example, your database ID.","maxLength":256,"minLength":1,"title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"primaryEmail":{"description":"The primary email address of the customer.","title":"Primary Email","type":"string"},"usageAttribution":{"allOf":[{"$ref":"#/components/schemas/CustomerUsageAttribution"}],"description":"Mapping to attribute metered usage to the customer\nEither key or usageAttribution.subjectKeys must be provided.","title":"Usage Attribution"}},"required":["name"],"type":"object"},"CustomerExpand":{"description":"CustomerExpand specifies the parts of the customer to expand in the list output.","enum":["subscriptions"],"type":"string"},"CustomerId":{"description":"Create Stripe checkout session with customer ID.","properties":{"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["id"],"type":"object"},"CustomerKey":{"description":"Create Stripe checkout session with customer key.","properties":{"key":{"type":"string"}},"required":["key"],"type":"object"},"CustomerOrderBy":{"description":"Order by options for customers.","enum":["id","name","createdAt"],"type":"string"},"CustomerPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Customer"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"CustomerReplaceUpdate":{"description":"Resource update operation model.","properties":{"billingAddress":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"The billing address of the customer.\nUsed for tax and invoicing.","title":"Billing Address"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Currency of the customer.\nUsed for billing, tax and invoicing.","title":"Currency"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"key":{"description":"An optional unique key of the customer.\nEither key or usageAttribution.subjectKeys must be provided.\nUseful to reference the customer in external systems.\nFor example, your database ID.","maxLength":256,"minLength":1,"title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"primaryEmail":{"description":"The primary email address of the customer.","title":"Primary Email","type":"string"},"usageAttribution":{"allOf":[{"$ref":"#/components/schemas/CustomerUsageAttribution"}],"description":"Mapping to attribute metered usage to the customer\nEither key or usageAttribution.subjectKeys must be provided.","title":"Usage Attribution"}},"required":["name"],"type":"object"},"CustomerSubscriptionOrderBy":{"description":"Order by options for customer subscriptions.","enum":["activeFrom","activeTo"],"type":"string"},"CustomerUsageAttribution":{"description":"Mapping to attribute metered usage to the customer.\nOne customer can have zero or more subjects,\nbut one subject can only belong to one customer.","properties":{"subjectKeys":{"description":"The subjects that are attributed to the customer.\nCan be empty when no subjects are associated with the customer.","items":{"description":"SubjectKey is a key that is used to identify a subject.","minLength":1,"type":"string"},"title":"SubjectKeys","type":"array"}},"required":["subjectKeys"],"type":"object"},"DiscountPercentage":{"description":"Percentage discount.","properties":{"percentage":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"The percentage of the discount.","maximum":100,"minimum":0,"title":"Percentage"}},"required":["percentage"],"type":"object"},"DiscountReasonMaximumSpend":{"description":"The reason for the discount is a maximum spend.","properties":{"type":{"enum":["maximum_spend"],"type":"string"}},"required":["type"],"type":"object"},"DiscountReasonRatecardPercentage":{"description":"The reason for the discount is a ratecard percentage.","properties":{"correlationId":{"description":"Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"percentage":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"The percentage of the discount.","maximum":100,"minimum":0,"title":"Percentage"},"type":{"enum":["ratecard_percentage"],"type":"string"}},"required":["type","percentage"],"type":"object"},"DiscountReasonRatecardUsage":{"description":"The reason for the discount is a ratecard usage.","properties":{"correlationId":{"description":"Correlation ID for the discount.\n\nThis is used to link discounts across different invoices (progressive billing use case).\n\nIf not provided, the invoicing engine will auto-generate one. When editing an invoice line,\nplease make sure to keep the same correlation ID of the discount or in progressive billing\nsetups the discount amounts might be incorrect.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the usage discount.\n\nMust be positive.","title":"Usage"},"type":{"enum":["ratecard_usage"],"type":"string"}},"required":["type","quantity"],"type":"object"},"DiscountUsage":{"description":"Usage discount.\n\nUsage discount means that the first N items are free. From billing perspective\nthis means that any usage on a specific feature is considered 0 until this discount\nis exhausted.","properties":{"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the usage discount.\n\nMust be positive.","title":"Usage"}},"required":["quantity"],"type":"object"},"Discounts":{"description":"Discount by type on a price","properties":{"percentage":{"allOf":[{"$ref":"#/components/schemas/DiscountPercentage"}],"description":"The percentage discount."},"usage":{"allOf":[{"$ref":"#/components/schemas/DiscountUsage"}],"description":"The usage discount."}},"type":"object"},"DynamicPriceWithCommitments":{"description":"Dynamic price with spend commitments.","properties":{"maximumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is limited to spend at most the amount.","title":"Maximum amount"},"minimumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is committed to spend at least the amount.","title":"Minimum amount"},"multiplier":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"default":"1","description":"The multiplier to apply to the base price to get the dynamic price.\n\nExamples:\n- 0.0: the price is zero\n- 0.5: the price is 50% of the base price\n- 1.0: the price is the same as the base price\n- 1.5: the price is 150% of the base price","title":"The multiplier to apply to the base price to get the dynamic price"},"type":{"description":"The type of the price.","enum":["dynamic"],"type":"string"}},"required":["type"],"type":"object"},"EditSubscriptionAddItem":{"description":"Add a new item to a phase.","properties":{"op":{"enum":["add_item"],"type":"string"},"phaseKey":{"type":"string"},"rateCard":{"$ref":"#/components/schemas/RateCard"}},"required":["op","phaseKey","rateCard"],"type":"object"},"EditSubscriptionAddPhase":{"description":"Add a new phase","properties":{"op":{"enum":["add_phase"],"type":"string"},"phase":{"$ref":"#/components/schemas/SubscriptionPhaseCreate"}},"required":["op","phase"],"type":"object"},"EditSubscriptionRemoveItem":{"description":"Remove an item from a phase.","properties":{"itemKey":{"type":"string"},"op":{"enum":["remove_item"],"type":"string"},"phaseKey":{"type":"string"}},"required":["op","phaseKey","itemKey"],"type":"object"},"EditSubscriptionRemovePhase":{"description":"Remove a phase","properties":{"op":{"enum":["remove_phase"],"type":"string"},"phaseKey":{"type":"string"},"shift":{"$ref":"#/components/schemas/RemovePhaseShifting"}},"required":["op","phaseKey","shift"],"type":"object"},"EditSubscriptionStretchPhase":{"description":"Stretch a phase","properties":{"extendBy":{"format":"duration","type":"string"},"op":{"enum":["stretch_phase"],"type":"string"},"phaseKey":{"type":"string"}},"required":["op","phaseKey","extendBy"],"type":"object"},"EditSubscriptionUnscheduleEdit":{"description":"Unschedules any edits from the current phase.","properties":{"op":{"enum":["unschedule_edit"],"type":"string"}},"required":["op"],"type":"object"},"Entitlement":{"deprecated":true,"description":"Entitlement templates are used to define the entitlements of a plan.\nFeatures are omitted from the entitlement template, as they are defined in the rate card.","discriminator":{"mapping":{"boolean":"#/components/schemas/EntitlementBoolean","metered":"#/components/schemas/EntitlementMetered","static":"#/components/schemas/EntitlementStatic"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/EntitlementMetered"},{"$ref":"#/components/schemas/EntitlementStatic"},{"$ref":"#/components/schemas/EntitlementBoolean"}],"type":"object"},"EntitlementBoolean":{"deprecated":true,"description":"Entitlement template of a boolean entitlement.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"The annotations of the entitlement.","example":{"subscription.id":"sub_123"},"readOnly":true},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentUsagePeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current usage period."},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"subjectKey":{"description":"The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.","example":"customer-1","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"type":{"enum":["boolean"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"The defined usage period of the entitlement"}},"required":["type","createdAt","updatedAt","activeFrom","id","subjectKey","featureKey","featureId"],"type":"object"},"EntitlementBooleanCreateInputs":{"deprecated":true,"description":"Create inputs for boolean entitlement","properties":{"featureId":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"type":{"enum":["boolean"],"type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodCreateInput"}],"description":"The usage period associated with the entitlement."}},"required":["type"],"type":"object"},"EntitlementBooleanV2":{"description":"Entitlement template of a boolean entitlement.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"The annotations of the entitlement.","example":{"subscription.id":"sub_123"},"readOnly":true},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentUsagePeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current usage period."},"customerId":{"description":"The identifier unique to the customer","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customerKey":{"description":"The identifier key unique to the customer","example":"customer-1","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"type":{"enum":["boolean"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"The defined usage period of the entitlement"}},"required":["type","createdAt","updatedAt","activeFrom","id","featureKey","featureId","customerId"],"type":"object"},"EntitlementCreateInputs":{"description":"Create inputs for entitlement","discriminator":{"mapping":{"boolean":"#/components/schemas/EntitlementBooleanCreateInputs","metered":"#/components/schemas/EntitlementMeteredCreateInputs","static":"#/components/schemas/EntitlementStaticCreateInputs"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/EntitlementMeteredCreateInputs"},{"$ref":"#/components/schemas/EntitlementStaticCreateInputs"},{"$ref":"#/components/schemas/EntitlementBooleanCreateInputs"}],"type":"object"},"EntitlementGrant":{"deprecated":true,"description":"The grant.","properties":{"amount":{"description":"The amount to grant. Should be a positive number.","example":100,"format":"double","minimum":0,"type":"number"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Grant annotations","example":{"issueAfterReset":true}},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"effectiveAt":{"description":"Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"entitlementId":{"description":"The unique entitlement ULID that the grant is associated with.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","readOnly":true,"type":"string"},"expiration":{"allOf":[{"$ref":"#/components/schemas/ExpirationPeriod"}],"description":"The grant expiration definition"},"expiresAt":{"description":"The time the grant expires.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"maxRolloverAmount":{"default":0,"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"The grant metadata.","example":{"stripePaymentId":"pi_4OrAkhLvyihio9p51h9iiFnB"}},"minRolloverAmount":{"default":0,"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"nextRecurrence":{"description":"The next time the grant will recurr.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"priority":{"description":"The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.","example":1,"format":"uint8","maximum":255,"minimum":1,"type":"integer"},"recurrence":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"The recurrence period of the grant."},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"voidedAt":{"description":"The time the grant was voided.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["createdAt","updatedAt","amount","effectiveAt","expiration","id","entitlementId"],"type":"object"},"EntitlementGrantCreateInput":{"deprecated":true,"description":"The grant creation input.","properties":{"amount":{"description":"The amount to grant. Should be a positive number.","example":100,"format":"double","minimum":0,"type":"number"},"effectiveAt":{"description":"Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"expiration":{"allOf":[{"$ref":"#/components/schemas/ExpirationPeriod"}],"description":"The grant expiration definition"},"maxRolloverAmount":{"default":0,"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"The grant metadata.","example":{"stripePaymentId":"pi_4OrAkhLvyihio9p51h9iiFnB"}},"minRolloverAmount":{"default":0,"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"priority":{"description":"The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.","example":1,"format":"uint8","maximum":255,"minimum":1,"type":"integer"},"recurrence":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodCreateInput"}],"description":"The subject of the grant."}},"required":["amount","effectiveAt","expiration"],"type":"object"},"EntitlementGrantCreateInputV2":{"description":"The grant creation input.","properties":{"amount":{"description":"The amount to grant. Should be a positive number.","example":100,"format":"double","minimum":0,"type":"number"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Grant annotations","example":{"internal_reference":"internal_reference"}},"effectiveAt":{"description":"Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"expiration":{"allOf":[{"$ref":"#/components/schemas/ExpirationPeriod"}],"description":"The grant expiration definition. If no expiration is provided, the grant can be active indefinitely."},"maxRolloverAmount":{"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. The default value equals grant amount.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"The grant metadata.","example":{"stripePaymentId":"pi_4OrAkhLvyihio9p51h9iiFnB"}},"minRolloverAmount":{"default":0,"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"priority":{"description":"The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.","example":1,"format":"uint8","maximum":255,"minimum":1,"type":"integer"},"recurrence":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodCreateInput"}],"description":"The subject of the grant."}},"required":["amount","effectiveAt"],"type":"object"},"EntitlementGrantV2":{"description":"The grant.","properties":{"amount":{"description":"The amount to grant. Should be a positive number.","example":100,"format":"double","minimum":0,"type":"number"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Grant annotations","example":{"internal_reference":"internal_reference"}},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"effectiveAt":{"description":"Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"entitlementId":{"description":"The unique entitlement ULID that the grant is associated with.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","readOnly":true,"type":"string"},"expiration":{"allOf":[{"$ref":"#/components/schemas/ExpirationPeriod"}],"description":"The grant expiration definition. If no expiration is provided, the grant can be active indefinitely."},"expiresAt":{"description":"The time the grant expires.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"maxRolloverAmount":{"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. The default value equals grant amount.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"The grant metadata.","example":{"stripePaymentId":"pi_4OrAkhLvyihio9p51h9iiFnB"}},"minRolloverAmount":{"default":0,"description":"Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))","example":100,"format":"double","type":"number"},"nextRecurrence":{"description":"The next time the grant will recurr.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"priority":{"description":"The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.","example":1,"format":"uint8","maximum":255,"minimum":1,"type":"integer"},"recurrence":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"The recurrence period of the grant."},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"voidedAt":{"description":"The time the grant was voided.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["createdAt","updatedAt","amount","effectiveAt","id","entitlementId"],"type":"object"},"EntitlementMetered":{"deprecated":true,"description":"Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems.\nAccess is determined based on feature usage using a balance calculation (the \"usage allowance\" provided by the issued grants is \"burnt down\" by the usage).","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"The annotations of the entitlement.","example":{"subscription.id":"sub_123"},"readOnly":true},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentUsagePeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current usage period.","readOnly":true},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"isSoftLimit":{"default":false,"description":"If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.","title":"Soft limit","type":"boolean"},"isUnlimited":{"default":false,"deprecated":true,"description":"Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.","type":"boolean"},"issueAfterReset":{"description":"You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.","format":"double","minimum":0,"title":"Initial grant amount","type":"number"},"issueAfterResetPriority":{"default":1,"description":"Defines the grant priority for the default grant.","format":"uint8","maximum":255,"minimum":1,"title":"Issue grant after reset priority","type":"integer"},"lastReset":{"description":"The time the last reset happened.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"measureUsageFrom":{"description":"The time from which usage is measured. If not specified on creation, defaults to entitlement creation time.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"preserveOverageAtReset":{"default":false,"description":"If true, the overage is preserved at reset. If false, the usage is reset to 0.","title":"Preserve overage at reset","type":"boolean"},"subjectKey":{"description":"The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.","example":"customer-1","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"type":{"enum":["metered"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"THe usage period of the entitlement.","readOnly":true}},"required":["type","createdAt","updatedAt","activeFrom","id","subjectKey","featureKey","featureId","lastReset","currentUsagePeriod","measureUsageFrom","usagePeriod"],"type":"object"},"EntitlementMeteredCreateInputs":{"deprecated":true,"description":"Create inpurs for metered entitlement","properties":{"featureId":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"isSoftLimit":{"default":false,"description":"If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.","title":"Soft limit","type":"boolean"},"isUnlimited":{"default":false,"deprecated":true,"description":"Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.","type":"boolean"},"issueAfterReset":{"description":"You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.","format":"double","minimum":0,"title":"Initial grant amount","type":"number"},"issueAfterResetPriority":{"default":1,"description":"Defines the grant priority for the default grant.","format":"uint8","maximum":255,"minimum":1,"title":"Issue grant after reset priority","type":"integer"},"measureUsageFrom":{"allOf":[{"$ref":"#/components/schemas/MeasureUsageFrom"}],"description":"Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time."},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"preserveOverageAtReset":{"default":false,"description":"If true, the overage is preserved at reset. If false, the usage is reset to 0.","title":"Preserve overage at reset","type":"boolean"},"type":{"enum":["metered"],"type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodCreateInput"}],"description":"The usage period associated with the entitlement."}},"required":["type","usagePeriod"],"type":"object"},"EntitlementMeteredV2":{"description":"Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems.\nAccess is determined based on feature usage using a balance calculation (the \"usage allowance\" provided by the issued grants is \"burnt down\" by the usage).","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"The annotations of the entitlement.","example":{"subscription.id":"sub_123"},"readOnly":true},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentUsagePeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current usage period.","readOnly":true},"customerId":{"description":"The identifier unique to the customer","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customerKey":{"description":"The identifier key unique to the customer","example":"customer-1","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"isSoftLimit":{"default":false,"description":"If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.","title":"Soft limit","type":"boolean"},"issue":{"allOf":[{"$ref":"#/components/schemas/IssueAfterReset"}],"description":"Issue after reset","title":"Issue after reset"},"issueAfterReset":{"deprecated":true,"description":"You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.","format":"double","minimum":0,"title":"Initial grant amount","type":"number"},"issueAfterResetPriority":{"default":1,"deprecated":true,"description":"Defines the grant priority for the default grant.","format":"uint8","maximum":255,"minimum":1,"title":"Issue grant after reset priority","type":"integer"},"lastReset":{"description":"The time the last reset happened.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"measureUsageFrom":{"description":"The time from which usage is measured. If not specified on creation, defaults to entitlement creation time.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"preserveOverageAtReset":{"default":false,"description":"If true, the overage is preserved at reset. If false, the usage is reset to 0.","title":"Preserve overage at reset","type":"boolean"},"type":{"enum":["metered"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"THe usage period of the entitlement.","readOnly":true}},"required":["type","createdAt","updatedAt","activeFrom","id","featureKey","featureId","lastReset","currentUsagePeriod","measureUsageFrom","usagePeriod","customerId"],"type":"object"},"EntitlementMeteredV2CreateInputs":{"description":"Create inputs for metered entitlement","properties":{"featureId":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"grants":{"description":"Grants","items":{"$ref":"#/components/schemas/EntitlementGrantCreateInputV2"},"title":"Grants","type":"array"},"isSoftLimit":{"default":false,"description":"If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.","title":"Soft limit","type":"boolean"},"issue":{"allOf":[{"$ref":"#/components/schemas/IssueAfterReset"}],"description":"Issue after reset","title":"Issue after reset"},"issueAfterReset":{"deprecated":true,"description":"You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.","format":"double","minimum":0,"title":"Initial grant amount","type":"number"},"issueAfterResetPriority":{"default":1,"deprecated":true,"description":"Defines the grant priority for the default grant.","format":"uint8","maximum":255,"minimum":1,"title":"Issue grant after reset priority","type":"integer"},"measureUsageFrom":{"allOf":[{"$ref":"#/components/schemas/MeasureUsageFrom"}],"description":"Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time."},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"preserveOverageAtReset":{"default":false,"description":"If true, the overage is preserved at reset. If false, the usage is reset to 0.","title":"Preserve overage at reset","type":"boolean"},"type":{"enum":["metered"],"type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodCreateInput"}],"description":"The usage period associated with the entitlement."}},"required":["type","usagePeriod"],"type":"object"},"EntitlementOrderBy":{"description":"Order by options for entitlements.","enum":["createdAt","updatedAt"],"type":"string"},"EntitlementPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Entitlement"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"EntitlementStatic":{"deprecated":true,"description":"A static entitlement.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"The annotations of the entitlement.","example":{"subscription.id":"sub_123"},"readOnly":true},"config":{"description":"The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.","example":"{ \"integrations\": [\"github\"] }","format":"json","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentUsagePeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current usage period."},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"subjectKey":{"description":"The identifier key unique to the subject.\nNOTE: Subjects are being deprecated, please use the new customer APIs.","example":"customer-1","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"type":{"enum":["static"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"The defined usage period of the entitlement"}},"required":["type","config","createdAt","updatedAt","activeFrom","id","subjectKey","featureKey","featureId"],"type":"object"},"EntitlementStaticCreateInputs":{"deprecated":true,"description":"Create inputs for static entitlement","properties":{"config":{"description":"The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.","example":"{ \"integrations\": [\"github\"] }","format":"json","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.\nEither featureKey or featureId is required.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"type":{"enum":["static"],"type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodCreateInput"}],"description":"The usage period associated with the entitlement."}},"required":["type","config"],"type":"object"},"EntitlementStaticV2":{"description":"A static entitlement.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"The annotations of the entitlement.","example":{"subscription.id":"sub_123"},"readOnly":true},"config":{"description":"The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.","example":"{ \"integrations\": [\"github\"] }","format":"json","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentUsagePeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current usage period."},"customerId":{"description":"The identifier unique to the customer","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customerKey":{"description":"The identifier key unique to the customer","example":"customer-1","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"featureId":{"description":"The feature the subject is entitled to use.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"featureKey":{"description":"The feature the subject is entitled to use.","example":"example-feature-key","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"type":{"enum":["static"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"usagePeriod":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriod"}],"description":"The defined usage period of the entitlement"}},"required":["type","config","createdAt","updatedAt","activeFrom","id","featureKey","featureId","customerId"],"type":"object"},"EntitlementType":{"deprecated":true,"description":"Type of the entitlement.","enum":["metered","boolean","static"],"type":"string","x-go-type":"string"},"EntitlementV2":{"description":"Entitlement templates are used to define the entitlements of a plan.\nFeatures are omitted from the entitlement template, as they are defined in the rate card.","discriminator":{"mapping":{"boolean":"#/components/schemas/EntitlementBooleanV2","metered":"#/components/schemas/EntitlementMeteredV2","static":"#/components/schemas/EntitlementStaticV2"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/EntitlementMeteredV2"},{"$ref":"#/components/schemas/EntitlementStaticV2"},{"$ref":"#/components/schemas/EntitlementBooleanV2"}],"type":"object"},"EntitlementV2CreateInputs":{"description":"Create inputs for entitlement","discriminator":{"mapping":{"boolean":"#/components/schemas/EntitlementBooleanCreateInputs","metered":"#/components/schemas/EntitlementMeteredV2CreateInputs","static":"#/components/schemas/EntitlementStaticCreateInputs"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/EntitlementMeteredV2CreateInputs"},{"$ref":"#/components/schemas/EntitlementStaticCreateInputs"},{"$ref":"#/components/schemas/EntitlementBooleanCreateInputs"}],"type":"object"},"EntitlementV2PaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/EntitlementV2"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"EntitlementValue":{"description":"Entitlements are the core of OpenMeter access management. They define access to features for subjects. Entitlements can be metered, boolean, or static.","properties":{"balance":{"description":"Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative.","example":100,"format":"double","readOnly":true,"type":"number"},"config":{"description":"Only available for static entitlements. The JSON parsable config of the entitlement.","example":"{ key: \"value\" }","readOnly":true,"type":"string"},"hasAccess":{"description":"Whether the subject has access to the feature. Shared accross all entitlement types.","example":true,"readOnly":true,"type":"boolean"},"overage":{"description":"Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage.","example":0,"format":"double","readOnly":true,"type":"number"},"totalAvailableGrantAmount":{"description":"Only available for metered entitlements. The summed amount of all grant active at query time PLUS the used amount of since inactive grants.","example":100,"format":"double","readOnly":true,"type":"number"},"usage":{"description":"Only available for metered entitlements. Returns the total feature usage in the current period.","example":50,"format":"double","readOnly":true,"type":"number"}},"required":["hasAccess"],"type":"object"},"EntitlementValueV2":{"description":"EntitlementValueV2 returns entitlement access state and value fields for customer-scoped V2 APIs.","properties":{"balance":{"description":"Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative.","example":100,"format":"double","readOnly":true,"type":"number"},"config":{"description":"Only available for static entitlements. The JSON parsable config of the entitlement.","example":"{ key: \"value\" }","readOnly":true,"type":"string"},"grantBalances":{"additionalProperties":{"format":"double","type":"number"},"description":"Only available for metered entitlements. The closing balance of each active grant at query time.\nThe key is the grant ID and the value is the remaining balance.","readOnly":true,"type":"object"},"hasAccess":{"description":"Whether the subject has access to the feature. Shared accross all entitlement types.","example":true,"readOnly":true,"type":"boolean"},"overage":{"description":"Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage.","example":0,"format":"double","readOnly":true,"type":"number"},"totalAvailableGrantAmount":{"description":"Only available for metered entitlements. The summed amount of all grant active at query time PLUS the used amount of since inactive grants.","example":100,"format":"double","readOnly":true,"type":"number"},"usage":{"description":"Only available for metered entitlements. Returns the total feature usage in the current period.","example":50,"format":"double","readOnly":true,"type":"number"}},"required":["hasAccess"],"type":"object"},"ErrorExtension":{"additionalProperties":{},"description":"Generic ErrorExtension as part of HTTPProblem.Extensions.[StatusCode]","properties":{"code":{"description":"The machine readable description of the error.","example":"invalid_feature_key","readOnly":true,"type":"string"},"field":{"description":"The path to the field.","example":"addons/pro/ratecards/token/featureKey","readOnly":true,"type":"string"},"message":{"description":"The human readable description of the error.","example":"not found feature by key","readOnly":true,"type":"string"}},"required":["field","code","message"],"type":"object"},"Event":{"description":"CloudEvents Specification JSON Schema\n\nOptional properties are nullable according to the CloudEvents specification:\nOPTIONAL not omitted attributes MAY be represented as a null JSON value.","example":{"id":"5c10fade-1c9e-4d6c-8275-c52c36731d3c","source":"service-name","specversion":"1.0","subject":"customer-id","time":"2023-01-01T01:01:01.001Z","type":"prompt"},"properties":{"data":{"additionalProperties":{},"description":"The event payload.\nOptional, if present it must be a JSON object.","nullable":true,"type":"object"},"datacontenttype":{"description":"Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.","enum":["application/json"],"example":"application/json","nullable":true,"type":"string"},"dataschema":{"description":"Identifies the schema that data adheres to.","format":"uri","minLength":1,"nullable":true,"type":"string"},"id":{"description":"Identifies the event.","example":"5c10fade-1c9e-4d6c-8275-c52c36731d3c","minLength":1,"type":"string"},"source":{"description":"Identifies the context in which an event happened.","example":"service-name","format":"uri-reference","minLength":1,"type":"string"},"specversion":{"default":"1.0","description":"The version of the CloudEvents specification which the event uses.","example":"1.0","minLength":1,"type":"string"},"subject":{"description":"Describes the subject of the event in the context of the event producer (identified by source).","example":"customer-id","minLength":1,"type":"string"},"time":{"description":"Timestamp of when the occurrence happened. Must adhere to RFC 3339.","example":"2023-01-01T01:01:01.001Z","format":"date-time","nullable":true,"type":"string"},"type":{"description":"Contains a value describing the type of event related to the originating occurrence.","example":"com.example.someevent","minLength":1,"type":"string"}},"required":["id","source","specversion","type","subject"],"type":"object","x-go-type":"event.Event","x-go-type-import":{"path":"github.com/cloudevents/sdk-go/v2/event"}},"EventClerk":{"description":"Clerk webhook event.","properties":{"data":{"additionalProperties":{"nullable":true},"type":"object"},"object":{"type":"string"},"type":{"type":"string"}},"required":["object","type","data"],"type":"object"},"EventDeliveryAttemptResponse":{"description":"The response of the event delivery attempt.","properties":{"body":{"description":"The body of the response.","readOnly":true,"title":"Response Body","type":"string"},"durationMs":{"description":"The duration of the response in milliseconds.","readOnly":true,"title":"Response Duration","type":"integer"},"statusCode":{"description":"Status code of the response if available.","readOnly":true,"title":"Status Code","type":"integer"},"url":{"description":"URL where the event was sent in case of notification channel with webhook type.","readOnly":true,"title":"URL","type":"string"}},"required":["body","durationMs"],"type":"object"},"EventStripe":{"description":"Stripe webhook event.","properties":{"api_version":{"type":"string"},"data":{"additionalProperties":{},"type":"object"},"id":{"type":"string"},"type":{"type":"string"}},"required":["id","api_version","data","type"],"type":"object"},"ExpirationDuration":{"description":"The expiration duration enum","enum":["HOUR","DAY","WEEK","MONTH","YEAR"],"type":"string"},"ExpirationPeriod":{"description":"The grant expiration definition","properties":{"count":{"description":"The number of time units in the expiration period.","example":12,"format":"uint32","maximum":1000,"minimum":1,"type":"integer"},"duration":{"allOf":[{"$ref":"#/components/schemas/ExpirationDuration"}],"description":"The unit of time for the expiration period."}},"required":["duration","count"],"type":"object"},"Feature":{"description":"Represents a feature that can be enabled or disabled for a plan.\nUsed both for product catalog and entitlements.","properties":{"advancedMeterGroupByFilters":{"additionalProperties":{"$ref":"#/components/schemas/FilterString"},"description":"Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.","example":{"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}},"title":"Advanced meter group by filters","type":"object"},"archivedAt":{"description":"Timestamp of when the resource was archived.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Archival Time","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"key":{"description":"A key is a unique string that is used to identify a resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"The unique key of the feature","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"example":{"key":"value"},"title":"Optional metadata"},"meterGroupByFilters":{"additionalProperties":{"type":"string"},"deprecated":true,"description":"Optional meter group by filters.\nUseful if the meter scope is broader than what feature tracks.\nExample scenario would be a meter tracking all token use with groupBy fields for the model,\nthen the feature could filter for model=gpt-4.\n\n⚠️ __Deprecated__: Use advancedMeterGroupByFilters instead","example":{"model":"gpt-4","type":"input"},"title":"Meter group by filters","type":"object"},"meterSlug":{"description":"A key is a unique string that is used to identify a resource.","example":"tokens_total","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Meter slug","type":"string"},"name":{"title":"The human-readable name of the feature","type":"string"},"unitCost":{"allOf":[{"$ref":"#/components/schemas/FeatureUnitCost"}],"description":"Optional per-unit cost configuration.\nUse \"manual\" for a fixed per-unit cost, or \"llm\" to look up cost\nfrom the LLM cost database based on meter group-by properties.","title":"Unit cost"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","key","name","id"],"type":"object"},"FeatureCreateInputs":{"description":"Represents a feature that can be enabled or disabled for a plan.\nUsed both for product catalog and entitlements.","properties":{"advancedMeterGroupByFilters":{"additionalProperties":{"$ref":"#/components/schemas/FilterString"},"description":"Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.","example":{"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}},"title":"Advanced meter group by filters","type":"object"},"key":{"description":"A key is a unique string that is used to identify a resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"The unique key of the feature","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"example":{"key":"value"},"title":"Optional metadata"},"meterGroupByFilters":{"additionalProperties":{"type":"string"},"deprecated":true,"description":"Optional meter group by filters.\nUseful if the meter scope is broader than what feature tracks.\nExample scenario would be a meter tracking all token use with groupBy fields for the model,\nthen the feature could filter for model=gpt-4.\n\n⚠️ __Deprecated__: Use advancedMeterGroupByFilters instead","example":{"model":"gpt-4","type":"input"},"title":"Meter group by filters","type":"object"},"meterSlug":{"description":"A key is a unique string that is used to identify a resource.","example":"tokens_total","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Meter slug","type":"string"},"name":{"title":"The human-readable name of the feature","type":"string"},"unitCost":{"allOf":[{"$ref":"#/components/schemas/FeatureUnitCost"}],"description":"Optional per-unit cost configuration.\nUse \"manual\" for a fixed per-unit cost, or \"llm\" to look up cost\nfrom the LLM cost database based on meter group-by properties.","title":"Unit cost"}},"required":["key","name"],"type":"object"},"FeatureLLMUnitCost":{"description":"LLM cost lookup configuration.\nMaps meter group-by dimensions to LLM cost database fields.","properties":{"model":{"description":"Static model ID value (e.g., \"gpt-4\", \"claude-3-5-sonnet\").\nUse this when the feature tracks a single model.\nMutually exclusive with `modelProperty`.","title":"Model","type":"string"},"modelProperty":{"description":"Meter group-by property that holds the model ID.\nUse this when the meter has a group-by dimension for model.\nMutually exclusive with `model`.","title":"Model property","type":"string"},"pricing":{"allOf":[{"$ref":"#/components/schemas/FeatureLLMUnitCostPricing"}],"description":"Resolved per-token pricing from the LLM cost database.\nOnly populated in responses when the feature's meter group-by filters\nspecify exact provider and model values.","readOnly":true,"title":"Resolved pricing"},"provider":{"description":"Static LLM provider value (e.g., \"openai\", \"anthropic\").\nUse this when the feature tracks a single provider.\nMutually exclusive with `providerProperty`.","title":"Provider","type":"string"},"providerProperty":{"description":"Meter group-by property that holds the LLM provider.\nUse this when the meter has a group-by dimension for provider.\nMutually exclusive with `provider`.","title":"Provider property","type":"string"},"tokenType":{"description":"Static token type value.\nUse this when the feature tracks a single token type (e.g., only input tokens).\nExpected values: input, output, cache_read, reasoning, cache_write, request, response.\n`request` is an alias for `input`, `response` is an alias for `output`.\nMutually exclusive with `tokenTypeProperty`.","title":"Token type","type":"string"},"tokenTypeProperty":{"description":"Meter group-by property that holds the token type.\nUse this when the meter has a group-by dimension for token type.\nMutually exclusive with `tokenType`.","title":"Token type property","type":"string"},"type":{"enum":["llm"],"type":"string"}},"required":["type"],"type":"object"},"FeatureLLMUnitCostPricing":{"description":"Resolved per-token pricing from the LLM cost database.","properties":{"cacheReadPerToken":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Cost per cache read token in USD.","title":"Cache read per token"},"cacheWritePerToken":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Cost per cache write token in USD.","title":"Cache write per token"},"inputPerToken":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Cost per input token in USD.","title":"Input per token"},"outputPerToken":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Cost per output token in USD.","title":"Output per token"},"reasoningPerToken":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Cost per reasoning token in USD.","title":"Reasoning per token"}},"required":["inputPerToken","outputPerToken"],"type":"object"},"FeatureManualUnitCost":{"description":"A fixed per-unit cost amount.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Fixed per-unit cost amount in USD."},"type":{"enum":["manual"],"type":"string"}},"required":["type","amount"],"type":"object"},"FeatureMeta":{"description":"Limited representation of a feature resource which includes only its unique identifiers (id, key).","properties":{"id":{"description":"Unique identifier of a feature.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"Feature Unique Identifier","type":"string"},"key":{"description":"The key is an immutable unique identifier of the feature used throughout the API,\nfor example when interacting with a subject's entitlements.","example":"gpt4_tokens","title":"Feature Key","type":"string"}},"required":["id","key"],"type":"object"},"FeatureOrderBy":{"description":"Order by options for features.","enum":["id","key","name","createdAt","updatedAt"],"type":"string"},"FeaturePaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Feature"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"FeatureUnitCost":{"description":"Per-unit cost configuration for a feature.\nEither a fixed manual amount or a dynamic LLM cost lookup.","discriminator":{"mapping":{"llm":"#/components/schemas/FeatureLLMUnitCost","manual":"#/components/schemas/FeatureManualUnitCost"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/FeatureManualUnitCost"},{"$ref":"#/components/schemas/FeatureLLMUnitCost"}],"type":"object"},"Filter":{"description":"Filter can be used to express complex queries.","example":{"$gte":100},"properties":{"$and":{"items":{"$ref":"#/components/schemas/Filter"},"minItems":2,"type":"array"},"$eq":{"$ref":"#/components/schemas/FilterValue"},"$gt":{"$ref":"#/components/schemas/FilterValue"},"$gte":{"$ref":"#/components/schemas/FilterValue"},"$in":{"$ref":"#/components/schemas/FilterValue"},"$lt":{"$ref":"#/components/schemas/FilterValue"},"$lte":{"$ref":"#/components/schemas/FilterValue"},"$ne":{"$ref":"#/components/schemas/FilterValue"},"$nin":{"$ref":"#/components/schemas/FilterValue"},"$or":{"items":{"$ref":"#/components/schemas/Filter"},"minItems":2,"type":"array"}},"type":"object","x-go-type":"filter.Filter","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/filter"}},"FilterBoolean":{"description":"A filter for a boolean field.","properties":{"$eq":{"description":"The field must be equal to the provided value.","nullable":true,"type":"boolean","x-omitempty":true}},"type":"object"},"FilterIDExact":{"description":"A filter for a ID (ULID) field allowing only equality or inclusion.","properties":{"$in":{"description":"The field must be in the provided list of values.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"nullable":true,"type":"array","x-omitempty":true}},"type":"object"},"FilterString":{"description":"A filter for a string field.","properties":{"$and":{"description":"Provide a list of filters to be combined with a logical AND.","items":{"$ref":"#/components/schemas/FilterString"},"nullable":true,"type":"array","x-omitempty":true},"$eq":{"description":"The field must be equal to the provided value.","nullable":true,"type":"string","x-omitempty":true},"$gt":{"description":"The field must be greater than the provided value.","nullable":true,"type":"string","x-omitempty":true},"$gte":{"description":"The field must be greater than or equal to the provided value.","nullable":true,"type":"string","x-omitempty":true},"$ilike":{"description":"The field must match the provided value, ignoring case.","nullable":true,"type":"string","x-omitempty":true},"$in":{"description":"The field must be in the provided list of values.","items":{"type":"string"},"nullable":true,"type":"array","x-omitempty":true},"$like":{"description":"The field must match the provided value.","nullable":true,"type":"string","x-omitempty":true},"$lt":{"description":"The field must be less than the provided value.","nullable":true,"type":"string","x-omitempty":true},"$lte":{"description":"The field must be less than or equal to the provided value.","nullable":true,"type":"string","x-omitempty":true},"$ne":{"description":"The field must not be equal to the provided value.","nullable":true,"type":"string","x-omitempty":true},"$nilike":{"description":"The field must not match the provided value, ignoring case.","nullable":true,"type":"string","x-omitempty":true},"$nin":{"description":"The field must not be in the provided list of values.","items":{"type":"string"},"nullable":true,"type":"array","x-omitempty":true},"$nlike":{"description":"The field must not match the provided value.","nullable":true,"type":"string","x-omitempty":true},"$or":{"description":"Provide a list of filters to be combined with a logical OR.","items":{"$ref":"#/components/schemas/FilterString"},"nullable":true,"type":"array","x-omitempty":true}},"type":"object"},"FilterTime":{"description":"A filter for a time field.","properties":{"$and":{"description":"Provide a list of filters to be combined with a logical AND.","items":{"$ref":"#/components/schemas/FilterTime"},"nullable":true,"type":"array","x-omitempty":true},"$gt":{"description":"The field must be greater than the provided value.","format":"date-time","nullable":true,"type":"string","x-omitempty":true},"$gte":{"description":"The field must be greater than or equal to the provided value.","format":"date-time","nullable":true,"type":"string","x-omitempty":true},"$lt":{"description":"The field must be less than the provided value.","format":"date-time","nullable":true,"type":"string","x-omitempty":true},"$lte":{"description":"The field must be less than or equal to the provided value.","format":"date-time","nullable":true,"type":"string","x-omitempty":true},"$or":{"description":"Provide a list of filters to be combined with a logical OR.","items":{"$ref":"#/components/schemas/FilterTime"},"nullable":true,"type":"array","x-omitempty":true}},"type":"object"},"FilterValue":{"description":"FilterValue represents a value that can be used in a filter (string, float, string array or float array).","oneOf":[{"$ref":"#/components/schemas/FilterValueString"},{"$ref":"#/components/schemas/FilterValueNumber"},{"$ref":"#/components/schemas/FilterValueArrayString"},{"$ref":"#/components/schemas/FilterValueArrayNumber"}],"title":"FilterValue represents a value that can be used in a filter (string, float, string array or float array).","x-go-type":"filter.FilterValue","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/filter"}},"FilterValueArrayNumber":{"description":"FilterValueArrayNumber represents an array of numbers.","items":{"$ref":"#/components/schemas/FilterValueNumber"},"title":"FilterValueArrayNumber represents an array of numbers.","type":"array","x-go-type":"filter.FilterValueArrayNumber","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/filter"}},"FilterValueArrayString":{"description":"FilterValueArrayString represents an array of strings.","items":{"$ref":"#/components/schemas/FilterValueString"},"title":"FilterValueArrayString represents an array of strings.","type":"array","x-go-type":"filter.FilterValueArrayString","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/filter"}},"FilterValueNumber":{"format":"double","type":"number","x-go-type":"filter.FilterValueNumber","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/filter"}},"FilterValueString":{"type":"string","x-go-type":"filter.FilterValueString","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/filter"}},"FlatPrice":{"description":"Flat price.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of the flat price."},"type":{"description":"The type of the price.","enum":["flat"],"type":"string"}},"required":["type","amount"],"type":"object"},"FlatPriceWithPaymentTerm":{"description":"Flat price with payment term.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of the flat price."},"paymentTerm":{"allOf":[{"$ref":"#/components/schemas/PricePaymentTerm"}],"default":"in_advance","description":"The payment term of the flat price.\nDefaults to in advance."},"type":{"description":"The type of the price.","enum":["flat"],"type":"string"}},"required":["type","amount"],"type":"object"},"ForbiddenProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The server understood the request but refuses to authorize it.","type":"object"},"FoundSubject":{"description":"Subject result descriptor.","properties":{"displayName":{"description":"A human-readable display name for the subject.","example":"Customer Name or Consumer Name or Dev Portal Application Name","nullable":true,"readOnly":true,"type":"string"},"key":{"description":"A unique, human-readable identifier for the subject.\nThis is typically a database ID or a customer key.","example":"customer-db-id-123","readOnly":true,"type":"string"},"subjectKind":{"allOf":[{"$ref":"#/components/schemas/SubjectKind"}],"description":"A human-readable display name for the subject.","example":"consumer","readOnly":true}},"required":["key","subjectKind"],"type":"object"},"GrantBurnDownHistorySegment":{"description":"A segment of the grant burn down history.\n\nA given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period.","properties":{"balanceAtEnd":{"description":"The entitlement balance at the end of the period.","example":100,"format":"double","readOnly":true,"type":"number"},"balanceAtStart":{"description":"entitlement balance at the start of the period.","example":100,"format":"double","readOnly":true,"type":"number"},"grantBalancesAtEnd":{"additionalProperties":{"format":"double","type":"number"},"description":"The balance breakdown of each active grant at the end of the period: GrantID: Balance","example":{"01G65Z755AFWAKHE12NY0CQ9FH":100},"readOnly":true,"type":"object"},"grantBalancesAtStart":{"additionalProperties":{"format":"double","type":"number"},"description":"The balance breakdown of each active grant at the start of the period: GrantID: Balance","example":{"01G65Z755AFWAKHE12NY0CQ9FH":100},"readOnly":true,"type":"object"},"grantUsages":{"description":"Which grants were actually burnt down in the period and by what amount.","items":{"$ref":"#/components/schemas/GrantUsageRecord"},"readOnly":true,"type":"array"},"overage":{"description":"Overuse that wasn't covered by grants.","example":100,"format":"double","readOnly":true,"type":"number"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The period of the segment."},"usage":{"description":"The total usage of the grant in the period.","example":100,"format":"double","readOnly":true,"type":"number"}},"required":["period","usage","overage","balanceAtStart","grantBalancesAtStart","balanceAtEnd","grantBalancesAtEnd","grantUsages"],"type":"object"},"GrantOrderBy":{"description":"Order by options for grants.","enum":["id","createdAt","updatedAt"],"type":"string"},"GrantPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/EntitlementGrant"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"GrantUsageRecord":{"description":"Usage Record","properties":{"grantId":{"description":"The id of the grant","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"usage":{"description":"The usage in the period","example":100,"format":"double","type":"number"}},"required":["grantId","usage"],"type":"object"},"GrantV2PaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/EntitlementGrantV2"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"IDResource":{"description":"IDResource is a resouce with an ID.","properties":{"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"}},"required":["id"],"type":"object"},"IngestEventsBody":{"anyOf":[{"$ref":"#/components/schemas/Event"},{"items":{"$ref":"#/components/schemas/Event"},"type":"array"}],"description":"The body of the events request.\nEither a single event or a batch of events."},"IngestedEvent":{"description":"An ingested event with optional validation error.","example":{"event":{"id":"5c10fade-1c9e-4d6c-8275-c52c36731d3c","source":"service-name","specversion":"1.0","subject":"customer-id","time":"2023-01-01T01:01:01.001Z","type":"prompt"},"ingestedAt":"2023-01-01T01:01:01.001Z","storedAt":"2023-01-01T01:01:02.001Z"},"properties":{"customerId":{"description":"The customer ID if the event is associated with a customer.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"event":{"allOf":[{"$ref":"#/components/schemas/Event"}],"description":"The original event ingested."},"ingestedAt":{"description":"The date and time the event was ingested.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"storedAt":{"description":"The date and time the event was stored.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"validationError":{"description":"The validation error if the event failed validation.","type":"string"}},"required":["event","ingestedAt","storedAt"],"type":"object"},"IngestedEventCursorPaginatedResponse":{"description":"A response for cursor pagination.","properties":{"items":{"description":"The items in the response.","items":{"$ref":"#/components/schemas/IngestedEvent"},"maxItems":100,"type":"array"},"nextCursor":{"description":"The cursor of the last item in the list.","type":"string"}},"required":["items"],"type":"object"},"InstallMethod":{"description":"Install method of the application.","enum":["with_oauth2","with_api_key","no_credentials_required"],"type":"string"},"InternalCreateStripeCheckoutSessionRequest":{"description":"The request body for creating a Stripe checkout session.","properties":{"cancel_url":{"format":"url","nullable":true,"type":"string"},"plan":{"type":"string"},"success_url":{"format":"url","nullable":true,"type":"string"}},"required":["plan"],"type":"object"},"InternalServerErrorProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The server encountered an unexpected condition that prevented it from fulfilling the request.","type":"object"},"Invoice":{"description":"Invoice represents an invoice in the system.","properties":{"collectionAt":{"description":"The time when the invoice will be/has been collected.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Currency for all invoice line items.\n\nMulti currency invoices are not supported yet."},"customer":{"allOf":[{"$ref":"#/components/schemas/BillingInvoiceCustomerExtendedDetails"}],"description":"Legal entity receiving the goods or services."},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"draftUntil":{"description":"The time until the invoice is in draft status.\n\nOn draft invoice creation it is calculated from the workflow settings.\n\nIf manual approval is required, the draftUntil time is set.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"dueAt":{"description":"Due time of the fulfillment of the invoice (if available).","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/InvoiceAppExternalIds"}],"description":"External IDs of the invoice in other apps such as Stripe.","readOnly":true},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"issuedAt":{"description":"The time the invoice was issued.\n\nDepending on the status of the invoice this can mean multiple things:\n- draft, gathering: The time the invoice will be issued based on the workflow settings.\n- issued: The time the invoice was issued.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"lines":{"description":"List of invoice lines representing each of the items sold to the customer.","items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"number":{"allOf":[{"$ref":"#/components/schemas/InvoiceNumber"}],"description":"Number specifies the human readable key used to reference this Invoice.\n\nThe invoice number can change in the draft phases, as we are allocating temporary draft\ninvoice numbers, but it's final as soon as the invoice gets finalized (issued state).\n\nPlease note that the number is (depending on the upstream settings) either unique for the\nwhole organization or unique for the customer, or in multi (stripe) account setups unique for the\naccount.","readOnly":true},"payment":{"allOf":[{"$ref":"#/components/schemas/InvoicePaymentTerms"}],"description":"Information on when, how, and to whom the invoice should be paid.","readOnly":true},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The period the invoice covers. If the invoice has no line items, it's not set."},"preceding":{"description":"Key information regarding previous invoices and potentially details as to why they were corrected.","items":{"$ref":"#/components/schemas/InvoiceDocumentRef"},"readOnly":true,"type":"array"},"quantitySnapshotedAt":{"description":"The time when the quantity snapshots on the invoice lines were taken.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"sentToCustomerAt":{"description":"The time the invoice was sent to customer.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/InvoiceStatus"}],"description":"The status of the invoice.\n\nThis field only conatins a simplified status, for more detailed information use the statusDetails field.","readOnly":true},"statusDetails":{"allOf":[{"$ref":"#/components/schemas/InvoiceStatusDetails"}],"description":"The details of the current invoice status.","readOnly":true},"supplier":{"allOf":[{"$ref":"#/components/schemas/BillingParty"}],"description":"The taxable entity supplying the goods or services."},"totals":{"allOf":[{"$ref":"#/components/schemas/InvoiceTotals"}],"description":"Summary of all the invoice totals, including taxes (calculated).","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/InvoiceType"}],"description":"Type of the invoice.\n\nThe type of invoice determines the purpose of the invoice and how it should be handled.\n\nSupported types:\n- standard: A regular commercial invoice document between a supplier and customer.\n- credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"validationIssues":{"description":"Validation issues reported by the invoice workflow.","items":{"$ref":"#/components/schemas/ValidationIssue"},"readOnly":true,"type":"array"},"voidedAt":{"description":"The time the invoice was voided.\n\nIf the invoice was voided, this field will be set to the time the invoice was voided.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"workflow":{"allOf":[{"$ref":"#/components/schemas/InvoiceWorkflowSettings"}],"description":"The workflow associated with the invoice.\n\nIt is always a snapshot of the workflow settings at the time of invoice creation. The\nfield is optional as it should be explicitly requested with expand options."}},"required":["id","createdAt","updatedAt","type","supplier","customer","number","currency","totals","status","statusDetails","workflow"],"type":"object"},"InvoiceAppExternalIds":{"description":"InvoiceAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.","properties":{"invoicing":{"description":"The external ID of the invoice in the invoicing app if available.","readOnly":true,"type":"string"},"payment":{"description":"The external ID of the invoice in the payment app if available.","readOnly":true,"type":"string"},"tax":{"description":"The external ID of the invoice in the tax app if available.","readOnly":true,"type":"string"}},"type":"object"},"InvoiceAvailableActionDetails":{"description":"InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for\nnon-gathering invoices.","properties":{"resultingState":{"description":"The state the invoice will reach if the action is activated and\nall intermediate steps are successful.\n\nFor example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.","readOnly":true,"type":"string"}},"required":["resultingState"],"type":"object"},"InvoiceAvailableActionInvoiceDetails":{"description":"InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for\ngathering invoices.","type":"object"},"InvoiceAvailableActions":{"description":"InvoiceAvailableActions represents the actions that can be performed on the invoice.","properties":{"advance":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionDetails"}],"description":"Advance the invoice to the next status.","readOnly":true},"approve":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionDetails"}],"description":"Approve an invoice that requires manual approval.","readOnly":true},"delete":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionDetails"}],"description":"Delete the invoice (only non-issued invoices can be deleted).","readOnly":true},"invoice":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionInvoiceDetails"}],"description":"Invoice a gathering invoice","readOnly":true},"retry":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionDetails"}],"description":"Retry an invoice issuing step that failed.","readOnly":true},"snapshotQuantities":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionDetails"}],"description":"Snapshot quantities for usage based line items.","readOnly":true},"void":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActionDetails"}],"description":"Void an already issued invoice.","readOnly":true}},"type":"object"},"InvoiceDetailedLine":{"description":"InvoiceDetailedLine represents a line item that is sold to the customer as a manually added fee.","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/InvoiceDetailedLineCostCategory"}],"default":"regular","description":"Category of the flat fee.","readOnly":true},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"creditAllocations":{"description":"Credit allocations applied to this line.\n\nCredits are deducted from the line total before taxes are applied.","items":{"$ref":"#/components/schemas/InvoiceLineCreditAllocation"},"readOnly":true,"type":"array"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of this line."},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineDiscounts"}],"description":"Discounts detailes applied to this line.\n\nNew discounts can be added via the invoice's discounts API, to facilitate\ndiscounts that are affecting multiple lines.","readOnly":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineAppExternalIds"}],"description":"External IDs of the invoice in other apps such as Stripe.","readOnly":true},"id":{"description":"ID of the line.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"invoice":{"allOf":[{"$ref":"#/components/schemas/InvoiceReference"}],"description":"The invoice this item belongs to."},"invoiceAt":{"deprecated":true,"description":"The time this line item should be invoiced.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"managedBy":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineManagedBy"}],"description":"managedBy specifies if the line is manually added via the api or managed by OpenMeter.","readOnly":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"paymentTerm":{"allOf":[{"$ref":"#/components/schemas/PricePaymentTerm"}],"default":"in_advance","deprecated":true,"description":"Payment term of the line."},"perUnitAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"deprecated":true,"description":"Price of the item being sold."},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"deprecated":true,"description":"Quantity of the item being sold."},"rateCard":{"allOf":[{"$ref":"#/components/schemas/InvoiceDetailedLineRateCard"}],"description":"The rate card that is used for this line."},"status":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineStatus"}],"description":"Status of the line.\n\nExternal calls always create valid lines, other line types are managed by the\nbilling engine of OpenMeter.","readOnly":true},"subscription":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineSubscriptionReference"}],"description":"Subscription are the references to the subscritpions that this line is related to.","readOnly":true},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"deprecated":true,"description":"Tax config specify the tax configuration for this line."},"taxes":{"description":"Taxes applied to the invoice totals.","items":{"$ref":"#/components/schemas/InvoiceLineTaxItem"},"readOnly":true,"type":"array"},"totals":{"allOf":[{"$ref":"#/components/schemas/InvoiceTotals"}],"description":"Totals for this line.","readOnly":true},"type":{"deprecated":true,"description":"Type of the line.","enum":["flat_fee"],"readOnly":true,"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["name","createdAt","updatedAt","id","managedBy","status","currency","totals","period","invoiceAt","type"],"type":"object"},"InvoiceDetailedLineCostCategory":{"description":"InvoiceDetailedLineCostCategory determines if the flat fee is a regular fee due to use due to a\ncommitment.","enum":["regular","commitment"],"type":"string"},"InvoiceDetailedLineRateCard":{"description":"InvoiceDetailedLineRateCard represents the rate card (intent) for a flat fee line.","properties":{"discounts":{"allOf":[{"$ref":"#/components/schemas/BillingDiscounts"}],"description":"The discounts that are applied to the line."},"price":{"allOf":[{"$ref":"#/components/schemas/FlatPriceWithPaymentTerm"}],"description":"The price of the rate card.\nWhen null, the feature or service is free.","example":{"amount":"100","paymentTerm":"in_arrears","type":"flat"},"nullable":true,"title":"Price","type":"object"},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Quantity of the item being sold.\n\nDefault: 1"},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.","title":"Tax config"}},"required":["price"],"type":"object"},"InvoiceDocumentRef":{"allOf":[{"$ref":"#/components/schemas/CreditNoteOriginalInvoiceRef"}],"description":"InvoiceDocumentRef is used to describe a reference to an existing document (invoice).","type":"object"},"InvoiceDocumentRefType":{"description":"InvoiceDocumentRefType defines the type of document that is being referenced.","enum":["credit_note_original_invoice"],"type":"string"},"InvoiceExpand":{"description":"InvoiceExpand specifies the parts of the invoice to expand in the list output.","enum":["lines","preceding","workflow.apps"],"type":"string"},"InvoiceGenericDocumentRef":{"description":"Omitted fields:\nperiod: Tax period in which the referred document had an effect required by some tax regimes and formats.\nstamps: Seals of approval from other organisations that may need to be listed.\next: \tExtensions for additional codes that may be required.","properties":{"description":{"description":"Additional details about the document.","readOnly":true,"type":"string"},"reason":{"description":"Human readable description on why this reference is here or needs to be used.","readOnly":true,"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/InvoiceDocumentRefType"}],"description":"Type of the document referenced.","readOnly":true}},"required":["type"],"title":"InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents.","type":"object"},"InvoiceLine":{"description":"InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage.","properties":{"children":{"description":"The lines detailing the item or service sold.","items":{"$ref":"#/components/schemas/InvoiceDetailedLine"},"readOnly":true,"type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"creditAllocations":{"description":"Credit allocations applied to this line.\n\nCredits are deducted from the line total before taxes are applied.","items":{"$ref":"#/components/schemas/InvoiceLineCreditAllocation"},"readOnly":true,"type":"array"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of this line."},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineDiscounts"}],"description":"Discounts detailes applied to this line.\n\nNew discounts can be added via the invoice's discounts API, to facilitate\ndiscounts that are affecting multiple lines.","readOnly":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineAppExternalIds"}],"description":"External IDs of the invoice in other apps such as Stripe.","readOnly":true},"featureKey":{"deprecated":true,"description":"The feature that the usage is based on.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"ID of the line.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"invoice":{"allOf":[{"$ref":"#/components/schemas/InvoiceReference"}],"description":"The invoice this item belongs to."},"invoiceAt":{"description":"The time this line item should be invoiced.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"managedBy":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineManagedBy"}],"description":"managedBy specifies if the line is manually added via the api or managed by OpenMeter.","readOnly":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"meteredPreLinePeriodQuantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The metered quantity of the item used in before this line's period without any discounts applied.\n\nIt is non-zero in case of progressive billing, when this shows how much of the usage was already billed.","readOnly":true},"meteredQuantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the item that has been metered for the period before any discounts were applied.","readOnly":true},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."},"preLinePeriodQuantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the item used before this line's period.\n\nIt is non-zero in case of progressive billing, when this shows how much of the usage was already billed.\n\nAny usage discounts applied previously are deducted from this quantity.","readOnly":true},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"deprecated":true,"description":"Price of the usage-based item being sold."},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the item being sold.\n\nAny usage discounts applied previously are deducted from this quantity.","readOnly":true},"rateCard":{"allOf":[{"$ref":"#/components/schemas/InvoiceUsageBasedRateCard"}],"description":"The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."},"status":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineStatus"}],"description":"Status of the line.\n\nExternal calls always create valid lines, other line types are managed by the\nbilling engine of OpenMeter.","readOnly":true},"subscription":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineSubscriptionReference"}],"description":"Subscription are the references to the subscritpions that this line is related to.","readOnly":true},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"deprecated":true,"description":"Tax config specify the tax configuration for this line."},"taxes":{"description":"Taxes applied to the invoice totals.","items":{"$ref":"#/components/schemas/InvoiceLineTaxItem"},"readOnly":true,"type":"array"},"totals":{"allOf":[{"$ref":"#/components/schemas/InvoiceTotals"}],"description":"Totals for this line.","readOnly":true},"type":{"deprecated":true,"description":"Type of the line.","enum":["usage_based"],"readOnly":true,"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["name","createdAt","updatedAt","id","managedBy","status","currency","totals","period","invoiceAt","type"],"type":"object"},"InvoiceLineAmountDiscount":{"description":"InvoiceLineAmountDiscount represents an amount deducted from the line, and will be applied before taxes.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Fixed discount amount to apply (calculated if percent present).","readOnly":true,"title":"Amount in the currency of the invoice"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Text description as to why the discount was applied.","readOnly":true,"type":"string"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineAppExternalIds"}],"description":"External IDs of the invoice in other apps such as Stripe.","readOnly":true},"id":{"description":"ID of the charge or discount.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"reason":{"allOf":[{"$ref":"#/components/schemas/BillingDiscountReason"}],"description":"Reason code.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","reason","amount"],"type":"object"},"InvoiceLineAppExternalIds":{"description":"InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.","properties":{"invoicing":{"description":"The external ID of the invoice in the invoicing app if available.","readOnly":true,"type":"string"},"tax":{"description":"The external ID of the invoice in the tax app if available.","readOnly":true,"type":"string"}},"type":"object"},"InvoiceLineCreditAllocation":{"description":"InvoiceLineCreditAllocation represents a credit amount allocated to the line before taxes are applied.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Amount allocated from credits.","readOnly":true,"title":"Amount in the currency of the invoice"},"description":{"description":"Text description as to why the credit was allocated.","readOnly":true,"type":"string"}},"required":["amount"],"type":"object"},"InvoiceLineDiscounts":{"description":"InvoiceLineDiscounts represents the discounts applied to the invoice line by type.","properties":{"amount":{"description":"Amount based discounts applied to the line.\n\nAmount based discounts are deduced from the total price of the line.","items":{"$ref":"#/components/schemas/InvoiceLineAmountDiscount"},"type":"array"},"usage":{"description":"Usage based discounts applied to the line.\n\nUsage based discounts are deduced from the usage of the line before price calculations are applied.","items":{"$ref":"#/components/schemas/InvoiceLineUsageDiscount"},"type":"array"}},"type":"object"},"InvoiceLineManagedBy":{"description":"InvoiceLineManagedBy specifies who manages the line.","enum":["subscription","system","manual"],"type":"string"},"InvoiceLineReplaceUpdate":{"description":"InvoiceLineReplaceUpdate represents the update model for an UBP invoice line.\n\nThis type makes ID optional to allow for creating new lines as part of the update.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"featureKey":{"deprecated":true,"description":"The feature that the usage is based on.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"The ID of the line.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"invoiceAt":{"description":"The time this line item should be invoiced.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"deprecated":true,"description":"Price of the usage-based item being sold."},"rateCard":{"allOf":[{"$ref":"#/components/schemas/InvoiceUsageBasedRateCard"}],"description":"The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"deprecated":true,"description":"Tax config specify the tax configuration for this line."}},"required":["name","period","invoiceAt"],"type":"object"},"InvoiceLineStatus":{"description":"Line status specifies the status of the line.","enum":["valid","detailed","split"],"type":"string"},"InvoiceLineSubscriptionReference":{"description":"InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to.","properties":{"billingPeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The billing period of the subscription. In case the subscription item's billing period is different\nfrom the subscription's billing period, this field will contain the billing period of the subscription itself.\n\nFor example, in case of:\n- A monthly billed subscription anchored to 2025-01-01\n- A subscription item billed daily\n\nAn example line would have the period of 2025-01-02 to 2025-01-03 as the item is billed daily, but the subscription's billing period\nwill be 2025-01-01 to 2025-01-31.","readOnly":true},"item":{"allOf":[{"$ref":"#/components/schemas/IDResource"}],"description":"The item this line is related to.","readOnly":true},"phase":{"allOf":[{"$ref":"#/components/schemas/IDResource"}],"description":"The phase of the subscription.","readOnly":true},"subscription":{"allOf":[{"$ref":"#/components/schemas/IDResource"}],"description":"The subscription.","readOnly":true}},"required":["subscription","phase","item","billingPeriod"],"type":"object"},"InvoiceLineTaxBehavior":{"description":"InvoiceLineTaxBehavior details how the tax item is applied to the base amount.\n\nInclusive means the tax is included in the base amount.\nExclusive means the tax is added to the base amount.","enum":["inclusive","exclusive"],"type":"string"},"InvoiceLineTaxItem":{"description":"TaxConfig stores the configuration for a tax line relative to an invoice line.","properties":{"behavior":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineTaxBehavior"}],"description":"Is the tax item inclusive or exclusive of the base amount.","readOnly":true},"config":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"Tax provider configuration.","readOnly":true},"percent":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"Percent defines the percentage set manually or determined from\nthe rate key (calculated if rate present). A nil percent implies that\nthis tax combo is **exempt** from tax.\")","readOnly":true},"surcharge":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Some countries require an additional surcharge (calculated if rate present).","readOnly":true}},"type":"object"},"InvoiceLineUsageDiscount":{"description":"InvoiceLineUsageDiscount represents an usage-based discount applied to the line.\n\nThe deduction is done before the pricing algorithm is applied.","properties":{"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Text description as to why the discount was applied.","readOnly":true,"type":"string"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineAppExternalIds"}],"description":"External IDs of the invoice in other apps such as Stripe.","readOnly":true},"id":{"description":"ID of the charge or discount.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"preLinePeriodQuantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The usage discount already applied to the previous split lines.\n\nOnly set if progressive billing is enabled and the line is a split line.","readOnly":true,"title":"Usage quantity in the unit of the underlying meter"},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The usage to apply.","readOnly":true,"title":"Usage quantity in the unit of the underlying meter"},"reason":{"allOf":[{"$ref":"#/components/schemas/BillingDiscountReason"}],"description":"Reason code.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","reason","quantity"],"type":"object"},"InvoiceNumber":{"description":"InvoiceNumber is a unique identifier for the invoice, generated by the\ninvoicing app.\n\nThe uniqueness depends on a lot of factors:\n- app setting (unique per app or unique per customer)\n- multiple app scenarios (multiple apps generating invoices with the same prefix)","example":"INV-2024-01-01-01","maxLength":256,"minLength":1,"type":"string"},"InvoiceOrderBy":{"description":"InvoiceOrderBy specifies the ordering options for invoice listing.","enum":["customer.name","issuedAt","status","createdAt","updatedAt","periodStart"],"type":"string"},"InvoicePaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Invoice"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"InvoicePaymentTerms":{"description":"Payment contains details as to how the invoice should be paid.","properties":{"terms":{"allOf":[{"$ref":"#/components/schemas/PaymentTerms"}],"description":"The terms of payment for the invoice."}},"type":"object"},"InvoicePendingLineCreate":{"description":"InvoicePendingLineCreate represents the create model for an invoice line that is sold to the customer based on usage.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"featureKey":{"deprecated":true,"description":"The feature that the usage is based on.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"invoiceAt":{"description":"The time this line item should be invoiced.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"deprecated":true,"description":"Price of the usage-based item being sold."},"rateCard":{"allOf":[{"$ref":"#/components/schemas/InvoiceUsageBasedRateCard"}],"description":"The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"deprecated":true,"description":"Tax config specify the tax configuration for this line."}},"required":["name","period","invoiceAt"],"type":"object"},"InvoicePendingLineCreateInput":{"description":"InvoicePendingLineCreate represents the create model for a pending invoice line.","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The currency of the lines to be created."},"lines":{"description":"The lines to be created.","items":{"$ref":"#/components/schemas/InvoicePendingLineCreate"},"minItems":1,"type":"array"}},"required":["currency","lines"],"type":"object"},"InvoicePendingLineCreateResponse":{"description":"InvoicePendingLineCreateResponse represents the response from the create pending line endpoint.","properties":{"invoice":{"allOf":[{"$ref":"#/components/schemas/Invoice"}],"description":"The invoice containing the created lines.","readOnly":true},"isInvoiceNew":{"description":"Whether the invoice was newly created.","readOnly":true,"type":"boolean"},"lines":{"description":"The lines that were created.","items":{"$ref":"#/components/schemas/InvoiceLine"},"readOnly":true,"type":"array"}},"required":["lines","invoice","isInvoiceNew"],"type":"object"},"InvoicePendingLinesActionFiltersInput":{"description":"InvoicePendingLinesActionFiltersInput specifies which lines to include in the invoice.","properties":{"lineIds":{"description":"The pending line items to include in the invoice, if not provided:\n- all line items that have invoice_at \u003c asOf will be included\n- [progressive billing only] all usage based line items will be included up to asOf, new\nusage-based line items will be staged for the rest of the billing cycle\n\nAll lineIDs present in the list, must exists and must be invoicable as of asOf, or the action will fail.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"}},"type":"object"},"InvoicePendingLinesActionInput":{"description":"BillingInvoiceActionInput is the input for creating an invoice.\n\nInvoice creation is always based on already pending line items created by the billingCreateLineByCustomer\noperation. Empty invoices are not allowed.","properties":{"asOf":{"description":"The time as of which the invoice is created.\n\nIf not provided, the current time is used.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"customerId":{"description":"The customer ID for which to create the invoice.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"filters":{"allOf":[{"$ref":"#/components/schemas/InvoicePendingLinesActionFiltersInput"}],"description":"Filters to apply when creating the invoice."},"progressiveBillingOverride":{"description":"Override the progressive billing setting of the customer.\n\nCan be used to disable/enable progressive billing in case the business logic\nrequires it, if not provided the billing profile's progressive billing setting will be used.","type":"boolean"}},"required":["customerId"],"type":"object"},"InvoiceReference":{"description":"Reference to an invoice.","properties":{"id":{"description":"The ID of the invoice.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"number":{"allOf":[{"$ref":"#/components/schemas/InvoiceNumber"}],"description":"The number of the invoice.","readOnly":true}},"required":["id"],"type":"object"},"InvoiceReplaceUpdate":{"description":"InvoiceReplaceUpdate represents the update model for an invoice.","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/BillingPartyReplaceUpdate"}],"description":"The customer the invoice is sent to."},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"lines":{"description":"The lines included in the invoice.","items":{"$ref":"#/components/schemas/InvoiceLineReplaceUpdate"},"type":"array"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"supplier":{"allOf":[{"$ref":"#/components/schemas/BillingPartyReplaceUpdate"}],"description":"The supplier of the lines included in the invoice."},"workflow":{"allOf":[{"$ref":"#/components/schemas/InvoiceWorkflowReplaceUpdate"}],"description":"The workflow settings for the invoice."}},"required":["supplier","customer","lines","workflow"],"type":"object"},"InvoiceSimulationInput":{"description":"InvoiceSimulationInput is the input for simulating an invoice.","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"Currency for all invoice line items.\n\nMulti currency invoices are not supported yet."},"lines":{"description":"Lines to be included in the generated invoice.","items":{"$ref":"#/components/schemas/InvoiceSimulationLine"},"type":"array"},"number":{"allOf":[{"$ref":"#/components/schemas/InvoiceNumber"}],"description":"The number of the invoice."}},"required":["currency","lines"],"type":"object"},"InvoiceSimulationLine":{"description":"InvoiceSimulationLine represents a usage-based line item that can be input to the simulation endpoint.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"featureKey":{"deprecated":true,"description":"The feature that the usage is based on.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"ID of the line. If not specified it will be auto-generated.\n\nWhen discounts are specified, this must be provided, so that the discount can reference it.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"invoiceAt":{"description":"The time this line item should be invoiced.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"period":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"Period of the line item applies to for revenue recognition pruposes.\n\nBilling always treats periods as start being inclusive and end being exclusive."},"preLinePeriodQuantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the item used before this line's period, if the line is billed progressively."},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"deprecated":true,"description":"Price of the usage-based item being sold."},"quantity":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity of the item being sold."},"rateCard":{"allOf":[{"$ref":"#/components/schemas/InvoiceUsageBasedRateCard"}],"description":"The rate card that is used for this line.\n\nThe rate card captures the intent of the price and discounts for the usage-based item."},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"deprecated":true,"description":"Tax config specify the tax configuration for this line."}},"required":["name","period","invoiceAt","quantity"],"type":"object"},"InvoiceStatus":{"description":"InvoiceStatus describes the status of an invoice.","enum":["gathering","draft","issuing","issued","payment_processing","overdue","paid","uncollectible","voided"],"type":"string"},"InvoiceStatusDetails":{"description":"InvoiceStatusDetails represents the details of the invoice status.\n\nAPI users are encouraged to rely on the immutable/failed/avaliableActions fields to determine\nthe next steps of the invoice instead of the extendedStatus field.","properties":{"availableActions":{"allOf":[{"$ref":"#/components/schemas/InvoiceAvailableActions"}],"description":"The actions that can be performed on the invoice."},"extendedStatus":{"description":"Extended status information for the invoice.","readOnly":true,"type":"string"},"failed":{"description":"Is the invoice in a failed state?","readOnly":true,"type":"boolean"},"immutable":{"description":"Is the invoice editable?","readOnly":true,"type":"boolean"}},"required":["immutable","failed","extendedStatus","availableActions"],"type":"object"},"InvoiceTotals":{"description":"Totals contains the summaries of all calculations for the invoice.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The total value of the line before taxes, discounts and commitments.","readOnly":true},"chargesTotal":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of value of the line that are due to additional charges.","readOnly":true},"creditsTotal":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of value of the line that are due to credits.","readOnly":true},"discountsTotal":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of value of the line that are due to discounts.","readOnly":true},"taxesExclusiveTotal":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The total amount of taxes that are added on top of amount from the line.","readOnly":true},"taxesInclusiveTotal":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The total amount of taxes that are included in the line.","readOnly":true},"taxesTotal":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The total amount of taxes for this line.","readOnly":true},"total":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The total amount value of the line after taxes, discounts and commitments.","readOnly":true}},"required":["amount","chargesTotal","discountsTotal","creditsTotal","taxesInclusiveTotal","taxesExclusiveTotal","taxesTotal","total"],"type":"object"},"InvoiceType":{"description":"InvoiceType represents the type of invoice.\n\nThe type of invoice determines the purpose of the invoice and how it should be handled.","enum":["standard","credit_note"],"type":"string"},"InvoiceUsageBasedRateCard":{"description":"InvoiceUsageBasedRateCard represents the rate card (intent) for an usage-based line.","properties":{"discounts":{"allOf":[{"$ref":"#/components/schemas/BillingDiscounts"}],"deprecated":true,"description":"The discounts that are applied to the line."},"featureKey":{"description":"The feature the customer is entitled to use.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Feature key","type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"description":"The price of the rate card.\nWhen null, the feature or service is free.","nullable":true},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.","title":"Tax config"}},"required":["price"],"type":"object"},"InvoiceWorkflowInvoicingSettingsReplaceUpdate":{"description":"InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow.","properties":{"autoAdvance":{"default":true,"description":"Whether to automatically issue the invoice after the draftPeriod has passed.","type":"boolean"},"defaultTaxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"Default tax configuration to apply to the invoices.\n\nSetting a tax code (`stripe.code` / `taxCodeId`) on a profile's default tax config is\ndeprecated and can no longer be added or changed: the organization default tax code is\nused instead. Existing tax-code values may still be removed, and `behavior` remains\nfully supported."},"draftPeriod":{"default":"P0D","description":"The period for the invoice to be kept in draft status for manual reviews.","example":"P1D","format":"ISO8601","type":"string"},"dueAfter":{"default":"P30D","description":"The period after which the invoice is due.\nWith some payment solutions it's only applicable for manual collection method.","example":"P30D","format":"ISO8601","type":"string"},"subscriptionEndProrationMode":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowInvoicingSubscriptionEndProrationMode"}],"default":"bill_actual_period","description":"Controls how subscription-ending shortened service periods are billed."}},"type":"object"},"InvoiceWorkflowReplaceUpdate":{"description":"InvoiceWorkflowReplaceUpdate represents the update model for an invoice workflow.\n\nFields that are immutable a re removed from the model. This is based on InvoiceWorkflowSettings.","properties":{"workflow":{"allOf":[{"$ref":"#/components/schemas/InvoiceWorkflowSettingsReplaceUpdate"}],"description":"The workflow used for this invoice."}},"required":["workflow"],"type":"object"},"InvoiceWorkflowSettings":{"description":"InvoiceWorkflowSettings represents the workflow settings used by the invoice.\n\nThis is a clone of the billing profile's workflow settings at the time of invoice creation\nwith customer overrides considered.","properties":{"apps":{"allOf":[{"$ref":"#/components/schemas/BillingProfileAppsOrReference"}],"description":"The apps that will be used to orchestrate the invoice's workflow.","readOnly":true},"sourceBillingProfileId":{"description":"sourceBillingProfileID is the billing profile on which the workflow was based on.\n\nThe profile is snapshotted on invoice creation, after which it can be altered independently\nof the profile itself.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"workflow":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflow"}],"description":"The workflow details used by this invoice."}},"required":["sourceBillingProfileId","workflow"],"type":"object"},"InvoiceWorkflowSettingsReplaceUpdate":{"description":"Mutable workflow settings for an invoice.\n\nOther fields on the invoice's workflow are not mutable, they serve as a history of the invoice's workflow\nat creation time.","properties":{"invoicing":{"allOf":[{"$ref":"#/components/schemas/InvoiceWorkflowInvoicingSettingsReplaceUpdate"}],"description":"The invoicing settings for this workflow"},"payment":{"allOf":[{"$ref":"#/components/schemas/BillingWorkflowPaymentSettings"}],"description":"The payment settings for this workflow"}},"required":["invoicing","payment"],"type":"object"},"IssueAfterReset":{"description":"Issue after reset","properties":{"amount":{"description":"The initial grant amount","format":"double","minimum":0,"title":"Initial grant amount","type":"number"},"priority":{"default":1,"description":"The priority of the issue after reset","format":"uint8","maximum":255,"minimum":1,"title":"Issue grant after reset priority","type":"integer"}},"required":["amount"],"type":"object"},"ListEntitlementsResult":{"description":"List entitlements result","oneOf":[{"items":{"$ref":"#/components/schemas/Entitlement"},"type":"array"},{"$ref":"#/components/schemas/EntitlementPaginatedResponse"}]},"ListFeaturesResult":{"description":"List features result","oneOf":[{"items":{"$ref":"#/components/schemas/Feature"},"type":"array"},{"$ref":"#/components/schemas/FeaturePaginatedResponse"}]},"MarketplaceInstallRequestPayload":{"description":"Marketplace install request payload.","properties":{"createBillingProfile":{"default":true,"description":"If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.","type":"boolean"},"name":{"description":"Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name.","type":"string"}},"type":"object"},"MarketplaceInstallResponse":{"description":"Marketplace install response.","properties":{"app":{"$ref":"#/components/schemas/App"},"defaultForCapabilityTypes":{"description":"Default for capabilities","items":{"$ref":"#/components/schemas/AppCapabilityType"},"type":"array"}},"required":["app","defaultForCapabilityTypes"],"type":"object"},"MarketplaceListing":{"description":"A marketplace listing.\nRepresent an available app in the app marketplace that can be installed to the organization.\n\nMarketplace apps only exist in config so they don't extend the Resource model.","example":{"capabilities":[{"description":"Stripe Tax calculates tax portion of the invoices.","key":"stripe_calculate_tax","name":"Calculate Tax","type":"calculateTax"},{"description":"Stripe invoices customers with due amount.","key":"stripe_invoice_customers","name":"Invoice Customers","type":"invoiceCustomers"},{"description":"Stripe payments collects outstanding revenue with Stripe customer's default payment method.","key":"stripe_collect_payments","name":"Collect Payments","type":"collectPayments"}],"description":"Stripe integration allows you to collect payments with Stripe.","installMethods":["with_oauth2","with_api_key"],"name":"Stripe","type":"stripe"},"properties":{"capabilities":{"description":"The app's capabilities.","items":{"$ref":"#/components/schemas/AppCapability"},"type":"array"},"description":{"description":"The app's description.","type":"string"},"installMethods":{"description":"Install methods.\n\nList of methods to install the app.","items":{"$ref":"#/components/schemas/InstallMethod"},"type":"array"},"name":{"description":"The app's name.","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/AppType"}],"description":"The app's type"}},"required":["type","name","description","capabilities","installMethods"],"type":"object"},"MarketplaceListingPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/MarketplaceListing"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"MeasureUsageFrom":{"description":"Measure usage from","oneOf":[{"$ref":"#/components/schemas/MeasureUsageFromPreset"},{"$ref":"#/components/schemas/MeasureUsageFromTime"}]},"MeasureUsageFromPreset":{"description":"Start of measurement options","enum":["CURRENT_PERIOD_START","NOW"],"type":"string","x-enum-varnames":["CurrentPeriodStart","Now"]},"MeasureUsageFromTime":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"Metadata":{"additionalProperties":{"type":"string"},"description":"Set of key-value pairs.\nMetadata can be used to store additional information about a resource.","example":{"externalId":"019142cc-a016-796a-8113-1a942fecd26d"},"type":"object","x-go-type":"map[string]string"},"Meter":{"description":"A meter is a configuration that defines how to match and aggregate events.","example":{"aggregation":"SUM","createdAt":"2024-01-01T01:01:01.001Z","description":"AI Token Usage","eventType":"prompt","groupBy":{"model":"$.model","type":"$.type"},"id":"01G65Z755AFWAKHE12NY0CQ9FH","name":"Tokens Total","slug":"tokens_total","updatedAt":"2024-01-01T01:01:01.001Z","valueProperty":"$.tokens"},"properties":{"aggregation":{"allOf":[{"$ref":"#/components/schemas/MeterAggregation"}],"description":"The aggregation type to use for the meter.","example":"SUM"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","nullable":true,"readOnly":true,"title":"Annotations","type":"object"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"eventFrom":{"description":"The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"eventType":{"description":"The event type to aggregate.","example":"prompt","minLength":1,"type":"string"},"groupBy":{"additionalProperties":{"type":"string"},"description":"Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.","example":{"type":"$.type"},"type":"object"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"slug":{"description":"A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.","example":"tokens_total","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"valueProperty":{"description":"JSONPath expression to extract the value from the ingested event's data property.\n\nThe ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.\n\nFor UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.","example":"$.tokens","minLength":1,"type":"string"}},"required":["id","createdAt","updatedAt","slug","aggregation","eventType"],"type":"object"},"MeterAggregation":{"description":"The aggregation type to use for the meter.","enum":["SUM","COUNT","UNIQUE_COUNT","AVG","MIN","MAX","LATEST"],"type":"string","x-enum-varnames":["Sum","Count","UniqueCount","Avg","Min","Max","Latest"]},"MeterCreate":{"description":"A meter create model.","example":{"aggregation":"SUM","description":"AI Token Usage","eventType":"prompt","groupBy":{"model":"$.model","type":"$.type"},"name":"Tokens Total","slug":"tokens_total","valueProperty":"$.tokens"},"properties":{"aggregation":{"allOf":[{"$ref":"#/components/schemas/MeterAggregation"}],"description":"The aggregation type to use for the meter.","example":"SUM"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"eventFrom":{"description":"The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"eventType":{"description":"The event type to aggregate.","example":"prompt","minLength":1,"type":"string"},"groupBy":{"additionalProperties":{"type":"string"},"description":"Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.","example":{"type":"$.type"},"type":"object"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"slug":{"description":"A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.","example":"tokens_total","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"valueProperty":{"description":"JSONPath expression to extract the value from the ingested event's data property.\n\nThe ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.\n\nFor UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.","example":"$.tokens","minLength":1,"type":"string"}},"required":["slug","aggregation","eventType"],"type":"object"},"MeterOrderBy":{"description":"Order by options for meters.","enum":["key","name","aggregation","createdAt","updatedAt"],"type":"string"},"MeterQueryRequest":{"description":"A meter query request.","properties":{"advancedMeterGroupByFilters":{"additionalProperties":{"$ref":"#/components/schemas/FilterString"},"description":"Optional advanced meter group by filters.\nYou can use this to filter for values of the meter groupBy fields.","example":{"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}},"type":"object"},"clientId":{"description":"Client ID\nUseful to track progress of a query.","example":"f74e58ed-94ce-4041-ae06-cf45420451a3","maxLength":36,"minLength":1,"type":"string"},"filterCustomerId":{"description":"Filtering by multiple customers.","example":["id-1","id-2"],"items":{"type":"string"},"maxItems":100,"type":"array"},"filterGroupBy":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"description":"Simple filter for group bys with exact match.","example":{"model":["gpt-4-turbo","gpt-4o"],"type":["prompt"]},"type":"object"},"from":{"description":"Start date-time in RFC 3339 format.\n\nInclusive.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"groupBy":{"description":"If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.","example":["model","type"],"items":{"type":"string"},"maxItems":100,"type":"array"},"subject":{"description":"Filtering by multiple subjects.","example":["subject-1","subject-2"],"items":{"type":"string"},"maxItems":100,"type":"array"},"to":{"description":"End date-time in RFC 3339 format.\n\nInclusive.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"windowSize":{"allOf":[{"$ref":"#/components/schemas/WindowSize"}],"description":"If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.","example":"DAY"},"windowTimeZone":{"default":"UTC","description":"The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.","example":"UTC","type":"string"}},"type":"object"},"MeterQueryResult":{"description":"The result of a meter query.","example":{"data":[{"groupBy":{"model":"gpt-4-turbo","type":"prompt"},"subject":"customer-1","value":12,"windowEnd":"2023-01-02T00:00:00Z","windowStart":"2023-01-01T00:00:00Z"}],"from":"2023-01-01T00:00:00Z","to":"2023-01-02T00:00:00Z","windowSize":"DAY"},"properties":{"data":{"description":"The usage data.\nIf no data is available, an empty array is returned.","items":{"$ref":"#/components/schemas/MeterQueryRow"},"type":"array"},"from":{"description":"The start of the period the usage is queried from.\nIf not specified, the usage is queried from the beginning of time.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"to":{"description":"The end of the period the usage is queried to.\nIf not specified, the usage is queried up to the current time.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"windowSize":{"allOf":[{"$ref":"#/components/schemas/WindowSize"}],"description":"The window size that the usage is aggregated.\nIf not specified, the usage is aggregated over the entire period."}},"required":["data"],"type":"object"},"MeterQueryRow":{"description":"A row in the result of a meter query.","example":{"groupBy":{"model":"gpt-4-turbo","type":"prompt"},"subject":"customer-1","value":12,"windowEnd":"2023-01-02T00:00:00Z","windowStart":"2023-01-01T00:00:00Z"},"properties":{"customerId":{"description":"The customer ID the value is aggregated over.","type":"string"},"groupBy":{"additionalProperties":{"nullable":true,"type":"string"},"description":"The group by values the value is aggregated over.","type":"object"},"subject":{"description":"The subject the value is aggregated over.\nIf not specified, the value is aggregated over all subjects.","nullable":true,"type":"string"},"value":{"description":"The aggregated value.","format":"double","type":"number"},"windowEnd":{"description":"The end of the window the value is aggregated over.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"windowStart":{"description":"The start of the window the value is aggregated over.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["value","windowStart","windowEnd","subject","groupBy"],"type":"object"},"MeterUpdate":{"description":"A meter update model.\n\nOnly the properties that can be updated are included.\nFor example, the slug and aggregation cannot be updated.","example":{"description":"AI Token Usage","groupBy":{"model":"$.model","type":"$.type"},"name":"Tokens Total"},"properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"groupBy":{"additionalProperties":{"type":"string"},"description":"Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.","example":{"type":"$.type"},"type":"object"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.","maxLength":256,"minLength":1,"title":"Display name","type":"string"}},"type":"object"},"NotFoundProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.","type":"object"},"NotificationChannel":{"allOf":[{"$ref":"#/components/schemas/NotificationChannelWebhook"}],"description":"Notification channel.","type":"object"},"NotificationChannelCreateRequest":{"allOf":[{"$ref":"#/components/schemas/NotificationChannelWebhookCreateRequest"}],"description":"Union type for requests creating new notification channel with certain type.","type":"object"},"NotificationChannelMeta":{"description":"Metadata only fields of a notification channel.","properties":{"id":{"description":"Identifies the notification channel.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Channel Unique Identifier","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/NotificationChannelType"}],"description":"Notification channel type.","title":"Channel Type"}},"required":["id","type"],"type":"object"},"NotificationChannelOrderBy":{"description":"Order by options for notification channels.","enum":["id","type","createdAt","updatedAt"],"type":"string"},"NotificationChannelPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/NotificationChannel"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"NotificationChannelType":{"description":"Type of the notification channel.","enum":["WEBHOOK"],"type":"string","x-enum-varnames":["Webhook"]},"NotificationChannelWebhook":{"description":"Notification channel with webhook type.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"customHeaders":{"additionalProperties":{"type":"string"},"description":"Custom HTTP headers sent as part of the webhook request.","title":"Custom HTTP Headers","type":"object"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"disabled":{"default":false,"description":"Whether the channel is disabled or not.","example":true,"title":"Channel Disabled","type":"boolean"},"id":{"description":"Identifies the notification channel.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Channel Unique Identifier","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"User friendly name of the channel.","example":"customer-webhook","maxLength":256,"minLength":1,"title":"Channel Name","type":"string"},"signingSecret":{"description":"Signing secret used for webhook request validation on the receiving end.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24","example":"whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8","pattern":"^(whsec_)?[a-zA-Z0-9+/=]{32,100}$","title":"Signing Secret","type":"string"},"type":{"description":"Notification channel type.","enum":["WEBHOOK"],"title":"Channel Type","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"url":{"description":"Webhook URL where the notification is sent.","example":"https://example.com/webhook","title":"Webhook URL","type":"string"}},"required":["createdAt","updatedAt","id","type","name","url"],"type":"object"},"NotificationChannelWebhookCreateRequest":{"description":"Request with input parameters for creating new notification channel with webhook type.","properties":{"customHeaders":{"additionalProperties":{"type":"string"},"description":"Custom HTTP headers sent as part of the webhook request.","title":"Custom HTTP Headers","type":"object"},"disabled":{"default":false,"description":"Whether the channel is disabled or not.","example":true,"title":"Channel Disabled","type":"boolean"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"User friendly name of the channel.","example":"customer-webhook","maxLength":256,"minLength":1,"title":"Channel Name","type":"string"},"signingSecret":{"description":"Signing secret used for webhook request validation on the receiving end.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24","example":"whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8","pattern":"^(whsec_)?[a-zA-Z0-9+/=]{32,100}$","title":"Signing Secret","type":"string"},"type":{"description":"Notification channel type.","enum":["WEBHOOK"],"title":"Channel Type","type":"string"},"url":{"description":"Webhook URL where the notification is sent.","example":"https://example.com/webhook","title":"Webhook URL","type":"string"}},"required":["type","name","url"],"type":"object"},"NotificationEvent":{"description":"Type of the notification event.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"createdAt":{"description":"Timestamp when the notification event was created in RFC 3339 format.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deliveryStatus":{"description":"The delivery status of the notification event.","items":{"$ref":"#/components/schemas/NotificationEventDeliveryStatus"},"readOnly":true,"title":"Delivery Status","type":"array"},"id":{"description":"A unique identifier of the notification event.","example":"01J2KNP1YTXQRXHTDJ4KPR7PZ0","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Event Identifier","type":"string"},"payload":{"allOf":[{"$ref":"#/components/schemas/NotificationEventPayload"}],"description":"Timestamp when the notification event was created in RFC 3339 format.","readOnly":true},"rule":{"allOf":[{"$ref":"#/components/schemas/NotificationRule"}],"description":"The nnotification rule which generated this event.","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/NotificationEventType"}],"description":"Type of the notification event.","readOnly":true,"title":"Event Type"}},"required":["id","type","createdAt","rule","deliveryStatus","payload"],"type":"object"},"NotificationEventBalanceThresholdPayload":{"description":"Payload for notification event with `entitlements.balance.threshold` type.","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/NotificationEventBalanceThresholdPayloadData"}],"description":"The data of the payload.","readOnly":true,"title":"Payload Data"},"id":{"description":"A unique identifier for the notification event the payload belongs to.","example":"01J2KNP1YTXQRXHTDJ4KPR7PZ0","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Notification Event Identifier","type":"string"},"timestamp":{"description":"Timestamp when the notification event was created in RFC 3339 format.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"type":{"description":"Type of the notification event.","enum":["entitlements.balance.threshold"],"readOnly":true,"title":"Notification Event Type","type":"string"}},"required":["id","type","timestamp","data"],"type":"object"},"NotificationEventBalanceThresholdPayloadData":{"description":"Data of the payload for notification event with `entitlements.balance.threshold` type.","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/Customer"}],"readOnly":true,"title":"Customer"},"entitlement":{"allOf":[{"$ref":"#/components/schemas/EntitlementMetered"}],"readOnly":true,"title":"Entitlement"},"feature":{"allOf":[{"$ref":"#/components/schemas/Feature"}],"readOnly":true,"title":"Feature"},"subject":{"allOf":[{"$ref":"#/components/schemas/Subject"}],"readOnly":true,"title":"Subject"},"threshold":{"allOf":[{"$ref":"#/components/schemas/NotificationRuleBalanceThresholdValue"}],"readOnly":true,"title":"Threshold"},"value":{"allOf":[{"$ref":"#/components/schemas/EntitlementValue"}],"readOnly":true,"title":"Entitlement Value"}},"required":["entitlement","feature","subject","value","threshold"],"type":"object"},"NotificationEventDeliveryAttempt":{"description":"The delivery attempt of the notification event.","properties":{"response":{"allOf":[{"$ref":"#/components/schemas/EventDeliveryAttemptResponse"}],"description":"Response returned by the notification event recipient.","readOnly":true,"title":"Response returned by the notification event recipient"},"state":{"allOf":[{"$ref":"#/components/schemas/NotificationEventDeliveryStatusState"}],"description":"State of teh delivery attempt.","example":"SUCCESS","readOnly":true,"title":"State of teh delivery attempt"},"timestamp":{"description":"Timestamp of the delivery attempt.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Timestamp of the delivery attempt","type":"string"}},"required":["state","response","timestamp"],"type":"object"},"NotificationEventDeliveryStatus":{"description":"The delivery status of the notification event.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"attempts":{"description":"List of delivery attempts.","items":{"$ref":"#/components/schemas/NotificationEventDeliveryAttempt"},"readOnly":true,"title":"Delivery Attempts","type":"array"},"channel":{"allOf":[{"$ref":"#/components/schemas/NotificationChannelMeta"}],"description":"Notification channel the delivery status associated with.","readOnly":true,"title":"Notification Channel"},"nextAttempt":{"description":"Timestamp of the next delivery attempt. If null it means there will be no more delivery attempts.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Timestamp of the next delivery attempt","type":"string"},"reason":{"description":"The reason of the last deliverry state update.","example":"Failed to dispatch event due to provider error.","readOnly":true,"title":"State Reason","type":"string"},"state":{"allOf":[{"$ref":"#/components/schemas/NotificationEventDeliveryStatusState"}],"description":"Delivery state of the notification event to the channel.","example":"SUCCESS","readOnly":true},"updatedAt":{"description":"Timestamp of when the status was last updated in RFC 3339 format.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["state","reason","updatedAt","channel","attempts"],"type":"object"},"NotificationEventDeliveryStatusState":{"description":"The delivery state of the notification event to the channel.","enum":["SUCCESS","FAILED","SENDING","PENDING","RESENDING"],"title":"Delivery State","type":"string","x-enum-varnames":["Success","Failed","Sending","Pending","Resending"]},"NotificationEventEntitlementValuePayloadBase":{"description":"Base data for any payload with entitlement entitlement value.","properties":{"customer":{"allOf":[{"$ref":"#/components/schemas/Customer"}],"readOnly":true,"title":"Customer"},"entitlement":{"allOf":[{"$ref":"#/components/schemas/EntitlementMetered"}],"readOnly":true,"title":"Entitlement"},"feature":{"allOf":[{"$ref":"#/components/schemas/Feature"}],"readOnly":true,"title":"Feature"},"subject":{"allOf":[{"$ref":"#/components/schemas/Subject"}],"readOnly":true,"title":"Subject"},"value":{"allOf":[{"$ref":"#/components/schemas/EntitlementValue"}],"readOnly":true,"title":"Entitlement Value"}},"required":["entitlement","feature","subject","value"],"type":"object"},"NotificationEventInvoiceCreatedPayload":{"description":"Payload for notification event with `invoice.created` type.","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Invoice"}],"description":"The data of the payload.","readOnly":true,"title":"Payload Data"},"id":{"description":"A unique identifier for the notification event the payload belongs to.","example":"01J2KNP1YTXQRXHTDJ4KPR7PZ0","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Notification Event Identifier","type":"string"},"timestamp":{"description":"Timestamp when the notification event was created in RFC 3339 format.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"type":{"description":"Type of the notification event.","enum":["invoice.created"],"readOnly":true,"title":"Notification Event Type","type":"string"}},"required":["id","type","timestamp","data"],"type":"object"},"NotificationEventInvoiceUpdatedPayload":{"description":"Payload for notification event with `invoice.updated` type.","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Invoice"}],"description":"The data of the payload.","readOnly":true,"title":"Payload Data"},"id":{"description":"A unique identifier for the notification event the payload belongs to.","example":"01J2KNP1YTXQRXHTDJ4KPR7PZ0","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Notification Event Identifier","type":"string"},"timestamp":{"description":"Timestamp when the notification event was created in RFC 3339 format.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"type":{"description":"Type of the notification event.","enum":["invoice.updated"],"readOnly":true,"title":"Notification Event Type","type":"string"}},"required":["id","type","timestamp","data"],"type":"object"},"NotificationEventOrderBy":{"description":"Order by options for notification channels.","enum":["id","createdAt"],"type":"string"},"NotificationEventPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/NotificationEvent"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"NotificationEventPayload":{"description":"The delivery status of the notification event.","discriminator":{"mapping":{"entitlements.balance.threshold":"#/components/schemas/NotificationEventBalanceThresholdPayload","entitlements.reset":"#/components/schemas/NotificationEventResetPayload","invoice.created":"#/components/schemas/NotificationEventInvoiceCreatedPayload","invoice.updated":"#/components/schemas/NotificationEventInvoiceUpdatedPayload"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/NotificationEventResetPayload"},{"$ref":"#/components/schemas/NotificationEventBalanceThresholdPayload"},{"$ref":"#/components/schemas/NotificationEventInvoiceCreatedPayload"},{"$ref":"#/components/schemas/NotificationEventInvoiceUpdatedPayload"}],"type":"object"},"NotificationEventResendRequest":{"description":"A notification event that will be re-sent.","properties":{"channels":{"description":"Notification channels to which the event should be re-sent.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"title":"Channels","type":"array"}},"type":"object"},"NotificationEventResetPayload":{"description":"Payload for notification event with `entitlements.reset` type.","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/NotificationEventEntitlementValuePayloadBase"}],"description":"The data of the payload.","readOnly":true,"title":"Payload Data"},"id":{"description":"A unique identifier for the notification event the payload belongs to.","example":"01J2KNP1YTXQRXHTDJ4KPR7PZ0","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Notification Event Identifier","type":"string"},"timestamp":{"description":"Timestamp when the notification event was created in RFC 3339 format.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"type":{"description":"Type of the notification event.","enum":["entitlements.reset"],"readOnly":true,"title":"Notification Event Type","type":"string"}},"required":["id","type","timestamp","data"],"type":"object"},"NotificationEventType":{"description":"Type of the notification event.","enum":["entitlements.balance.threshold","entitlements.reset","invoice.created","invoice.updated"],"type":"string"},"NotificationRule":{"description":"Notification Rule.","discriminator":{"mapping":{"entitlements.balance.threshold":"#/components/schemas/NotificationRuleBalanceThreshold","entitlements.reset":"#/components/schemas/NotificationRuleEntitlementReset","invoice.created":"#/components/schemas/NotificationRuleInvoiceCreated","invoice.updated":"#/components/schemas/NotificationRuleInvoiceUpdated"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/NotificationRuleBalanceThreshold"},{"$ref":"#/components/schemas/NotificationRuleEntitlementReset"},{"$ref":"#/components/schemas/NotificationRuleInvoiceCreated"},{"$ref":"#/components/schemas/NotificationRuleInvoiceUpdated"}],"type":"object"},"NotificationRuleBalanceThreshold":{"description":"Notification rule with entitlements.balance.threshold type.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"channels":{"description":"List of notification channels the rule applies to.","items":{"$ref":"#/components/schemas/NotificationChannelMeta"},"title":"Channels assigned to Rule","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"features":{"description":"Optional field containing list of features the rule applies to.","items":{"$ref":"#/components/schemas/FeatureMeta"},"minItems":1,"title":"Features","type":"array"},"id":{"description":"Identifies the notification rule.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Rule Unique Identifier","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"thresholds":{"description":"List of thresholds the rule suppose to be triggered.","items":{"$ref":"#/components/schemas/NotificationRuleBalanceThresholdValue"},"maxItems":10,"minItems":1,"title":"Entitlement Balance Thresholds","type":"array"},"type":{"description":"Notification rule type.","enum":["entitlements.balance.threshold"],"title":"Rule Type","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","type","name","channels","thresholds"],"type":"object"},"NotificationRuleBalanceThresholdCreateRequest":{"description":"Request with input parameters for creating new notification rule with entitlements.balance.threshold type.","properties":{"channels":{"description":"List of notification channels the rule is applied to.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"minItems":1,"title":"Channels","type":"array"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"features":{"description":"Optional field for defining the scope of notification by feature. It may contain features by id or key.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"minItems":1,"title":"Features","type":"array"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"thresholds":{"description":"List of thresholds the rule suppose to be triggered.","items":{"$ref":"#/components/schemas/NotificationRuleBalanceThresholdValue"},"maxItems":10,"minItems":1,"title":"Entitlement Balance Thresholds","type":"array"},"type":{"description":"Notification rule type.","enum":["entitlements.balance.threshold"],"title":"Rule Type","type":"string"}},"required":["type","name","thresholds","channels"],"type":"object"},"NotificationRuleBalanceThresholdValue":{"description":"Threshold value with multiple supported types.","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/NotificationRuleBalanceThresholdValueType"}],"description":"Type of the threshold.","example":"usage_value"},"value":{"description":"Value of the threshold.","example":100,"format":"double","title":"Threshold Value","type":"number"}},"required":["value","type"],"type":"object"},"NotificationRuleBalanceThresholdValueType":{"description":"Type of the rule in the balance threshold specification:\n* `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period\n* `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period\n* `usage_value`: threshold defined by the usage value in the current usage period\n* `NUMBER` (**deprecated**): see `usage_value`\n* `PERCENT` (**deprecated**): see `usage_percentage`","enum":["PERCENT","NUMBER","balance_value","usage_percentage","usage_value"],"title":"Notification balance threshold type","type":"string","x-enum-varnames":["Percent","Number","BalanceValue","UsagePercentage","UsageValue"]},"NotificationRuleCreateRequest":{"description":"Union type for requests creating new notification rule with certain type.","discriminator":{"mapping":{"entitlements.balance.threshold":"#/components/schemas/NotificationRuleBalanceThresholdCreateRequest","entitlements.reset":"#/components/schemas/NotificationRuleEntitlementResetCreateRequest","invoice.created":"#/components/schemas/NotificationRuleInvoiceCreatedCreateRequest","invoice.updated":"#/components/schemas/NotificationRuleInvoiceUpdatedCreateRequest"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/NotificationRuleBalanceThresholdCreateRequest"},{"$ref":"#/components/schemas/NotificationRuleEntitlementResetCreateRequest"},{"$ref":"#/components/schemas/NotificationRuleInvoiceCreatedCreateRequest"},{"$ref":"#/components/schemas/NotificationRuleInvoiceUpdatedCreateRequest"}],"type":"object"},"NotificationRuleEntitlementReset":{"description":"Notification rule with entitlements.reset type.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"channels":{"description":"List of notification channels the rule applies to.","items":{"$ref":"#/components/schemas/NotificationChannelMeta"},"title":"Channels assigned to Rule","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"features":{"description":"Optional field containing list of features the rule applies to.","items":{"$ref":"#/components/schemas/FeatureMeta"},"minItems":1,"title":"Features","type":"array"},"id":{"description":"Identifies the notification rule.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Rule Unique Identifier","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"type":{"description":"Notification rule type.","enum":["entitlements.reset"],"title":"Rule Type","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","type","name","channels"],"type":"object"},"NotificationRuleEntitlementResetCreateRequest":{"description":"Request with input parameters for creating new notification rule with entitlements.reset type.","properties":{"channels":{"description":"List of notification channels the rule is applied to.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"minItems":1,"title":"Channels","type":"array"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"features":{"description":"Optional field for defining the scope of notification by feature. It may contain features by id or key.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"minItems":1,"title":"Features","type":"array"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"type":{"description":"Notification rule type.","enum":["entitlements.reset"],"title":"Rule Type","type":"string"}},"required":["type","name","channels"],"type":"object"},"NotificationRuleInvoiceCreated":{"description":"Notification rule with invoice.created type.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"channels":{"description":"List of notification channels the rule applies to.","items":{"$ref":"#/components/schemas/NotificationChannelMeta"},"title":"Channels assigned to Rule","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"id":{"description":"Identifies the notification rule.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Rule Unique Identifier","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"type":{"description":"Notification rule type.","enum":["invoice.created"],"title":"Rule Type","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","type","name","channels"],"type":"object"},"NotificationRuleInvoiceCreatedCreateRequest":{"description":"Request with input parameters for creating new notification rule with invoice.created type.","properties":{"channels":{"description":"List of notification channels the rule is applied to.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"minItems":1,"title":"Channels","type":"array"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"type":{"description":"Notification rule type.","enum":["invoice.created"],"title":"Rule Type","type":"string"}},"required":["type","name","channels"],"type":"object"},"NotificationRuleInvoiceUpdated":{"description":"Notification rule with invoice.updated type.","properties":{"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"channels":{"description":"List of notification channels the rule applies to.","items":{"$ref":"#/components/schemas/NotificationChannelMeta"},"title":"Channels assigned to Rule","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"id":{"description":"Identifies the notification rule.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"Rule Unique Identifier","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"type":{"description":"Notification rule type.","enum":["invoice.updated"],"title":"Rule Type","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","type","name","channels"],"type":"object"},"NotificationRuleInvoiceUpdatedCreateRequest":{"description":"Request with input parameters for creating new notification rule with invoice.updated  type.","properties":{"channels":{"description":"List of notification channels the rule is applied to.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"minItems":1,"title":"Channels","type":"array"},"disabled":{"default":false,"description":"Whether the rule is disabled or not.","example":true,"title":"Rule Disabled","type":"boolean"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"The user friendly name of the notification rule.","example":"Balance threshold reached","maxLength":256,"minLength":1,"title":"Rule Name","type":"string"},"type":{"description":"Notification rule type.","enum":["invoice.updated"],"title":"Rule Type","type":"string"}},"required":["type","name","channels"],"type":"object"},"NotificationRuleOrderBy":{"description":"Order by options for notification channels.","enum":["id","type","createdAt","updatedAt"],"type":"string"},"NotificationRulePaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/NotificationRule"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"Numeric":{"description":"Numeric represents an arbitrary precision number.","pattern":"^\\-?[0-9]+(\\.[0-9]+)?$","type":"string"},"OAuth2AuthorizationCodeGrantErrorType":{"description":"OAuth2 authorization code grant error types.","enum":["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"],"type":"string"},"ObjectStorageReport":{"description":"The object storage report.","properties":{"bucketName":{"description":"The name of the bucket to export events to.","type":"string"},"id":{"description":"The ID of the report.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"objectPrefix":{"description":"Optional prefix to use for the object key.\nIt is useful to organize the objects in the bucket.","pattern":"^(/?[a-zA-Z0-9_\\-\\.]+)+/?$","type":"string"},"region":{"description":"The region of the object storage.","type":"string"},"schedule":{"allOf":[{"$ref":"#/components/schemas/ReportSchedule"}],"description":"The schedule of the report.\nDefines how frequently the report should run."},"slug":{"description":"The unique slug of the report.\nMust be unique within the organization.","type":"string"},"storageType":{"allOf":[{"$ref":"#/components/schemas/ObjectStorageType"}],"description":"The type of the object storage engine to export events to.","example":"s3"},"type":{"description":"The type of the report.","enum":["objectStorage"],"type":"string"}},"required":["type","id","slug","schedule","storageType","bucketName"],"type":"object"},"ObjectStorageReportCreate":{"description":"Resource create operation model.","properties":{"accessKeyId":{"description":"The access key and secret to use for the object storage.","type":"string"},"bucketName":{"description":"The name of the bucket to export events to.","type":"string"},"gcsCredentials":{"description":"The GCS credentials to use for the object storage.\nJSON credentials file.","type":"string"},"objectPrefix":{"description":"Optional prefix to use for the object key.\nIt is useful to organize the objects in the bucket.","pattern":"^(/?[a-zA-Z0-9_\\-\\.]+)+/?$","type":"string"},"region":{"description":"The region of the object storage.","type":"string"},"schedule":{"allOf":[{"$ref":"#/components/schemas/ReportSchedule"}],"description":"The schedule of the report.\nDefines how frequently the report should run."},"secretAccessKey":{"description":"The secret access key to use for the object storage.","type":"string"},"slug":{"description":"The unique slug of the report.\nMust be unique within the organization.","type":"string"},"storageType":{"allOf":[{"$ref":"#/components/schemas/ObjectStorageType"}],"description":"The type of the object storage engine to export events to.","example":"s3"},"type":{"description":"The type of the report.","enum":["objectStorage"],"type":"string"}},"required":["type","slug","schedule","storageType","bucketName"],"type":"object"},"ObjectStorageType":{"description":"The type of the object storage engine.","enum":["s3","gcs"],"type":"string","x-go-type":"report.StorageType","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/report"}},"Organization":{"description":"The organization information.","properties":{"billingEngine":{"allOf":[{"$ref":"#/components/schemas/BillingEngineKind"}],"readOnly":true},"id":{"readOnly":true,"type":"string"},"name":{"readOnly":true,"type":"string"},"permissions":{"items":{"$ref":"#/components/schemas/OrganizationPermission"},"readOnly":true,"type":"array"},"slug":{"readOnly":true,"type":"string"},"timeZone":{"type":"string"}},"required":["id","slug","name","timeZone","permissions","billingEngine"],"type":"object"},"OrganizationPermission":{"description":"The organization permission with a resource and action.","properties":{"action":{"enum":["read","write"],"type":"string"},"resource":{"$ref":"#/components/schemas/ResourceKind"}},"required":["resource","action"],"type":"object"},"OrganizationUpdateAll":{"description":"Resource update operation model.","properties":{"timeZone":{"type":"string"}},"required":["timeZone"],"type":"object"},"PackagePriceWithCommitments":{"description":"Package price with spend commitments.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The price of one package.","title":"Amount"},"maximumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is limited to spend at most the amount.","title":"Maximum amount"},"minimumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is committed to spend at least the amount.","title":"Minimum amount"},"quantityPerPackage":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The quantity per package.","title":"Quantity per package"},"type":{"description":"The type of the price.","enum":["package"],"type":"string"}},"required":["type","amount","quantityPerPackage"],"type":"object"},"PaymentDueDate":{"description":"PaymentDueDate contains an amount that should be paid by the given date.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"How much needs to be paid by the date.","readOnly":true},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"If different from the parent document's base currency.","readOnly":true},"dueAt":{"description":"When the payment is due.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"notes":{"description":"Other details to take into account for the due date.","readOnly":true,"type":"string"},"percent":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"Percentage of the total that should be paid by the date.","readOnly":true}},"required":["dueAt","amount"],"type":"object"},"PaymentTermDueDate":{"description":"PaymentTermDueDate defines the terms for payment on a specific date.","properties":{"detail":{"description":"Text detail of the chosen payment terms.","readOnly":true,"type":"string"},"dueAt":{"description":"When the payment is due.","items":{"$ref":"#/components/schemas/PaymentDueDate"},"minItems":1,"readOnly":true,"type":"array"},"notes":{"description":"Description of the conditions for payment.","readOnly":true,"type":"string"},"type":{"description":"Type of terms to be applied.","enum":["due_date"],"type":"string"}},"required":["type","dueAt"],"type":"object"},"PaymentTermInstant":{"description":"PaymentTermInstant defines the terms for payment on receipt of invoice.","properties":{"detail":{"description":"Text detail of the chosen payment terms.","readOnly":true,"type":"string"},"notes":{"description":"Description of the conditions for payment.","readOnly":true,"type":"string"},"type":{"description":"Type of terms to be applied.","enum":["instant"],"type":"string"}},"required":["type"],"type":"object"},"PaymentTerms":{"anyOf":[{"$ref":"#/components/schemas/PaymentTermInstant"},{"$ref":"#/components/schemas/PaymentTermDueDate"}],"description":"PaymentTerms defines the terms for payment."},"Percentage":{"description":"Numeric representation of a percentage\n\n50% is represented as 50","example":50,"format":"double","type":"number","x-go-package":"github.com/openmeterio/openmeter/pkg/models","x-go-type":"models.Percentage"},"Period":{"description":"A period with a start and end time.","properties":{"from":{"description":"Period start time.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"to":{"description":"Period end time.","example":"2023-02-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["from","to"],"type":"object"},"Plan":{"description":"Plans provide a template for subscriptions.","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"Alignment configuration for the plan."},"billingCadence":{"description":"The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","title":"Billing cadence","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The currency code of the plan.","title":"Currency"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"effectiveFrom":{"description":"The date and time when the plan becomes effective. When not specified, the plan is a draft.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Effective start date","type":"string"},"effectiveTo":{"description":"The date and time when the plan is no longer effective. When not specified, the plan is effective indefinitely.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Effective end date","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"phases":{"description":"The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.","items":{"$ref":"#/components/schemas/PlanPhase"},"minItems":1,"title":"Plan phases","type":"array"},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"Default pro-rating configuration for subscriptions using this plan.","title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","title":"Settlement mode"},"status":{"allOf":[{"$ref":"#/components/schemas/PlanStatus"}],"description":"The status of the plan.\nComputed based on the effective start and end dates:\n- draft = no effectiveFrom\n- active = effectiveFrom \u003c= now \u003c effectiveTo\n- archived / inactive = effectiveTo \u003c= now\n- scheduled = now \u003c effectiveFrom \u003c effectiveTo","readOnly":true,"title":"Status"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"validationErrors":{"description":"List of validation errors.","items":{"$ref":"#/components/schemas/ValidationError"},"nullable":true,"readOnly":true,"title":"Validation errors","type":"array"},"version":{"default":1,"description":"Version of the plan. Incremented when the plan is updated.","minimum":1,"readOnly":true,"title":"Version","type":"integer"}},"required":["id","name","createdAt","updatedAt","key","version","currency","billingCadence","status","phases","validationErrors"],"type":"object"},"PlanAddon":{"description":"The PlanAddon describes the association between a plan and add-on.","properties":{"addon":{"allOf":[{"$ref":"#/components/schemas/Addon"}],"description":"Add-on object.","readOnly":true,"title":"Addon"},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"fromPlanPhase":{"description":"The key of the plan phase from the add-on becomes available for purchase.","title":"The plan phase from the add-on becomes purchasable","type":"string"},"maxQuantity":{"description":"The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.","title":"Max quantity of the add-on","type":"integer"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","title":"Metadata"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"},"validationErrors":{"description":"List of validation errors.","items":{"$ref":"#/components/schemas/ValidationError"},"nullable":true,"readOnly":true,"title":"Validation errors","type":"array"}},"required":["createdAt","updatedAt","addon","fromPlanPhase","validationErrors"],"type":"object"},"PlanAddonCreate":{"description":"A plan add-on assignment create request.","properties":{"addonId":{"description":"The add-on unique identifier in ULID format.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"Add-on unique identifier","type":"string"},"fromPlanPhase":{"description":"The key of the plan phase from the add-on becomes available for purchase.","title":"The plan phase from the add-on becomes purchasable","type":"string"},"maxQuantity":{"description":"The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.","title":"Max quantity of the add-on","type":"integer"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","title":"Metadata"}},"required":["fromPlanPhase","addonId"],"type":"object"},"PlanAddonOrderBy":{"description":"Order by options for plan add-on assignments.","enum":["id","key","version","created_at","updated_at"],"type":"string"},"PlanAddonPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/PlanAddon"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"PlanAddonReplaceUpdate":{"description":"Resource update operation model.","properties":{"fromPlanPhase":{"description":"The key of the plan phase from the add-on becomes available for purchase.","title":"The plan phase from the add-on becomes purchasable","type":"string"},"maxQuantity":{"description":"The maximum number of times the add-on can be purchased for the plan.\nIt is not applicable for add-ons with single instance type.","title":"Max quantity of the add-on","type":"integer"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","title":"Metadata"}},"required":["fromPlanPhase"],"type":"object"},"PlanCreate":{"description":"Resource create operation model.","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"Alignment configuration for the plan."},"billingCadence":{"description":"The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","title":"Billing cadence","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The currency code of the plan.","title":"Currency"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"phases":{"description":"The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.","items":{"$ref":"#/components/schemas/PlanPhase"},"minItems":1,"title":"Plan phases","type":"array"},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"Default pro-rating configuration for subscriptions using this plan.","title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","title":"Settlement mode"}},"required":["name","key","currency","billingCadence","phases"],"type":"object"},"PlanOrderBy":{"description":"Order by options for plans.","enum":["id","key","version","created_at","updated_at"],"type":"string"},"PlanPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Plan"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"PlanPhase":{"description":"The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"duration":{"description":"The duration of the phase.","example":"P1Y","format":"duration","nullable":true,"title":"Duration","type":"string"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"rateCards":{"description":"The rate cards of the plan.","items":{"$ref":"#/components/schemas/RateCard"},"title":"Rate cards","type":"array"}},"required":["key","name","duration","rateCards"],"type":"object"},"PlanReference":{"description":"References an exact plan.","properties":{"id":{"description":"The plan ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"key":{"description":"The plan key.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"version":{"description":"The plan version.","type":"integer"}},"required":["id","key","version"],"type":"object"},"PlanReferenceInput":{"description":"References an exact plan defaulting to the current active version.","properties":{"key":{"description":"The plan key.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"version":{"description":"The plan version.","type":"integer"}},"required":["key"],"type":"object"},"PlanReplaceUpdate":{"description":"Resource update operation model.","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"Alignment configuration for the plan."},"billingCadence":{"description":"The default billing cadence for subscriptions using this plan.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","title":"Billing cadence","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"phases":{"description":"The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.\nA phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.","items":{"$ref":"#/components/schemas/PlanPhase"},"minItems":1,"title":"Plan phases","type":"array"},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"Default pro-rating configuration for subscriptions using this plan.","title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the plan.\nIt determines how the billing system generates invoices and credits for the subscriptions using this plan.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","title":"Settlement mode"}},"required":["name","billingCadence","phases"],"type":"object"},"PlanStatus":{"description":"The status of a plan.","enum":["draft","active","archived","scheduled"],"type":"string"},"PlanSubscriptionChange":{"description":"Change subscription based on plan.","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"What alignment settings the subscription should have."},"billingAnchor":{"description":"The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls how custom-currency cost bases are selected for the new subscription."},"description":{"description":"Description for the Subscription.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Arbitrary metadata associated with the subscription."},"name":{"description":"The name of the Subscription. If not provided the plan name is used.","type":"string"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanReferenceInput"}],"description":"The plan reference to change to."},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"description":"The settlement mode of the subscription."},"startingPhase":{"description":"The key of the phase to start the subscription in.\nIf not provided, the subscription will start in the first phase of the plan.","minLength":1,"type":"string"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"description":"Timing configuration for the change, when the change should take effect.\nFor changing a subscription, the accepted values depend on the subscription configuration."}},"required":["timing","plan"],"type":"object"},"PlanSubscriptionCreate":{"description":"Create subscription based on plan.","properties":{"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"What alignment settings the subscription should have."},"billingAnchor":{"description":"The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls how custom-currency cost bases are selected for the new subscription."},"customerId":{"description":"The ID of the customer. Provide either the key or ID. Has presedence over the key.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customerKey":{"description":"The key of the customer. Provide either the key or ID.","maxLength":256,"minLength":1,"type":"string"},"description":{"description":"Description for the Subscription.","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Arbitrary metadata associated with the subscription."},"name":{"description":"The name of the Subscription. If not provided the plan name is used.","type":"string"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanReferenceInput"}],"description":"The plan reference to change to."},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"description":"The settlement mode of the subscription."},"startingPhase":{"description":"The key of the phase to start the subscription in.\nIf not provided, the subscription will start in the first phase of the plan.","minLength":1,"type":"string"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"default":"immediate","description":"Timing configuration for the change, when the change should take effect.\nThe default is immediate."}},"required":["plan"],"title":"Create from plan","type":"object"},"PortalToken":{"description":"A consumer portal token.\n\nValidator doesn't obey required for readOnly properties\nSee: https://github.com/stoplightio/spectral/issues/1274","properties":{"allowedMeterSlugs":{"description":"Optional, if defined only the specified meters will be allowed.","example":["tokens_total"],"items":{"type":"string"},"type":"array"},"createdAt":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"expired":{"readOnly":true,"type":"boolean"},"expiresAt":{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"id":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"subject":{"example":"customer-1","type":"string"},"token":{"description":"The token is only returned at creation.","example":"om_portal_IAnD3PpWW2A2Wr8m9jfzeHlGX8xmCXwG.y5q4S-AWqFu6qjfaFz0zQq4Ez28RsnyVwJffX5qxMvo","readOnly":true,"type":"string"}},"required":["subject"],"type":"object"},"PreconditionFailedProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"One or more conditions given in the request header fields evaluated to false when tested on the server.","type":"object"},"PricePaymentTerm":{"description":"The payment term of a flat price.\nOne of: in_advance or in_arrears.","enum":["in_advance","in_arrears"],"type":"string"},"PriceTier":{"description":"A price tier.\nAt least one price component is required in each tier.","properties":{"flatPrice":{"allOf":[{"$ref":"#/components/schemas/FlatPrice"}],"description":"The flat price component of the tier.","nullable":true,"title":"Flat price component","type":"object"},"unitPrice":{"allOf":[{"$ref":"#/components/schemas/UnitPrice"}],"description":"The unit price component of the tier.","nullable":true,"title":"Unit price component","type":"object"},"upToAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"Up to and including to this quantity will be contained in the tier.\nIf null, the tier is open-ended.","title":"Up to quantity"}},"required":["flatPrice","unitPrice"],"type":"object"},"ProRatingConfig":{"description":"Configuration for pro-rating behavior.","properties":{"enabled":{"default":true,"description":"Whether pro-rating is enabled for this plan.","title":"Enable pro-rating","type":"boolean"},"mode":{"allOf":[{"$ref":"#/components/schemas/ProRatingMode"}],"default":"prorate_prices","description":"How to handle pro-rating for billing period changes.","title":"Pro-rating mode"}},"required":["enabled","mode"],"type":"object"},"ProRatingMode":{"description":"Pro-rating mode options for handling billing period changes.","enum":["prorate_prices"],"type":"string"},"Progress":{"description":"Progress describes a progress of a task.","properties":{"failed":{"description":"Failed is the number of items that failed","format":"uint64","type":"integer"},"success":{"description":"Success is the number of items that succeeded","format":"uint64","type":"integer"},"total":{"description":"The total number of items to process","format":"uint64","type":"integer"},"updatedAt":{"description":"The time the progress was last updated","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["success","failed","total","updatedAt"],"type":"object"},"QueryPeriod":{"description":"Query period used by reporting.","enum":["MINUTE","HOUR","DAY","MONTH"],"type":"string","x-go-type":"report.QueryPeriod","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/report"}},"RateCard":{"description":"A rate card defines the pricing and entitlement of a feature or service.","discriminator":{"mapping":{"flat_fee":"#/components/schemas/RateCardFlatFee","usage_based":"#/components/schemas/RateCardUsageBased"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/RateCardFlatFee"},{"$ref":"#/components/schemas/RateCardUsageBased"}],"type":"object"},"RateCardBooleanEntitlement":{"description":"Entitlement template of a boolean entitlement.","properties":{"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"type":{"enum":["boolean"],"type":"string"}},"required":["type"],"type":"object"},"RateCardEntitlement":{"description":"Entitlement templates are used to define the entitlements of a plan.\nFeatures are omitted from the entitlement template, as they are defined in the rate card.","discriminator":{"mapping":{"boolean":"#/components/schemas/RateCardBooleanEntitlement","metered":"#/components/schemas/RateCardMeteredEntitlement","static":"#/components/schemas/RateCardStaticEntitlement"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/RateCardMeteredEntitlement"},{"$ref":"#/components/schemas/RateCardStaticEntitlement"},{"$ref":"#/components/schemas/RateCardBooleanEntitlement"}],"type":"object"},"RateCardFlatFee":{"description":"A flat fee rate card defines a one-time purchase or a recurring fee.","properties":{"billingCadence":{"description":"The billing cadence of the rate card.\nWhen null it means it is a one time fee.","format":"duration","nullable":true,"title":"Billing cadence","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/Discounts"}],"description":"The discount of the rate card. For flat fee rate cards only percentage discounts are supported.\nOnly available when price is set.","title":"Discounts"},"entitlementTemplate":{"allOf":[{"$ref":"#/components/schemas/RateCardEntitlement"}],"description":"The entitlement of the rate card.\nOnly available when featureKey is set."},"featureKey":{"description":"The feature the customer is entitled to use.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Feature key","type":"string"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/FlatPriceWithPaymentTerm"}],"description":"The price of the rate card.\nWhen null, the feature or service is free.","example":{"amount":"100","paymentTerm":"in_arrears","type":"flat"},"nullable":true,"title":"Price","type":"object"},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.","title":"Tax config"},"type":{"description":"The type of the RateCard.","enum":["flat_fee"],"title":"RateCard type","type":"string"}},"required":["type","key","name","billingCadence","price"],"type":"object"},"RateCardMeteredEntitlement":{"description":"The entitlement template with a metered entitlement.","properties":{"isSoftLimit":{"default":false,"description":"If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.","title":"Soft limit","type":"boolean"},"issueAfterReset":{"description":"You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.","format":"double","minimum":0,"title":"Initial grant amount","type":"number"},"issueAfterResetPriority":{"default":1,"description":"Defines the grant priority for the default grant.","format":"uint8","maximum":255,"minimum":1,"title":"Issue grant after reset priority","type":"integer"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"preserveOverageAtReset":{"default":false,"description":"If true, the overage is preserved at reset. If false, the usage is reset to 0.","title":"Preserve overage at reset","type":"boolean"},"type":{"enum":["metered"],"type":"string"},"usagePeriod":{"description":"The interval of the metered entitlement.\nDefaults to the billing cadence of the rate card.","format":"duration","title":"Usage Period","type":"string"}},"required":["type"],"type":"object"},"RateCardStaticEntitlement":{"description":"Entitlement template of a static entitlement.","properties":{"config":{"description":"The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.","example":"{ \"integrations\": [\"github\"] }","format":"json","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the feature."},"type":{"enum":["static"],"type":"string"}},"required":["type","config"],"type":"object"},"RateCardUsageBased":{"description":"A usage-based rate card defines a price based on usage.","properties":{"billingCadence":{"description":"The billing cadence of the rate card.","format":"duration","title":"Billing cadence","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/Discounts"}],"description":"The discounts of the rate card.\n\nFlat fee rate cards only support percentage discounts.","title":"Discounts"},"entitlementTemplate":{"allOf":[{"$ref":"#/components/schemas/RateCardEntitlement"}],"description":"The entitlement of the rate card.\nOnly available when featureKey is set."},"featureKey":{"description":"The feature the customer is entitled to use.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Feature key","type":"string"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","title":"Key","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"description":"The price of the rate card.\nWhen null, the feature or service is free.","nullable":true},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"The tax config of the rate card.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.","title":"Tax config"},"type":{"description":"The type of the RateCard.","enum":["usage_based"],"title":"RateCard type","type":"string"}},"required":["type","key","name","billingCadence","price"],"type":"object"},"RateCardUsageBasedPrice":{"description":"The price of the usage based rate card.","discriminator":{"mapping":{"dynamic":"#/components/schemas/DynamicPriceWithCommitments","flat":"#/components/schemas/FlatPriceWithPaymentTerm","package":"#/components/schemas/PackagePriceWithCommitments","tiered":"#/components/schemas/TieredPriceWithCommitments","unit":"#/components/schemas/UnitPriceWithCommitments"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/FlatPriceWithPaymentTerm"},{"$ref":"#/components/schemas/UnitPriceWithCommitments"},{"$ref":"#/components/schemas/TieredPriceWithCommitments"},{"$ref":"#/components/schemas/DynamicPriceWithCommitments"},{"$ref":"#/components/schemas/PackagePriceWithCommitments"}],"type":"object"},"RecurringPeriod":{"deprecated":true,"description":"Recurring period with an interval and an anchor.","example":{"anchor":"2023-01-01T01:01:01.001Z","interval":"DAY","intervalISO":"P1D"},"properties":{"anchor":{"description":"A date-time anchor to base the recurring period on.","example":"2023-01-01T01:01:01.001Z","format":"date-time","title":"Anchor time","type":"string"},"interval":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodInterval"}],"description":"The unit of time for the interval. Heuristically maps ISO duraitons to enum values or returns the ISO duration.","title":"Interval"},"intervalISO":{"description":"The unit of time for the interval in ISO8601 format.","format":"duration","type":"string"}},"required":["interval","anchor","intervalISO"],"type":"object"},"RecurringPeriodCreateInput":{"description":"Recurring period with an interval and an anchor.","example":{"anchor":"2023-01-01T01:01:01.001Z","interval":"DAY"},"properties":{"anchor":{"description":"A date-time anchor to base the recurring period on.","example":"2023-01-01T01:01:01.001Z","format":"date-time","title":"Anchor time","type":"string"},"interval":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodInterval"}],"description":"The unit of time for the interval.","title":"Interval"}},"required":["interval"],"type":"object"},"RecurringPeriodInterval":{"anyOf":[{"pattern":"^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$","type":"string"},{"$ref":"#/components/schemas/RecurringPeriodIntervalEnum"}],"description":"Period duration for the recurrence"},"RecurringPeriodIntervalEnum":{"description":"The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.","enum":["DAY","WEEK","MONTH","YEAR"],"type":"string"},"RecurringPeriodV2":{"description":"Recurring period with an interval and an anchor.","properties":{"anchor":{"description":"A date-time anchor to base the recurring period on.","example":"2023-01-01T01:01:01.001Z","format":"date-time","title":"Anchor time","type":"string"},"interval":{"allOf":[{"$ref":"#/components/schemas/RecurringPeriodInterval"}],"description":"The unit of time for the interval. Heuristically maps ISO duraitons to enum values or returns the ISO duration.","title":"Interval"}},"required":["interval","anchor"],"type":"object"},"RemovePhaseShifting":{"description":"The direction of the phase shift when a phase is removed.","enum":["next","prev"],"type":"string"},"Report":{"description":"One of the report types.","discriminator":{"mapping":{"objectStorage":"#/components/schemas/ObjectStorageReport","stripe":"#/components/schemas/StripeReport","webhook":"#/components/schemas/WebhookReport"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ObjectStorageReport"},{"$ref":"#/components/schemas/StripeReport"},{"$ref":"#/components/schemas/WebhookReport"}],"type":"object"},"ReportCreate":{"description":"The report create request.","discriminator":{"mapping":{"objectStorage":"#/components/schemas/ObjectStorageReportCreate","stripe":"#/components/schemas/StripeReportCreate","webhook":"#/components/schemas/WebhookReportCreate"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ObjectStorageReportCreate"},{"$ref":"#/components/schemas/StripeReportCreate"},{"$ref":"#/components/schemas/WebhookReportCreate"}],"type":"object"},"ReportFilter":{"description":"Filter to apply to the report.","properties":{"subject":{"allOf":[{"$ref":"#/components/schemas/Filter"}],"description":"Subject based filters."},"usage":{"allOf":[{"$ref":"#/components/schemas/Filter"}],"description":"Usage based filters."}},"type":"object"},"ReportPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Report"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"ReportQuery":{"description":"Query to apply on the usage data.","properties":{"groupBy":{"description":"Optional group by fields.","items":{"type":"string"},"type":"array"},"period":{"allOf":[{"$ref":"#/components/schemas/QueryPeriod"}],"description":"Defines `from` in query relative to `to`."},"windowSize":{"allOf":[{"$ref":"#/components/schemas/WindowSize"}],"description":"Optional, granuality of the report.\nIf empty, will return total for the entire period."}},"required":["period"],"type":"object"},"ReportRun":{"description":"The result of the report run.","properties":{"from":{"description":"The start of the period the report run covers.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"id":{"description":"The ID of the report run.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"reportId":{"description":"The ID of the report.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"stats":{"allOf":[{"$ref":"#/components/schemas/ReportRunStats"}],"description":"The stats of the report run."},"time":{"description":"The time the report run was created.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"to":{"description":"The end of the period the report run covers.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["id","reportId","time","from","to","stats"],"type":"object"},"ReportRunPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/ReportRun"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"ReportRunResult":{"description":"The result of the report run.","properties":{"customerId":{"description":"The customer ID of the report run.","type":"string"},"destinations":{"description":"The destinations of the report run.","items":{"type":"string"},"type":"array"},"error":{"description":"The error of the report run if any.","type":"string"},"from":{"description":"The start of the period the report run covers.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"groupBy":{"description":"The group by fields of the report run.","items":{"type":"string"},"type":"array"},"status":{"allOf":[{"$ref":"#/components/schemas/ReportRunResultStatus"}],"description":"The status of the report run."},"statusDetail":{"allOf":[{"$ref":"#/components/schemas/ReportRunResultStatusDetail"}],"description":"The status detail of the report run if any."},"subject":{"description":"The subject of the report run.","type":"string"},"time":{"description":"The time of the report run result.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"to":{"description":"The end of the period the report run covers.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"usage":{"description":"The usage data of the report run.","items":{"$ref":"#/components/schemas/MeterQueryRow"},"type":"array"},"webhookMessageId":{"description":"The ID of the webhook message if any.","type":"string"},"windowSize":{"allOf":[{"$ref":"#/components/schemas/WindowSize"}],"description":"The window size of the report run if it run for a specific window."}},"required":["time","from","to","usage","destinations","status"],"type":"object"},"ReportRunResultPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/ReportRunResult"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"ReportRunResultStatus":{"description":"The status of the report run.","enum":["completed","skipped","failed"],"type":"string"},"ReportRunResultStatusDetail":{"description":"The status detail of the report run.","enum":["stripe_invalid_usage_value","subject_stripe_customer_id_missing","stripe_event_conflict","stripe_resource_missing","stripe_timestamp_out_of_range"],"type":"string"},"ReportRunStats":{"description":"The stats of the report run.","properties":{"completed":{"description":"The number of tasks succesfully completed.","format":"uint64","minimum":0,"type":"integer"},"failed":{"description":"The number of tasks failed.","format":"uint64","minimum":0,"type":"integer"},"skipped":{"description":"The number of tasks skipped.\nTasks can be skipped for example when OpenMeter is missing information to perform the task in the external system.\nLike missing Stripe customer ID.","format":"uint64","minimum":0,"type":"integer"},"total":{"description":"The total number of tasks.","format":"uint64","minimum":0,"type":"integer"}},"required":["total","completed","skipped","failed"],"type":"object"},"ReportSchedule":{"description":"The schedule of the report.\nDefines how frequently the report should run.","properties":{"interval":{"description":"The interval of the report.","enum":["1m","1h","24h"],"type":"string","x-go-type":"string"},"startAt":{"description":"The start time of the report.\nSet it to now if you want sync to start immediatly.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}},"required":["interval","startAt"],"type":"object"},"ReportType":{"description":"The type of the report.","enum":["objectStorage","stripe","webhook"],"type":"string","x-go-type":"report.ReportType","x-go-type-import":{"path":"github.com/openmeterio/cloud/services/backend/pkg/report"}},"ReportUpdate":{"allOf":[{"$ref":"#/components/schemas/WebhookReportUpdateAll"}],"description":"The report update request.","type":"object"},"ResetEntitlementUsageInput":{"description":"Reset parameters","properties":{"effectiveAt":{"description":"The time at which the reset takes effect, defaults to now. The reset cannot be in the future. The provided value is truncated to the minute due to how historical meter data is stored.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"preserveOverage":{"description":"Determines whether the overage is preserved or forgiven, overriding the entitlement's default behavior.\n- If true, the overage is preserved.\n- If false, the overage is forgiven.","type":"boolean"},"retainAnchor":{"description":"Determines whether the usage period anchor is retained or reset to the effectiveAt time.\n- If true, the usage period anchor is retained.\n- If false, the usage period anchor is reset to the effectiveAt time.","type":"boolean"}},"type":"object"},"ResourceKind":{"description":"Permission resource kind.","enum":["addon","app","audit","billingProfile","currency","customer","debug","entitlement","event","feature","invoice","meter","notification","organization","plan","portal","report","subject","subscription","taxCode","token"],"type":"string"},"SandboxApp":{"description":"Sandbox app can be used for testing OpenMeter features.\n\nThe app is not creating anything in external systems, thus it is safe to use for\nverifying OpenMeter features.","properties":{"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"listing":{"allOf":[{"$ref":"#/components/schemas/MarketplaceListing"}],"description":"The marketplace listing that this installed app is based on.","readOnly":true},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/AppStatus"}],"description":"Status of the app connection.","readOnly":true},"type":{"description":"The app's type is Sandbox.","enum":["sandbox"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","listing","status","type"],"type":"object"},"SandboxAppReplaceUpdate":{"description":"Resource update operation model.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"type":{"description":"The app's type is Sandbox.","enum":["sandbox"],"type":"string"}},"required":["name","type"],"type":"object"},"SandboxCustomerAppData":{"description":"Sandbox Customer App Data.","properties":{"app":{"allOf":[{"$ref":"#/components/schemas/SandboxApp"}],"description":"The installed sandbox app this data belongs to.","readOnly":true},"id":{"description":"The app ID.\nIf not provided, it will use the global default for the app type.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"App ID","type":"string"},"type":{"description":"The app name.","enum":["sandbox"],"title":"App Type","type":"string"}},"required":["type"],"type":"object"},"ServiceUnavailableProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.","type":"object"},"SortOrder":{"description":"The order direction.","enum":["ASC","DESC"],"type":"string"},"StripeAPIKeyInput":{"description":"The Stripe API key input.\nUsed to authenticate with the Stripe API.","properties":{"secretAPIKey":{"type":"string"}},"required":["secretAPIKey"],"type":"object"},"StripeApp":{"description":"A installed Stripe app object.","example":{"createdAt":"2024-01-01T01:01:01.001Z","id":"01G65Z755AFWAKHE12NY0CQ9FH","listing":{"capabilities":[{"description":"Stripe Tax calculates tax portion of the invoices.","key":"stripe_calculate_tax","name":"Calculate Tax","type":"calculateTax"},{"description":"Stripe invoices customers with due amount.","key":"stripe_invoice_customers","name":"Invoice Customers","type":"invoiceCustomers"},{"description":"Stripe payments collects outstanding revenue with Stripe customer's default payment method.","key":"stripe_collect_payments","name":"Collect Payments","type":"collectPayments"}],"description":"Stripe integration allows you to collect payments with Stripe.","installMethods":["with_oauth2","with_api_key"],"name":"Stripe","type":"stripe"},"livemode":true,"maskedAPIKey":"sk_live_************abc","name":"Stripe","status":"ready","stripeAccountId":"acct_123456789","type":"stripe","updatedAt":"2024-01-01T01:01:01.001Z"},"properties":{"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"listing":{"allOf":[{"$ref":"#/components/schemas/MarketplaceListing"}],"description":"The marketplace listing that this installed app is based on.","readOnly":true},"livemode":{"description":"Livemode, true if the app is in production mode.","readOnly":true,"type":"boolean"},"maskedAPIKey":{"description":"The masked API key.\nOnly shows the first 8 and last 3 characters.","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/AppStatus"}],"description":"Status of the app connection.","readOnly":true},"stripeAccountId":{"description":"The Stripe account ID.","readOnly":true,"type":"string"},"type":{"description":"The app's type is Stripe.","enum":["stripe"],"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","listing","status","type","stripeAccountId","livemode","maskedAPIKey"],"type":"object"},"StripeAppReplaceUpdate":{"description":"Resource update operation model.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"secretAPIKey":{"description":"The Stripe API key.","format":"password","type":"string"},"type":{"description":"The app's type is Stripe.","enum":["stripe"],"type":"string"}},"required":["name","type"],"type":"object"},"StripeCheckoutSessionMode":{"description":"Stripe CheckoutSession.mode","enum":["setup"],"type":"string"},"StripeCustomerAppData":{"description":"Stripe Customer App Data.","example":{"stripeCustomerId":"cus_xxxxxxxxxxxxxx","type":"stripe"},"properties":{"app":{"allOf":[{"$ref":"#/components/schemas/StripeApp"}],"description":"The installed stripe app this data belongs to.","readOnly":true},"id":{"description":"The app ID.\nIf not provided, it will use the global default for the app type.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"App ID","type":"string"},"stripeCustomerId":{"description":"The Stripe customer ID.","type":"string"},"stripeDefaultPaymentMethodId":{"description":"The Stripe default payment method ID.","type":"string"},"type":{"description":"The app name.","enum":["stripe"],"title":"App Type","type":"string"}},"required":["type","stripeCustomerId"],"type":"object"},"StripeCustomerAppDataBase":{"description":"Stripe Customer App Data Base.","properties":{"stripeCustomerId":{"description":"The Stripe customer ID.","type":"string"},"stripeDefaultPaymentMethodId":{"description":"The Stripe default payment method ID.","type":"string"}},"required":["stripeCustomerId"],"type":"object"},"StripeCustomerAppDataCreateOrUpdateItem":{"description":"Stripe Customer App Data.","example":{"stripeCustomerId":"cus_xxxxxxxxxxxxxx","type":"stripe"},"properties":{"id":{"description":"The app ID.\nIf not provided, it will use the global default for the app type.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"App ID","type":"string"},"stripeCustomerId":{"description":"The Stripe customer ID.","type":"string"},"stripeDefaultPaymentMethodId":{"description":"The Stripe default payment method ID.","type":"string"},"type":{"description":"The app name.","enum":["stripe"],"title":"App Type","type":"string"}},"required":["type","stripeCustomerId"],"type":"object"},"StripeCustomerPortalSession":{"description":"Stripe customer portal session.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object","properties":{"configurationId":{"description":"Configuration used to customize the customer portal.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration","type":"string"},"createdAt":{"description":"Created at.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-created","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"id":{"description":"The ID of the customer portal session.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id","type":"string"},"livemode":{"description":"Livemode.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode","type":"boolean"},"locale":{"description":"Status.\n  /**\nThe IETF language tag of the locale customer portal is displayed in.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale","type":"string"},"returnUrl":{"description":"Return URL.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url","type":"string"},"stripeCustomerId":{"description":"The ID of the stripe customer.","type":"string"},"url":{"description":"/**\nThe ID of the customer.The URL to redirect the customer to after they have completed\ntheir requested actions.","type":"string"}},"required":["id","stripeCustomerId","configurationId","livemode","createdAt","returnUrl","locale","url"],"type":"object"},"StripeReport":{"description":"The stripe report.","properties":{"id":{"description":"The ID of the report.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"meter":{"allOf":[{"$ref":"#/components/schemas/Meter"}],"description":"The meter to report on.","readOnly":true},"meterGroupByFilters":{"additionalProperties":{"type":"string"},"description":"Optional meter group by filters. Useful if the meter scope is broader than what report tracks.","example":{"model":"gpt-4"},"type":"object"},"schedule":{"allOf":[{"$ref":"#/components/schemas/ReportSchedule"}],"description":"The schedule of the report.\nDefines how frequently the report should run."},"slug":{"description":"The unique slug of the report.\nMust be unique within the organization.","type":"string"},"stripeBillingMeterId":{"description":"The ID of the Stripe billing meter entity.","readOnly":true,"type":"string"},"type":{"description":"The type of the report.","enum":["stripe"],"type":"string"}},"required":["type","id","slug","schedule","meter","stripeBillingMeterId"],"type":"object"},"StripeReportCreate":{"description":"Resource create operation model.","properties":{"meterGroupByFilters":{"additionalProperties":{"type":"string"},"description":"Optional meter group by filters. Useful if the meter scope is broader than what report tracks.","example":{"model":"gpt-4"},"type":"object"},"meterIdOrSlug":{"description":"The ID of the meter entity.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"schedule":{"allOf":[{"$ref":"#/components/schemas/ReportSchedule"}],"description":"The schedule of the report.\nDefines how frequently the report should run."},"slug":{"description":"The unique slug of the report.\nMust be unique within the organization.","type":"string"},"type":{"description":"The type of the report.","enum":["stripe"],"type":"string"}},"required":["type","slug","schedule","meterIdOrSlug"],"type":"object"},"StripeTaxConfig":{"description":"The tax config for Stripe.","properties":{"code":{"description":"Product tax code.\n\nSee: https://docs.stripe.com/tax/tax-codes","example":"txcd_10000000","pattern":"^txcd_\\d{8}$","title":"Tax code","type":"string"}},"required":["code"],"type":"object"},"StripeWebhookEvent":{"description":"Stripe webhook event.","properties":{"created":{"description":"The event created timestamp.","format":"int32","type":"integer"},"data":{"description":"The event data.","properties":{"object":{}},"required":["object"],"type":"object"},"id":{"description":"The event ID.","type":"string"},"livemode":{"description":"Live mode.","type":"boolean"},"type":{"description":"The event type.","type":"string"}},"required":["id","type","livemode","created","data"],"type":"object"},"StripeWebhookResponse":{"description":"Stripe webhook response.","properties":{"appId":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"customerId":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"message":{"type":"string"},"namespaceId":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["namespaceId","appId"],"type":"object"},"Subject":{"deprecated":true,"description":"A subject is a unique identifier for a usage attribution by its key.\nSubjects only exist in the concept of metering.\nSubjects are optional to create and work as an enrichment for the subject key like displayName, metadata, etc.\nSubjects are useful when you are reporting usage events with your own database ID but want to enrich the subject with a human-readable name or metadata.\nFor most use cases, a subject is equivalent to a customer.\n\n⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.","example":{"createdAt":"2025-01-01T01:01:01.001Z","deletedAt":"2025-03-01T01:01:01.001Z","displayName":"Customer Name","id":"01G65Z755AFWAKHE12NY0CQ9FH","key":"customer-id","metadata":{"hubspotId":"123456"},"stripeCustomerId":"cus_JMOlctsKV8","updatedAt":"2025-02-01T01:01:01.001Z"},"properties":{"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currentPeriodEnd":{"deprecated":true,"description":"The end of the current period for the subject.","example":"2023-02-01T00:00:00Z","format":"date-time","type":"string"},"currentPeriodStart":{"deprecated":true,"description":"The start of the current period for the subject.","example":"2023-01-01T00:00:00Z","format":"date-time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"displayName":{"description":"A human-readable display name for the subject.","example":"Customer Name","nullable":true,"type":"string"},"id":{"description":"A unique identifier for the subject.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"key":{"description":"A unique, human-readable identifier for the subject.\nThis is typically a database ID or a customer key.","example":"customer-db-id-123","type":"string"},"metadata":{"additionalProperties":{},"description":"Metadata for the subject.","example":{"hubspotId":"123456"},"nullable":true,"type":"object"},"stripeCustomerId":{"deprecated":true,"description":"The Stripe customer ID for the subject.","example":"cus_JMOlctsKV8","nullable":true,"type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","key"],"type":"object"},"SubjectKind":{"enum":["consumer","application","generic"],"type":"string"},"SubjectPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Subject"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"SubjectUpsert":{"deprecated":true,"description":"A subject is a unique identifier for a user or entity.\n\n⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.","example":{"displayName":"Customer Name","key":"customer-id","metadata":{"hubspotId":"123456"},"stripeCustomerId":"cus_JMOlctsKV8"},"properties":{"currentPeriodEnd":{"deprecated":true,"description":"The end of the current period for the subject.","example":"2023-02-01T00:00:00Z","format":"date-time","type":"string"},"currentPeriodStart":{"deprecated":true,"description":"The start of the current period for the subject.","example":"2023-01-01T00:00:00Z","format":"date-time","type":"string"},"displayName":{"description":"A human-readable display name for the subject.","example":"Customer Name","nullable":true,"type":"string"},"key":{"description":"A unique, human-readable identifier for the subject.\nThis is typically a database ID or a customer key.","example":"customer-db-id-123","type":"string"},"metadata":{"additionalProperties":{},"description":"Metadata for the subject.","example":{"hubspotId":"123456"},"nullable":true,"type":"object"},"stripeCustomerId":{"deprecated":true,"description":"The Stripe customer ID for the subject.","example":"cus_JMOlctsKV8","nullable":true,"type":"string"}},"required":["key"],"type":"object"},"Subscription":{"description":"Subscription is an exact subscription instance.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"alignment":{"allOf":[{"$ref":"#/components/schemas/Alignment"}],"description":"Alignment configuration for the plan."},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"billingAnchor":{"description":"The normalizedbilling anchor of the subscription.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Billing anchor","type":"string"},"billingCadence":{"description":"The billing cadence for the subscriptions.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","readOnly":true,"title":"Billing cadence","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls whether custom-currency cost bases are resolved dynamically or pinned\nwhen their currency pair is introduced to the subscription.","readOnly":true,"title":"Cost basis mode"},"costBasisPins":{"description":"Cost bases pinned to custom-currency pairs for this subscription.","items":{"$ref":"#/components/schemas/SubscriptionCostBasisPin"},"readOnly":true,"title":"Pinned cost bases","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The fiat currency in which the subscription is invoiced.","title":"Currency"},"customerId":{"description":"The customer ID of the subscription.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanReference"}],"description":"The plan of the subscription."},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"The pro-rating configuration for the subscriptions.","readOnly":true,"title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the subscription.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","readOnly":true,"title":"Settlement mode"},"status":{"allOf":[{"$ref":"#/components/schemas/SubscriptionStatus"}],"description":"The status of the subscription.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","activeFrom","status","customerId","currency","costBasisMode","costBasisPins","billingCadence","billingAnchor","settlementMode"],"type":"object"},"SubscriptionAddon":{"description":"A subscription add-on, represents concrete instances of an add-on for a given subscription.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"addon":{"description":"Partially populated add-on properties.","properties":{"id":{"description":"The ID of the add-on.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"ID","type":"string"},"instanceType":{"allOf":[{"$ref":"#/components/schemas/AddonInstanceType"}],"description":"The instance type of the add-on.","readOnly":true,"title":"InstanceType"},"key":{"description":"A semi-unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","readOnly":true,"title":"Key","type":"string"},"version":{"default":1,"description":"The version of the Add-on which templates this instance.","minimum":1,"readOnly":true,"title":"Version","type":"integer"}},"required":["id","key","version","instanceType"],"title":"Addon","type":"object"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"quantity":{"description":"The quantity of the add-on. Always 1 for single instance add-ons.","example":1,"minimum":0,"title":"Quantity","type":"integer"},"quantityAt":{"description":"For which point in time the quantity was resolved to.","example":"2025-01-05T00:00:00Z","format":"date-time","readOnly":true,"title":"QuantityAt","type":"string"},"rateCards":{"description":"The rate cards of the add-on.","items":{"$ref":"#/components/schemas/SubscriptionAddonRateCard"},"readOnly":true,"title":"Rate cards","type":"array"},"subscriptionId":{"description":"The ID of the subscription.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"SubscriptionID","type":"string"},"timeline":{"description":"The timeline of the add-on. The returned periods are sorted and continuous.","example":[{"activeFrom":"2025-01-01T00:00:00Z","activeTo":"2025-01-02T00:00:00Z","quantity":1},{"activeFrom":"2025-01-02T00:00:00Z","activeTo":"2025-01-03T00:00:00Z","quantity":0},{"activeFrom":"2025-01-03T00:00:00Z","quantity":1}],"items":{"$ref":"#/components/schemas/SubscriptionAddonTimelineSegment"},"readOnly":true,"title":"Timeline","type":"array"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","activeFrom","addon","quantityAt","quantity","timeline","subscriptionId","rateCards"],"type":"object"},"SubscriptionAddonCreate":{"description":"A subscription add-on create body.","properties":{"addon":{"description":"The add-on to create.","properties":{"id":{"description":"The ID of the add-on.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["id"],"title":"Addon","type":"object"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"quantity":{"description":"The quantity of the add-on. Always 1 for single instance add-ons.","example":1,"minimum":0,"title":"Quantity","type":"integer"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"description":"The timing of the operation. After the create or update, a new entry will be created in the timeline.","title":"Timing"}},"required":["name","quantity","timing","addon"],"type":"object"},"SubscriptionAddonRateCard":{"description":"A rate card for a subscription add-on.","properties":{"affectedSubscriptionItemIds":{"description":"The IDs of the subscription items that this rate card belongs to.","items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"readOnly":true,"title":"Affected subscription item IDs","type":"array"},"rateCard":{"allOf":[{"$ref":"#/components/schemas/RateCard"}],"description":"The rate card.","title":"Rate card"}},"required":["rateCard","affectedSubscriptionItemIds"],"type":"object"},"SubscriptionAddonTimelineSegment":{"description":"A subscription add-on event.","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"quantity":{"description":"The quantity of the add-on for the given period.","example":1,"minimum":0,"readOnly":true,"title":"Quantity","type":"integer"}},"required":["activeFrom","quantity"],"type":"object"},"SubscriptionAddonUpdate":{"description":"Resource create or update operation model.","properties":{"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"quantity":{"description":"The quantity of the add-on. Always 1 for single instance add-ons.","example":1,"minimum":0,"title":"Quantity","type":"integer"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"description":"The timing of the operation. After the create or update, a new entry will be created in the timeline.","title":"Timing"}},"type":"object"},"SubscriptionAlignment":{"description":"Alignment details enriched with the current billing period.","properties":{"billablesMustAlign":{"deprecated":true,"description":"Whether all Billable items and RateCards must align.\nAlignment means the Price's BillingCadence must align for both duration and anchor time.","type":"boolean"},"currentAlignedBillingPeriod":{"allOf":[{"$ref":"#/components/schemas/Period"}],"description":"The current billing period. Only has value if the subscription is aligned and active."}},"type":"object"},"SubscriptionBadRequestErrorResponse":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions.","properties":{"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","example":"The request body must be a JSON object.","type":"string"},"extensions":{"allOf":[{"$ref":"#/components/schemas/SubscriptionErrorExtensions"}],"description":"Additional properties specific to the problem type may be present."},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","example":"urn:request:local/JMOlctsKV8-000001","format":"uri","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","example":400,"format":"int16","maximum":599,"minimum":400,"type":"integer"},"title":{"description":"A a short, human-readable summary of the problem type.","example":"Bad Request","type":"string"},"type":{"default":"about:blank","description":"Type contains a URI that identifies the problem type.","example":"about:blank","format":"uri","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"SubscriptionChange":{"description":"Change a subscription.","oneOf":[{"$ref":"#/components/schemas/PlanSubscriptionChange"},{"$ref":"#/components/schemas/CustomSubscriptionChange"}]},"SubscriptionChangeResponseBody":{"description":"Response body for subscription change.","properties":{"current":{"allOf":[{"$ref":"#/components/schemas/Subscription"}],"description":"The current subscription before the change.","title":"Current subscription"},"next":{"allOf":[{"$ref":"#/components/schemas/SubscriptionExpanded"}],"description":"The new state of the subscription after the change.","title":"The subscription it will be changed to"}},"required":["current","next"],"type":"object"},"SubscriptionConflictErrorResponse":{"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions.","properties":{"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","example":"The request body must be a JSON object.","type":"string"},"extensions":{"allOf":[{"$ref":"#/components/schemas/SubscriptionErrorExtensions"}],"description":"Additional properties specific to the problem type may be present."},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","example":"urn:request:local/JMOlctsKV8-000001","format":"uri","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","example":400,"format":"int16","maximum":599,"minimum":400,"type":"integer"},"title":{"description":"A a short, human-readable summary of the problem type.","example":"Bad Request","type":"string"},"type":{"default":"about:blank","description":"Type contains a URI that identifies the problem type.","example":"about:blank","format":"uri","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"SubscriptionCostBasisMode":{"description":"Controls how custom-currency cost bases are selected for the subscription.","enum":["dynamic","pinned"],"type":"string"},"SubscriptionCostBasisPin":{"description":"A cost basis pinned to a custom-currency pair for the subscription.","properties":{"costBasisId":{"description":"The pinned cost basis resource ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"customCurrencyId":{"description":"The managed custom currency ID.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"invoiceCurrency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"description":"The fiat currency in which the subscription is invoiced.","readOnly":true}},"required":["customCurrencyId","invoiceCurrency","costBasisId"],"type":"object"},"SubscriptionCreate":{"description":"Create a subscription.","oneOf":[{"$ref":"#/components/schemas/PlanSubscriptionCreate"},{"$ref":"#/components/schemas/CustomSubscriptionCreate"}]},"SubscriptionEdit":{"description":"Subscription edit input.","properties":{"customizations":{"description":"Batch processing commands for manipulating running subscriptions.\nThe key format is `/phases/{phaseKey}` or `/phases/{phaseKey}/items/{itemKey}`.","items":{"$ref":"#/components/schemas/SubscriptionEditOperation"},"maxItems":100,"type":"array"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"description":"Whether the billing period should be restarted.Timing configuration to allow for the changes to take effect at different times."}},"required":["customizations"],"type":"object"},"SubscriptionEditOperation":{"description":"The operation to be performed on the subscription.","discriminator":{"mapping":{"add_item":"#/components/schemas/EditSubscriptionAddItem","add_phase":"#/components/schemas/EditSubscriptionAddPhase","remove_item":"#/components/schemas/EditSubscriptionRemoveItem","remove_phase":"#/components/schemas/EditSubscriptionRemovePhase","stretch_phase":"#/components/schemas/EditSubscriptionStretchPhase","unschedule_edit":"#/components/schemas/EditSubscriptionUnscheduleEdit"},"propertyName":"op"},"oneOf":[{"$ref":"#/components/schemas/EditSubscriptionAddItem"},{"$ref":"#/components/schemas/EditSubscriptionRemoveItem"},{"$ref":"#/components/schemas/EditSubscriptionAddPhase"},{"$ref":"#/components/schemas/EditSubscriptionRemovePhase"},{"$ref":"#/components/schemas/EditSubscriptionStretchPhase"},{"$ref":"#/components/schemas/EditSubscriptionUnscheduleEdit"}],"type":"object"},"SubscriptionErrorExtensions":{"description":"Error extensions for the Subscription Errors.","properties":{"validationErrors":{"items":{"$ref":"#/components/schemas/ErrorExtension"},"type":"array"}},"required":["validationErrors"],"type":"object"},"SubscriptionExpanded":{"description":"Expanded subscription","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"alignment":{"allOf":[{"$ref":"#/components/schemas/SubscriptionAlignment"}],"description":"Alignment details enriched with the current billing period."},"annotations":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Set of key-value pairs managed by the system. Cannot be modified by user.","readOnly":true,"title":"Annotations"},"billingAnchor":{"description":"The normalizedbilling anchor of the subscription.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Billing anchor","type":"string"},"billingCadence":{"description":"The billing cadence for the subscriptions.\nDefines how often customers are billed using ISO8601 duration format.\nExamples: \"P1M\" (monthly), \"P3M\" (quarterly), \"P1Y\" (annually).","example":"P1M","format":"duration","readOnly":true,"title":"Billing cadence","type":"string"},"costBasisMode":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCostBasisMode"}],"default":"dynamic","description":"Controls whether custom-currency cost bases are resolved dynamically or pinned\nwhen their currency pair is introduced to the subscription.","readOnly":true,"title":"Cost basis mode"},"costBasisPins":{"description":"Cost bases pinned to custom-currency pairs for this subscription.","items":{"$ref":"#/components/schemas/SubscriptionCostBasisPin"},"readOnly":true,"title":"Pinned cost bases","type":"array"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCode"}],"default":"USD","description":"The fiat currency in which the subscription is invoiced.","title":"Currency"},"customerId":{"description":"The customer ID of the subscription.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"phases":{"description":"The phases of the subscription.","items":{"$ref":"#/components/schemas/SubscriptionPhaseExpanded"},"type":"array"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanReference"}],"description":"The plan of the subscription."},"proRatingConfig":{"allOf":[{"$ref":"#/components/schemas/ProRatingConfig"}],"default":{"enabled":true,"mode":"prorate_prices"},"description":"The pro-rating configuration for the subscriptions.","readOnly":true,"title":"Pro-rating configuration"},"settlementMode":{"allOf":[{"$ref":"#/components/schemas/BillingSettlementMode"}],"default":"credit_then_invoice","description":"The settlement mode of the subscription.\n- credit_then_invoice: credits from the previous billing period are applied first, then the remaining balance is invoiced.\n- credit_only: only credits from the previous billing period are generated and applied. No invoices are generated for the subscription.\nThis is the default and most common settlement mode.","readOnly":true,"title":"Settlement mode"},"status":{"allOf":[{"$ref":"#/components/schemas/SubscriptionStatus"}],"description":"The status of the subscription.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","activeFrom","status","customerId","currency","costBasisMode","costBasisPins","billingCadence","billingAnchor","settlementMode","phases"],"type":"object"},"SubscriptionItem":{"description":"The actual contents of the Subscription, what the user gets, what they pay, etc...","properties":{"activeFrom":{"description":"The cadence start of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The cadence end of the resource.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"billingCadence":{"description":"The billing cadence of the rate card.\nWhen null, the rate card is a one-time purchase.","format":"duration","nullable":true,"title":"Billing cadence","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"currency":{"allOf":[{"$ref":"#/components/schemas/CurrencyCodeOrCustom"}],"description":"The materialized currency of the item's rate card. Present for priced items.","readOnly":true,"title":"Currency"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/Discounts"}],"description":"The discounts applied to the rate card.","title":"Discounts"},"featureKey":{"description":"The feature's key (if present).","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"included":{"allOf":[{"$ref":"#/components/schemas/SubscriptionItemIncluded"}],"description":"Describes what access is gained via the SubscriptionItem"},"key":{"description":"The identifier of the RateCard.\nSubscriptionItem/RateCard can be identified, it has a reference:\n\n1. If a Feature is associated with the SubscriptionItem, it is identified by the Feature\n1.1 It can be an ID reference, for an exact version of the Feature (Features can change across versions)\n1.2 It can be a Key reference, which always refers to the latest (active or inactive) version of a Feature\n\n2. If a Feature is not associated with the SubscriptionItem, it is referenced by the Price\n\nWe say \"referenced by the Price\" regardless of how a price itself is referenced, it colloquially makes sense to say \"paying the same price for the same thing\". In practice this should be derived from what's printed on the invoice line-item.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/RateCardUsageBasedPrice"}],"description":"The price of the rate card.\nWhen null, the feature or service is free.","example":{"amount":"100","paymentTerm":"in_arrears","type":"flat"},"nullable":true,"title":"Price"},"taxConfig":{"allOf":[{"$ref":"#/components/schemas/TaxConfig"}],"description":"The tax config of the Subscription Item.\nWhen undefined, the tax config of the feature or the default tax config of the plan is used.","title":"Tax config"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","activeFrom","key","billingCadence","price"],"type":"object"},"SubscriptionItemIncluded":{"description":"Included contents like Entitlement, or the Feature.","properties":{"entitlement":{"allOf":[{"$ref":"#/components/schemas/Entitlement"}],"description":"The entitlement of the Subscription Item."},"feature":{"allOf":[{"$ref":"#/components/schemas/Feature"}],"description":"The feature the customer is entitled to use."}},"required":["feature"],"type":"object"},"SubscriptionPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"$ref":"#/components/schemas/Subscription"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"},"SubscriptionPhaseCreate":{"description":"Subscription phase create input.","properties":{"description":{"description":"The description of the phase.","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/Discounts"}],"description":"The discounts on the plan.","title":"Discounts"},"duration":{"description":"The intended duration of the new phase.\nDuration is required when the phase will not be the last phase.","example":"P1M","format":"duration","title":"Duration","type":"string"},"key":{"description":"A locally unique identifier for the phase.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"name":{"description":"The name of the phase.","type":"string"},"startAfter":{"description":"Interval after the subscription starts to transition to the phase.\nWhen null, the phase starts immediately after the subscription starts.","example":"P1Y","format":"duration","nullable":true,"title":"Start after","type":"string"}},"required":["startAfter","key","name"],"type":"object"},"SubscriptionPhaseExpanded":{"description":"Expanded subscription phase","properties":{"activeFrom":{"description":"The time from which the phase is active.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"activeTo":{"description":"The until which the Phase is active.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"description":{"description":"Optional description of the resource. Maximum 1024 characters.","maxLength":1024,"title":"Description","type":"string"},"discounts":{"allOf":[{"$ref":"#/components/schemas/Discounts"}],"description":"The discounts on the plan.","title":"Discounts"},"id":{"description":"A unique identifier for the resource.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"title":"ID","type":"string"},"itemTimelines":{"additionalProperties":{"items":{"$ref":"#/components/schemas/SubscriptionItem"},"type":"array"},"description":"Includes all versions of the items on each key, including all edits, scheduled changes, etc...","type":"object"},"items":{"description":"The items of the phase. The structure is flattened to better conform to the Plan API.\nThe timelines are flattened according to the following rules:\n- for the current phase, the `items` contains only the active item for each key\n- for past phases, the `items` contains only the last item for each key\n- for future phases, the `items` contains only the first version of the item for each key","items":{"$ref":"#/components/schemas/SubscriptionItem"},"type":"array"},"key":{"description":"A locally unique identifier for the resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional metadata for the resource.","nullable":true,"title":"Metadata","type":"object"},"name":{"description":"Human-readable name for the resource. Between 1 and 256 characters.","maxLength":256,"minLength":1,"title":"Display name","type":"string"},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["id","name","createdAt","updatedAt","key","activeFrom","items","itemTimelines"],"type":"object"},"SubscriptionStatus":{"description":"Subscription status.","enum":["active","inactive","canceled","scheduled"],"type":"string"},"SubscriptionTiming":{"description":"Subscription edit timing defined when the changes should take effect.\nIf the provided configuration is not supported by the subscription, an error will be returned.","oneOf":[{"$ref":"#/components/schemas/SubscriptionTimingEnum"},{"description":"[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"}]},"SubscriptionTimingEnum":{"description":"Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.","enum":["immediate","next_billing_cycle"],"type":"string"},"SvixPortal":{"description":"The Svix portal URL.","properties":{"appId":{"description":"The Svix app ID.","type":"string"},"token":{"description":"The token to access the Svix portal.","type":"string"},"url":{"description":"The URL to the Svix portal.","format":"uri","type":"string"}},"required":["appId","url","token"],"type":"object"},"TaxBehavior":{"description":"Tax behavior.\n\nThis enum is used to specify whether tax is included in the price or excluded from the price.","enum":["inclusive","exclusive"],"type":"string"},"TaxConfig":{"description":"Set of provider specific tax configs.","properties":{"behavior":{"allOf":[{"$ref":"#/components/schemas/TaxBehavior"}],"description":"Tax behavior.\n\nIf not specified the billing profile is used to determine the tax behavior.\nIf not specified in the billing profile, the provider's default behavior is used.","title":"Tax behavior"},"customInvoicing":{"allOf":[{"$ref":"#/components/schemas/CustomInvoicingTaxConfig"}],"deprecated":true,"description":"Custom invoicing tax config.","title":"Custom invoicing tax config"},"stripe":{"allOf":[{"$ref":"#/components/schemas/StripeTaxConfig"}],"deprecated":true,"description":"Stripe tax config.","title":"Stripe tax config"},"taxCodeId":{"description":"Tax code reference.\n\nWhen both `taxCodeId` and `stripe.code` are provided, `taxCodeId` takes precedence:\nthe referenced tax code entity is used and `stripe.code` is ignored.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","title":"Tax code ID","type":"string"}},"type":"object"},"TieredPriceMode":{"description":"The mode of the tiered price.","enum":["volume","graduated"],"type":"string"},"TieredPriceWithCommitments":{"description":"Tiered price with spend commitments.","properties":{"maximumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is limited to spend at most the amount.","title":"Maximum amount"},"minimumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is committed to spend at least the amount.","title":"Minimum amount"},"mode":{"allOf":[{"$ref":"#/components/schemas/TieredPriceMode"}],"description":"Defines if the tiering mode is volume-based or graduated:\n- In `volume`-based tiering, the maximum quantity within a period determines the per unit price.\n- In `graduated` tiering, pricing can change as the quantity grows.","title":"Mode"},"tiers":{"description":"The tiers of the tiered price.\nAt least one price component is required in each tier.","items":{"$ref":"#/components/schemas/PriceTier"},"minItems":1,"title":"Tiers","type":"array"},"type":{"description":"The type of the price.\n\nOne of: flat, unit, or tiered.","enum":["tiered"],"type":"string"}},"required":["type","mode","tiers"],"type":"object"},"Token":{"description":"API secret token for programmatic access to OpenMeter.\nEither `role` or `permissions` must be provided.","properties":{"createdAt":{"description":"The date and time the token was created.","example":"2023-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"type":"string"},"createdBy":{"description":"The user that created the token.","readOnly":true,"type":"string"},"expiresAt":{"description":"The date and time the token expires.","example":"2023-01-01T01:01:01.001Z","format":"date-time","nullable":true,"type":"string"},"id":{"description":"Readonly unique ULID identifier.","example":"01ARZ3NDEKTSV4RRFFQ69G5FAV","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"name":{"description":"The name of the token.","example":"My Token","type":"string"},"permissions":{"description":"The permissions of the token.","items":{"$ref":"#/components/schemas/TokenPermission"},"type":"array"},"role":{"description":"The assigned role of the token.","enum":["org:openmeter_read_only","org:openmeter_read_write"],"example":"org:openmeter_read_only","type":"string"},"token":{"description":"The token secret.\nFull secret is only visible when creating a new token.\nWhen listing tokens, the secret is redacted to the last 5 characters.","readOnly":true,"type":"string"}},"required":["id","name","permissions","createdBy","createdAt","token"],"type":"object"},"TokenCreate":{"description":"Resource create operation model.","properties":{"expiresAt":{"description":"The date and time the token expires.","example":"2023-01-01T01:01:01.001Z","format":"date-time","nullable":true,"type":"string"},"name":{"description":"The name of the token.","example":"My Token","type":"string"},"permissions":{"description":"The permissions of the token.","items":{"$ref":"#/components/schemas/TokenPermission"},"type":"array"},"role":{"description":"The assigned role of the token.","enum":["org:openmeter_read_only","org:openmeter_read_write"],"example":"org:openmeter_read_only","type":"string"}},"required":["name","permissions"],"type":"object"},"TokenPermission":{"description":"Token permission.\nSee OrganizationPermissionResourceKind for the list of resource kinds.","enum":["addon:read","addon:write","app:read","app:write","audit:read","billingProfile:read","billingProfile:write","customer:read","customer:write","debug:read","debug:write","entitlement:read","entitlement:write","event:read","event:write","event:write-only","feature:read","feature:write","invoice:read","invoice:write","meter:read","meter:write","notification:read","notification:write","organization:read","organization:write","plan:read","plan:write","portal:read","portal:write","report:read","report:write","subject:read","subject:write","subscription:read","subscription:write","token:read","token:write"],"type":"string"},"ULIDOrExternalKey":{"anyOf":[{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},{"description":"ExternalKey is a looser version of key.","maxLength":256,"minLength":1,"type":"string"}],"description":"ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key.","x-go-type":"string"},"UnauthorizedProblemResponse":{"allOf":[{"$ref":"#/components/schemas/UnexpectedProblemResponse"}],"description":"The request has not been applied because it lacks valid authentication credentials for the target resource.","type":"object"},"UnexpectedProblemResponse":{"additionalProperties":{},"description":"A Problem Details object (RFC 7807).\nAdditional properties specific to the problem type may be present.","properties":{"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","example":"The request body must be a JSON object.","type":"string"},"extensions":{"additionalProperties":{},"description":"Additional properties specific to the problem type may be present.","example":{"otherAttribute":"otherValue","validationErrors":[{"code":"validation_error","message":"Validation error"}]},"type":"object"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","example":"urn:request:local/JMOlctsKV8-000001","format":"uri","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","example":400,"format":"int16","maximum":599,"minimum":400,"type":"integer"},"title":{"description":"A a short, human-readable summary of the problem type.","example":"Bad Request","type":"string"},"type":{"default":"about:blank","description":"Type contains a URI that identifies the problem type.","example":"about:blank","format":"uri","type":"string"}},"required":["type","title","detail","instance"],"type":"object","x-go-type":"models.StatusProblem","x-go-type-import":{"path":"github.com/openmeterio/openmeter/pkg/models"}},"Unit":{"description":"The unit of subscription item.","properties":{"plural":{"readOnly":true,"type":"string"},"singular":{"readOnly":true,"type":"string"}},"required":["singular","plural"],"type":"object"},"UnitPrice":{"description":"Unit price.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of the unit price."},"type":{"description":"The type of the price.","enum":["unit"],"type":"string"}},"required":["type","amount"],"type":"object"},"UnitPriceWithCommitments":{"description":"Unit price with spend commitments.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The amount of the unit price."},"maximumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is limited to spend at most the amount.","title":"Maximum amount"},"minimumAmount":{"allOf":[{"$ref":"#/components/schemas/Numeric"}],"description":"The customer is committed to spend at least the amount.","title":"Minimum amount"},"type":{"description":"The type of the price.","enum":["unit"],"type":"string"}},"required":["type","amount"],"type":"object"},"ValidationError":{"description":"Validation errors providing detailed description of the issue.","properties":{"attributes":{"allOf":[{"$ref":"#/components/schemas/Annotations"}],"description":"Additional attributes.","readOnly":true},"code":{"description":"The machine readable description of the error.","example":"invalid_feature_key","readOnly":true,"type":"string"},"field":{"description":"The path to the field.","example":"addons/pro/ratecards/token/featureKey","readOnly":true,"type":"string"},"message":{"description":"The human readable description of the error.","example":"not found feature by key","readOnly":true,"type":"string"}},"required":["field","code","message"],"type":"object"},"ValidationIssue":{"description":"ValidationIssue captures any validation issues related to the invoice.\n\nIssues with severity \"critical\" will prevent the invoice from being issued.","properties":{"code":{"description":"Machine indentifiable code for the issue, if available.","readOnly":true,"type":"string"},"component":{"description":"Component reporting the issue.","readOnly":true,"type":"string"},"createdAt":{"description":"Timestamp of when the resource was created.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Creation Time","type":"string"},"deletedAt":{"description":"Timestamp of when the resource was permanently deleted.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Deletion Time","type":"string"},"field":{"description":"The field that the issue is related to, if available in JSON path format.","readOnly":true,"type":"string"},"id":{"description":"ID of the charge or discount.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"message":{"description":"A human-readable description of the issue.","readOnly":true,"type":"string"},"metadata":{"allOf":[{"$ref":"#/components/schemas/Metadata"}],"description":"Additional context for the issue.","readOnly":true},"severity":{"allOf":[{"$ref":"#/components/schemas/ValidationIssueSeverity"}],"description":"The severity of the issue.","readOnly":true},"updatedAt":{"description":"Timestamp of when the resource was last updated.","example":"2024-01-01T01:01:01.001Z","format":"date-time","readOnly":true,"title":"Last Update Time","type":"string"}},"required":["createdAt","updatedAt","id","severity","component","message"],"type":"object"},"ValidationIssueSeverity":{"description":"ValidationIssueSeverity describes the severity of a validation issue.\n\nIssues with severity \"critical\" will prevent the invoice from being issued.","enum":["critical","warning"],"type":"string"},"VersionResponse":{"description":"The version of the Cloud build and API.","properties":{"openMeter":{"description":"The version of the OpenMeter API.","example":"v1.0.0","type":"string"},"version":{"description":"The version of the Cloud build.","example":"v1.1000","type":"string"}},"required":["version","openMeter"],"type":"object"},"VoidInvoiceActionCreate":{"description":"InvoiceVoidAction describes how to handle the voided line items.","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/VoidInvoiceLineActionCreate"}],"description":"The action to take on the line items."},"percentage":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"How much of the total line items to be voided? (e.g. 100% means all charges are voided)"}},"required":["percentage","action"],"type":"object"},"VoidInvoiceActionCreateItem":{"description":"InvoiceVoidAction describes how to handle the voided line items.","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/VoidInvoiceLineActionCreateItem"}],"description":"The action to take on the line items."},"percentage":{"allOf":[{"$ref":"#/components/schemas/Percentage"}],"description":"How much of the total line items to be voided? (e.g. 100% means all charges are voided)"}},"required":["percentage","action"],"type":"object"},"VoidInvoiceActionInput":{"description":"Request to void an invoice","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/VoidInvoiceActionCreate"}],"description":"The action to take on the voided line items."},"overrides":{"description":"Per line item overrides for the action.\n\nIf not specified, the `action` will be applied to all line items.","items":{"$ref":"#/components/schemas/VoidInvoiceActionLineOverride"},"nullable":true,"type":"array"},"reason":{"description":"The reason for voiding the invoice.","type":"string"}},"required":["action","reason"],"type":"object"},"VoidInvoiceActionLineOverride":{"description":"VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding.","properties":{"action":{"allOf":[{"$ref":"#/components/schemas/VoidInvoiceActionCreateItem"}],"description":"The action to take on the line item."},"lineId":{"description":"The line item ID to override.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},"required":["lineId","action"],"type":"object"},"VoidInvoiceLineActionCreate":{"description":"VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding.","discriminator":{"mapping":{"discard":"#/components/schemas/VoidInvoiceLineDiscardAction","pending":"#/components/schemas/VoidInvoiceLinePendingActionCreate"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/VoidInvoiceLineDiscardAction"},{"$ref":"#/components/schemas/VoidInvoiceLinePendingActionCreate"}],"type":"object"},"VoidInvoiceLineActionCreateItem":{"description":"VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding.","discriminator":{"mapping":{"discard":"#/components/schemas/VoidInvoiceLineDiscardAction","pending":"#/components/schemas/VoidInvoiceLinePendingActionCreateItem"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/VoidInvoiceLineDiscardAction"},{"$ref":"#/components/schemas/VoidInvoiceLinePendingActionCreateItem"}],"type":"object"},"VoidInvoiceLineDiscardAction":{"description":"VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice.","properties":{"type":{"description":"The action to take on the line item.","enum":["discard"],"type":"string"}},"required":["type"],"type":"object"},"VoidInvoiceLinePendingActionCreate":{"description":"VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice.","properties":{"nextInvoiceAt":{"description":"The time at which the line item should be invoiced again.\n\nIf not provided, the line item will be re-invoiced now.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"type":{"description":"The action to take on the line item.","enum":["pending"],"type":"string"}},"required":["type"],"type":"object"},"VoidInvoiceLinePendingActionCreateItem":{"description":"VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice.","properties":{"nextInvoiceAt":{"description":"The time at which the line item should be invoiced again.\n\nIf not provided, the line item will be re-invoiced now.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"type":{"description":"The action to take on the line item.","enum":["pending"],"type":"string"}},"required":["type"],"type":"object"},"WebhookEndpoint":{"description":"Webhook endpoint to send the report to.","properties":{"description":{"description":"Optional description of the webhook endpoint.","type":"string"},"rateLimit":{"description":"Optional rate limit for the webhook endpoint.","format":"uint16","minimum":1,"type":"integer"},"url":{"description":"The URL of the webhook endpoint.","type":"string"}},"required":["url"],"type":"object"},"WebhookReport":{"description":"The webhook report.","properties":{"endpoint":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"}],"description":"Webhook endpoint to send the report to."},"filter":{"allOf":[{"$ref":"#/components/schemas/ReportFilter"}],"description":"Filter to apply to the report."},"id":{"description":"The ID of the report.","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","readOnly":true,"type":"string"},"meter":{"allOf":[{"$ref":"#/components/schemas/Meter"}],"description":"The meter to report on.","readOnly":true},"meterGroupByFilters":{"additionalProperties":{"type":"string"},"description":"Optional meter group by filters. Useful if the meter scope is broader than what report tracks.","example":{"model":"gpt-4"},"type":"object"},"query":{"allOf":[{"$ref":"#/components/schemas/ReportQuery"}],"description":"Query to apply on the usage data."},"schedule":{"allOf":[{"$ref":"#/components/schemas/ReportSchedule"}],"description":"The schedule of the report.\nDefines how frequently the report should run."},"slug":{"description":"The unique slug of the report.\nMust be unique within the organization.","type":"string"},"type":{"description":"The type of the report.","enum":["webhook"],"type":"string"}},"required":["type","id","slug","schedule","meter","query","endpoint"],"type":"object"},"WebhookReportCreate":{"description":"Resource create operation model.","properties":{"endpoint":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"}],"description":"Webhook endpoint to send the report to."},"filter":{"allOf":[{"$ref":"#/components/schemas/ReportFilter"}],"description":"Filter to apply to the report."},"meterGroupByFilters":{"additionalProperties":{"type":"string"},"description":"Optional meter group by filters. Useful if the meter scope is broader than what report tracks.","example":{"model":"gpt-4"},"type":"object"},"meterIdOrSlug":{"description":"The ID of the meter entity.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"query":{"allOf":[{"$ref":"#/components/schemas/ReportQuery"}],"description":"Query to apply on the usage data."},"schedule":{"allOf":[{"$ref":"#/components/schemas/ReportSchedule"}],"description":"The schedule of the report.\nDefines how frequently the report should run."},"slug":{"description":"The unique slug of the report.\nMust be unique within the organization.","type":"string"},"type":{"description":"The type of the report.","enum":["webhook"],"type":"string"}},"required":["type","slug","schedule","meterIdOrSlug","query","endpoint"],"type":"object"},"WebhookReportUpdateAll":{"description":"Resource update operation model.","properties":{"endpoint":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"}],"description":"Webhook endpoint to send the report to."},"filter":{"allOf":[{"$ref":"#/components/schemas/ReportFilter"}],"description":"Filter to apply to the report."},"query":{"allOf":[{"$ref":"#/components/schemas/ReportQuery"}],"description":"Query to apply on the usage data."}},"required":["query","endpoint"],"type":"object"},"WindowSize":{"description":"Aggregation window size.","enum":["MINUTE","HOUR","DAY","MONTH"],"type":"string","x-enum-varnames":["Minute","Hour","Day","Month"]},"WindowedBalanceHistory":{"description":"The windowed balance history.","properties":{"burndownHistory":{"description":"Grant burndown history.","items":{"$ref":"#/components/schemas/GrantBurnDownHistorySegment"},"type":"array"},"windowedHistory":{"description":"The windowed balance history.\n- It only returns rows for windows where there was usage.\n- The windows are inclusive at their start and exclusive at their end.\n- The last window may be smaller than the window size and is inclusive at both ends.","items":{"$ref":"#/components/schemas/BalanceHistoryWindow"},"type":"array"}},"required":["windowedHistory","burndownHistory"],"type":"object"},"stringPaginatedResponse":{"description":"Paginated response","properties":{"items":{"description":"The items in the current page.","items":{"type":"string"},"type":"array"},"page":{"description":"The page index.","example":1,"type":"integer"},"pageSize":{"description":"The maximum number of items per page.","example":100,"type":"integer"},"totalCount":{"description":"The total number of items.","example":500,"type":"integer"}},"required":["totalCount","page","pageSize","items"],"type":"object"}},"securitySchemes":{"CloudCookieAuth":{"description":"Cloud API web app cookie.","in":"cookie","name":"__session","type":"apiKey"},"CloudPortalTokenAuth":{"description":"Cloud consumer portal token.","scheme":"Bearer","type":"http"},"CloudTokenAuth":{"description":"Cloud API token.","scheme":"Bearer","type":"http"},"SvixWebhook":{"in":"header","name":"svix-signature","type":"apiKey"}}},"info":{"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"https://openmeter.cloud/terms-of-service","title":"OpenMeter Cloud API","version":"1.0.0"},"openapi":"3.0.0","paths":{"/api/internal/customers/{customerIdOrKey}/subscriptions-correlated":{"get":{"description":"Returns the lists of correlated subscriptions for a customer.","operationId":"getCorrelatedCustomerSubscriptionsInternal","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"description":"Active after date-time in RFC 3339 format.\nInclusive.\nFilters for subscriptions that are active at or after the given date-time.\nDefaults to current time.","in":"query","name":"activeAfter","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrelatedCustomerSubscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Returns the lists of correlated subscriptions for a customer","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/plans":{"get":{"description":"Get the plans.","operationId":"getCloudBillingPlans","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CloudBillingPlan"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get plans","tags":["Cloud Billing"]}},"/api/internal/report-runs":{"get":{"description":"List report runs on the UI.","operationId":"listReportRunsInternal","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"description":"Filter by report ID or Slug.","explode":false,"in":"query","name":"report","schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"style":"form"},{"description":"Filter by report type.","explode":false,"in":"query","name":"type","schema":{"$ref":"#/components/schemas/ReportType"},"style":"form"},{"description":"Start date-time in RFC 3339 format.\nInclusive.","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\nInclusive.","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List report runs","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/reports":{"get":{"description":"List reports on the UI.","operationId":"listReportsInternal","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"description":"Search for reports by type.","explode":false,"in":"query","name":"type","schema":{"$ref":"#/components/schemas/ReportType"},"style":"form"},{"description":"Sort reports by slug.","explode":false,"in":"query","name":"sort","schema":{"enum":["slug:asc","slug:desc"],"type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List reports","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/reports/{reportIdOrSlug}/runs/{reportRunId}/results":{"get":{"description":"List report runs on the UI.","operationId":"listReportRunResultsInternal","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"description":"Report ID or Slug.","in":"path","name":"reportIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"description":"Report run ID.","in":"path","name":"reportRunId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Filter by subject.","explode":false,"in":"query","name":"subject","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filter by status.","explode":false,"in":"query","name":"status","schema":{"$ref":"#/components/schemas/ReportRunResultStatus"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunResultPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List report run results","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/subjects":{"get":{"description":"List subjects on the UI.","operationId":"listSubjectsInternal","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"description":"Search for subjects by key or display name.","explode":false,"in":"query","name":"search","schema":{"type":"string"},"style":"form"},{"description":"Sort subjects by key or display name.","explode":false,"in":"query","name":"sort","schema":{"enum":["key:asc","key:desc","displayName:asc","displayName:desc"],"type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List subjects","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/subjects/kong/unassigned":{"get":{"description":"List unassigned subjects on the UI, including Kong entities.","operationId":"listUnassignedKongSubjectsInternal","parameters":[{"description":"Search for unassigned subjects by key or display name.\nCase insensitive, partial match.","explode":false,"in":"query","name":"search","schema":{"type":"string"},"style":"form"},{"description":"Number of items to return.\n\nDefault is 100.","explode":false,"in":"query","name":"limit","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"},"style":"form"},{"description":"Filter by subject kind.","in":"query","name":"kinds","schema":{"items":{"$ref":"#/components/schemas/SubjectKind"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoundSubject"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List unassigned subjects, including Kong entities","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/subjects/unassigned":{"get":{"description":"List unassigned subjects on the UI.","operationId":"listUnassignedSubjectsInternal","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"description":"Search for unassigned subjects by key or display name.\nCase insensitive, partial match.","explode":false,"in":"query","name":"search","schema":{"type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stringPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List unassigned subjects","tags":["Cloud Internal"],"x-internal":true}},"/api/internal/subscription":{"get":{"description":"Get the Subscriptions for the current organization.\nReturns a 404 if the organization doesn't have an active subscription.","operationId":"getCloudBillingSubscription","parameters":[{"explode":false,"in":"query","name":"expand","schema":{"default":[],"items":{"$ref":"#/components/schemas/CloudBillingGetSubscriptionExpand"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudBillingSubscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subscription for the current organization","tags":["Cloud Billing"],"x-internal":true},"post":{"description":"Change the current cloud user's subscription.","operationId":"changeCloudSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudBillingChangeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudBillingChangeResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Change the current cloud user's subscription","tags":["Cloud Billing"]}},"/api/v1/addons":{"get":{"description":"List all add-ons.","operationId":"listAddons","parameters":[{"description":"Include deleted add-ons in response.\n\nUsage: `?includeDeleted=true`","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Filter by addon.id attribute","in":"query","name":"id","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"description":"Filter by addon.key attribute","in":"query","name":"key","schema":{"items":{"description":"A key is a unique string that is used to identify a resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"type":"array"},"style":"form"},{"description":"Filter by addon.key and addon.version attributes","in":"query","name":"keyVersion","schema":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object"},"style":"deepObject"},{"description":"Only return add-ons with the given status.\n\nUsage:\n- `?status=active`: return only the currently active add-ons\n- `?status=draft`: return only the draft add-ons\n- `?status=archived`: return only the archived add-ons","in":"query","name":"status","schema":{"items":{"$ref":"#/components/schemas/AddonStatus"},"type":"array"},"style":"form"},{"description":"Filter by addon.currency attribute","in":"query","name":"currency","schema":{"items":{"$ref":"#/components/schemas/CurrencyCode"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/AddonOrderByOrdering.order"},{"$ref":"#/components/parameters/AddonOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List add-ons","tags":["Product Catalog"]},"post":{"description":"Create a new add-on.","operationId":"createAddon","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create an add-on","tags":["Product Catalog"]}},"/api/v1/addons/{addonId}":{"delete":{"description":"Soft delete add-on by id.\n\nOnce a add-on is deleted it cannot be undeleted.","operationId":"deleteAddon","parameters":[{"in":"path","name":"addonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete add-on","tags":["Product Catalog"]},"get":{"description":"Get add-on by id or key. The latest published version is returned if latter is used.","operationId":"getAddon","parameters":[{"in":"path","name":"addonId","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"x-go-type":"string"},{"description":"Include latest version of the add-on instead of the version in active state.\n\nUsage: `?includeLatest=true`","explode":false,"in":"query","name":"includeLatest","schema":{"default":false,"type":"boolean"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get add-on","tags":["Product Catalog"]},"put":{"description":"Update add-on by id.","operationId":"updateAddon","parameters":[{"in":"path","name":"addonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonReplaceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update add-on","tags":["Product Catalog"]}},"/api/v1/addons/{addonId}/archive":{"post":{"description":"Archive a add-on version.","operationId":"archiveAddon","parameters":[{"in":"path","name":"addonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Archive add-on version","tags":["Product Catalog"]}},"/api/v1/addons/{addonId}/publish":{"post":{"description":"Publish a add-on version.","operationId":"publishAddon","parameters":[{"in":"path","name":"addonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Publish add-on","tags":["Product Catalog"]}},"/api/v1/apps":{"get":{"description":"List apps.","operationId":"listApps","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List apps","tags":["Apps"]}},"/api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronized":{"post":{"operationId":"appCustomInvoicingDraftSynchronized","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInvoicingDraftSynchronizedRequest"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Submit draft synchronization results","tags":["App: Custom Invoicing"]}},"/api/v1/apps/custom-invoicing/{invoiceId}/issuing/synchronized":{"post":{"operationId":"appCustomInvoicingIssuingSynchronized","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInvoicingFinalizedRequest"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Submit issuing synchronization results","tags":["App: Custom Invoicing"]}},"/api/v1/apps/custom-invoicing/{invoiceId}/payment/status":{"post":{"operationId":"appCustomInvoicingUpdatePaymentStatus","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInvoicingUpdatePaymentStatusRequest"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update payment status","tags":["App: Custom Invoicing"]}},"/api/v1/apps/{id}":{"delete":{"description":"Uninstall an app.","operationId":"uninstallApp","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Uninstall app","tags":["Apps"]},"get":{"description":"Get the app.","operationId":"getApp","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get app","tags":["Apps"]},"put":{"description":"Update an app.","operationId":"updateApp","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppReplaceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update app","tags":["Apps"]}},"/api/v1/apps/{id}/stripe/api-key":{"put":{"deprecated":true,"description":"Update the Stripe API key.\n\n⚠️ __Deprecated__: Use [`PUT /api/v1/apps/{id}`](#tag/apps/put/api/v1/apps/{id}) instead.","operationId":"updateStripeAPIKey","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeAPIKeyInput"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update Stripe API key","tags":["App: Stripe"]}},"/api/v1/apps/{id}/stripe/webhook":{"post":{"description":"Handle stripe webhooks for apps.","operationId":"appStripeWebhook","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookEvent"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"security":[{}],"summary":"Stripe webhook","tags":["App: Stripe"]}},"/api/v1/audit":{"get":{"description":"Get audit records.","operationId":"listAuditRecords","parameters":[{"$ref":"#/components/parameters/CursorPagination.cursor"},{"$ref":"#/components/parameters/CursorPagination.limit"},{"content":{"application/json":{"schema":{"format":"application/json","properties":{"action":{"$ref":"#/components/schemas/FilterString"},"authorized":{"$ref":"#/components/schemas/FilterBoolean"},"operation":{"$ref":"#/components/schemas/FilterString"},"resourceKind":{"$ref":"#/components/schemas/FilterString"},"time":{"$ref":"#/components/schemas/FilterTime"},"userId":{"$ref":"#/components/schemas/FilterString"}}}}},"description":"The filter to apply to the audit records.","in":"query","name":"filter"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRecordCursorPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List audit records","tags":["Audit"]}},"/api/v1/billing/customers":{"get":{"description":"List customer overrides using the specified filters.\n\nThe response will include the customer override values and the merged billing profile values.\n\nIf the includeAllCustomers is set to true, the list contains all customers. This mode is\nuseful for getting the current effective billing workflow settings for all users regardless\nif they have customer orverrides or not.","operationId":"listBillingProfileCustomerOverrides","parameters":[{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.billingProfile"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.customersWithoutPinnedProfile"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.includeAllCustomers"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.customerId"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.customerName"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.customerKey"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.customerPrimaryEmail"},{"$ref":"#/components/parameters/BillingProfileListCustomerOverridesParams.expand"},{"$ref":"#/components/parameters/BillingProfileCustomerOverrideOrderByOrdering.order"},{"$ref":"#/components/parameters/BillingProfileCustomerOverrideOrderByOrdering.orderBy"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideWithDetailsPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List customer overrides","tags":["Billing"]}},"/api/v1/billing/customers/{customerId}":{"delete":{"description":"Delete a customer override by customer id.\n\nThis will remove the customer override and the customer will be subject to the default\nbilling profile's settings again.","operationId":"deleteBillingProfileCustomerOverride","parameters":[{"in":"path","name":"customerId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete a customer override","tags":["Billing"]},"get":{"description":"Get a customer override by customer id.\n\nThe response will include the customer override values and the merged billing profile values.\n\nIf the customer override is not found, the default billing profile's values are returned. This behavior\nallows for getting a merged profile regardless of the customer override existence.","operationId":"getBillingProfileCustomerOverride","parameters":[{"in":"path","name":"customerId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideExpand"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideWithDetails"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get a customer override","tags":["Billing"]},"put":{"description":"The customer override can be used to pin a given customer to a billing profile\ndifferent from the default one.\n\nThis can be used to test the effect of different billing profiles before making them\nthe default ones or have different workflow settings for example for enterprise customers.","operationId":"upsertBillingProfileCustomerOverride","parameters":[{"in":"path","name":"customerId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileCustomerOverrideWithDetails"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a new or update a customer override","tags":["Billing"]}},"/api/v1/billing/customers/{customerId}/invoices/pending-lines":{"post":{"description":"Create a new pending line item (charge).\n\nThis call is used to create a new pending line item for the customer if required a new\ngathering invoice will be created.\n\nA new invoice will be created if:\n- there is no invoice in gathering state\n- the currency of the line item doesn't match the currency of any invoices in gathering state","operationId":"createPendingInvoiceLine","parameters":[{"in":"path","name":"customerId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePendingLineCreateInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePendingLineCreateResponse"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create pending line items","tags":["Billing"]}},"/api/v1/billing/customers/{customerId}/invoices/simulate":{"post":{"description":"Simulate an invoice for a customer.\n\nThis call will simulate an invoice for a customer based on the pending line items.\n\nThe call will return the total amount of the invoice and the line items that will be included in the invoice.","operationId":"simulateInvoice","parameters":[{"in":"path","name":"customerId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceSimulationInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Simulate an invoice for a customer","tags":["Billing"]}},"/api/v1/billing/invoices":{"get":{"description":"List invoices based on the specified filters.\n\nThe expand option can be used to include additional information (besides the invoice header and totals)\nin the response. For example by adding the expand=lines option the invoice lines will be included in the response.\n\nGathering invoices will always show the current usage calculated on the fly.","operationId":"listInvoices","parameters":[{"$ref":"#/components/parameters/InvoiceListParams.statuses"},{"$ref":"#/components/parameters/InvoiceListParams.extendedStatuses"},{"$ref":"#/components/parameters/InvoiceListParams.issuedAfter"},{"$ref":"#/components/parameters/InvoiceListParams.issuedBefore"},{"$ref":"#/components/parameters/InvoiceListParams.periodStartAfter"},{"$ref":"#/components/parameters/InvoiceListParams.periodStartBefore"},{"$ref":"#/components/parameters/InvoiceListParams.createdAfter"},{"$ref":"#/components/parameters/InvoiceListParams.createdBefore"},{"$ref":"#/components/parameters/InvoiceListParams.expand"},{"$ref":"#/components/parameters/InvoiceListParams.customers"},{"$ref":"#/components/parameters/InvoiceListParams.includeDeleted"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/InvoiceOrderByOrdering.order"},{"$ref":"#/components/parameters/InvoiceOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List invoices","tags":["Billing"]}},"/api/v1/billing/invoices/invoice":{"post":{"description":"Create a new invoice from the pending line items.\n\nThis should be only called if for some reason we need to invoice a customer outside of the normal billing cycle.\n\nWhen creating an invoice, the pending line items will be marked as invoiced and the invoice will be created with the total amount of the pending items.\n\nNew pending line items will be created for the period between now() and the next billing cycle's begining date for any metered item.\n\nThe call can return multiple invoices if the pending line items are in different currencies.","operationId":"invoicePendingLinesAction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePendingLinesActionInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Invoice a customer based on the pending line items","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}":{"delete":{"description":"Delete an invoice\n\nOnly invoices that are in the draft (or earlier) status can be deleted.\n\nInvoices that are post finalization can only be voided.","operationId":"deleteInvoice","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete an invoice","tags":["Billing"]},"get":{"description":"Get an invoice by ID.\n\nGathering invoices will always show the current usage calculated on the fly.","operationId":"getInvoice","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"query","name":"expand","schema":{"default":["lines"],"items":{"$ref":"#/components/schemas/InvoiceExpand"},"type":"array"},"style":"form"},{"explode":false,"in":"query","name":"includeDeletedLines","schema":{"default":false,"type":"boolean"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get an invoice","tags":["Billing"]},"put":{"description":"Update an invoice\n\nOnly invoices in draft or earlier status can be updated.","operationId":"updateInvoice","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReplaceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update an invoice","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}/advance":{"post":{"description":"Advance the invoice's state to the next status.\n\nThe call doesn't \"approve the invoice\", it only advances the invoice to the next status if the transition would be automatic.\n\nThe action can be called when the invoice's statusDetails' actions field contain the \"advance\" action.","operationId":"advanceInvoiceAction","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Advance the invoice's state to the next status","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}/approve":{"post":{"description":"Approve an invoice and start executing the payment workflow.\n\nThis call instantly sends the invoice to the customer using the configured billing profile app.\n\nThis call is valid in two invoice statuses:\n- `draft`: the invoice will be sent to the customer, the invluce state becomes issued\n- `manual_approval_needed`: the invoice will be sent to the customer, the invoice state becomes issued","operationId":"approveInvoiceAction","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Send the invoice to the customer","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}/retry":{"post":{"description":"Retry advancing the invoice after a failed attempt.\n\nThe action can be called when the invoice's statusDetails' actions field contain the \"retry\" action.","operationId":"retryInvoiceAction","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Retry advancing the invoice after a failed attempt.","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}/snapshot-quantities":{"post":{"description":"Snapshot quantities for usage based line items.\n\nThis call will snapshot the quantities for all usage based line items in the invoice.\n\nThis call is only valid in `draft.waiting_for_collection` status, where the collection period\ncan be skipped using this action.","operationId":"snapshotQuantitiesInvoiceAction","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Snapshot quantities for usage based line items","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}/taxes/recalculate":{"post":{"description":"Recalculate an invoice's tax amounts (using the app set in the customer's billing profile)\n\nNote: charges might apply, depending on the tax provider.","operationId":"recalculateInvoiceTaxAction","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Recalculate an invoice's tax amounts","tags":["Billing"]}},"/api/v1/billing/invoices/{invoiceId}/void":{"post":{"description":"Void an invoice\n\nOnly invoices that have been alread issued can be voided.\n\nVoiding an invoice will mark it as voided, the user can specify how to handle the voided line items.","operationId":"voidInvoiceAction","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidInvoiceActionInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Void an invoice","tags":["Billing"]}},"/api/v1/billing/profiles":{"get":{"description":"List all billing profiles matching the specified filters.\n\nThe expand option can be used to include additional information (besides the billing profile)\nin the response. For example by adding the expand=apps option the apps used by the billing profile\nwill be included in the response.","operationId":"listBillingProfiles","parameters":[{"explode":false,"in":"query","name":"includeArchived","schema":{"default":false,"type":"boolean"},"style":"form"},{"in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/BillingProfileExpand"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/BillingProfileOrderByOrdering.order"},{"$ref":"#/components/parameters/BillingProfileOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfilePaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List billing profiles","tags":["Billing"]},"post":{"description":"Create a new billing profile\n\nBilling profiles are representations of a customer's billing information. Customer overrides\ncan be applied to a billing profile to customize the billing behavior for a specific customer.","operationId":"createBillingProfile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfile"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a new billing profile","tags":["Billing"]}},"/api/v1/billing/profiles/{id}":{"delete":{"description":"Delete a billing profile by id.\n\nOnly such billing profiles can be deleted that are:\n- not the default one\n- not pinned to any customer using customer overrides\n- only have finalized invoices","operationId":"deleteBillingProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete a billing profile","tags":["Billing"]},"get":{"description":"Get a billing profile by id.\n\nThe expand option can be used to include additional information (besides the billing profile)\nin the response. For example by adding the expand=apps option the apps used by the billing profile\nwill be included in the response.","operationId":"getBillingProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"query","name":"expand","schema":{"items":{"$ref":"#/components/schemas/BillingProfileExpand"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfile"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get a billing profile","tags":["Billing"]},"put":{"description":"Update a billing profile by id.\n\nThe apps field cannot be updated directly, if an app change is desired a new\nprofile should be created.","operationId":"updateBillingProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileReplaceUpdateWithWorkflow"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfile"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update a billing profile","tags":["Billing"]}},"/api/v1/customers":{"get":{"description":"List customers.","operationId":"listCustomers","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/CustomerOrderByOrdering.order"},{"$ref":"#/components/parameters/CustomerOrderByOrdering.orderBy"},{"$ref":"#/components/parameters/queryCustomerList.includeDeleted"},{"$ref":"#/components/parameters/queryCustomerList.key"},{"$ref":"#/components/parameters/queryCustomerList.name"},{"$ref":"#/components/parameters/queryCustomerList.primaryEmail"},{"$ref":"#/components/parameters/queryCustomerList.subject"},{"$ref":"#/components/parameters/queryCustomerList.planKey"},{"$ref":"#/components/parameters/queryCustomerList.expand"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List customers","tags":["Customers"]},"post":{"description":"Create a new customer.","operationId":"createCustomer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create customer","tags":["Customers"]}},"/api/v1/customers/{customerIdOrKey}":{"delete":{"description":"Delete a customer by ID.","operationId":"deleteCustomer","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete customer","tags":["Customers"]},"get":{"description":"Get a customer by ID or key.","operationId":"getCustomer","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"$ref":"#/components/parameters/queryCustomerGet"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer","tags":["Customers"]},"put":{"description":"Update a customer by ID.","operationId":"updateCustomer","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerReplaceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update customer","tags":["Customers"]}},"/api/v1/customers/{customerIdOrKey}/access":{"get":{"description":"Get the overall access of a customer.","operationId":"getCustomerAccess","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccess"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer access","tags":["Entitlements","Customers"]}},"/api/v1/customers/{customerIdOrKey}/apps":{"get":{"description":"List customers app data.","operationId":"listCustomerAppData","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/listCustomerAppDataParams.type"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAppDataPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List customer app data","tags":["Customers","Apps"]},"put":{"description":"Upsert customer app data.","operationId":"upsertCustomerAppData","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerAppDataCreateOrUpdateItem"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomerAppData"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Upsert customer app data","tags":["Customers","Apps"]}},"/api/v1/customers/{customerIdOrKey}/apps/{appId}":{"delete":{"description":"Delete customer app data.","operationId":"deleteCustomerAppData","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"appId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete customer app data","tags":["Customers","Apps"]}},"/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/value":{"get":{"description":"Checks customer access to a given feature (by key). All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.","operationId":"getCustomerEntitlementValue","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"featureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"}},{"in":"query","name":"time","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementValue"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer entitlement value","tags":["Entitlements","Customers"]}},"/api/v1/customers/{customerIdOrKey}/stripe":{"get":{"description":"Get stripe app data for a customer.\nOnly returns data if the customer billing profile is linked to a stripe app.","operationId":"getCustomerStripeAppData","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCustomerAppData"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer stripe app data","tags":["Customers"]},"put":{"description":"Upsert stripe app data for a customer.\nOnly updates data if the customer billing profile is linked to a stripe app.","operationId":"upsertCustomerStripeAppData","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCustomerAppDataBase"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCustomerAppData"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Upsert customer stripe app data","tags":["Customers"]}},"/api/v1/customers/{customerIdOrKey}/stripe/portal":{"post":{"description":"Create Stripe customer portal session.\nOnly returns URL if the customer billing profile is linked to a stripe app and customer.\n\nUseful to redirect the customer to the Stripe customer portal to manage their payment methods,\nchange their billing address and access their invoice history.","operationId":"createCustomerStripePortalSession","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeCustomerPortalSessionParams"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeCustomerPortalSession"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create Stripe customer portal session","tags":["Customers"]}},"/api/v1/customers/{customerIdOrKey}/subscriptions":{"get":{"description":"Lists all subscriptions for a customer.","operationId":"listCustomerSubscriptions","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"query","name":"status","schema":{"items":{"$ref":"#/components/schemas/SubscriptionStatus"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/CustomerSubscriptionOrderByOrdering.order"},{"$ref":"#/components/parameters/CustomerSubscriptionOrderByOrdering.orderBy"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List customer subscriptions","tags":["Customers"]}},"/api/v1/debug/metrics":{"get":{"description":"Returns debug metrics (in OpenMetrics format) like the number of ingested events since mindnight UTC.\n\nThe OpenMetrics Counter(s) reset every day at midnight UTC.","operationId":"getDebugMetrics","responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get event metrics","tags":["Debug"]}},"/api/v1/entitlements":{"get":{"deprecated":true,"description":"List all entitlements for all the subjects and features. This endpoint is intended for administrative purposes only.\nTo fetch the entitlements of a specific subject please use the /api/v1/subjects/{subjectKeyOrID}/entitlements endpoint.\nIf page is provided that takes precedence and the paginated response is returned.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/entitlements`](#tag/entitlements/get/api/v2/entitlements) instead.","operationId":"listEntitlements","parameters":[{"description":"Filtering by multiple features.\n\nUsage: `?feature=feature-1\u0026feature=feature-2`","in":"query","name":"feature","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple subjects.\n\nUsage: `?subject=customer-1\u0026subject=customer-2`","in":"query","name":"subject","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered\u0026entitlementType=boolean`","in":"query","name":"entitlementType","schema":{"items":{"$ref":"#/components/schemas/EntitlementType"},"type":"array"},"style":"form"},{"description":"Exclude inactive entitlements in the response (those scheduled for later or earlier)","explode":false,"in":"query","name":"excludeInactive","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/LimitOffset.offset"},{"$ref":"#/components/parameters/LimitOffset.limit"},{"$ref":"#/components/parameters/EntitlementOrderByOrdering.order"},{"$ref":"#/components/parameters/EntitlementOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntitlementsResult"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List all entitlements","tags":["Entitlements"],"x-internal":true}},"/api/v1/entitlements/{entitlementId}":{"get":{"deprecated":true,"description":"Get entitlement by ID.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/entitlements/{entitlementId}`](#tag/entitlements/get/api/v2/entitlements/{entitlementId}) instead.","operationId":"getEntitlementById","parameters":[{"in":"path","name":"entitlementId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get entitlement by ID","tags":["Entitlements"]}},"/api/v1/events":{"get":{"description":"List ingested events within a time range.\n\nIf the from query param is not provided it defaults to last 72 hours.","operationId":"listEvents","parameters":[{"description":"Client ID\nUseful to track progress of a query.","explode":false,"in":"query","name":"clientId","schema":{"maxLength":36,"minLength":1,"type":"string"},"style":"form"},{"description":"Start date-time in RFC 3339 format.\n\nInclusive.","in":"query","name":"ingestedAtFrom","schema":{"format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\n\nInclusive.","in":"query","name":"ingestedAtTo","schema":{"format":"date-time","type":"string"},"style":"form"},{"description":"The event ID.\n\nAccepts partial ID.","explode":false,"in":"query","name":"id","schema":{"type":"string"},"style":"form"},{"description":"The event subject.\n\nAccepts partial subject.","explode":false,"in":"query","name":"subject","schema":{"type":"string"},"style":"form"},{"description":"The event customer ID.","in":"query","name":"customerId","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"description":"Start date-time in RFC 3339 format.\n\nInclusive.","in":"query","name":"from","schema":{"format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\n\nInclusive.","in":"query","name":"to","schema":{"format":"date-time","type":"string"},"style":"form"},{"description":"Number of events to return.","explode":false,"in":"query","name":"limit","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IngestedEvent"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List ingested events","tags":["Events"]},"post":{"description":"Ingests an event or batch of events following the CloudEvents specification.","operationId":"ingestEvents","requestBody":{"content":{"application/cloudevents+json":{"schema":{"$ref":"#/components/schemas/Event"}},"application/cloudevents-batch+json":{"schema":{"items":{"$ref":"#/components/schemas/Event"},"type":"array"}},"application/json":{"schema":{"$ref":"#/components/schemas/IngestEventsBody"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Ingest events","tags":["Events"]}},"/api/v1/features":{"get":{"description":"List features.","operationId":"listFeatures","parameters":[{"description":"Filter by meterSlug","in":"query","name":"meterSlug","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Include archived features in response.","explode":false,"in":"query","name":"includeArchived","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/LimitOffset.offset"},{"$ref":"#/components/parameters/LimitOffset.limit"},{"$ref":"#/components/parameters/FeatureOrderByOrdering.order"},{"$ref":"#/components/parameters/FeatureOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFeaturesResult"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List features","tags":["Product Catalog"]},"post":{"description":"Features are either metered or static. A feature is metered if meterSlug is provided at creation.\nFor metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields.\nMeters with SUM, COUNT, UNIQUE_COUNT and LATEST aggregations are supported for features.","operationId":"createFeature","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCreateInputs"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create feature","tags":["Product Catalog"]}},"/api/v1/features/{featureId}":{"delete":{"description":"Archive a feature by ID.\n\nOnce a feature is archived it cannot be unarchived. If a feature is archived, new entitlements cannot be created for it, but archiving the feature does not affect existing entitlements.\nThis means, if you want to create a new feature with the same key, and then create entitlements for it, the previous entitlements have to be deleted first on a per subject basis.","operationId":"deleteFeature","parameters":[{"in":"path","name":"featureId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete feature","tags":["Product Catalog"]},"get":{"description":"Get a feature by ID.","operationId":"getFeature","parameters":[{"in":"path","name":"featureId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feature"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get feature","tags":["Product Catalog"]}},"/api/v1/grants":{"get":{"deprecated":true,"description":"List all grants for all the subjects and entitlements. This endpoint is intended for administrative purposes only.\nTo fetch the grants of a specific entitlement please use the /api/v1/subjects/{subjectKeyOrID}/entitlements/{entitlementOrFeatureID}/grants endpoint.\nIf page is provided that takes precedence and the paginated response is returned.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/grants`](#tag/entitlements/get/api/v2/grants) instead.","operationId":"listGrants","parameters":[{"description":"Filtering by multiple features.\n\nUsage: `?feature=feature-1\u0026feature=feature-2`","in":"query","name":"feature","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple subjects.\n\nUsage: `?subject=customer-1\u0026subject=customer-2`","in":"query","name":"subject","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Include deleted","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/LimitOffset.offset"},{"$ref":"#/components/parameters/LimitOffset.limit"},{"$ref":"#/components/parameters/GrantOrderByOrdering.order"},{"$ref":"#/components/parameters/GrantOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/EntitlementGrant"},"type":"array"},{"$ref":"#/components/schemas/GrantPaginatedResponse"}]}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List grants","tags":["Entitlements"]}},"/api/v1/grants/{grantId}":{"delete":{"description":"Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations. Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed to the grant will remain, but future usage cannot be burnt down from the grant.\nFor example, if you have a single grant for your metered entitlement with an initial amount of 100, and so far 60 usage has been metered, the grant (and the entitlement itself) would have a balance of 40. If you then void that grant, balance becomes 0, but the 60 previous usage will not be affected.","operationId":"voidGrant","parameters":[{"in":"path","name":"grantId","required":true,"schema":{"type":"string"}},{"description":"The time at which the grant should be voided.\nMust not be in the future and must be within the current usage period of the entitlement.\nDefaults to the current time if not specified.","in":"query","name":"at","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Void grant","tags":["Entitlements"]}},"/api/v1/info/currencies":{"get":{"description":"List all supported currencies.","operationId":"listCurrencies","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Currency"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List supported currencies","tags":["Lookup Information"]}},"/api/v1/info/progress/{id}":{"get":{"description":"Get progress","operationId":"getProgress","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Progress"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get progress","tags":["Lookup Information"]}},"/api/v1/intercom/verification":{"get":{"description":"Get the Intercom verification hash.","operationId":"getIntercomVerificationHash","responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get Intercom verification hash","tags":["Cloud Internal"],"x-internal":true}},"/api/v1/marketplace/listings":{"get":{"description":"List available apps of the app marketplace.","operationId":"listMarketplaceListings","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceListingPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List available apps","tags":["Apps"]}},"/api/v1/marketplace/listings/{type}":{"get":{"description":"Get a marketplace listing by type.","operationId":"getMarketplaceListing","parameters":[{"in":"path","name":"type","required":true,"schema":{"$ref":"#/components/schemas/AppType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceListing"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get app details by type","tags":["Apps"]}},"/api/v1/marketplace/listings/{type}/install":{"post":{"description":"Install an app from the marketplace.","operationId":"marketplaceAppInstall","parameters":[{"$ref":"#/components/parameters/MarketplaceInstallRequest.type"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceInstallRequestPayload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceInstallResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Install app","tags":["Apps"]}},"/api/v1/marketplace/listings/{type}/install/apikey":{"post":{"description":"Install an marketplace app via API Key.","operationId":"marketplaceAppAPIKeyInstall","parameters":[{"$ref":"#/components/parameters/MarketplaceApiKeyInstallRequest.type"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"apiKey":{"description":"The API key for the provider.\nFor example, the Stripe API key.","type":"string"},"createBillingProfile":{"default":true,"description":"If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.","type":"boolean"},"name":{"description":"Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name.","type":"string"}},"required":["apiKey"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceInstallResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Install app via API key","tags":["Apps"]}},"/api/v1/marketplace/listings/{type}/install/oauth2":{"get":{"description":"Install an app via OAuth.\nReturns a URL to start the OAuth 2.0 flow.","operationId":"marketplaceOAuth2InstallGetURL","parameters":[{"in":"path","name":"type","required":true,"schema":{"$ref":"#/components/schemas/AppType"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientAppStartResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get OAuth2 install URL","tags":["Apps"]}},"/api/v1/marketplace/listings/{type}/install/oauth2/authorize":{"get":{"description":"Authorize OAuth2 code.\nVerifies the OAuth code and exchanges it for a token and refresh token","operationId":"marketplaceOAuth2InstallAuthorize","parameters":[{"$ref":"#/components/parameters/OAuth2AuthorizationCodeGrantSuccessParams.state"},{"$ref":"#/components/parameters/OAuth2AuthorizationCodeGrantSuccessParams.code"},{"$ref":"#/components/parameters/OAuth2AuthorizationCodeGrantErrorParams.error"},{"$ref":"#/components/parameters/OAuth2AuthorizationCodeGrantErrorParams.error_description"},{"$ref":"#/components/parameters/OAuth2AuthorizationCodeGrantErrorParams.error_uri"},{"$ref":"#/components/parameters/MarketplaceOAuth2InstallAuthorizeRequest.type"}],"responses":{"303":{"description":"Redirection"},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Install app via OAuth2","tags":["Apps"]}},"/api/v1/meters":{"get":{"description":"List meters.","operationId":"listMeters","parameters":[{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/MeterOrderByOrdering.order"},{"$ref":"#/components/parameters/MeterOrderByOrdering.orderBy"},{"$ref":"#/components/parameters/queryMeterList.includeDeleted"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Meter"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List meters","tags":["Meters"]},"post":{"description":"Create a meter.","operationId":"createMeter","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meter"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create meter","tags":["Meters"]}},"/api/v1/meters/{meterIdOrSlug}":{"delete":{"description":"Delete a meter.","operationId":"deleteMeter","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete meter","tags":["Meters"]},"get":{"description":"Get a meter by ID or slug.","operationId":"getMeter","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meter"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get meter","tags":["Meters"]},"put":{"description":"Update a meter.","operationId":"updateMeter","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meter"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update meter","tags":["Meters"]}},"/api/v1/meters/{meterIdOrSlug}/group-by/{groupByKey}/values":{"get":{"description":"List meter group by values.","operationId":"listMeterGroupByValues","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"groupByKey","required":true,"schema":{"type":"string"}},{"description":"Start date-time in RFC 3339 format.\n\nInclusive. Defaults to 24 hours ago.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List meter group by values","tags":["Meters"]}},"/api/v1/meters/{meterIdOrSlug}/query":{"get":{"description":"Query meter for usage.","operationId":"queryMeter","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"$ref":"#/components/parameters/MeterQuery.clientId"},{"$ref":"#/components/parameters/MeterQuery.from"},{"$ref":"#/components/parameters/MeterQuery.to"},{"$ref":"#/components/parameters/MeterQuery.windowSize"},{"$ref":"#/components/parameters/MeterQuery.windowTimeZone"},{"$ref":"#/components/parameters/MeterQuery.subject"},{"$ref":"#/components/parameters/MeterQuery.filterCustomerId"},{"$ref":"#/components/parameters/MeterQuery.filterGroupBy"},{"$ref":"#/components/parameters/MeterQuery.advancedMeterGroupByFilters"},{"$ref":"#/components/parameters/MeterQuery.groupBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryResult"}},"text/csv":{"schema":{"type":"string"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Query meter","tags":["Meters"]},"post":{"operationId":"queryMeterPost","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryResult"}},"text/csv":{"schema":{"type":"string"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Query meter","tags":["Meters"]}},"/api/v1/meters/{meterIdOrSlug}/subjects":{"get":{"description":"List subjects for a meter.","operationId":"listMeterSubjects","parameters":[{"in":"path","name":"meterIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"description":"Start date-time in RFC 3339 format.\n\nInclusive. Defaults to the beginning of time.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List meter subjects","tags":["Meters"]}},"/api/v1/notification/channels":{"get":{"description":"List all notification channels.","operationId":"listNotificationChannels","parameters":[{"description":"Include deleted notification channels in response.\n\nUsage: `?includeDeleted=true`","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Include disabled notification channels in response.\n\nUsage: `?includeDisabled=false`","explode":false,"in":"query","name":"includeDisabled","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/NotificationChannelOrderByOrdering.order"},{"$ref":"#/components/parameters/NotificationChannelOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List notification channels","tags":["Notifications"]},"post":{"description":"Create a new notification channel.","operationId":"createNotificationChannel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannel"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a notification channel","tags":["Notifications"]}},"/api/v1/notification/channels/{channelId}":{"delete":{"description":"Soft delete notification channel by id.\n\nOnce a notification channel is deleted it cannot be undeleted.","operationId":"deleteNotificationChannel","parameters":[{"in":"path","name":"channelId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete a notification channel","tags":["Notifications"]},"get":{"description":"Get a notification channel by id.","operationId":"getNotificationChannel","parameters":[{"in":"path","name":"channelId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannel"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get notification channel","tags":["Notifications"]},"put":{"description":"Update notification channel.","operationId":"updateNotificationChannel","parameters":[{"in":"path","name":"channelId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannelCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationChannel"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update a notification channel","tags":["Notifications"]}},"/api/v1/notification/events":{"get":{"description":"List all notification events.","operationId":"listNotificationEvents","parameters":[{"description":"Start date-time in RFC 3339 format.\nInclusive.","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\nInclusive.","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"Filtering by multiple feature ids or keys.\n\nUsage: `?feature=feature-1\u0026feature=feature-2`","in":"query","name":"feature","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple subject ids or keys.\n\nUsage: `?subject=subject-1\u0026subject=subject-2`","in":"query","name":"subject","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple rule ids.\n\nUsage: `?rule=01J8J2XYZ2N5WBYK09EDZFBSZM\u0026rule=01J8J4R4VZH180KRKQ63NB2VA5`","in":"query","name":"rule","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple channel ids.\n\nUsage: `?channel=01J8J4RXH778XB056JS088PCYT\u0026channel=01J8J4S1R1G9EVN62RG23A9M6J`","in":"query","name":"channel","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/NotificationEventOrderByOrdering.order"},{"$ref":"#/components/parameters/NotificationEventOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEventPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List notification events","tags":["Notifications"]}},"/api/v1/notification/events/{eventId}":{"get":{"description":"Get a notification event by id.","operationId":"getNotificationEvent","parameters":[{"in":"path","name":"eventId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEvent"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get notification event","tags":["Notifications"]}},"/api/v1/notification/events/{eventId}/resend":{"post":{"operationId":"resendNotificationEvent","parameters":[{"in":"path","name":"eventId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEventResendRequest"}}},"required":true},"responses":{"202":{"description":"The request has been accepted for processing, but processing has not yet completed."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Re-send notification event","tags":["Notifications"]}},"/api/v1/notification/rules":{"get":{"description":"List all notification rules.","operationId":"listNotificationRules","parameters":[{"description":"Include deleted notification rules in response.\n\nUsage: `?includeDeleted=true`","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Include disabled notification rules in response.\n\nUsage: `?includeDisabled=false`","explode":false,"in":"query","name":"includeDisabled","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Filtering by multiple feature ids/keys.\n\nUsage: `?feature=feature-1\u0026feature=feature-2`","in":"query","name":"feature","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple notifiaction channel ids.\n\nUsage: `?channel=01ARZ3NDEKTSV4RRFFQ69G5FAV\u0026channel=01J8J2Y5X4NNGQS32CF81W95E3`","in":"query","name":"channel","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/NotificationRuleOrderByOrdering.order"},{"$ref":"#/components/parameters/NotificationRuleOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRulePaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List notification rules","tags":["Notifications"]},"post":{"description":"Create a new notification rule.","operationId":"createNotificationRule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRule"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a notification rule","tags":["Notifications"]}},"/api/v1/notification/rules/{ruleId}":{"delete":{"description":"Soft delete notification rule by id.\n\nOnce a notification rule is deleted it cannot be undeleted.","operationId":"deleteNotificationRule","parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete a notification rule","tags":["Notifications"]},"get":{"description":"Get a notification rule by id.","operationId":"getNotificationRule","parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRule"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get notification rule","tags":["Notifications"]},"put":{"description":"Update notification rule.","operationId":"updateNotificationRule","parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRuleCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationRule"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update a notification rule","tags":["Notifications"]}},"/api/v1/notification/rules/{ruleId}/test":{"post":{"description":"Test a notification rule by sending a test event with random data.","operationId":"testNotificationRule","parameters":[{"in":"path","name":"ruleId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEvent"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Test notification rule","tags":["Notifications"]}},"/api/v1/organization":{"get":{"description":"Retrieve the organization information.","operationId":"getOrganization","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get organization","tags":["Cloud Internal"],"x-internal":true},"put":{"description":"Update the organization information.","operationId":"updateOrganization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdateAll"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update organization","tags":["Cloud Internal"],"x-internal":true}},"/api/v1/organization/portal":{"get":{"description":"Get a subject token for the organization to access OpenMeter usage.","operationId":"getOrganizationPortalToken","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalToken"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get organization portal token","tags":["Cloud Internal"],"x-internal":true}},"/api/v1/plans":{"get":{"description":"List all plans.","operationId":"listPlans","parameters":[{"description":"Include deleted plans in response.\n\nUsage: `?includeDeleted=true`","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Filter by plan.id attribute","in":"query","name":"id","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"description":"Filter by plan.key attribute","in":"query","name":"key","schema":{"items":{"description":"A key is a unique string that is used to identify a resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"type":"array"},"style":"form"},{"description":"Filter by plan.key and plan.version attributes","in":"query","name":"keyVersion","schema":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object"},"style":"deepObject"},{"description":"Only return plans with the given status.\n\nUsage:\n- `?status=active`: return only the currently active plan\n- `?status=draft`: return only the draft plan\n- `?status=archived`: return only the archived plans","in":"query","name":"status","schema":{"items":{"$ref":"#/components/schemas/PlanStatus"},"type":"array"},"style":"form"},{"description":"Filter by plan.currency attribute","in":"query","name":"currency","schema":{"items":{"$ref":"#/components/schemas/CurrencyCode"},"type":"array"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/PlanOrderByOrdering.order"},{"$ref":"#/components/parameters/PlanOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List plans","tags":["Product Catalog"]},"post":{"description":"Create a new plan.","operationId":"createPlan","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a plan","tags":["Product Catalog"]}},"/api/v1/plans/{planIdOrKey}/next":{"post":{"deprecated":true,"description":"Create a new draft version from plan.\nIt returns error if there is already a plan in draft or planId does not reference the latest published version.","operationId":"nextPlan","parameters":[{"in":"path","name":"planIdOrKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"x-go-type":"string"}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"New draft plan","tags":["Product Catalog"]}},"/api/v1/plans/{planId}":{"delete":{"description":"Soft delete plan by plan.id.\n\nOnce a plan is deleted it cannot be undeleted.","operationId":"deletePlan","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete plan","tags":["Product Catalog"]},"get":{"description":"Get a plan by id or key. The latest published version is returned if latter is used.","operationId":"getPlan","parameters":[{"in":"path","name":"planId","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"x-go-type":"string"},{"description":"Include latest version of the Plan instead of the version in active state.\n\nUsage: `?includeLatest=true`","explode":false,"in":"query","name":"includeLatest","schema":{"default":false,"type":"boolean"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get plan","tags":["Product Catalog"]},"put":{"description":"Update plan by id.","operationId":"updatePlan","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanReplaceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update a plan","tags":["Product Catalog"]}},"/api/v1/plans/{planId}/addons":{"get":{"description":"List all available add-ons for plan.","operationId":"listPlanAddons","parameters":[{"in":"path","name":"planId","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"description":"Include deleted plan add-on assignments.\n\nUsage: `?includeDeleted=true`","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Filter by addon.id attribute.","in":"query","name":"id","schema":{"items":{"description":"ULID (Universally Unique Lexicographically Sortable Identifier).","example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"type":"array"},"style":"form"},{"description":"Filter by addon.key attribute.","in":"query","name":"key","schema":{"items":{"description":"A key is a unique string that is used to identify a resource.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"},"type":"array"},"style":"form"},{"description":"Filter by addon.key and addon.version attributes.","in":"query","name":"keyVersion","schema":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object"},"style":"deepObject"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/PlanAddonOrderByOrdering.order"},{"$ref":"#/components/parameters/PlanAddonOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAddonPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List all available add-ons for plan","tags":["Product Catalog"]},"post":{"description":"Create new add-on assignment for plan.","operationId":"createPlanAddon","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAddonCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAddon"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create new add-on assignment for plan","tags":["Product Catalog"]}},"/api/v1/plans/{planId}/addons/{planAddonId}":{"delete":{"description":"Delete add-on assignment for plan.\n\nOnce a plan is deleted it cannot be undeleted.","operationId":"deletePlanAddon","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"planAddonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete add-on assignment for plan","tags":["Product Catalog"]},"get":{"description":"Get add-on assignment for plan by id.","operationId":"getPlanAddon","parameters":[{"in":"path","name":"planId","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"planAddonId","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAddon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get add-on assignment for plan","tags":["Product Catalog"]},"put":{"description":"Update add-on assignment for plan.","operationId":"updatePlanAddon","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"planAddonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAddonReplaceUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAddon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update add-on assignment for plan","tags":["Product Catalog"]}},"/api/v1/plans/{planId}/archive":{"post":{"description":"Archive a plan version.","operationId":"archivePlan","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Archive plan version","tags":["Product Catalog"]}},"/api/v1/plans/{planId}/publish":{"post":{"description":"Publish a plan version.","operationId":"publishPlan","parameters":[{"in":"path","name":"planId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Publish plan","tags":["Product Catalog"]}},"/api/v1/portal/meters/{meterSlug}/query":{"get":{"description":"Query meter for consumer portal. This endpoint is publicly exposable to consumers. Query meter for consumer portal. This endpoint is publicly exposable to consumers.","operationId":"queryPortalMeter","parameters":[{"in":"path","name":"meterSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$","type":"string"}},{"$ref":"#/components/parameters/MeterQuery.clientId"},{"$ref":"#/components/parameters/MeterQuery.from"},{"$ref":"#/components/parameters/MeterQuery.to"},{"$ref":"#/components/parameters/MeterQuery.windowSize"},{"$ref":"#/components/parameters/MeterQuery.windowTimeZone"},{"$ref":"#/components/parameters/MeterQuery.filterCustomerId"},{"$ref":"#/components/parameters/MeterQuery.filterGroupBy"},{"$ref":"#/components/parameters/MeterQuery.advancedMeterGroupByFilters"},{"$ref":"#/components/parameters/MeterQuery.groupBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeterQueryResult"}},"text/csv":{"schema":{"type":"string"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"security":[{"CloudPortalTokenAuth":[]}],"summary":"Query meter Query meter","tags":["Portal"]}},"/api/v1/portal/tokens":{"get":{"description":"List tokens.","operationId":"listPortalTokens","parameters":[{"explode":false,"in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PortalToken"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List consumer portal tokens","tags":["Portal"]},"post":{"description":"Create a consumer portal token.","operationId":"createPortalToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalToken"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalToken"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create consumer portal token","tags":["Portal"]}},"/api/v1/portal/tokens/invalidate":{"post":{"description":"Invalidates consumer portal tokens by ID or subject.","operationId":"invalidatePortalTokens","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"Invalidate a portal token by ID.","type":"string"},"subject":{"description":"Invalidate all portal tokens for a subject.","type":"string"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Invalidate portal tokens","tags":["Portal"]}},"/api/v1/report-runs":{"get":{"description":"List report runs","operationId":"listReportRuns","parameters":[{"description":"Filter by report ID or Slug.","explode":false,"in":"query","name":"report","schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"},"style":"form"},{"description":"Filter by report type.","explode":false,"in":"query","name":"type","schema":{"$ref":"#/components/schemas/ReportType"},"style":"form"},{"description":"Number of report runs to return.","explode":false,"in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"},"style":"form"},{"description":"Start date-time in RFC 3339 format.\nInclusive.","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End date-time in RFC 3339 format.\nInclusive.","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportRun"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List report runs","tags":["Reports"]}},"/api/v1/reports":{"get":{"description":"Retrieve the report information.","operationId":"listReports","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Report"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List reports","tags":["Reports"]},"post":{"description":"Create a new report.","operationId":"createReport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create report","tags":["Reports"]}},"/api/v1/reports/{reportIdOrSlug}":{"delete":{"operationId":"deleteReport","parameters":[{"in":"path","name":"reportIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete report","tags":["Reports"]},"put":{"description":"Update a report","operationId":"updateReport","parameters":[{"in":"path","name":"reportIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update report","tags":["Reports"]}},"/api/v1/reports/{reportIdOrSlug}/runs/{reportRunId}/results":{"get":{"description":"List report run results","operationId":"listReportRunResults","parameters":[{"in":"path","name":"reportIdOrSlug","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"reportRunId","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Filter by subject.","explode":false,"in":"query","name":"subject","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filter by status.","explode":false,"in":"query","name":"status","schema":{"$ref":"#/components/schemas/ReportRunResultStatus"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportRunResult"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List report run results","tags":["Reports"]}},"/api/v1/stripe/checkout":{"post":{"operationId":"createInternalStripeCheckoutSession","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InternalCreateStripeCheckoutSessionRequest"}}},"required":true},"responses":{"303":{"description":"Redirection","headers":{"location":{"required":true,"schema":{"format":"url","type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create Stripe checkout session","tags":["Cloud Internal"],"x-internal":true}},"/api/v1/stripe/checkout/sessions":{"post":{"description":"Create checkout session.","operationId":"createStripeCheckoutSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeCheckoutSessionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStripeCheckoutSessionResult"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create checkout session","tags":["App: Stripe"]}},"/api/v1/stripe/portal":{"get":{"description":"Creates a Stripe portal session.","operationId":"createStripePortalSession","parameters":[{"in":"header","name":"referer","required":true,"schema":{"type":"string"}}],"responses":{"303":{"description":"Redirection","headers":{"location":{"required":true,"schema":{"format":"url","type":"string"}}}},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create Stripe portal session","tags":["Cloud Internal"],"x-internal":true}},"/api/v1/subjects":{"get":{"deprecated":true,"description":"List subjects.\n\n⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.","operationId":"listSubjects","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Subject"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List subjects","tags":["Subjects"]},"post":{"deprecated":true,"description":"Upserts a subject. Creates or updates subject.\n\nIf the subject doesn't exist, it will be created.\nIf the subject exists, it will be partially updated with the provided fields.\n\n⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.","operationId":"upsertSubject","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubjectUpsert"},"type":"array"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Subject"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Upsert subject","tags":["Subjects"]}},"/api/v1/subjects/{subjectIdOrKey}":{"delete":{"deprecated":true,"description":"Delete subject by ID or key.\n\n⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.","operationId":"deleteSubject","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete subject","tags":["Subjects"]},"get":{"deprecated":true,"description":"Get subject by ID or key.\n\n⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.","operationId":"getSubject","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subject"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subject","tags":["Subjects"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements":{"get":{"deprecated":true,"description":"List all entitlements for a subject. For checking entitlement access, use the /value endpoint instead.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements) instead.","operationId":"listSubjectEntitlements","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Entitlement"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List subject entitlements","tags":["Entitlements"]},"post":{"deprecated":true,"description":"OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).\n\n- Boolean entitlements define static feature access, e.g. \"Can use SSO authentication\".\n- Static entitlements let you pass along a configuration while granting access, e.g. \"Using this feature with X Y settings\" (passed in the config).\n- Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems.  Example: The customer can use 10000 AI tokens during the usage period of the entitlement.\n\nA given subject can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.\n\nOnce an entitlement is created you cannot modify it, only delete it.\n\n⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements) instead.","operationId":"createEntitlement","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementCreateInputs"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a subject entitlement","tags":["Entitlements"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants":{"get":{"deprecated":true,"description":"List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead.","operationId":"listEntitlementGrants","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"type":"string"}},{"explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"explode":false,"in":"query","name":"orderBy","schema":{"allOf":[{"$ref":"#/components/schemas/GrantOrderBy"}],"default":"updatedAt"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EntitlementGrant"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List subject entitlement grants","tags":["Entitlements"]},"post":{"deprecated":true,"description":"Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.\n\nA grant defines a given amount of usage that can be consumed for the entitlement. The grant is in effect between its effective date and its expiration date. Specifying both is mandatory for new grants.\n\nGrants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.\n\nGrants can have a recurrence setting intended to automate the manual reissuing of grants. For example, a daily recurrence is equal to reissuing that same grant every day (ignoring rollover settings).\n\nRollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))\n\nGrants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.\n\n⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead.","operationId":"createGrant","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementGrantCreateInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementGrant"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create subject entitlement grant","tags":["Entitlements"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override":{"put":{"deprecated":true,"description":"Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided subject-feature pair. If the previous entitlement is already deleted or otherwise doesnt exist, the override will fail.\n\nThis endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.\n\n⚠️ __Deprecated__: Use [`PUT /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override`](#tag/entitlements/put/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override) instead.","operationId":"overrideEntitlement","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementCreateInputs"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Override subject entitlement","tags":["Entitlements"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value":{"get":{"deprecated":true,"description":"This endpoint should be used for access checks and enforcement. All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.\n\nFor convenience reasons, /value works with both entitlementId and featureKey.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value) instead.","operationId":"getEntitlementValue","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"type":"string"}},{"in":"query","name":"time","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementValue"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subject entitlement value","tags":["Entitlements"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}":{"delete":{"deprecated":true,"description":"Deleting an entitlement revokes access to the associated feature. As a single subject can only have one entitlement per featureKey, when \"migrating\" features you have to delete the old entitlements as well.\nAs access and status checks can be historical queries, deleting an entitlement populates the deletedAt timestamp. When queried for a time before that, the entitlement is still considered active, you cannot have retroactive changes to access, which is important for, among other things, auditing.\n\n⚠️ __Deprecated__: Use [`DELETE /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/delete/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead.","operationId":"deleteEntitlement","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete subject entitlement","tags":["Entitlements"]},"get":{"deprecated":true,"description":"Get entitlement by id. For checking entitlement access, use the /value endpoint instead.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead.","operationId":"getEntitlement","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entitlement"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subject entitlement","tags":["Entitlements"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history":{"get":{"deprecated":true,"description":"Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.\n\nBurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period.\n\nWindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window.\n\n⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history) instead.","operationId":"getEntitlementHistory","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementId","required":true,"schema":{"type":"string"}},{"description":"Start of time range to query entitlement: date-time in RFC 3339 format. Defaults to the last reset. Gets truncated to the granularity of the underlying meter.","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.\nIf not now then gets truncated to the granularity of the underlying meter.","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"Windowsize","explode":false,"in":"query","name":"windowSize","required":true,"schema":{"$ref":"#/components/schemas/WindowSize"},"style":"form"},{"description":"The timezone used when calculating the windows.","explode":false,"in":"query","name":"windowTimeZone","schema":{"default":"UTC","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WindowedBalanceHistory"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subject entitlement history","tags":["Entitlements"]}},"/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset":{"post":{"deprecated":true,"description":"Reset marks the start of a new usage period for the entitlement and initiates grant rollover. At the start of a period usage is zerod out and grants are rolled over based on their rollover settings. It would typically be synced with the subjects billing period to enforce usage based on their subscription.\n\nUsage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.\n\n⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset) instead.","operationId":"resetEntitlementUsage","parameters":[{"in":"path","name":"subjectIdOrKey","required":true,"schema":{"type":"string"}},{"in":"path","name":"entitlementId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetEntitlementUsageInput"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Reset subject entitlement","tags":["Entitlements"]}},"/api/v1/subscription":{"get":{"description":"Get the subscription","operationId":"getCloudSubscription","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudSubscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subscription","tags":["Subscription"],"x-internal":true}},"/api/v1/subscriptions":{"post":{"operationId":"createSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create subscription","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}":{"delete":{"description":"Deletes a subscription. Only scheduled subscriptions can be deleted.","operationId":"deleteSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete subscription","tags":["Subscriptions"]},"get":{"operationId":"getSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"description":"The time at which the subscription should be queried. If not provided the current time is used.","in":"query","name":"at","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionExpanded"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subscription","tags":["Subscriptions"]},"patch":{"description":"Batch processing commands for manipulating running subscriptions.\nThe key format is `/phases/{phaseKey}` or `/phases/{phaseKey}/items/{itemKey}`.","operationId":"editSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionEdit"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Edit subscription","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/addons":{"get":{"description":"List all addons of a subscription. In the returned list will match to a set unique by addonId.","operationId":"listSubscriptionAddons","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionAddon"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List subscription addons","tags":["Subscriptions"]},"post":{"description":"Create a new subscription addon, either providing the key or the id of the addon.","operationId":"createSubscriptionAddon","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionAddonCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionAddon"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create subscription addon","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}":{"get":{"description":"Get a subscription addon by id.","operationId":"getSubscriptionAddon","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"subscriptionAddonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionAddon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get subscription addon","tags":["Subscriptions"]},"patch":{"description":"Updates a subscription addon (allows changing the quantity: purchasing more instances or cancelling the current instances)","operationId":"updateSubscriptionAddon","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"path","name":"subscriptionAddonId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionAddonUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionAddon"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Update subscription addon","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/cancel":{"post":{"description":"Cancels the subscription.\nWill result in a scheduling conflict if there are other subscriptions scheduled to start after the cancellation time.","operationId":"cancelSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"description":"If not provided the subscription is canceled immediately."}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Cancel subscription","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/change":{"post":{"description":"Closes a running subscription and starts a new one according to the specification.\nCan be used for upgrades, downgrades, and plan changes.","operationId":"changeSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionChange"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionChangeResponseBody"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Change subscription","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/migrate":{"post":{"description":"Migrates the subscripiton to the provided version of the current plan.\nIf possible, the migration will be done immediately.\nIf not, the migration will be scheduled to the end of the current billing period.","operationId":"migrateSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"billingAnchor":{"description":"The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.","example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"startingPhase":{"description":"The key of the phase to start the subscription in.\nIf not provided, the subscription will start in the first phase of the plan.","minLength":1,"type":"string"},"targetVersion":{"description":"The version of the plan to migrate to.\nIf not provided, the subscription will migrate to the latest version of the current plan.","minimum":1,"type":"integer"},"timing":{"allOf":[{"$ref":"#/components/schemas/SubscriptionTiming"}],"default":"immediate","description":"Timing configuration for the migration, when the migration should take effect.\nIf not supported by the subscription, 400 will be returned."}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionChangeResponseBody"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Migrate subscription","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/restore":{"post":{"deprecated":true,"description":"Restores a canceled subscription.\nAny subscription scheduled to start later will be deleted and this subscription will be continued indefinitely.","operationId":"restoreSubscription","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Restore subscription","tags":["Subscriptions"]}},"/api/v1/subscriptions/{subscriptionId}/unschedule-cancelation":{"post":{"description":"Cancels the scheduled cancelation.","operationId":"unscheduleCancelation","parameters":[{"in":"path","name":"subscriptionId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionBadRequestErrorResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). Variants with ErrorExtensions specific to subscriptions."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SubscriptionConflictErrorResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource.\nVariants with ErrorExtensions specific to subscriptions."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Unschedule cancelation","tags":["Subscriptions"]}},"/api/v1/svix/portal":{"get":{"description":"Get the Svix portal URL.","operationId":"getSvixPortal","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SvixPortal"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get Svix portal URL","tags":["Cloud Internal"],"x-internal":true}},"/api/v1/tokens":{"get":{"description":"List tokens.","operationId":"listTokens","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Token"},"type":"array"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List tokens","tags":["Cloud"]},"post":{"description":"Create a token.","operationId":"createToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create token","tags":["Cloud"]}},"/api/v1/tokens/{id}":{"delete":{"description":"Delete a token.","operationId":"deleteToken","parameters":[{"in":"path","name":"id","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete token","tags":["Cloud"]}},"/api/v1/version":{"get":{"description":"Retrieve the version of the Cloud build and API.","operationId":"getVersion","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"}}},"description":"The request has succeeded."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"security":[{}],"summary":"Get version","tags":["Cloud Internal"]}},"/api/v2/customers/{customerIdOrKey}/entitlements":{"get":{"description":"List all entitlements for a customer. For checking entitlement access, use the /value endpoint instead.","operationId":"listCustomerEntitlementsV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/EntitlementOrderByOrdering.order"},{"$ref":"#/components/parameters/EntitlementOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2PaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List customer entitlements","tags":["Entitlements","Customers"]},"post":{"description":"OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).\n\n- Boolean entitlements define static feature access, e.g. \"Can use SSO authentication\".\n- Static entitlements let you pass along a configuration while granting access, e.g. \"Using this feature with X Y settings\" (passed in the config).\n- Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems.  Example: The customer can use 10000 AI tokens during the usage period of the entitlement.\n\nA given customer can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.\n\nOnce an entitlement is created you cannot modify it, only delete it.","operationId":"createCustomerEntitlementV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2CreateInputs"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create a customer entitlement","tags":["Entitlements","Customers"]}},"/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}":{"delete":{"description":"Deleting an entitlement revokes access to the associated feature. As a single customer can only have one entitlement per featureKey, when \"migrating\" features you have to delete the old entitlements as well.\nAs access and status checks can be historical queries, deleting an entitlement populates the deletedAt timestamp. When queried for a time before that, the entitlement is still considered active, you cannot have retroactive changes to access, which is important for, among other things, auditing.","operationId":"deleteCustomerEntitlementV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Delete customer entitlement","tags":["Entitlements","Customers"]},"get":{"description":"Get entitlement by feature key. For checking entitlement access, use the /value endpoint instead.\nIf featureKey is used, the entitlement is resolved for the current timestamp.","operationId":"getCustomerEntitlementV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer entitlement","tags":["Entitlements","Customers"]}},"/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants":{"get":{"description":"List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.","operationId":"listCustomerEntitlementGrantsV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/LimitOffset.offset"},{"$ref":"#/components/parameters/LimitOffset.limit"},{"$ref":"#/components/parameters/GrantOrderByOrdering.order"},{"$ref":"#/components/parameters/GrantOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantV2PaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List customer entitlement grants","tags":["Entitlements","Customers"]},"post":{"description":"Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.\n\nA grant defines a given amount of usage that can be consumed for the entitlement. The grant is in effect between its effective date and its expiration date. Specifying both is mandatory for new grants.\n\nGrants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.\n\nGrants can have a recurrence setting intended to automate the manual reissuing of grants. For example, a daily recurrence is equal to reissuing that same grant every day (ignoring rollover settings).\n\nRollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))\n\nGrants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.","operationId":"createCustomerEntitlementGrantV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementGrantCreateInputV2"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementGrantV2"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Create customer entitlement grant","tags":["Entitlements","Customers"]}},"/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history":{"get":{"description":"Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.\n\nBurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period.\n\nWindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window.","operationId":"getCustomerEntitlementHistoryV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"description":"Start of time range to query entitlement: date-time in RFC 3339 format. Defaults to the last reset. Gets truncated to the granularity of the underlying meter.","in":"query","name":"from","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.\nIf not now then gets truncated to the granularity of the underlying meter.","in":"query","name":"to","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"},{"description":"Windowsize","explode":false,"in":"query","name":"windowSize","required":true,"schema":{"$ref":"#/components/schemas/WindowSize"},"style":"form"},{"description":"The timezone used when calculating the windows.","explode":false,"in":"query","name":"windowTimeZone","schema":{"default":"UTC","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WindowedBalanceHistory"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer entitlement history","tags":["Entitlements","Customers"]}},"/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override":{"put":{"description":"Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided customer-feature pair. If the previous entitlement is already deleted or otherwise doesnt exist, the override will fail.\n\nThis endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.","operationId":"overrideCustomerEntitlementV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2CreateInputs"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2"}}},"description":"The request has succeeded and a new resource has been created as a result."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictProblemResponse"}}},"description":"The request could not be completed due to a conflict with the current state of the target resource."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Override customer entitlement","tags":["Entitlements","Customers"]}},"/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset":{"post":{"description":"Reset marks the start of a new usage period for the entitlement and initiates grant rollover. At the start of a period usage is zerod out and grants are rolled over based on their rollover settings. It would typically be synced with the customers billing period to enforce usage based on their subscription.\n\nUsage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.","operationId":"resetCustomerEntitlementUsageV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetEntitlementUsageInput"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Reset customer entitlement","tags":["Entitlements","Customers"]}},"/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value":{"get":{"description":"Checks customer access to a given feature (by key). All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.","operationId":"getCustomerEntitlementValueV2","parameters":[{"in":"path","name":"customerIdOrKey","required":true,"schema":{"$ref":"#/components/schemas/ULIDOrExternalKey"}},{"in":"path","name":"entitlementIdOrFeatureKey","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}},{"in":"query","name":"time","schema":{"example":"2023-01-01T01:01:01.001Z","format":"date-time","type":"string"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementValueV2"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get customer entitlement value","tags":["Entitlements","Customers"]}},"/api/v2/entitlements":{"get":{"description":"List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only.\nTo fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint.","operationId":"listEntitlementsV2","parameters":[{"description":"Filtering by multiple features.\n\nUsage: `?feature=feature-1\u0026feature=feature-2`","in":"query","name":"feature","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple customers.\n\nUsage: `?customerKeys=customer-1\u0026customerKeys=customer-3`","in":"query","name":"customerKeys","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple customers.\n\nUsage: `?customerIds=01K4WAQ0J99ZZ0MD75HXR112H8\u0026customerIds=01K4WAQ0J99ZZ0MD75HXR112H9`","in":"query","name":"customerIds","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered\u0026entitlementType=boolean`","in":"query","name":"entitlementType","schema":{"items":{"$ref":"#/components/schemas/EntitlementType"},"type":"array"},"style":"form"},{"description":"Exclude inactive entitlements in the response (those scheduled for later or earlier)","explode":false,"in":"query","name":"excludeInactive","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/LimitOffset.offset"},{"$ref":"#/components/parameters/LimitOffset.limit"},{"$ref":"#/components/parameters/EntitlementOrderByOrdering.order"},{"$ref":"#/components/parameters/EntitlementOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2PaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List all entitlements","tags":["Entitlements"]}},"/api/v2/entitlements/{entitlementId}":{"get":{"description":"Get entitlement by ID.","operationId":"getEntitlementByIdV2","parameters":[{"in":"path","name":"entitlementId","required":true,"schema":{"example":"01G65Z755AFWAKHE12NY0CQ9FH","pattern":"^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementV2"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblemResponse"}}},"description":"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"Get entitlement by ID","tags":["Entitlements"]}},"/api/v2/events":{"get":{"description":"List ingested events with advanced filtering and cursor pagination.","operationId":"listEventsV2","parameters":[{"$ref":"#/components/parameters/CursorPagination.cursor"},{"$ref":"#/components/parameters/CursorPagination.limit"},{"description":"Client ID\nUseful to track progress of a query.","explode":false,"in":"query","name":"clientId","schema":{"maxLength":36,"minLength":1,"type":"string"},"style":"form"},{"content":{"application/json":{"schema":{"format":"application/json","properties":{"customerId":{"$ref":"#/components/schemas/FilterIDExact"},"id":{"$ref":"#/components/schemas/FilterString"},"ingestedAt":{"$ref":"#/components/schemas/FilterTime"},"source":{"$ref":"#/components/schemas/FilterString"},"subject":{"$ref":"#/components/schemas/FilterString"},"time":{"$ref":"#/components/schemas/FilterTime"},"type":{"$ref":"#/components/schemas/FilterString"}}}}},"description":"The filter for the events encoded as JSON string.","in":"query","name":"filter"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestedEventCursorPaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List ingested events","tags":["Events"]}},"/api/v2/grants":{"get":{"description":"List all grants for all the customers and entitlements. This endpoint is intended for administrative purposes only.\nTo fetch the grants of a specific entitlement please use the /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants endpoint.\nIf page is provided that takes precedence and the paginated response is returned.","operationId":"listGrantsV2","parameters":[{"description":"Filtering by multiple features.\n\nUsage: `?feature=feature-1\u0026feature=feature-2`","in":"query","name":"feature","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Filtering by multiple customers (either by ID or key).\n\nUsage: `?customer=customer-1\u0026customer=customer-2`","in":"query","name":"customer","schema":{"items":{"$ref":"#/components/schemas/ULIDOrExternalKey"},"type":"array"},"style":"form"},{"description":"Include deleted","explode":false,"in":"query","name":"includeDeleted","schema":{"default":false,"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/Pagination.page"},{"$ref":"#/components/parameters/Pagination.pageSize"},{"$ref":"#/components/parameters/LimitOffset.offset"},{"$ref":"#/components/parameters/LimitOffset.limit"},{"$ref":"#/components/parameters/GrantOrderByOrdering.order"},{"$ref":"#/components/parameters/GrantOrderByOrdering.orderBy"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantV2PaginatedResponse"}}},"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"summary":"List grants","tags":["Entitlements"]}},"/webhooks/clerk":{"post":{"description":"Handle Clerk webhook events.","operationId":"clerkWebhookEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventClerk"}}},"required":true},"responses":{"200":{"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"security":[{"SvixWebhook":[]}],"summary":"Handle Clerk webhook events","tags":["Cloud Internal"],"x-internal":true}},"/webhooks/stripe":{"post":{"description":"Handle Stripe webhook events.","operationId":"stripeWebhookEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventStripe"}}},"required":true},"responses":{"200":{"description":"The request has succeeded."},"400":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestProblemResponse"}}},"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnauthorizedProblemResponse"}}},"description":"The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ForbiddenProblemResponse"}}},"description":"The server understood the request but refuses to authorize it."},"412":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PreconditionFailedProblemResponse"}}},"description":"One or more conditions given in the request header fields evaluated to false when tested on the server."},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorProblemResponse"}}},"description":"The server encountered an unexpected condition that prevented it from fulfilling the request."},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableProblemResponse"}}},"description":"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay."},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/UnexpectedProblemResponse"}}},"description":"An unexpected error response."}},"security":[{}],"summary":"Handle Stripe webhook events","tags":["Cloud Internal"],"x-internal":true}}},"security":[{"CloudTokenAuth":[]},{"CloudCookieAuth":[]}],"tags":[{"name":"Cloud Internal"},{"name":"Cloud"},{"name":"Reports"},{"name":"Subscription"},{"name":"Audit"},{"name":"Cloud Billing"},{"description":"With Subscriptions, you can easily start, cancel, and manage customer subscriptions. For example, provisioning them on a specific plan or assigning custom rate cards.","name":"Subscriptions"},{"description":"⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. \n\n Subjects are entities that consume resources you wish to meter. These can range from users, servers, and services to devices. The design of subjects is intentionally generic, enabling flexible application across various metering scenarios. Typically, a subject acts as a unique identifier within your system for a user or customer. Meters are aggregating events for each subject.","name":"Subjects"},{"description":"Configure and manage your product plans, pricing tiers, and subscription offerings. ","name":"Product Catalog"},{"description":"With the Consumer Portal, you can build in-app user-facing dashboards where your users can track their usage in real-time. Subject scoped portal tokens can be generated on your behalf to allow restricted access to the OpenMeter API.","name":"Portal"},{"description":"Notifications provide automated triggers when specific entitlement balances and usage thresholds are reached, ensuring that your customers and sales teams are always informed. Notify customers and internal teams when specific conditions are met, like reaching 75%, 100%, and 150% of their monthly usage allowance. [Read more](https://openmeter.io/docs/guides/notifications/overview).","name":"Notifications"},{"description":"Meters specify how to aggregate events for billing and analytics purposes. Meters can be configured with multiple aggregation methods and groupings. Multiple meters can be created for the same event type, enabling flexible metering scenarios.","name":"Meters"},{"description":"Lookup information for static data like currencies","name":"Lookup Information"},{"description":"Events are used to track usage of your product or service. Events are processed asynchronously by the meters, so they may not be immediately available for querying.","name":"Events"},{"description":"With Entitlements, you can define and enforce usage limits, implement quota-based pricing, and manage access to features in your application.","name":"Entitlements"},{"description":"Debugging and testing endpoints.","name":"Debug"},{"description":"Manage customer subscription lifecycles and plan assignments. ","name":"Customers"},{"description":"Manage your billing profiles and invoices. ","name":"Billing"},{"description":"Interface third party invoicing and payment systems.","name":"App: Custom Invoicing"},{"description":"Support for Stripe billing.","name":"App: Stripe"},{"description":"Manage integrations for extending OpenMeter's functionality. ","name":"Apps"}]}
