openapi: 3.0.0 info: title: OpenMeter API version: 1.0.0 license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html description: |- OpenMeter is a cloud native usage metering service. The OpenMeter API allows you to ingest events, query meter usage, and manage resources. tags: - name: Subscriptions 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: Subjects description: |- ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. 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: Product Catalog description: 'Configure and manage your product plans, pricing tiers, and subscription offerings. ' - name: Portal 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: Notifications 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: Meters 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: Lookup Information description: Lookup information for static data like currencies - name: Events 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: Entitlements description: With Entitlements, you can define and enforce usage limits, implement quota-based pricing, and manage access to features in your application. - name: Debug description: Debugging and testing endpoints. - name: Customers description: 'Manage customer subscription lifecycles and plan assignments. ' - name: Billing description: 'Manage your billing profiles and invoices. ' - name: 'App: Custom Invoicing' description: Interface third party invoicing and payment systems. - name: 'App: Stripe' description: Support for Stripe billing. - name: Apps description: "Manage integrations for extending OpenMeter's functionality. " paths: /api/v1/addons: get: operationId: listAddons summary: List add-ons description: List all add-ons. parameters: - name: includeDeleted in: query required: false description: |- Include deleted add-ons in response. Usage: `?includeDeleted=true` schema: type: boolean default: false explode: false style: form - name: id in: query required: false description: Filter by addon.id attribute schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form - name: key in: query required: false description: Filter by addon.key attribute schema: type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. style: form - name: keyVersion in: query required: false description: Filter by addon.key and addon.version attributes schema: type: object additionalProperties: type: array items: type: integer style: deepObject - name: status in: query required: false description: |- Only return add-ons with the given status. Usage: - `?status=active`: return only the currently active add-ons - `?status=draft`: return only the draft add-ons - `?status=archived`: return only the archived add-ons schema: type: array items: $ref: '#/components/schemas/AddonStatus' style: form - name: currency in: query required: false description: Filter by addon.currency attribute schema: type: array items: $ref: '#/components/schemas/CurrencyCode' style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/AddonOrderByOrdering.order' - $ref: '#/components/parameters/AddonOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/AddonPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog post: operationId: createAddon summary: Create an add-on description: Create a new add-on. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Addon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddonCreate' /api/v1/addons/{addonId}: put: operationId: updateAddon summary: Update add-on description: Update add-on by id. parameters: - name: addonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Addon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddonReplaceUpdate' get: operationId: getAddon summary: Get add-on description: Get add-on by id or key. The latest published version is returned if latter is used. parameters: - name: addonId in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ x-go-type: string x-go-type: string - name: includeLatest in: query required: false description: |- Include latest version of the add-on instead of the version in active state. Usage: `?includeLatest=true` schema: type: boolean default: false explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Addon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog delete: operationId: deleteAddon summary: Delete add-on description: |- Soft delete add-on by id. Once a add-on is deleted it cannot be undeleted. parameters: - name: addonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/addons/{addonId}/archive: post: operationId: archiveAddon summary: Archive add-on version description: Archive a add-on version. parameters: - name: addonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Addon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/addons/{addonId}/publish: post: operationId: publishAddon summary: Publish add-on description: Publish a add-on version. parameters: - name: addonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Addon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/apps: get: operationId: listApps summary: List apps description: List apps. parameters: - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/AppPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps /api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronized: post: operationId: appCustomInvoicingDraftSynchronized summary: Submit draft synchronization results parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - 'App: Custom Invoicing' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomInvoicingDraftSynchronizedRequest' /api/v1/apps/custom-invoicing/{invoiceId}/issuing/synchronized: post: operationId: appCustomInvoicingIssuingSynchronized summary: Submit issuing synchronization results parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - 'App: Custom Invoicing' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomInvoicingFinalizedRequest' /api/v1/apps/custom-invoicing/{invoiceId}/payment/status: post: operationId: appCustomInvoicingUpdatePaymentStatus summary: Update payment status parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - 'App: Custom Invoicing' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomInvoicingUpdatePaymentStatusRequest' /api/v1/apps/{id}: get: operationId: getApp summary: Get app description: Get the app. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/App' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps put: operationId: updateApp summary: Update app description: Update an app. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/App' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AppReplaceUpdate' delete: operationId: uninstallApp summary: Uninstall app description: Uninstall an app. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps /api/v1/apps/{id}/stripe/api-key: put: operationId: updateStripeAPIKey summary: Update Stripe API key description: |- Update the Stripe API key. ⚠️ __Deprecated__: Use [`PUT /api/v1/apps/{id}`](#tag/apps/put/api/v1/apps/{id}) instead. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - 'App: Stripe' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StripeAPIKeyInput' deprecated: true /api/v1/apps/{id}/stripe/webhook: post: operationId: appStripeWebhook summary: Stripe webhook description: Handle stripe webhooks for apps. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StripeWebhookResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - 'App: Stripe' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StripeWebhookEvent' security: - {} /api/v1/billing/customers: get: operationId: listBillingProfileCustomerOverrides summary: List customer overrides description: |- List customer overrides using the specified filters. The response will include the customer override values and the merged billing profile values. If the includeAllCustomers is set to true, the list contains all customers. This mode is useful for getting the current effective billing workflow settings for all users regardless if they have customer orverrides or not. 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/BillingProfileCustomerOverrideWithDetailsPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/customers/{customerId}: put: operationId: upsertBillingProfileCustomerOverride summary: Create a new or update a customer override description: |- The customer override can be used to pin a given customer to a billing profile different from the default one. This can be used to test the effect of different billing profiles before making them the default ones or have different workflow settings for example for enterprise customers. parameters: - name: customerId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/BillingProfileCustomerOverrideWithDetails' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BillingProfileCustomerOverrideCreate' get: operationId: getBillingProfileCustomerOverride summary: Get a customer override description: |- Get a customer override by customer id. The response will include the customer override values and the merged billing profile values. If the customer override is not found, the default billing profile's values are returned. This behavior allows for getting a merged profile regardless of the customer override existence. parameters: - name: customerId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: expand in: query required: false schema: type: array items: $ref: '#/components/schemas/BillingProfileCustomerOverrideExpand' style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/BillingProfileCustomerOverrideWithDetails' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing delete: operationId: deleteBillingProfileCustomerOverride summary: Delete a customer override description: |- Delete a customer override by customer id. This will remove the customer override and the customer will be subject to the default billing profile's settings again. parameters: - name: customerId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/customers/{customerId}/invoices/pending-lines: post: operationId: createPendingInvoiceLine summary: Create pending line items description: |- Create a new pending line item (charge). This call is used to create a new pending line item for the customer if required a new gathering invoice will be created. A new invoice will be created if: - there is no invoice in gathering state - the currency of the line item doesn't match the currency of any invoices in gathering state parameters: - name: customerId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/InvoicePendingLineCreateResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InvoicePendingLineCreateInput' /api/v1/billing/customers/{customerId}/invoices/simulate: post: operationId: simulateInvoice summary: Simulate an invoice for a customer description: |- Simulate an invoice for a customer. This call will simulate an invoice for a customer based on the pending line items. The call will return the total amount of the invoice and the line items that will be included in the invoice. parameters: - name: customerId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InvoiceSimulationInput' /api/v1/billing/invoices: get: operationId: listInvoices summary: List invoices description: |- List invoices based on the specified filters. The expand option can be used to include additional information (besides the invoice header and totals) in the response. For example by adding the expand=lines option the invoice lines will be included in the response. Gathering invoices will always show the current usage calculated on the fly. 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/InvoicePaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/invoices/invoice: post: operationId: invoicePendingLinesAction summary: Invoice a customer based on the pending line items description: |- Create a new invoice from the pending line items. This should be only called if for some reason we need to invoice a customer outside of the normal billing cycle. When 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. New pending line items will be created for the period between now() and the next billing cycle's begining date for any metered item. The call can return multiple invoices if the pending line items are in different currencies. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: type: array items: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InvoicePendingLinesActionInput' /api/v1/billing/invoices/{invoiceId}: get: operationId: getInvoice summary: Get an invoice description: |- Get an invoice by ID. Gathering invoices will always show the current usage calculated on the fly. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: expand in: query required: false schema: type: array items: $ref: '#/components/schemas/InvoiceExpand' default: - lines style: form - name: includeDeletedLines in: query required: false schema: type: boolean default: false explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing delete: operationId: deleteInvoice summary: Delete an invoice description: |- Delete an invoice Only invoices that are in the draft (or earlier) status can be deleted. Invoices that are post finalization can only be voided. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing put: operationId: updateInvoice summary: Update an invoice description: |- Update an invoice Only invoices in draft or earlier status can be updated. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InvoiceReplaceUpdate' /api/v1/billing/invoices/{invoiceId}/advance: post: operationId: advanceInvoiceAction summary: Advance the invoice's state to the next status description: |- Advance the invoice's state to the next status. The call doesn't "approve the invoice", it only advances the invoice to the next status if the transition would be automatic. The action can be called when the invoice's statusDetails' actions field contain the "advance" action. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/invoices/{invoiceId}/approve: post: operationId: approveInvoiceAction summary: Send the invoice to the customer description: |- Approve an invoice and start executing the payment workflow. This call instantly sends the invoice to the customer using the configured billing profile app. This call is valid in two invoice statuses: - `draft`: the invoice will be sent to the customer, the invluce state becomes issued - `manual_approval_needed`: the invoice will be sent to the customer, the invoice state becomes issued parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/invoices/{invoiceId}/retry: post: operationId: retryInvoiceAction summary: Retry advancing the invoice after a failed attempt. description: |- Retry advancing the invoice after a failed attempt. The action can be called when the invoice's statusDetails' actions field contain the "retry" action. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/invoices/{invoiceId}/snapshot-quantities: post: operationId: snapshotQuantitiesInvoiceAction summary: Snapshot quantities for usage based line items description: |- Snapshot quantities for usage based line items. This call will snapshot the quantities for all usage based line items in the invoice. This call is only valid in `draft.waiting_for_collection` status, where the collection period can be skipped using this action. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/invoices/{invoiceId}/taxes/recalculate: post: operationId: recalculateInvoiceTaxAction summary: Recalculate an invoice's tax amounts description: |- Recalculate an invoice's tax amounts (using the app set in the customer's billing profile) Note: charges might apply, depending on the tax provider. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing /api/v1/billing/invoices/{invoiceId}/void: post: operationId: voidInvoiceAction summary: Void an invoice description: |- Void an invoice Only invoices that have been alread issued can be voided. Voiding an invoice will mark it as voided, the user can specify how to handle the voided line items. parameters: - name: invoiceId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Invoice' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VoidInvoiceActionInput' /api/v1/billing/profiles: get: operationId: listBillingProfiles summary: List billing profiles description: |- List all billing profiles matching the specified filters. The expand option can be used to include additional information (besides the billing profile) in the response. For example by adding the expand=apps option the apps used by the billing profile will be included in the response. parameters: - name: includeArchived in: query required: false schema: type: boolean default: false explode: false style: form - name: expand in: query required: false schema: type: array items: $ref: '#/components/schemas/BillingProfileExpand' style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/BillingProfileOrderByOrdering.order' - $ref: '#/components/parameters/BillingProfileOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/BillingProfilePaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing post: operationId: createBillingProfile summary: Create a new billing profile description: |- Create a new billing profile Billing profiles are representations of a customer's billing information. Customer overrides can be applied to a billing profile to customize the billing behavior for a specific customer. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/BillingProfile' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BillingProfileCreate' /api/v1/billing/profiles/{id}: delete: operationId: deleteBillingProfile summary: Delete a billing profile description: |- Delete a billing profile by id. Only such billing profiles can be deleted that are: - not the default one - not pinned to any customer using customer overrides - only have finalized invoices parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing get: operationId: getBillingProfile summary: Get a billing profile description: |- Get a billing profile by id. The expand option can be used to include additional information (besides the billing profile) in the response. For example by adding the expand=apps option the apps used by the billing profile will be included in the response. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: expand in: query required: false schema: type: array items: $ref: '#/components/schemas/BillingProfileExpand' style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/BillingProfile' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing put: operationId: updateBillingProfile summary: Update a billing profile description: |- Update a billing profile by id. The apps field cannot be updated directly, if an app change is desired a new profile should be created. parameters: - name: id in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/BillingProfile' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Billing requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BillingProfileReplaceUpdateWithWorkflow' /api/v1/customers: post: operationId: createCustomer summary: Create customer description: Create a new customer. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Customer' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerCreate' get: operationId: listCustomers summary: List customers description: List customers. 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/CustomerPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers /api/v1/customers/{customerIdOrKey}: get: operationId: getCustomer summary: Get customer description: Get a customer by ID or key. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - $ref: '#/components/parameters/queryCustomerGet' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Customer' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers put: operationId: updateCustomer summary: Update customer description: Update a customer by ID. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Customer' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerReplaceUpdate' delete: operationId: deleteCustomer summary: Delete customer description: Delete a customer by ID. parameters: - name: customerIdOrKey in: path 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': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers /api/v1/customers/{customerIdOrKey}/access: get: operationId: getCustomerAccess summary: Get customer access description: Get the overall access of a customer. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/CustomerAccess' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers /api/v1/customers/{customerIdOrKey}/apps: get: operationId: listCustomerAppData summary: List customer app data description: List customers app data. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/listCustomerAppDataParams.type' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/CustomerAppDataPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers - Apps put: operationId: upsertCustomerAppData summary: Upsert customer app data description: Upsert customer app data. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/CustomerAppData' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers - Apps requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/CustomerAppDataCreateOrUpdateItem' /api/v1/customers/{customerIdOrKey}/apps/{appId}: delete: operationId: deleteCustomerAppData summary: Delete customer app data description: Delete customer app data. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: appId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers - Apps /api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/value: get: operationId: getCustomerEntitlementValue summary: Get customer entitlement value 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. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: featureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - name: time in: query required: false schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementValue' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers /api/v1/customers/{customerIdOrKey}/stripe: get: operationId: getCustomerStripeAppData summary: Get customer stripe app data description: |- Get stripe app data for a customer. Only returns data if the customer billing profile is linked to a stripe app. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StripeCustomerAppData' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers - Apps put: operationId: upsertCustomerStripeAppData summary: Upsert customer stripe app data description: |- Upsert stripe app data for a customer. Only updates data if the customer billing profile is linked to a stripe app. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StripeCustomerAppData' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers - Apps requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StripeCustomerAppDataBase' /api/v1/customers/{customerIdOrKey}/stripe/portal: post: operationId: createCustomerStripePortalSession summary: Create Stripe customer portal session description: |- Create Stripe customer portal session. Only returns URL if the customer billing profile is linked to a stripe app and customer. Useful to redirect the customer to the Stripe customer portal to manage their payment methods, change their billing address and access their invoice history. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/StripeCustomerPortalSession' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers - Apps requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateStripeCustomerPortalSessionParams' /api/v1/customers/{customerIdOrKey}/subscriptions: get: operationId: listCustomerSubscriptions summary: List customer subscriptions description: Lists all subscriptions for a customer. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: status in: query required: false schema: type: array items: $ref: '#/components/schemas/SubscriptionStatus' style: form - $ref: '#/components/parameters/CustomerSubscriptionOrderByOrdering.order' - $ref: '#/components/parameters/CustomerSubscriptionOrderByOrdering.orderBy' - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SubscriptionPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Customers /api/v1/debug/metrics: get: operationId: getDebugMetrics summary: Get event metrics description: |- Returns debug metrics (in OpenMetrics format) like the number of ingested events since mindnight UTC. The OpenMetrics Counter(s) reset every day at midnight UTC. responses: '200': description: The request has succeeded. content: text/plain: schema: type: string '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Debug /api/v1/entitlements: get: operationId: listEntitlements summary: List all entitlements description: |- List all entitlements for all the subjects and features. This endpoint is intended for administrative purposes only. To fetch the entitlements of a specific subject please use the /api/v1/subjects/{subjectKeyOrID}/entitlements endpoint. If page is provided that takes precedence and the paginated response is returned. ⚠️ __Deprecated__: Use [`GET /api/v2/entitlements`](#tag/entitlements/get/api/v2/entitlements) instead. parameters: - name: feature in: query required: false description: |- Filtering by multiple features. Usage: `?feature=feature-1&feature=feature-2` schema: type: array items: type: string style: form - name: subject in: query required: false description: |- Filtering by multiple subjects. Usage: `?subject=customer-1&subject=customer-2` schema: type: array items: type: string style: form - name: entitlementType in: query required: false description: |- Filtering by multiple entitlement types. Usage: `?entitlementType=metered&entitlementType=boolean` schema: type: array items: $ref: '#/components/schemas/EntitlementType' style: form - name: excludeInactive in: query required: false description: Exclude inactive entitlements in the response (those scheduled for later or earlier) schema: type: boolean default: false explode: false 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/ListEntitlementsResult' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true x-internal: true /api/v1/entitlements/{entitlementId}: get: operationId: getEntitlementById summary: Get entitlement by ID description: |- Get entitlement by ID. ⚠️ __Deprecated__: Use [`GET /api/v2/entitlements/{entitlementId}`](#tag/entitlements/get/api/v2/entitlements/{entitlementId}) instead. parameters: - name: entitlementId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Entitlement' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true /api/v1/events: get: operationId: listEvents summary: List ingested events description: |- List ingested events within a time range. If the from query param is not provided it defaults to last 72 hours. parameters: - name: clientId in: query required: false description: |- Client ID Useful to track progress of a query. schema: type: string minLength: 1 maxLength: 36 explode: false style: form - name: ingestedAtFrom in: query required: false description: |- Start date-time in RFC 3339 format. Inclusive. schema: type: string format: date-time style: form - name: ingestedAtTo in: query required: false description: |- End date-time in RFC 3339 format. Inclusive. schema: type: string format: date-time style: form - name: id in: query required: false description: |- The event ID. Accepts partial ID. schema: type: string explode: false style: form - name: subject in: query required: false description: |- The event subject. Accepts partial subject. schema: type: string explode: false style: form - name: customerId in: query required: false description: The event customer ID. schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form - name: from in: query required: false description: |- Start date-time in RFC 3339 format. Inclusive. schema: type: string format: date-time style: form - name: to in: query required: false description: |- End date-time in RFC 3339 format. Inclusive. schema: type: string format: date-time style: form - name: limit in: query required: false description: Number of events to return. schema: type: integer minimum: 1 maximum: 100 default: 100 explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/IngestedEvent' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Events post: operationId: ingestEvents description: Ingests an event or batch of events following the CloudEvents specification. summary: Ingest events responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Events requestBody: required: true content: application/cloudevents+json: schema: $ref: '#/components/schemas/Event' application/cloudevents-batch+json: schema: type: array items: $ref: '#/components/schemas/Event' application/json: schema: $ref: '#/components/schemas/IngestEventsBody' /api/v1/features: get: operationId: listFeatures summary: List features description: List features. parameters: - name: meterSlug in: query required: false description: Filter by meterSlug schema: type: array items: type: string style: form - name: includeArchived in: query required: false description: Include archived features in response. schema: type: boolean default: false explode: false 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/ListFeaturesResult' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog post: operationId: createFeature summary: Create feature description: |- Features are either metered or static. A feature is metered if meterSlug is provided at creation. For metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields. Meters with SUM, COUNT, UNIQUE_COUNT and LATEST aggregations are supported for features. Features cannot be updated later, only archived. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Feature' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FeatureCreateInputs' /api/v1/features/{featureId}: get: operationId: getFeature summary: Get feature description: Get a feature by ID. parameters: - name: featureId in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Feature' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog delete: operationId: deleteFeature summary: Delete feature description: |- Archive a feature by ID. Once 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. This 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. parameters: - name: featureId in: path required: true schema: type: string responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/features/{featureId}/cost: get: operationId: queryFeatureCost summary: Query feature cost description: |- Query the cost of a feature based on its unit cost configuration and underlying meter usage. For features with manual unit cost, the cost is usage × fixed amount. For features with LLM unit cost, the cost is resolved per row from the LLM cost database. The feature must have a meter and unit cost configured. parameters: - name: featureId in: path required: true schema: 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/FeatureCostQueryResult' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/grants: get: operationId: listGrants summary: List grants description: |- List all grants for all the subjects and entitlements. This endpoint is intended for administrative purposes only. To fetch the grants of a specific entitlement please use the /api/v1/subjects/{subjectKeyOrID}/entitlements/{entitlementOrFeatureID}/grants endpoint. If page is provided that takes precedence and the paginated response is returned. ⚠️ __Deprecated__: Use [`GET /api/v2/grants`](#tag/entitlements/get/api/v2/grants) instead. parameters: - name: feature in: query required: false description: |- Filtering by multiple features. Usage: `?feature=feature-1&feature=feature-2` schema: type: array items: type: string style: form - name: subject in: query required: false description: |- Filtering by multiple subjects. Usage: `?subject=customer-1&subject=customer-2` schema: type: array items: type: string style: form - name: includeDeleted in: query required: false description: Include deleted schema: type: boolean default: false explode: false 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': description: The request has succeeded. content: application/json: schema: anyOf: - type: array items: $ref: '#/components/schemas/EntitlementGrant' - $ref: '#/components/schemas/GrantPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true /api/v1/grants/{grantId}: delete: operationId: voidGrant summary: Void grant 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. For 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. parameters: - name: grantId in: path required: true schema: type: string - name: at in: query required: false description: |- The time at which the grant should be voided. Must not be in the future and must be within the current usage period of the entitlement. Defaults to the current time if not specified. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements /api/v1/info/currencies: get: operationId: listCurrencies summary: List supported currencies description: List all supported currencies. responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/Currency' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Lookup Information /api/v1/info/progress/{id}: get: operationId: getProgress summary: Get progress description: Get progress parameters: - name: id in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Progress' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Lookup Information /api/v1/marketplace/listings: get: operationId: listMarketplaceListings summary: List available apps description: List available apps of the app marketplace. parameters: - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MarketplaceListingPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps /api/v1/marketplace/listings/{type}: get: operationId: getMarketplaceListing summary: Get app details by type description: Get a marketplace listing by type. parameters: - name: type in: path required: true schema: $ref: '#/components/schemas/AppType' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MarketplaceListing' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps /api/v1/marketplace/listings/{type}/install: post: operationId: marketplaceAppInstall summary: Install app description: Install an app from the marketplace. parameters: - $ref: '#/components/parameters/MarketplaceInstallRequest.type' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MarketplaceInstallResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MarketplaceInstallRequestPayload' /api/v1/marketplace/listings/{type}/install/apikey: post: operationId: marketplaceAppAPIKeyInstall summary: Install app via API key description: Install an marketplace app via API Key. parameters: - $ref: '#/components/parameters/MarketplaceApiKeyInstallRequest.type' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MarketplaceInstallResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: |- Name of the application to install. If name is not provided defaults to the marketplace listing's name. createBillingProfile: type: boolean description: |- If true, a billing profile will be created for the app. The Stripe app will be also set as the default billing profile if the current default is a Sandbox app. default: true apiKey: type: string description: |- The API key for the provider. For example, the Stripe API key. required: - apiKey /api/v1/marketplace/listings/{type}/install/oauth2: get: operationId: marketplaceOAuth2InstallGetURL summary: Get OAuth2 install URL description: |- Install an app via OAuth. Returns a URL to start the OAuth 2.0 flow. parameters: - name: type in: path required: true schema: $ref: '#/components/schemas/AppType' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/ClientAppStartResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps /api/v1/marketplace/listings/{type}/install/oauth2/authorize: get: operationId: marketplaceOAuth2InstallAuthorize summary: Install app via OAuth2 description: |- Authorize OAuth2 code. Verifies the OAuth code and exchanges it for a token and refresh token 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': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Apps /api/v1/meters: get: operationId: listMeters summary: List meters description: List meters. 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': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/Meter' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters post: operationId: createMeter summary: Create meter description: Create a meter. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Meter' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MeterCreate' /api/v1/meters/{meterIdOrSlug}: get: operationId: getMeter summary: Get meter description: Get a meter by ID or slug. parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Meter' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters put: operationId: updateMeter summary: Update meter description: Update a meter. parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Meter' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MeterUpdate' delete: operationId: deleteMeter summary: Delete meter description: Delete a meter. parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters /api/v1/meters/{meterIdOrSlug}/group-by/{groupByKey}/values: get: operationId: listMeterGroupByValues summary: List meter group by values description: List meter group by values. parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: groupByKey in: path required: true schema: type: string - name: from in: query required: false description: |- Start date-time in RFC 3339 format. Inclusive. Defaults to 24 hours ago. For example: ?from=2025-01-01T00%3A00%3A00.000Z schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: to in: query required: false description: |- End date-time in RFC 3339 format. Inclusive. For example: ?to=2025-02-01T00%3A00%3A00.000Z schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: type: string '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters /api/v1/meters/{meterIdOrSlug}/query: get: operationId: queryMeter parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - $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' description: Query meter for usage. summary: Query meter responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MeterQueryResult' text/csv: schema: type: string '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters post: operationId: queryMeterPost summary: Query meter parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MeterQueryResult' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MeterQueryRequest' /api/v1/meters/{meterIdOrSlug}/subjects: get: operationId: listMeterSubjects summary: List meter subjects description: List subjects for a meter. parameters: - name: meterIdOrSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: from in: query required: false description: |- Start date-time in RFC 3339 format. Inclusive. Defaults to the beginning of time. For example: ?from=2025-01-01T00%3A00%3A00.000Z schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: to in: query required: false description: |- End date-time in RFC 3339 format. Inclusive. For example: ?to=2025-02-01T00%3A00%3A00.000Z schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: type: string '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Meters /api/v1/notification/channels: get: operationId: listNotificationChannels summary: List notification channels description: List all notification channels. parameters: - name: includeDeleted in: query required: false description: |- Include deleted notification channels in response. Usage: `?includeDeleted=true` schema: type: boolean default: false explode: false style: form - name: includeDisabled in: query required: false description: |- Include disabled notification channels in response. Usage: `?includeDisabled=false` schema: type: boolean default: false explode: false style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/NotificationChannelOrderByOrdering.order' - $ref: '#/components/parameters/NotificationChannelOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationChannelPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications post: operationId: createNotificationChannel summary: Create a notification channel description: Create a new notification channel. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/NotificationChannel' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NotificationChannelCreateRequest' /api/v1/notification/channels/{channelId}: put: operationId: updateNotificationChannel summary: Update a notification channel description: Update notification channel. parameters: - name: channelId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationChannel' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NotificationChannelCreateRequest' get: operationId: getNotificationChannel summary: Get notification channel description: Get a notification channel by id. parameters: - name: channelId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationChannel' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications delete: operationId: deleteNotificationChannel summary: Delete a notification channel description: |- Soft delete notification channel by id. Once a notification channel is deleted it cannot be undeleted. parameters: - name: channelId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications /api/v1/notification/events: get: operationId: listNotificationEvents summary: List notification events description: List all notification events. parameters: - name: from in: query required: false description: |- Start date-time in RFC 3339 format. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: to in: query required: false description: |- End date-time in RFC 3339 format. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: feature in: query required: false description: |- Filtering by multiple feature ids or keys. Usage: `?feature=feature-1&feature=feature-2` schema: type: array items: type: string style: form - name: subject in: query required: false description: |- Filtering by multiple subject ids or keys. Usage: `?subject=subject-1&subject=subject-2` schema: type: array items: type: string style: form - name: rule in: query required: false description: |- Filtering by multiple rule ids. Usage: `?rule=01J8J2XYZ2N5WBYK09EDZFBSZM&rule=01J8J4R4VZH180KRKQ63NB2VA5` schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form - name: channel in: query required: false description: |- Filtering by multiple channel ids. Usage: `?channel=01J8J4RXH778XB056JS088PCYT&channel=01J8J4S1R1G9EVN62RG23A9M6J` schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/NotificationEventOrderByOrdering.order' - $ref: '#/components/parameters/NotificationEventOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationEventPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications /api/v1/notification/events/{eventId}: get: operationId: getNotificationEvent summary: Get notification event description: Get a notification event by id. parameters: - name: eventId in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationEvent' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications /api/v1/notification/events/{eventId}/resend: post: operationId: resendNotificationEvent summary: Re-send notification event parameters: - name: eventId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '202': description: The request has been accepted for processing, but processing has not yet completed. '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NotificationEventResendRequest' /api/v1/notification/rules: get: operationId: listNotificationRules summary: List notification rules description: List all notification rules. parameters: - name: includeDeleted in: query required: false description: |- Include deleted notification rules in response. Usage: `?includeDeleted=true` schema: type: boolean default: false explode: false style: form - name: includeDisabled in: query required: false description: |- Include disabled notification rules in response. Usage: `?includeDisabled=false` schema: type: boolean default: false explode: false style: form - name: feature in: query required: false description: |- Filtering by multiple feature ids/keys. Usage: `?feature=feature-1&feature=feature-2` schema: type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- ULID (Universally Unique Lexicographically Sortable Identifier). A key is a unique string that is used to identify a resource. TODO: this is a temporary solution to support both ULID and Key in the same spec for codegen. style: form - name: channel in: query required: false description: |- Filtering by multiple notifiaction channel ids. Usage: `?channel=01ARZ3NDEKTSV4RRFFQ69G5FAV&channel=01J8J2Y5X4NNGQS32CF81W95E3` schema: type: array items: type: string style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/NotificationRuleOrderByOrdering.order' - $ref: '#/components/parameters/NotificationRuleOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationRulePaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications post: operationId: createNotificationRule summary: Create a notification rule description: Create a new notification rule. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/NotificationRule' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NotificationRuleCreateRequest' /api/v1/notification/rules/{ruleId}: put: operationId: updateNotificationRule summary: Update a notification rule description: Update notification rule. parameters: - name: ruleId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationRule' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NotificationRuleCreateRequest' get: operationId: getNotificationRule summary: Get notification rule description: Get a notification rule by id. parameters: - name: ruleId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/NotificationRule' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications delete: operationId: deleteNotificationRule summary: Delete a notification rule description: |- Soft delete notification rule by id. Once a notification rule is deleted it cannot be undeleted. parameters: - name: ruleId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications /api/v1/notification/rules/{ruleId}/test: post: operationId: testNotificationRule summary: Test notification rule description: Test a notification rule by sending a test event with random data. parameters: - name: ruleId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/NotificationEvent' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Notifications /api/v1/plans: get: operationId: listPlans summary: List plans description: List all plans. parameters: - name: includeDeleted in: query required: false description: |- Include deleted plans in response. Usage: `?includeDeleted=true` schema: type: boolean default: false explode: false style: form - name: id in: query required: false description: Filter by plan.id attribute schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form - name: key in: query required: false description: Filter by plan.key attribute schema: type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. style: form - name: keyVersion in: query required: false description: Filter by plan.key and plan.version attributes schema: type: object additionalProperties: type: array items: type: integer style: deepObject - name: status in: query required: false description: |- Only return plans with the given status. Usage: - `?status=active`: return only the currently active plan - `?status=draft`: return only the draft plan - `?status=archived`: return only the archived plans schema: type: array items: $ref: '#/components/schemas/PlanStatus' style: form - name: currency in: query required: false description: Filter by plan.currency attribute schema: type: array items: $ref: '#/components/schemas/CurrencyCode' style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/PlanOrderByOrdering.order' - $ref: '#/components/parameters/PlanOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/PlanPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog post: operationId: createPlan summary: Create a plan description: Create a new plan. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Plan' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PlanCreate' /api/v1/plans/{planIdOrKey}/next: post: operationId: nextPlan summary: New draft plan description: |- Create a new draft version from plan. It returns error if there is already a plan in draft or planId does not reference the latest published version. parameters: - name: planIdOrKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ x-go-type: string x-go-type: string responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Plan' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog deprecated: true /api/v1/plans/{planId}: put: operationId: updatePlan summary: Update a plan description: Update plan by id. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Plan' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PlanReplaceUpdate' get: operationId: getPlan summary: Get plan description: Get a plan by id or key. The latest published version is returned if latter is used. parameters: - name: planId in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ x-go-type: string x-go-type: string - name: includeLatest in: query required: false description: |- Include latest version of the Plan instead of the version in active state. Usage: `?includeLatest=true` schema: type: boolean default: false explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Plan' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog delete: operationId: deletePlan summary: Delete plan description: |- Soft delete plan by plan.id. Once a plan is deleted it cannot be undeleted. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/plans/{planId}/addons: get: operationId: listPlanAddons summary: List all available add-ons for plan description: List all available add-ons for plan. parameters: - name: planId in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: includeDeleted in: query required: false description: |- Include deleted plan add-on assignments. Usage: `?includeDeleted=true` schema: type: boolean default: false explode: false style: form - name: id in: query required: false description: Filter by addon.id attribute. schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form - name: key in: query required: false description: Filter by addon.key attribute. schema: type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. style: form - name: keyVersion in: query required: false description: Filter by addon.key and addon.version attributes. schema: type: object additionalProperties: type: array items: type: integer style: deepObject - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/PlanAddonOrderByOrdering.order' - $ref: '#/components/parameters/PlanAddonOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/PlanAddonPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog post: operationId: createPlanAddon summary: Create new add-on assignment for plan description: Create new add-on assignment for plan. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/PlanAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PlanAddonCreate' /api/v1/plans/{planId}/addons/{planAddonId}: put: operationId: updatePlanAddon summary: Update add-on assignment for plan description: Update add-on assignment for plan. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: planAddonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/PlanAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PlanAddonReplaceUpdate' get: operationId: getPlanAddon summary: Get add-on assignment for plan description: Get add-on assignment for plan by id. parameters: - name: planId in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: planAddonId in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/PlanAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog delete: operationId: deletePlanAddon summary: Delete add-on assignment for plan description: |- Delete add-on assignment for plan. Once a plan is deleted it cannot be undeleted. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: planAddonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/plans/{planId}/archive: post: operationId: archivePlan summary: Archive plan version description: Archive a plan version. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Plan' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/plans/{planId}/publish: post: operationId: publishPlan summary: Publish plan description: Publish a plan version. parameters: - name: planId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Plan' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Product Catalog /api/v1/portal/meters/{meterSlug}/query: get: operationId: queryPortalMeter parameters: - name: meterSlug in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ - $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' 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. summary: Query meter Query meter responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/MeterQueryResult' text/csv: schema: type: string '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Portal security: - PortalTokenAuth: [] /api/v1/portal/tokens: post: operationId: createPortalToken summary: Create consumer portal token description: Create a consumer portal token. responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/PortalToken' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Portal requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PortalToken' get: operationId: listPortalTokens summary: List consumer portal tokens description: List tokens. parameters: - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 25 explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/PortalToken' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Portal /api/v1/portal/tokens/invalidate: post: operationId: invalidatePortalTokens summary: Invalidate portal tokens description: Invalidates consumer portal tokens by ID or subject. responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Portal requestBody: required: true content: application/json: schema: type: object properties: id: type: string description: Invalidate a portal token by ID. subject: type: string description: Invalidate all portal tokens for a subject. /api/v1/stripe/checkout/sessions: post: operationId: createStripeCheckoutSession summary: Create checkout session description: Create checkout session. responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/CreateStripeCheckoutSessionResult' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - 'App: Stripe' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateStripeCheckoutSessionRequest' /api/v1/subjects: get: operationId: listSubjects summary: List subjects description: |- List subjects. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/Subject' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subjects deprecated: true post: operationId: upsertSubject summary: Upsert subject description: |- Upserts a subject. Creates or updates subject. If the subject doesn't exist, it will be created. If the subject exists, it will be partially updated with the provided fields. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/Subject' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subjects requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/SubjectUpsert' deprecated: true /api/v1/subjects/{subjectIdOrKey}: get: operationId: getSubject summary: Get subject description: |- Get subject by ID or key. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Subject' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subjects deprecated: true delete: operationId: deleteSubject summary: Delete subject description: |- Delete subject by ID or key. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subjects deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements: post: operationId: createEntitlement summary: Create a subject entitlement 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). - Boolean entitlements define static feature access, e.g. "Can use SSO authentication". - Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config). - 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. A 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. Once an entitlement is created you cannot modify it, only delete it. ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Entitlement' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntitlementCreateInputs' deprecated: true get: operationId: listSubjectEntitlements summary: List subject entitlements description: |- List all entitlements for a subject. For checking entitlement access, use the /value endpoint instead. ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: includeDeleted in: query required: false schema: type: boolean default: false explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/Entitlement' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants: get: operationId: listEntitlementGrants summary: List subject entitlement grants description: |- List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey. ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementIdOrFeatureKey in: path required: true schema: type: string - name: includeDeleted in: query required: false schema: type: boolean default: false explode: false style: form - name: orderBy in: query required: false schema: allOf: - $ref: '#/components/schemas/GrantOrderBy' default: updatedAt explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/EntitlementGrant' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true post: operationId: createGrant summary: Create subject entitlement grant 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. A 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. Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority. Grants 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). Rollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried. ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementIdOrFeatureKey in: path required: true schema: type: string responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/EntitlementGrant' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntitlementGrantCreateInput' deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override: put: operationId: overrideEntitlement summary: Override subject entitlement 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. This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime. ⚠️ __Deprecated__: Use [`PUT /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override`](#tag/entitlements/put/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementIdOrFeatureKey in: path required: true schema: type: string responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Entitlement' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntitlementCreateInputs' deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value: get: operationId: getEntitlementValue summary: Get subject entitlement value 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. For convenience reasons, /value works with both entitlementId and featureKey. ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementIdOrFeatureKey in: path required: true schema: type: string - name: time in: query required: false schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementValue' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}: get: operationId: getEntitlement summary: Get subject entitlement description: |- Get entitlement by id. For checking entitlement access, use the /value endpoint instead. ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementId in: path required: true schema: type: string responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Entitlement' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true delete: operationId: deleteEntitlement summary: Delete subject entitlement 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. As 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. ⚠️ __Deprecated__: Use [`DELETE /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/delete/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementId in: path required: true schema: type: string responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history: get: operationId: getEntitlementHistory summary: Get subject entitlement history description: |- Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events. BurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period. WindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window. ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementId in: path required: true schema: type: string - name: from in: query required: false 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.' schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: to in: query required: false description: |- End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now. If not now then gets truncated to the granularity of the underlying meter. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: windowSize in: query required: true description: Windowsize schema: $ref: '#/components/schemas/WindowSize' explode: false style: form - name: windowTimeZone in: query required: false description: The timezone used when calculating the windows. schema: type: string default: UTC explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/WindowedBalanceHistory' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements deprecated: true /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset: post: operationId: resetEntitlementUsage summary: Reset subject entitlement 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. Usage 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. ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset) instead. parameters: - name: subjectIdOrKey in: path required: true schema: type: string - name: entitlementId in: path required: true schema: type: string responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ResetEntitlementUsageInput' deprecated: true /api/v1/subscriptions: post: operationId: createSubscription summary: Create subscription responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionCreate' /api/v1/subscriptions/{subscriptionId}: get: operationId: getSubscription summary: Get subscription parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: at in: query required: false description: The time at which the subscription should be queried. If not provided the current time is used. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SubscriptionExpanded' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions patch: operationId: editSubscription summary: Edit subscription description: |- Batch processing commands for manipulating running subscriptions. The key format is `/phases/{phaseKey}` or `/phases/{phaseKey}/items/{itemKey}`. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionEdit' delete: operationId: deleteSubscription summary: Delete subscription description: Deletes a subscription. Only scheduled subscriptions can be deleted. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions /api/v1/subscriptions/{subscriptionId}/addons: post: operationId: createSubscriptionAddon summary: Create subscription addon description: Create a new subscription addon, either providing the key or the id of the addon. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/SubscriptionAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionAddonCreate' get: operationId: listSubscriptionAddons summary: List subscription addons description: List all addons of a subscription. In the returned list will match to a set unique by addonId. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions /api/v1/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}: get: operationId: getSubscriptionAddon summary: Get subscription addon description: Get a subscription addon by id. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: subscriptionAddonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SubscriptionAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions patch: operationId: updateSubscriptionAddon summary: Update subscription addon description: 'Updates a subscription addon (allows changing the quantity: purchasing more instances or cancelling the current instances)' parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH - name: subscriptionAddonId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SubscriptionAddon' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionAddonUpdate' /api/v1/subscriptions/{subscriptionId}/cancel: post: operationId: cancelSubscription summary: Cancel subscription description: |- Cancels the subscription. Will result in a scheduling conflict if there are other subscriptions scheduled to start after the cancellation time. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: type: object properties: timing: allOf: - $ref: '#/components/schemas/SubscriptionTiming' description: If not provided the subscription is canceled immediately. /api/v1/subscriptions/{subscriptionId}/change: post: operationId: changeSubscription summary: Change subscription description: |- Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SubscriptionChangeResponseBody' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionChange' /api/v1/subscriptions/{subscriptionId}/migrate: post: operationId: migrateSubscription summary: Migrate subscription description: |- Migrates the subscripiton to the provided version of the current plan. If possible, the migration will be done immediately. If not, the migration will be scheduled to the end of the current billing period. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/SubscriptionChangeResponseBody' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions requestBody: required: true content: application/json: schema: type: object properties: timing: allOf: - $ref: '#/components/schemas/SubscriptionTiming' description: |- Timing configuration for the migration, when the migration should take effect. If not supported by the subscription, 400 will be returned. default: immediate targetVersion: type: integer minimum: 1 description: |- The version of the plan to migrate to. If not provided, the subscription will migrate to the latest version of the current plan. startingPhase: type: string minLength: 1 description: |- The key of the phase to start the subscription in. If not provided, the subscription will start in the first phase of the plan. billingAnchor: type: string format: date-time 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' /api/v1/subscriptions/{subscriptionId}/restore: post: operationId: restoreSubscription summary: Restore subscription description: |- Restores a canceled subscription. Any subscription scheduled to start later will be deleted and this subscription will be continued indefinitely. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions deprecated: true /api/v1/subscriptions/{subscriptionId}/unschedule-cancelation: post: operationId: unscheduleCancelation summary: Unschedule cancelation description: Cancels the scheduled cancelation. parameters: - name: subscriptionId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': 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. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionBadRequestErrorResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. content: application/problem+json: schema: $ref: '#/components/schemas/SubscriptionConflictErrorResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Subscriptions /api/v2/customers/{customerIdOrKey}/entitlements: post: operationId: createCustomerEntitlementV2 summary: Create a customer entitlement 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). - Boolean entitlements define static feature access, e.g. "Can use SSO authentication". - Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config). - 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. A 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. Once an entitlement is created you cannot modify it, only delete it. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/EntitlementV2' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntitlementV2CreateInputs' get: operationId: listCustomerEntitlementsV2 summary: List customer entitlements description: List all entitlements for a customer. For checking entitlement access, use the /value endpoint instead. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: includeDeleted in: query required: false schema: type: boolean default: false explode: false style: form - $ref: '#/components/parameters/Pagination.page' - $ref: '#/components/parameters/Pagination.pageSize' - $ref: '#/components/parameters/EntitlementOrderByOrdering.order' - $ref: '#/components/parameters/EntitlementOrderByOrdering.orderBy' responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementV2PaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}: get: operationId: getCustomerEntitlementV2 summary: Get customer entitlement description: |- Get entitlement by feature key. For checking entitlement access, use the /value endpoint instead. If featureKey is used, the entitlement is resolved for the current timestamp. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementV2' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements delete: operationId: deleteCustomerEntitlementV2 summary: Delete customer entitlement 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. As 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. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants: get: operationId: listCustomerEntitlementGrantsV2 summary: List customer entitlement grants description: List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: includeDeleted in: query required: false schema: type: boolean default: false explode: false 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/GrantV2PaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers post: operationId: createCustomerEntitlementGrantV2 summary: Create customer entitlement grant 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. A 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. Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority. Grants 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). Rollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/EntitlementGrantV2' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntitlementGrantCreateInputV2' /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history: get: operationId: getCustomerEntitlementHistoryV2 summary: Get customer entitlement history description: |- Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events. BurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period. WindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: from in: query required: false 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.' schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: to in: query required: false description: |- End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now. If not now then gets truncated to the granularity of the underlying meter. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form - name: windowSize in: query required: true description: Windowsize schema: $ref: '#/components/schemas/WindowSize' explode: false style: form - name: windowTimeZone in: query required: false description: The timezone used when calculating the windows. schema: type: string default: UTC explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/WindowedBalanceHistory' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override: put: operationId: overrideCustomerEntitlementV2 summary: Override customer entitlement 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. This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' responses: '201': description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/EntitlementV2' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '409': description: The request could not be completed due to a conflict with the current state of the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/ConflictProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntitlementV2CreateInputs' /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset: post: operationId: resetCustomerEntitlementUsageV2 summary: Reset customer entitlement 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. Usage 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. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ responses: '204': description: 'There is no content to send for this request, but the headers may be useful. ' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ResetEntitlementUsageInput' /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value: get: operationId: getCustomerEntitlementValueV2 summary: Get customer entitlement value 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. parameters: - name: customerIdOrKey in: path required: true schema: $ref: '#/components/schemas/ULIDOrExternalKey' - name: entitlementIdOrFeatureKey in: path required: true schema: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ - name: time in: query required: false schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementValue' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements - Customers /api/v2/entitlements: get: operationId: listEntitlementsV2 summary: List all entitlements description: |- List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only. To fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint. parameters: - name: feature in: query required: false description: |- Filtering by multiple features. Usage: `?feature=feature-1&feature=feature-2` schema: type: array items: type: string style: form - name: customerKeys in: query required: false description: |- Filtering by multiple customers. Usage: `?customerKeys=customer-1&customerKeys=customer-3` schema: type: array items: type: string style: form - name: customerIds in: query required: false description: |- Filtering by multiple customers. Usage: `?customerIds=01K4WAQ0J99ZZ0MD75HXR112H8&customerIds=01K4WAQ0J99ZZ0MD75HXR112H9` schema: type: array items: type: string style: form - name: entitlementType in: query required: false description: |- Filtering by multiple entitlement types. Usage: `?entitlementType=metered&entitlementType=boolean` schema: type: array items: $ref: '#/components/schemas/EntitlementType' style: form - name: excludeInactive in: query required: false description: Exclude inactive entitlements in the response (those scheduled for later or earlier) schema: type: boolean default: false explode: false 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementV2PaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements /api/v2/entitlements/{entitlementId}: get: operationId: getEntitlementByIdV2 summary: Get entitlement by ID description: Get entitlement by ID. parameters: - name: entitlementId in: path required: true schema: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ example: 01G65Z755AFWAKHE12NY0CQ9FH responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/EntitlementV2' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '404': description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. content: application/problem+json: schema: $ref: '#/components/schemas/NotFoundProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements /api/v2/events: get: operationId: listEventsV2 summary: List ingested events description: List ingested events with advanced filtering and cursor pagination. parameters: - $ref: '#/components/parameters/CursorPagination.cursor' - $ref: '#/components/parameters/CursorPagination.limit' - name: clientId in: query required: false description: |- Client ID Useful to track progress of a query. schema: type: string minLength: 1 maxLength: 36 explode: false style: form - name: filter in: query required: false description: The filter for the events encoded as JSON string. content: application/json: schema: properties: id: $ref: '#/components/schemas/FilterString' source: $ref: '#/components/schemas/FilterString' subject: $ref: '#/components/schemas/FilterString' customerId: $ref: '#/components/schemas/FilterIDExact' type: $ref: '#/components/schemas/FilterString' time: $ref: '#/components/schemas/FilterTime' ingestedAt: $ref: '#/components/schemas/FilterTime' format: application/json responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/IngestedEventCursorPaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Events /api/v2/grants: get: operationId: listGrantsV2 summary: List grants description: |- List all grants for all the customers and entitlements. This endpoint is intended for administrative purposes only. To fetch the grants of a specific entitlement please use the /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants endpoint. If page is provided that takes precedence and the paginated response is returned. parameters: - name: feature in: query required: false description: |- Filtering by multiple features. Usage: `?feature=feature-1&feature=feature-2` schema: type: array items: type: string style: form - name: customer in: query required: false description: |- Filtering by multiple customers (either by ID or key). Usage: `?customer=customer-1&customer=customer-2` schema: type: array items: $ref: '#/components/schemas/ULIDOrExternalKey' style: form - name: includeDeleted in: query required: false description: Include deleted schema: type: boolean default: false explode: false 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': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/GrantV2PaginatedResponse' '400': 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). content: application/problem+json: schema: $ref: '#/components/schemas/BadRequestProblemResponse' '401': description: The request has not been applied because it lacks valid authentication credentials for the target resource. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblemResponse' '403': description: The server understood the request but refuses to authorize it. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenProblemResponse' '412': description: One or more conditions given in the request header fields evaluated to false when tested on the server. content: application/problem+json: schema: $ref: '#/components/schemas/PreconditionFailedProblemResponse' '500': description: The server encountered an unexpected condition that prevented it from fulfilling the request. content: application/problem+json: schema: $ref: '#/components/schemas/InternalServerErrorProblemResponse' '503': 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. content: application/problem+json: schema: $ref: '#/components/schemas/ServiceUnavailableProblemResponse' default: description: An unexpected error response. content: application/problem+json: schema: $ref: '#/components/schemas/UnexpectedProblemResponse' tags: - Entitlements components: parameters: AddonOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form AddonOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/AddonOrderBy' explode: false style: form BillingProfileCustomerOverrideOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form BillingProfileCustomerOverrideOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/BillingProfileCustomerOverrideOrderBy' explode: false style: form BillingProfileListCustomerOverridesParams.billingProfile: name: billingProfile in: query required: false description: Filter by billing profile. schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form BillingProfileListCustomerOverridesParams.customerId: name: customerId in: query required: false description: Filter by customer id. schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form BillingProfileListCustomerOverridesParams.customerKey: name: customerKey in: query required: false description: Filter by customer key schema: type: string explode: false style: form BillingProfileListCustomerOverridesParams.customerName: name: customerName in: query required: false description: Filter by customer name. schema: type: string explode: false style: form BillingProfileListCustomerOverridesParams.customerPrimaryEmail: name: customerPrimaryEmail in: query required: false description: Filter by customer primary email schema: type: string explode: false style: form BillingProfileListCustomerOverridesParams.customersWithoutPinnedProfile: name: customersWithoutPinnedProfile in: query required: false description: Only return customers without pinned billing profiles. This implicitly sets includeAllCustomers to true. schema: type: boolean style: form BillingProfileListCustomerOverridesParams.expand: name: expand in: query required: false description: Expand the response with additional details. schema: type: array items: $ref: '#/components/schemas/BillingProfileCustomerOverrideExpand' style: form BillingProfileListCustomerOverridesParams.includeAllCustomers: name: includeAllCustomers in: query required: false description: |- Include customers without customer overrides. If set to false only the customers specifically associated with a billing profile will be returned. If set to true, in case of the default billing profile, all customers will be returned. schema: type: boolean default: true style: form BillingProfileOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form BillingProfileOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/BillingProfileOrderBy' explode: false style: form CursorPagination.cursor: name: cursor in: query required: false description: The cursor after which to start the pagination. schema: type: string explode: false style: form CursorPagination.limit: name: limit in: query required: false description: The limit of the pagination. schema: type: integer minimum: 1 maximum: 100 default: 100 explode: false style: form CustomerOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form CustomerOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/CustomerOrderBy' explode: false style: form CustomerSubscriptionOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form CustomerSubscriptionOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/CustomerSubscriptionOrderBy' explode: false style: form EntitlementOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form EntitlementOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/EntitlementOrderBy' explode: false style: form FeatureOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form FeatureOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/FeatureOrderBy' explode: false style: form GrantOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form GrantOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/GrantOrderBy' explode: false style: form InvoiceListParams.createdAfter: name: createdAfter in: query required: false description: |- Filter by invoice created time. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form InvoiceListParams.createdBefore: name: createdBefore in: query required: false description: |- Filter by invoice created time. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form InvoiceListParams.customers: name: customers in: query required: false description: Filter by customer ID schema: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH style: form InvoiceListParams.expand: name: expand in: query required: false description: What parts of the list output to expand in listings schema: type: array items: $ref: '#/components/schemas/InvoiceExpand' style: form InvoiceListParams.extendedStatuses: name: extendedStatuses in: query required: false description: Filter by invoice extended statuses schema: type: array items: type: string style: form InvoiceListParams.includeDeleted: name: includeDeleted in: query required: false description: Include deleted invoices schema: type: boolean explode: false style: form InvoiceListParams.issuedAfter: name: issuedAfter in: query required: false description: |- Filter by invoice issued time. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form InvoiceListParams.issuedBefore: name: issuedBefore in: query required: false description: |- Filter by invoice issued time. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form InvoiceListParams.periodStartAfter: name: periodStartAfter in: query required: false description: |- Filter by period start time. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form InvoiceListParams.periodStartBefore: name: periodStartBefore in: query required: false description: |- Filter by period start time. Inclusive. schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form InvoiceListParams.statuses: name: statuses in: query required: false description: Filter by the invoice status. schema: type: array items: $ref: '#/components/schemas/InvoiceStatus' style: form InvoiceOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form InvoiceOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/InvoiceOrderBy' explode: false style: form LimitOffset.limit: name: limit in: query required: false description: |- Number of items to return. Default is 100. schema: type: integer minimum: 1 maximum: 1000 default: 100 explode: false style: form LimitOffset.offset: name: offset in: query required: false description: |- Number of items to skip. Default is 0. schema: type: integer minimum: 0 default: 0 explode: false style: form MarketplaceApiKeyInstallRequest.type: name: type in: path required: true description: The type of the app to install. schema: $ref: '#/components/schemas/AppType' MarketplaceInstallRequest.type: name: type in: path required: true description: The type of the app to install. schema: $ref: '#/components/schemas/AppType' MarketplaceOAuth2InstallAuthorizeRequest.type: name: type in: path required: true description: The type of the app to install. schema: $ref: '#/components/schemas/AppType' MeterOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form MeterOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/MeterOrderBy' explode: false style: form MeterQuery.advancedMeterGroupByFilters: name: advancedMeterGroupByFilters in: query required: false description: |- Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields. content: application/json: schema: additionalProperties: $ref: '#/components/schemas/FilterString' title: Advanced meter group by filters format: application/json MeterQuery.clientId: name: clientId in: query required: false description: |- Client ID Useful to track progress of a query. schema: type: string minLength: 1 maxLength: 36 explode: false style: form MeterQuery.filterCustomerId: name: filterCustomerId in: query required: false description: |- Filtering by multiple customers. For example: ?filterCustomerId=customer-1&filterCustomerId=customer-2 schema: type: array items: type: string maxItems: 100 style: form MeterQuery.filterGroupBy: name: filterGroupBy in: query required: false description: |- Simple filter for group bys with exact match. For example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo ⚠️ __Deprecated__: Use `advancedMeterGroupByFilters` instead schema: type: object additionalProperties: type: string style: deepObject deprecated: true MeterQuery.from: name: from in: query required: false description: |- Start date-time in RFC 3339 format. Inclusive. For example: ?from=2025-01-01T00%3A00%3A00.000Z schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form MeterQuery.groupBy: name: groupBy in: query required: false description: |- If not specified a single aggregate will be returned for each subject and time window. `subject` is a reserved group by value. For example: ?groupBy=subject&groupBy=model schema: type: array items: type: string style: form MeterQuery.subject: name: subject in: query required: false description: |- Filtering by multiple subjects. For example: ?subject=subject-1&subject=subject-2 schema: type: array items: type: string style: form MeterQuery.to: name: to in: query required: false description: |- End date-time in RFC 3339 format. Inclusive. For example: ?to=2025-02-01T00%3A00%3A00.000Z schema: type: string format: date-time example: '2023-01-01T01:01:01.001Z' style: form MeterQuery.windowSize: name: windowSize in: query required: false description: |- If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group. For example: ?windowSize=DAY schema: $ref: '#/components/schemas/WindowSize' explode: false style: form MeterQuery.windowTimeZone: name: windowTimeZone in: query required: false description: |- The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). If not specified, the UTC timezone will be used. For example: ?windowTimeZone=UTC schema: type: string default: UTC explode: false style: form NotificationChannelOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form NotificationChannelOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/NotificationChannelOrderBy' explode: false style: form NotificationEventOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form NotificationEventOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/NotificationEventOrderBy' explode: false style: form NotificationRuleOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form NotificationRuleOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/NotificationRuleOrderBy' explode: false style: form OAuth2AuthorizationCodeGrantErrorParams.error: name: error in: query required: false description: |- Error code. Required with the error response. schema: $ref: '#/components/schemas/OAuth2AuthorizationCodeGrantErrorType' explode: false style: form OAuth2AuthorizationCodeGrantErrorParams.error_description: name: error_description in: query required: false description: |- Optional human-readable text providing additional information, used to assist the client developer in understanding the error that occurred. schema: type: string explode: false style: form OAuth2AuthorizationCodeGrantErrorParams.error_uri: name: error_uri in: query required: false description: |- Optional uri identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error schema: type: string explode: false style: form OAuth2AuthorizationCodeGrantSuccessParams.code: name: code in: query required: false description: |- Authorization code which the client will later exchange for an access token. Required with the success response. schema: type: string explode: false style: form OAuth2AuthorizationCodeGrantSuccessParams.state: name: state in: query required: false description: |- Required if the "state" parameter was present in the client authorization request. The exact value received from the client: Unique, randomly generated, opaque, and non-guessable string that is sent when starting an authentication request and validated when processing the response. schema: type: string explode: false style: form Pagination.page: name: page in: query required: false description: |- Page index. Default is 1. schema: type: integer minimum: 1 default: 1 explode: false style: form Pagination.pageSize: name: pageSize in: query required: false description: |- The maximum number of items per page. Default is 100. schema: type: integer minimum: 1 maximum: 1000 default: 100 explode: false style: form PlanAddonOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form PlanAddonOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/PlanAddonOrderBy' explode: false style: form PlanOrderByOrdering.order: name: order in: query required: false description: The order direction. schema: allOf: - $ref: '#/components/schemas/SortOrder' default: ASC explode: false style: form PlanOrderByOrdering.orderBy: name: orderBy in: query required: false description: The order by field. schema: $ref: '#/components/schemas/PlanOrderBy' explode: false style: form listCustomerAppDataParams.type: name: type in: query required: false description: Filter customer data by app type. schema: $ref: '#/components/schemas/AppType' explode: false style: form queryCustomerGet: name: expand in: query required: false description: What parts of the customer output to expand schema: type: array items: $ref: '#/components/schemas/CustomerExpand' style: form queryCustomerList.expand: name: expand in: query required: false description: What parts of the list output to expand in listings schema: type: array items: $ref: '#/components/schemas/CustomerExpand' style: form queryCustomerList.includeDeleted: name: includeDeleted in: query required: false description: Include deleted customers. schema: type: boolean default: false explode: false style: form queryCustomerList.key: name: key in: query required: false description: |- Filter customers by key. Case-insensitive partial match. schema: type: string explode: false style: form queryCustomerList.name: name: name in: query required: false description: |- Filter customers by name. Case-insensitive partial match. schema: type: string explode: false style: form queryCustomerList.planKey: name: planKey in: query required: false description: Filter customers by the plan key of their susbcription. schema: type: string explode: false style: form queryCustomerList.primaryEmail: name: primaryEmail in: query required: false description: |- Filter customers by primary email. Case-insensitive partial match. schema: type: string explode: false style: form queryCustomerList.subject: name: subject in: query required: false description: |- Filter customers by usage attribution subject. Case-insensitive partial match. schema: type: string explode: false style: form queryMeterList.includeDeleted: name: includeDeleted in: query required: false description: Include deleted meters. schema: type: boolean default: false explode: false style: form schemas: Addon: type: object required: - id - name - createdAt - updatedAt - key - version - instanceType - currency - status - rateCards - validationErrors properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true version: type: integer minimum: 1 description: Version of the add-on. Incremented when the add-on is updated. title: Version default: 1 readOnly: true instanceType: allOf: - $ref: '#/components/schemas/AddonInstanceType' description: The instanceType of the add-ons. Can be "single" or "multiple". title: InstanceType currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the add-on. title: Currency default: USD effectiveFrom: type: string format: date-time 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' title: Effective start date readOnly: true effectiveTo: type: string format: date-time 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' title: Effective end date readOnly: true status: allOf: - $ref: '#/components/schemas/AddonStatus' description: |- The status of the add-on. Computed based on the effective start and end dates: - draft = no effectiveFrom - active = effectiveFrom <= now < effectiveTo - archived = effectiveTo <= now title: Status readOnly: true rateCards: type: array items: $ref: '#/components/schemas/RateCard' description: The rate cards of the add-on. title: Rate cards validationErrors: type: array items: $ref: '#/components/schemas/ValidationError' nullable: true description: List of validation errors. title: Validation errors readOnly: true description: Add-on allows extending subscriptions with compatible plans with additional ratecards. AddonCreate: type: object required: - name - key - instanceType - currency - rateCards properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key instanceType: allOf: - $ref: '#/components/schemas/AddonInstanceType' description: The instanceType of the add-ons. Can be "single" or "multiple". title: InstanceType currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the add-on. title: Currency default: USD rateCards: type: array items: $ref: '#/components/schemas/RateCard' description: The rate cards of the add-on. title: Rate cards description: Resource create operation model. AddonInstanceType: type: string enum: - single - multiple description: |- The instanceType of the add-on. Single instance add-ons can be added to subscription only once while add-ons with multiple type can be added more then once. AddonOrderBy: type: string enum: - id - key - version - created_at - updated_at description: Order by options for add-ons. AddonPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Addon' description: The items in the current page. description: Paginated response AddonReplaceUpdate: type: object required: - name - instanceType - rateCards properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata instanceType: allOf: - $ref: '#/components/schemas/AddonInstanceType' description: The instanceType of the add-ons. Can be "single" or "multiple". title: InstanceType rateCards: type: array items: $ref: '#/components/schemas/RateCard' description: The rate cards of the add-on. title: Rate cards description: Resource update operation model. AddonStatus: type: string enum: - draft - active - archived description: The status of the add-on defined by the effectiveFrom and effectiveTo properties. Address: type: object properties: 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. postalCode: type: string description: Postal code. state: type: string description: State or province. city: type: string description: City. line1: type: string description: First line of the address. line2: type: string description: Second line of the address. phoneNumber: type: string description: Phone number. description: Address Alignment: type: object properties: billablesMustAlign: type: boolean description: |- Whether all Billable items and RateCards must align. Alignment means the Price's BillingCadence must align for both duration and anchor time. deprecated: true description: Alignment configuration for a plan or subscription. deprecated: true Annotations: type: object additionalProperties: {} description: Set of key-value pairs managed by the system. Cannot be modified by user. example: externalId: 019142cc-a016-796a-8113-1a942fecd26d App: type: object oneOf: - $ref: '#/components/schemas/StripeApp' - $ref: '#/components/schemas/SandboxApp' - $ref: '#/components/schemas/CustomInvoicingApp' discriminator: propertyName: type mapping: stripe: '#/components/schemas/StripeApp' sandbox: '#/components/schemas/SandboxApp' custom_invoicing: '#/components/schemas/CustomInvoicingApp' description: |- App. One of: stripe AppBase: type: object required: - id - name - createdAt - updatedAt - listing - status properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true listing: allOf: - $ref: '#/components/schemas/MarketplaceListing' description: The marketplace listing that this installed app is based on. readOnly: true status: allOf: - $ref: '#/components/schemas/AppStatus' description: Status of the app connection. readOnly: true description: |- Abstract base model for installed apps. Represent an app installed to the organization. This is an actual instance, with its own configuration and credentials. AppCapability: type: object required: - type - key - name - description properties: type: allOf: - $ref: '#/components/schemas/AppCapabilityType' description: The capability type. key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: Key name: type: string description: The capability name. description: type: string description: The capability description. description: |- App capability. Capabilities only exist in config so they don't extend the Resource model. example: type: collectPayments key: stripe_collect_payment name: Collect Payments description: Stripe payments collects outstanding revenue with Stripe customer's default payment method. AppCapabilityType: type: string enum: - reportUsage - reportEvents - calculateTax - invoiceCustomers - collectPayments description: App capability type. AppPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/App' description: The items in the current page. description: Paginated response AppReadOrCreateOrUpdateOrDeleteOrQuery: type: object oneOf: - $ref: '#/components/schemas/StripeAppReadOrCreateOrUpdateOrDeleteOrQuery' - $ref: '#/components/schemas/SandboxApp' - $ref: '#/components/schemas/CustomInvoicingApp' discriminator: propertyName: type mapping: stripe: '#/components/schemas/StripeAppReadOrCreateOrUpdateOrDeleteOrQuery' sandbox: '#/components/schemas/SandboxApp' custom_invoicing: '#/components/schemas/CustomInvoicingApp' description: |- App. One of: stripe AppReference: type: object required: - id properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the app. example: 01G65Z755AFWAKHE12NY0CQ9FH description: |- App reference Can be used as a short reference to an app if the full app object is not needed. AppReplaceUpdate: type: object oneOf: - $ref: '#/components/schemas/StripeAppReplaceUpdate' - $ref: '#/components/schemas/SandboxAppReplaceUpdate' - $ref: '#/components/schemas/CustomInvoicingAppReplaceUpdate' discriminator: propertyName: type mapping: stripe: '#/components/schemas/StripeAppReplaceUpdate' sandbox: '#/components/schemas/SandboxAppReplaceUpdate' custom_invoicing: '#/components/schemas/CustomInvoicingAppReplaceUpdate' description: App ReplaceUpdate Model AppStatus: type: string enum: - ready - unauthorized description: App installed status. AppType: type: string enum: - stripe - sandbox - custom_invoicing description: Type of the app. BadRequestProblemResponse: type: object 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). BalanceHistoryWindow: type: object required: - period - usage - balanceAtStart properties: period: $ref: '#/components/schemas/Period' usage: type: number format: double description: The total usage of the feature in the period. example: 100 readOnly: true balanceAtStart: type: number format: double description: The entitlement balance at the start of the period. example: 100 readOnly: true description: The balance history window. BillingCollectionAlignment: type: string enum: - subscription - anchored description: |- BillingCollectionAlignment specifies when the pending line items should be collected into an invoice. title: Collection alignment BillingCustomerProfile: type: object required: - supplier - workflow - apps properties: 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 apps: allOf: - $ref: '#/components/schemas/BillingProfileAppsOrReference' description: |- The applications used by this billing profile. Expand settings govern if this includes the whole app object or just the ID references. readOnly: true description: |- Customer specific merged profile. This profile is calculated from the customer override and the billing profile it references or the default. Thus this does not have any kind of resource fields, only the calculated values. BillingDiscountMetadata: type: object properties: correlationId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect. example: 01G65Z755AFWAKHE12NY0CQ9FH description: Billing specific fields for product catalog discounts. BillingDiscountPercentage: type: object required: - percentage properties: percentage: allOf: - $ref: '#/components/schemas/Percentage' minimum: 0 maximum: 100 description: The percentage of the discount. title: Percentage correlationId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect. example: 01G65Z755AFWAKHE12NY0CQ9FH description: A percentage discount. BillingDiscountReason: type: object oneOf: - $ref: '#/components/schemas/DiscountReasonMaximumSpend' - $ref: '#/components/schemas/DiscountReasonRatecardPercentage' - $ref: '#/components/schemas/DiscountReasonRatecardUsage' discriminator: propertyName: type mapping: maximum_spend: '#/components/schemas/DiscountReasonMaximumSpend' ratecard_percentage: '#/components/schemas/DiscountReasonRatecardPercentage' ratecard_usage: '#/components/schemas/DiscountReasonRatecardUsage' description: The reason for the discount. BillingDiscountUsage: type: object required: - quantity properties: quantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The quantity of the usage discount. Must be positive. title: Usage correlationId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect. example: 01G65Z755AFWAKHE12NY0CQ9FH description: A usage discount. BillingDiscounts: type: object properties: percentage: allOf: - $ref: '#/components/schemas/BillingDiscountPercentage' description: The percentage discount. usage: allOf: - $ref: '#/components/schemas/BillingDiscountUsage' description: The usage discount. description: A discount by type. BillingInvoiceCustomerExtendedDetails: type: object required: - usageAttribution properties: id: type: string description: Unique identifier for the party (if available) readOnly: true key: type: string minLength: 1 maxLength: 256 description: An optional unique key of the party (if available) title: Key name: type: string description: Legal name or representation of the organization. taxId: allOf: - $ref: '#/components/schemas/BillingPartyTaxIdentity' description: |- The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes. addresses: type: array items: $ref: '#/components/schemas/Address' maxItems: 1 description: Regular post addresses for where information should be sent if needed. usageAttribution: allOf: - $ref: '#/components/schemas/CustomerUsageAttribution' description: Mapping to attribute metered usage to the customer title: Usage Attribution description: |- BillingInvoiceCustomerExtendedDetails is a collection of fields that are used to extend the billing party details for invoices. These fields contain the OpenMeter specific details for the customer, that are not strictly required for the invoice itself. BillingParty: type: object properties: id: type: string description: Unique identifier for the party (if available) readOnly: true key: type: string minLength: 1 maxLength: 256 description: An optional unique key of the party (if available) title: Key name: type: string description: Legal name or representation of the organization. taxId: allOf: - $ref: '#/components/schemas/BillingPartyTaxIdentity' description: |- The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes. addresses: type: array items: $ref: '#/components/schemas/Address' maxItems: 1 description: Regular post addresses for where information should be sent if needed. description: Party represents a person or business entity. BillingPartyReplaceUpdate: type: object properties: key: type: string minLength: 1 maxLength: 256 description: An optional unique key of the party (if available) title: Key name: type: string description: Legal name or representation of the organization. taxId: allOf: - $ref: '#/components/schemas/BillingPartyTaxIdentity' description: |- The entity's legal ID code used for tax purposes. They may have other numbers, but we're only interested in those valid for tax purposes. addresses: type: array items: $ref: '#/components/schemas/Address' maxItems: 1 description: Regular post addresses for where information should be sent if needed. description: Resource update operation model. BillingPartyTaxIdentity: type: object properties: code: allOf: - $ref: '#/components/schemas/BillingTaxIdentificationCode' description: Normalized tax code shown on the original identity document. description: Identity stores the details required to identify an entity for tax purposes in a specific country. BillingProfile: type: object required: - id - name - createdAt - updatedAt - supplier - workflow - apps - default properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true 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 readOnly: true apps: allOf: - $ref: '#/components/schemas/BillingProfileAppsOrReference' description: |- The applications used by this billing profile. Expand settings govern if this includes the whole app object or just the ID references. readOnly: true default: type: boolean description: Is this the default profile? description: BillingProfile represents a billing profile BillingProfileAppReferences: type: object required: - tax - invoicing - payment properties: tax: allOf: - $ref: '#/components/schemas/AppReference' description: The tax app used for this workflow readOnly: true 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 description: BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile BillingProfileApps: type: object required: - tax - invoicing - payment properties: tax: allOf: - $ref: '#/components/schemas/App' description: The tax app used for this workflow readOnly: true 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 description: BillingProfileApps represents the applications used by a billing profile BillingProfileAppsCreate: type: object required: - tax - invoicing - payment properties: tax: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The tax app used for this workflow example: 01G65Z755AFWAKHE12NY0CQ9FH x-go-type: string invoicing: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The invoicing app used for this workflow example: 01G65Z755AFWAKHE12NY0CQ9FH x-go-type: string payment: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The payment app used for this workflow example: 01G65Z755AFWAKHE12NY0CQ9FH x-go-type: string description: BillingProfileAppsCreate represents the input for creating a billing profile's apps BillingProfileAppsOrReference: anyOf: - $ref: '#/components/schemas/BillingProfileApps' - $ref: '#/components/schemas/BillingProfileAppReferences' description: |- ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences for a billing profile. BillingProfileCreate: type: object required: - name - supplier - default - workflow - apps properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata supplier: allOf: - $ref: '#/components/schemas/BillingParty' description: The name and contact information for the supplier this billing profile represents default: type: boolean description: Is this the default profile? workflow: allOf: - $ref: '#/components/schemas/BillingWorkflowCreate' description: The billing workflow settings for this profile. apps: allOf: - $ref: '#/components/schemas/BillingProfileAppsCreate' description: The apps used by this billing profile. description: BillingProfileCreate represents the input for creating a billing profile BillingProfileCustomerOverride: type: object required: - createdAt - updatedAt - customerId properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true billingProfileId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The billing profile this override is associated with. If empty the default profile is looked up dynamically. example: 01G65Z755AFWAKHE12NY0CQ9FH customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The customer id this override is associated with. example: 01G65Z755AFWAKHE12NY0CQ9FH description: Customer override values. BillingProfileCustomerOverrideCreate: type: object properties: billingProfileId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The billing profile this override is associated with. If not provided, the default billing profile is chosen if available. example: 01G65Z755AFWAKHE12NY0CQ9FH description: Payload for creating a new or updating an existing customer override. BillingProfileCustomerOverrideExpand: type: string enum: - apps - customer description: CustomerOverrideExpand specifies the parts of the profile to expand. BillingProfileCustomerOverrideOrderBy: type: string enum: - customerId - customerName - customerKey - customerPrimaryEmail - customerCreatedAt description: Order by options for customers. BillingProfileCustomerOverrideWithDetails: type: object required: - baseBillingProfileId properties: customerOverride: allOf: - $ref: '#/components/schemas/BillingProfileCustomerOverride' description: |- The customer override values. If empty the merged values are calculated based on the default profile. baseBillingProfileId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The billing profile the customerProfile is associated with at the time of query. customerOverride contains the explicit mapping set in the customer override object. If that is empty, then the baseBillingProfileId is the default profile. example: 01G65Z755AFWAKHE12NY0CQ9FH customerProfile: allOf: - $ref: '#/components/schemas/BillingCustomerProfile' description: Merged billing profile with the customer specific overrides. customer: allOf: - $ref: '#/components/schemas/Customer' description: The customer this override belongs to. description: Customer specific workflow overrides. BillingProfileCustomerOverrideWithDetailsPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/BillingProfileCustomerOverrideWithDetails' description: The items in the current page. description: Paginated response BillingProfileCustomerWorkflowOverride: type: object required: - taxApp - invoicingApp - paymentApp 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 taxApp: allOf: - $ref: '#/components/schemas/AppReadOrCreateOrUpdateOrDeleteOrQuery' description: The tax app used for this workflow readOnly: true invoicingApp: allOf: - $ref: '#/components/schemas/AppReadOrCreateOrUpdateOrDeleteOrQuery' description: The invoicing app used for this workflow readOnly: true paymentApp: allOf: - $ref: '#/components/schemas/AppReadOrCreateOrUpdateOrDeleteOrQuery' description: The payment app used for this workflow readOnly: true description: Customer specific workflow overrides. BillingProfileExpand: type: string enum: - apps description: BillingProfileExpand details what profile fields to expand BillingProfileOrderBy: type: string enum: - createdAt - updatedAt - default - name description: BillingProfileOrderBy specifies the ordering options for profiles BillingProfilePaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/BillingProfile' description: The items in the current page. description: Paginated response BillingProfileReplaceUpdateWithWorkflow: type: object required: - name - supplier - default - workflow properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata supplier: allOf: - $ref: '#/components/schemas/BillingParty' description: The name and contact information for the supplier this billing profile represents default: type: boolean description: Is this the default profile? workflow: allOf: - $ref: '#/components/schemas/BillingWorkflow' description: The billing workflow settings for this profile. description: |- BillingProfileReplaceUpdate represents the input for updating a billing profile The apps field cannot be updated directly, if an app change is desired a new profile should be created. BillingTaxIdentificationCode: type: string minLength: 1 maxLength: 32 description: TaxIdentificationCode is a normalized tax code shown on the original identity document. BillingWorkflow: type: object 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 description: BillingWorkflow represents the settings for a billing workflow. BillingWorkflowAppReferenceType: type: string enum: - app_id - app_type description: App reference type specifies the type of reference inside an app reference BillingWorkflowCollectionAlignment: type: object oneOf: - $ref: '#/components/schemas/BillingWorkflowCollectionAlignmentSubscription' - $ref: '#/components/schemas/BillingWorkflowCollectionAlignmentAnchored' discriminator: propertyName: type mapping: subscription: '#/components/schemas/BillingWorkflowCollectionAlignmentSubscription' anchored: '#/components/schemas/BillingWorkflowCollectionAlignmentAnchored' description: |- The alignment for collecting the pending line items into an invoice. Defaults to subscription, which means that we are to create a new invoice every time the a subscription period starts (for in advance items) or ends (for in arrears items). BillingWorkflowCollectionAlignmentAnchored: type: object required: - type - recurringPeriod properties: type: type: string enum: - anchored description: The type of alignment. recurringPeriod: allOf: - $ref: '#/components/schemas/RecurringPeriodV2' description: The recurring period for the alignment. description: |- BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice. BillingWorkflowCollectionAlignmentSubscription: type: object required: - type properties: type: type: string enum: - subscription description: The type of alignment. description: |- BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice. BillingWorkflowCollectionSettings: type: object properties: alignment: allOf: - $ref: '#/components/schemas/BillingWorkflowCollectionAlignment' description: The alignment for collecting the pending line items into an invoice. default: type: subscription interval: type: string format: ISO8601 description: |- This grace period can be used to delay the collection of the pending line items specified in alignment. This is useful, in case of multiple subscriptions having slightly different billing periods. example: P1D default: PT1H description: Workflow collection specifies how to collect the pending line items for an invoice BillingWorkflowCreate: type: object 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 description: Resource create operation model. BillingWorkflowInvoicingSettings: type: object properties: autoAdvance: type: boolean description: Whether to automatically issue the invoice after the draftPeriod has passed. default: true draftPeriod: type: string format: ISO8601 description: The period for the invoice to be kept in draft status for manual reviews. example: P1D default: P0D dueAfter: type: string format: ISO8601 description: |- The period after which the invoice is due. With some payment solutions it's only applicable for manual collection method. example: P30D default: P30D progressiveBilling: type: boolean description: Should progressive billing be allowed for this workflow? default: true defaultTaxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Default tax configuration to apply to the invoices. description: BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow title: Workflow invoice settings BillingWorkflowLineResolution: type: string enum: - day - period description: BillingWorkflowLineResolution specifies how the line items should be resolved in the invoice title: Item resolution BillingWorkflowPaymentSettings: type: object properties: collectionMethod: allOf: - $ref: '#/components/schemas/CollectionMethod' description: The payment method for the invoice. default: charge_automatically description: BillingWorkflowPaymentSettings represents the payment settings for a billing workflow title: Workflow payment settings BillingWorkflowTaxSettings: type: object properties: enabled: type: boolean description: |- Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax. default: true enforced: type: boolean description: |- Enforce tax calculation when tax is supported by the app. When enabled, OpenMeter will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription. default: false description: BillingWorkflowTaxSettings represents the tax settings for a billing workflow title: Workflow tax settings CheckoutSessionCustomTextAfterSubmitParams: type: object properties: afterSubmit: type: object properties: message: type: string maxLength: 1200 description: Custom text that should be displayed after the payment confirmation button. shippingAddress: type: object properties: message: type: string maxLength: 1200 description: Custom text that should be displayed alongside shipping address collection. submit: type: object properties: message: type: string maxLength: 1200 description: Custom text that should be displayed alongside the payment confirmation button. termsOfServiceAcceptance: type: object properties: message: type: string maxLength: 1200 description: Custom text that should be displayed in place of the default terms of service agreement text. description: Stripe CheckoutSession.custom_text CheckoutSessionUIMode: type: string enum: - embedded - hosted description: Stripe CheckoutSession.ui_mode ClientAppStartResponse: type: object required: - url properties: url: type: string description: The URL to start the OAuth2 authorization code grant flow. description: Response from the client app (OpenMeter backend) to start the OAuth2 flow. CollectionMethod: type: string enum: - charge_automatically - send_invoice description: CollectionMethod specifies how the invoice should be collected (automatic vs manual) title: Collection method ConflictProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: The request could not be completed due to a conflict with the current state of the target resource. CountryCode: type: string minLength: 2 maxLength: 2 pattern: ^[A-Z]{2}$ description: |- [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience. example: US CreateCheckoutSessionTaxIdCollection: type: object required: - enabled properties: enabled: type: boolean description: Enable tax ID collection during checkout. Defaults to false. required: allOf: - $ref: '#/components/schemas/CreateCheckoutSessionTaxIdCollectionRequired' description: Describes whether a tax ID is required during checkout. Defaults to never. description: Create Stripe checkout session tax ID collection. CreateCheckoutSessionTaxIdCollectionRequired: type: string enum: - if_supported - never description: Create Stripe checkout session tax ID collection required. CreateStripeCheckoutSessionBillingAddressCollection: type: string enum: - auto - required description: Specify whether Checkout should collect the customer’s billing address. CreateStripeCheckoutSessionConsentCollection: type: object properties: paymentMethodReuseAgreement: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement' description: |- Determines the position and visibility of the payment method reuse agreement in the UI. When 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. The Checkout Session will determine whether to display an option to opt into promotional communication 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. There must be a valid terms of service URL set in your Stripe Dashboard settings. https://dashboard.stripe.com/settings/public description: Configure fields for the Checkout Session to gather active consent from customers. CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement: type: object properties: position: $ref: '#/components/schemas/CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition' description: Create Stripe checkout session payment method reuse agreement. CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition: type: string enum: - auto - hidden description: Create Stripe checkout session consent collection agreement position. CreateStripeCheckoutSessionConsentCollectionPromotions: type: string enum: - auto - none description: Create Stripe checkout session consent collection promotions. CreateStripeCheckoutSessionConsentCollectionTermsOfService: type: string enum: - none - required description: Create Stripe checkout session consent collection terms of service. CreateStripeCheckoutSessionCustomerUpdate: type: object properties: address: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior' description: |- Describes whether Checkout saves the billing address onto customer.address. To always collect a full billing address, use billing_address_collection. Defaults to never. name: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior' description: |- Describes whether Checkout saves the name onto customer.name. Defaults to never. shipping: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionCustomerUpdateBehavior' description: |- Describes whether Checkout saves shipping information onto customer.shipping. To collect shipping information, use shipping_address_collection. Defaults to never. description: Controls what fields on Customer can be updated by the Checkout Session. CreateStripeCheckoutSessionCustomerUpdateBehavior: type: string enum: - auto - never description: Create Stripe checkout session customer update behavior. CreateStripeCheckoutSessionRedirectOnCompletion: type: string enum: - always - if_required - never description: Create Stripe checkout session redirect on completion. CreateStripeCheckoutSessionRequest: type: object required: - customer - options properties: appId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: If not provided, the default Stripe app is used if any. example: 01G65Z755AFWAKHE12NY0CQ9FH 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. or provide a customer object to create a new customer. stripeCustomerId: type: string description: |- Stripe customer ID. If not provided OpenMeter creates a new Stripe customer or uses the OpenMeter customer's default Stripe customer ID. options: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionRequestOptions' description: Options passed to Stripe when creating the checkout session. description: Create Stripe checkout session request. example: customer: name: ACME, Inc. currency: USD usageAttribution: subjectKeys: - my-identifier options: currency: USD successURL: http://example.com billingAddressCollection: required taxIdCollection: enabled: true required: if_supported customerUpdate: name: auto address: auto CreateStripeCheckoutSessionRequestOptions: type: object properties: billingAddressCollection: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionBillingAddressCollection' description: Specify whether Checkout should collect the customer’s billing address. Defaults to auto. cancelURL: type: string 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. This parameter is not allowed if ui_mode is embedded. clientReferenceID: type: string 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. customerUpdate: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionCustomerUpdate' description: Controls what fields on Customer can be updated by the Checkout Session. 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. expiresAt: type: integer format: int64 description: |- The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. locale: type: string metadata: type: object additionalProperties: type: string description: |- Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. returnURL: type: string description: |- The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. This parameter is required if ui_mode is embedded and redirect-based payment methods are enabled on the session. successURL: type: string description: |- The URL to which Stripe should send customers when payment or setup is complete. This parameter is not allowed if ui_mode is embedded. If you’d like to use information from the successful Checkout Session on your page, read the guide on customizing your success page: https://docs.stripe.com/payments/checkout/custom-success-page uiMode: allOf: - $ref: '#/components/schemas/CheckoutSessionUIMode' description: The UI mode of the Session. Defaults to hosted. paymentMethodTypes: type: array items: type: string description: A list of the types of payment methods (e.g., card) this Checkout Session can accept. redirectOnCompletion: allOf: - $ref: '#/components/schemas/CreateStripeCheckoutSessionRedirectOnCompletion' description: |- This parameter applies to ui_mode: embedded. Defaults to always. Learn more about the redirect behavior of embedded sessions at https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form taxIdCollection: allOf: - $ref: '#/components/schemas/CreateCheckoutSessionTaxIdCollection' description: Controls tax ID collection during checkout. description: |- Create Stripe checkout session options See https://docs.stripe.com/api/checkout/sessions/create CreateStripeCheckoutSessionResult: type: object required: - customerId - stripeCustomerId - sessionId - setupIntentId - createdAt - mode properties: customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The OpenMeter customer ID. example: 01G65Z755AFWAKHE12NY0CQ9FH stripeCustomerId: type: string description: The Stripe customer ID. sessionId: type: string description: The checkout session ID. setupIntentId: type: string description: The checkout session setup intent ID. clientSecret: type: string description: |- The client secret of the checkout session. This can be used to initialize Stripe.js for your client-side implementation. clientReferenceId: type: string 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. customerEmail: type: string description: Customer's email address provided to Stripe. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: Three-letter ISO currency code, in lowercase. createdAt: type: string format: date-time description: Timestamp at which the checkout session was created. example: '2023-01-01T01:01:01.001Z' expiresAt: type: string format: date-time description: Timestamp at which the checkout session will expire. example: '2023-01-01T01:01:01.001Z' metadata: type: object additionalProperties: type: string description: Set of key-value pairs attached to the checkout session. status: type: string description: The status of the checkout session. url: type: string description: URL to show the checkout session. mode: allOf: - $ref: '#/components/schemas/StripeCheckoutSessionMode' description: |- Mode Always `setup` for now. cancelURL: type: string description: Cancel URL. successURL: type: string description: Success URL. returnURL: type: string description: Return URL. description: Create Stripe Checkout Session response. CreateStripeCustomerPortalSessionParams: type: object properties: configurationId: type: string description: |- The ID of an existing configuration to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. See https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-configuration title: Configuration locale: type: string description: |- The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used. See: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale title: Locale returnUrl: type: string description: |- The URL to redirect the customer to after they have completed their requested actions. See: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url title: ReturnUrl description: Stripe customer portal request params. CreditNoteOriginalInvoiceRef: type: object required: - type - url properties: type: type: string enum: - credit_note_original_invoice description: Type of the invoice. issuedAt: type: string format: date-time description: IssueAt reflects the time the document was issued. example: '2023-01-01T01:01:01.001Z' readOnly: true number: allOf: - $ref: '#/components/schemas/InvoiceNumber' description: (Serial) Number of the referenced document. readOnly: true url: type: string format: uri description: Link to the source document. readOnly: true allOf: - $ref: '#/components/schemas/InvoiceGenericDocumentRef' description: CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on. Currency: type: object required: - code - name - symbol - subunits properties: code: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency ISO code. name: type: string description: The currency name. symbol: type: string description: The currency symbol. subunits: type: integer format: uint32 description: Subunit of the currency. description: Currency describes a currency supported by OpenMeter. CurrencyCode: type: string minLength: 3 maxLength: 3 pattern: ^[A-Z]{3}$ description: |- Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience. example: USD CustomInvoicingApp: type: object required: - id - name - createdAt - updatedAt - listing - status - type - enableDraftSyncHook - enableIssuingSyncHook properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true listing: allOf: - $ref: '#/components/schemas/MarketplaceListing' description: The marketplace listing that this installed app is based on. readOnly: true status: allOf: - $ref: '#/components/schemas/AppStatus' description: Status of the app connection. readOnly: true type: type: string enum: - custom_invoicing description: The app's type is CustomInvoicing. enableDraftSyncHook: type: boolean description: |- Enable draft.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically. enableIssuingSyncHook: type: boolean description: |- Enable issuing.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically. description: |- Custom Invoicing app can be used for interface with any invoicing or payment system. This app provides ways to manipulate invoices and payments, however the integration must rely on Notifications API to get notified about invoice changes. CustomInvoicingAppReplaceUpdate: type: object required: - name - type - enableDraftSyncHook - enableIssuingSyncHook properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata type: type: string enum: - custom_invoicing description: The app's type is CustomInvoicing. enableDraftSyncHook: type: boolean description: |- Enable draft.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically. enableIssuingSyncHook: type: boolean description: |- Enable issuing.sync hook. If the hook is not enabled, the invoice will be progressed to the next state automatically. description: Resource update operation model. CustomInvoicingCustomerAppData: type: object required: - type properties: app: allOf: - $ref: '#/components/schemas/CustomInvoicingApp' description: The installed custom invoicing app this data belongs to. readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The app ID. If not provided, it will use the global default for the app type. example: 01G65Z755AFWAKHE12NY0CQ9FH title: App ID type: type: string enum: - custom_invoicing description: The app name. title: App Type metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Metadata to be used by the custom invoicing provider. description: Custom Invoicing Customer App Data. CustomInvoicingDraftSynchronizedRequest: type: object properties: invoicing: allOf: - $ref: '#/components/schemas/CustomInvoicingSyncResult' description: The result of the synchronization. description: Information to finalize the draft details of an invoice. CustomInvoicingFinalizedInvoicingRequest: type: object properties: invoiceNumber: allOf: - $ref: '#/components/schemas/InvoiceNumber' description: If set the invoice's number will be set to this value. sentToCustomerAt: type: string format: date-time description: If set the invoice's sent to customer at will be set to this value. example: '2023-01-01T01:01:01.001Z' description: Information to finalize the invoicing details of an invoice. CustomInvoicingFinalizedPaymentRequest: type: object properties: externalId: type: string description: If set the invoice's payment external ID will be set to this value. description: Information to finalize the payment details of an invoice. CustomInvoicingFinalizedRequest: type: object 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. description: |- Information to finalize the invoice. If invoicing.invoiceNumber is not set, then a new invoice number will be generated (INV- prefix). CustomInvoicingLineDiscountExternalIdMapping: type: object required: - lineDiscountId - externalId properties: lineDiscountId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The line discount ID. example: 01G65Z755AFWAKHE12NY0CQ9FH externalId: type: string description: The external ID (e.g. custom invoicing system's ID). description: Mapping between line discounts and external IDs. CustomInvoicingLineExternalIdMapping: type: object required: - lineId - externalId properties: lineId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The line ID. example: 01G65Z755AFWAKHE12NY0CQ9FH externalId: type: string description: The external ID (e.g. custom invoicing system's ID). description: Mapping between lines and external IDs. CustomInvoicingPaymentTrigger: type: string enum: - paid - payment_failed - payment_uncollectible - payment_overdue - action_required - void description: Payment trigger to execute on a finalized invoice. CustomInvoicingSyncResult: type: object properties: invoiceNumber: allOf: - $ref: '#/components/schemas/InvoiceNumber' description: If set the invoice's number will be set to this value. externalId: type: string description: If set the invoice's invoicing external ID will be set to this value. lineExternalIds: type: array items: $ref: '#/components/schemas/CustomInvoicingLineExternalIdMapping' description: |- If set the invoice's line external IDs will be set to this value. This can be used to reference the external system's entities in the invoice. lineDiscountExternalIds: type: array items: $ref: '#/components/schemas/CustomInvoicingLineDiscountExternalIdMapping' description: |- If set the invoice's line discount external IDs will be set to this value. This can be used to reference the external system's entities in the invoice. description: |- Information to synchronize the invoice. Can be used to store external app's IDs on the invoice or lines. CustomInvoicingTaxConfig: type: object required: - code properties: code: type: string description: |- Tax code. The tax code should be interpreted by the custom invoicing provider. title: Tax code description: Custom invoicing tax config. CustomInvoicingUpdatePaymentStatusRequest: type: object required: - trigger properties: trigger: allOf: - $ref: '#/components/schemas/CustomInvoicingPaymentTrigger' description: The trigger to be executed on the invoice. description: |- Update payment status request. Can be used to manipulate invoice's payment status (when custominvoicing app is being used). CustomPlanInput: type: object allOf: - type: object required: - name - currency - billingCadence - phases properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata alignment: allOf: - $ref: '#/components/schemas/Alignment' description: Alignment configuration for the plan. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the plan. title: Currency default: USD billingCadence: type: string format: duration description: |- The default billing cadence for subscriptions using this plan. Defines how often customers are billed using ISO8601 duration format. Examples: "P1M" (monthly), "P3M" (quarterly), "P1Y" (annually). title: Billing cadence example: P1M proRatingConfig: allOf: - $ref: '#/components/schemas/ProRatingConfig' description: Default pro-rating configuration for subscriptions using this plan. title: Pro-rating configuration default: enabled: true mode: prorate_prices phases: type: array items: $ref: '#/components/schemas/PlanPhase' minItems: 1 description: |- The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. A 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. title: Plan phases description: The template for omitting properties. description: Plan input for custom subscription creation (without key and version). CustomSubscriptionChange: type: object required: - timing - customPlan properties: timing: allOf: - $ref: '#/components/schemas/SubscriptionTiming' description: |- Timing configuration for the change, when the change should take effect. For changing a subscription, the accepted values depend on the subscription configuration. billingAnchor: type: string format: date-time 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' customPlan: allOf: - $ref: '#/components/schemas/CustomPlanInput' description: The custom plan description which defines the Subscription. description: Change a custom subscription. CustomSubscriptionCreate: type: object required: - customPlan properties: 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. The default is immediate. default: immediate customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the customer. Provide either the key or ID. Has presedence over the key. example: 01G65Z755AFWAKHE12NY0CQ9FH customerKey: type: string minLength: 1 maxLength: 256 description: The key of the customer. Provide either the key or ID. billingAnchor: type: string format: date-time 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' description: Create a custom subscription. title: Create custom Customer: type: object required: - id - name - createdAt - updatedAt properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true key: type: string minLength: 1 maxLength: 256 description: |- An optional unique key of the customer. Either key or usageAttribution.subjectKeys must be provided. Useful to reference the customer in external systems. For example, your database ID. title: Key usageAttribution: allOf: - $ref: '#/components/schemas/CustomerUsageAttribution' description: |- Mapping to attribute metered usage to the customer Either key or usageAttribution.subjectKeys must be provided. title: Usage Attribution primaryEmail: type: string description: The primary email address of the customer. title: Primary Email currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- Currency of the customer. Used for billing, tax and invoicing. title: Currency billingAddress: allOf: - $ref: '#/components/schemas/Address' description: |- The billing address of the customer. Used for tax and invoicing. title: Billing Address currentSubscriptionId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the Subscription if the customer has one. example: 01G65Z755AFWAKHE12NY0CQ9FH title: Current Subscription ID readOnly: true subscriptions: type: array items: $ref: '#/components/schemas/Subscription' description: |- The subscriptions of the customer. Only with the `subscriptions` expand option. title: Subscriptions readOnly: true annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true description: A customer object. example: id: 01G65Z755AFWAKHE12NY0CQ9FH name: ACME Inc. usageAttribution: subjectKeys: - my_subject_key createdAt: '2024-01-01T01:01:01.001Z' updatedAt: '2024-01-01T01:01:01.001Z' CustomerAccess: type: object required: - entitlements properties: entitlements: type: object additionalProperties: $ref: '#/components/schemas/EntitlementValue' description: |- Map of entitlements the customer has access to. The key is the feature key, the value is the entitlement value + the entitlement ID. readOnly: true description: CustomerAccess describes what features the customer has access to. CustomerAppData: type: object oneOf: - $ref: '#/components/schemas/StripeCustomerAppData' - $ref: '#/components/schemas/SandboxCustomerAppData' - $ref: '#/components/schemas/CustomInvoicingCustomerAppData' discriminator: propertyName: type mapping: stripe: '#/components/schemas/StripeCustomerAppData' sandbox: '#/components/schemas/SandboxCustomerAppData' custom_invoicing: '#/components/schemas/CustomInvoicingCustomerAppData' description: |- CustomerAppData Stores the app specific data for the customer. One of: stripe, sandbox, custom_invoicing CustomerAppDataCreateOrUpdateItem: type: object oneOf: - $ref: '#/components/schemas/StripeCustomerAppDataCreateOrUpdateItem' - $ref: '#/components/schemas/SandboxCustomerAppData' - $ref: '#/components/schemas/CustomInvoicingCustomerAppData' discriminator: propertyName: type mapping: stripe: '#/components/schemas/StripeCustomerAppDataCreateOrUpdateItem' sandbox: '#/components/schemas/SandboxCustomerAppData' custom_invoicing: '#/components/schemas/CustomInvoicingCustomerAppData' description: |- CustomerAppData Stores the app specific data for the customer. One of: stripe, sandbox, custom_invoicing CustomerAppDataPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/CustomerAppData' description: The items in the current page. description: Paginated response CustomerCreate: type: object required: - name properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata key: type: string minLength: 1 maxLength: 256 description: |- An optional unique key of the customer. Either key or usageAttribution.subjectKeys must be provided. Useful to reference the customer in external systems. For example, your database ID. title: Key usageAttribution: allOf: - $ref: '#/components/schemas/CustomerUsageAttribution' description: |- Mapping to attribute metered usage to the customer Either key or usageAttribution.subjectKeys must be provided. title: Usage Attribution primaryEmail: type: string description: The primary email address of the customer. title: Primary Email currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- Currency of the customer. Used for billing, tax and invoicing. title: Currency billingAddress: allOf: - $ref: '#/components/schemas/Address' description: |- The billing address of the customer. Used for tax and invoicing. title: Billing Address description: Resource create operation model. CustomerExpand: type: string enum: - subscriptions description: CustomerExpand specifies the parts of the customer to expand in the list output. CustomerId: type: object required: - id properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH description: Create Stripe checkout session with customer ID. CustomerKey: type: object required: - key properties: key: type: string description: Create Stripe checkout session with customer key. CustomerOrderBy: type: string enum: - id - name - createdAt description: Order by options for customers. CustomerPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Customer' description: The items in the current page. description: Paginated response CustomerReplaceUpdate: type: object required: - name properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata key: type: string minLength: 1 maxLength: 256 description: |- An optional unique key of the customer. Either key or usageAttribution.subjectKeys must be provided. Useful to reference the customer in external systems. For example, your database ID. title: Key usageAttribution: allOf: - $ref: '#/components/schemas/CustomerUsageAttribution' description: |- Mapping to attribute metered usage to the customer Either key or usageAttribution.subjectKeys must be provided. title: Usage Attribution primaryEmail: type: string description: The primary email address of the customer. title: Primary Email currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- Currency of the customer. Used for billing, tax and invoicing. title: Currency billingAddress: allOf: - $ref: '#/components/schemas/Address' description: |- The billing address of the customer. Used for tax and invoicing. title: Billing Address description: Resource update operation model. CustomerSubscriptionOrderBy: type: string enum: - activeFrom - activeTo description: Order by options for customer subscriptions. CustomerUsageAttribution: type: object required: - subjectKeys properties: subjectKeys: type: array items: type: string minLength: 1 description: SubjectKey is a key that is used to identify a subject. minItems: 0 description: |- The subjects that are attributed to the customer. Can be empty when no subjects are associated with the customer. title: SubjectKeys description: |- Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer. DiscountPercentage: type: object required: - percentage properties: percentage: allOf: - $ref: '#/components/schemas/Percentage' minimum: 0 maximum: 100 description: The percentage of the discount. title: Percentage description: Percentage discount. DiscountReasonMaximumSpend: type: object required: - type properties: type: type: string enum: - maximum_spend description: The reason for the discount is a maximum spend. DiscountReasonRatecardPercentage: type: object required: - type - percentage properties: type: type: string enum: - ratecard_percentage percentage: allOf: - $ref: '#/components/schemas/Percentage' minimum: 0 maximum: 100 description: The percentage of the discount. title: Percentage correlationId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect. example: 01G65Z755AFWAKHE12NY0CQ9FH description: The reason for the discount is a ratecard percentage. DiscountReasonRatecardUsage: type: object required: - type - quantity properties: type: type: string enum: - ratecard_usage quantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The quantity of the usage discount. Must be positive. title: Usage correlationId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- Correlation ID for the discount. This is used to link discounts across different invoices (progressive billing use case). If not provided, the invoicing engine will auto-generate one. When editing an invoice line, please make sure to keep the same correlation ID of the discount or in progressive billing setups the discount amounts might be incorrect. example: 01G65Z755AFWAKHE12NY0CQ9FH description: The reason for the discount is a ratecard usage. DiscountReasonType: type: string enum: - maximum_spend - ratecard_percentage - ratecard_usage description: The type of the discount reason. DiscountUsage: type: object required: - quantity properties: quantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The quantity of the usage discount. Must be positive. title: Usage description: |- Usage discount. Usage discount means that the first N items are free. From billing perspective this means that any usage on a specific feature is considered 0 until this discount is exhausted. Discounts: type: object properties: percentage: allOf: - $ref: '#/components/schemas/DiscountPercentage' description: The percentage discount. usage: allOf: - $ref: '#/components/schemas/DiscountUsage' description: The usage discount. description: Discount by type on a price DynamicPrice: type: object required: - type properties: type: type: string enum: - dynamic description: The type of the price. multiplier: allOf: - $ref: '#/components/schemas/Numeric' description: |- The multiplier to apply to the base price to get the dynamic price. Examples: - 0.0: the price is zero - 0.5: the price is 50% of the base price - 1.0: the price is the same as the base price - 1.5: the price is 150% of the base price title: The multiplier to apply to the base price to get the dynamic price default: '1' description: |- Dynamic price. The underlying meter's value is considered the base price in the customer's currency. The rate specifies the markup over the price. DynamicPriceWithCommitments: type: object required: - type properties: type: type: string enum: - dynamic description: The type of the price. multiplier: allOf: - $ref: '#/components/schemas/Numeric' description: |- The multiplier to apply to the base price to get the dynamic price. Examples: - 0.0: the price is zero - 0.5: the price is 50% of the base price - 1.0: the price is the same as the base price - 1.5: the price is 150% of the base price title: The multiplier to apply to the base price to get the dynamic price default: '1' minimumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is committed to spend at least the amount. title: Minimum amount maximumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is limited to spend at most the amount. title: Maximum amount description: Dynamic price with spend commitments. EditOp: type: string enum: - add_item - remove_item - unschedule_edit - add_phase - remove_phase - stretch_phase description: Enum listing the different operation types. EditSubscriptionAddItem: type: object required: - op - phaseKey - rateCard properties: op: type: string enum: - add_item phaseKey: type: string rateCard: $ref: '#/components/schemas/RateCard' description: Add a new item to a phase. EditSubscriptionAddPhase: type: object required: - op - phase properties: op: type: string enum: - add_phase phase: $ref: '#/components/schemas/SubscriptionPhaseCreate' description: Add a new phase EditSubscriptionRemoveItem: type: object required: - op - phaseKey - itemKey properties: op: type: string enum: - remove_item phaseKey: type: string itemKey: type: string description: Remove an item from a phase. EditSubscriptionRemovePhase: type: object required: - op - phaseKey - shift properties: op: type: string enum: - remove_phase phaseKey: type: string shift: $ref: '#/components/schemas/RemovePhaseShifting' description: Remove a phase EditSubscriptionStretchPhase: type: object required: - op - phaseKey - extendBy properties: op: type: string enum: - stretch_phase phaseKey: type: string extendBy: type: string format: duration description: Stretch a phase EditSubscriptionUnscheduleEdit: type: object required: - op properties: op: type: string enum: - unschedule_edit description: Unschedules any edits from the current phase. Entitlement: type: object oneOf: - $ref: '#/components/schemas/EntitlementMetered' - $ref: '#/components/schemas/EntitlementStatic' - $ref: '#/components/schemas/EntitlementBoolean' discriminator: propertyName: type mapping: metered: '#/components/schemas/EntitlementMetered' static: '#/components/schemas/EntitlementStatic' boolean: '#/components/schemas/EntitlementBoolean' description: |- Entitlement templates are used to define the entitlements of a plan. Features are omitted from the entitlement template, as they are defined in the rate card. deprecated: true EntitlementBaseTemplate: type: object required: - createdAt - updatedAt - activeFrom - id - type - subjectKey - featureKey - featureId properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true type: allOf: - $ref: '#/components/schemas/EntitlementType' description: The type of the entitlement. title: Type subjectKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The identifier key unique to the subject. NOTE: Subjects are being deprecated, please use the new customer APIs. example: customer-1 featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The defined usage period of the entitlement description: Shared fields of the entitlement templates. EntitlementBoolean: type: object required: - type - createdAt - updatedAt - activeFrom - id - subjectKey - featureKey - featureId properties: type: type: string enum: - boolean createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true subjectKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The identifier key unique to the subject. NOTE: Subjects are being deprecated, please use the new customer APIs. example: customer-1 featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The defined usage period of the entitlement description: Entitlement template of a boolean entitlement. deprecated: true EntitlementBooleanCreateInputs: type: object required: - type properties: featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The usage period associated with the entitlement. type: type: string enum: - boolean description: Create inputs for boolean entitlement deprecated: true EntitlementBooleanV2: type: object required: - type - createdAt - updatedAt - activeFrom - id - featureKey - featureId - customerId properties: type: type: string enum: - boolean createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The defined usage period of the entitlement customerKey: type: string description: The identifier key unique to the customer example: customer-1 customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The identifier unique to the customer example: 01ARZ3NDEKTSV4RRFFQ69G5FAV description: Entitlement template of a boolean entitlement. EntitlementCreateInputs: type: object oneOf: - $ref: '#/components/schemas/EntitlementMeteredCreateInputs' - $ref: '#/components/schemas/EntitlementStaticCreateInputs' - $ref: '#/components/schemas/EntitlementBooleanCreateInputs' discriminator: propertyName: type mapping: metered: '#/components/schemas/EntitlementMeteredCreateInputs' static: '#/components/schemas/EntitlementStaticCreateInputs' boolean: '#/components/schemas/EntitlementBooleanCreateInputs' description: Create inputs for entitlement EntitlementCreateSharedFields: type: object properties: featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The usage period associated with the entitlement. description: Shared fields for entitlement creation EntitlementCustomerFields: type: object required: - customerId properties: customerKey: type: string description: The identifier key unique to the customer example: customer-1 customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The identifier unique to the customer example: 01ARZ3NDEKTSV4RRFFQ69G5FAV description: Customer fields for entitlements EntitlementGrant: type: object required: - createdAt - updatedAt - amount - effectiveAt - expiration - id - entitlementId properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true amount: type: number format: double minimum: 0 description: The amount to grant. Should be a positive number. example: 100 priority: type: integer format: uint8 minimum: 1 maximum: 255 description: |- The priority of the grant. Grants with higher priority are applied first. Priority is a positive decimal numbers. With lower numbers indicating higher importance. For example, a priority of 1 is more urgent than a priority of 2. When there are several grants available for the same subject, the system selects the grant with the highest priority. In cases where grants share the same priority level, the grant closest to its expiration will be used first. In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. example: 1 effectiveAt: type: string format: date-time 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' expiration: allOf: - $ref: '#/components/schemas/ExpirationPeriod' description: The grant expiration definition maxRolloverAmount: type: number format: double description: |- Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 default: 0 minRolloverAmount: type: number format: double description: |- Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 default: 0 metadata: allOf: - $ref: '#/components/schemas/Metadata' description: The grant metadata. example: stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true entitlementId: type: string description: The unique entitlement ULID that the grant is associated with. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true nextRecurrence: type: string format: date-time description: The next time the grant will recurr. example: '2023-01-01T01:01:01.001Z' expiresAt: type: string format: date-time description: The time the grant expires. example: '2023-01-01T01:01:01.001Z' readOnly: true voidedAt: type: string format: date-time description: The time the grant was voided. example: '2023-01-01T01:01:01.001Z' recurrence: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The recurrence period of the grant. annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Grant annotations example: issueAfterReset: true description: The grant. deprecated: true EntitlementGrantCreateInput: type: object required: - amount - effectiveAt - expiration properties: amount: type: number format: double minimum: 0 description: The amount to grant. Should be a positive number. example: 100 priority: type: integer format: uint8 minimum: 1 maximum: 255 description: |- The priority of the grant. Grants with higher priority are applied first. Priority is a positive decimal numbers. With lower numbers indicating higher importance. For example, a priority of 1 is more urgent than a priority of 2. When there are several grants available for the same subject, the system selects the grant with the highest priority. In cases where grants share the same priority level, the grant closest to its expiration will be used first. In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. example: 1 effectiveAt: type: string format: date-time 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' expiration: allOf: - $ref: '#/components/schemas/ExpirationPeriod' description: The grant expiration definition maxRolloverAmount: type: number format: double description: |- Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 default: 0 minRolloverAmount: type: number format: double description: |- Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 default: 0 metadata: allOf: - $ref: '#/components/schemas/Metadata' description: The grant metadata. example: stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB recurrence: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The subject of the grant. description: The grant creation input. deprecated: true EntitlementGrantCreateInputV2: type: object required: - amount - effectiveAt properties: amount: type: number format: double minimum: 0 description: The amount to grant. Should be a positive number. example: 100 priority: type: integer format: uint8 minimum: 1 maximum: 255 description: |- The priority of the grant. Grants with higher priority are applied first. Priority is a positive decimal numbers. With lower numbers indicating higher importance. For example, a priority of 1 is more urgent than a priority of 2. When there are several grants available for the same subject, the system selects the grant with the highest priority. In cases where grants share the same priority level, the grant closest to its expiration will be used first. In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. example: 1 effectiveAt: type: string format: date-time 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' minRolloverAmount: type: number format: double description: |- Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 default: 0 metadata: allOf: - $ref: '#/components/schemas/Metadata' description: The grant metadata. example: stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB recurrence: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The subject of the grant. maxRolloverAmount: type: number format: double 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. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 expiration: allOf: - $ref: '#/components/schemas/ExpirationPeriod' description: The grant expiration definition. If no expiration is provided, the grant can be active indefinitely. annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Grant annotations example: internal_reference: internal_reference description: The grant creation input. EntitlementGrantV2: type: object required: - createdAt - updatedAt - amount - effectiveAt - id - entitlementId properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true amount: type: number format: double minimum: 0 description: The amount to grant. Should be a positive number. example: 100 priority: type: integer format: uint8 minimum: 1 maximum: 255 description: |- The priority of the grant. Grants with higher priority are applied first. Priority is a positive decimal numbers. With lower numbers indicating higher importance. For example, a priority of 1 is more urgent than a priority of 2. When there are several grants available for the same subject, the system selects the grant with the highest priority. In cases where grants share the same priority level, the grant closest to its expiration will be used first. In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first. example: 1 effectiveAt: type: string format: date-time 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' minRolloverAmount: type: number format: double description: |- Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 default: 0 metadata: allOf: - $ref: '#/components/schemas/Metadata' description: The grant metadata. example: stripePaymentId: pi_4OrAkhLvyihio9p51h9iiFnB maxRolloverAmount: type: number format: double 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. Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount)) example: 100 expiration: allOf: - $ref: '#/components/schemas/ExpirationPeriod' description: The grant expiration definition. If no expiration is provided, the grant can be active indefinitely. annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Grant annotations example: internal_reference: internal_reference id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true entitlementId: type: string description: The unique entitlement ULID that the grant is associated with. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true nextRecurrence: type: string format: date-time description: The next time the grant will recurr. example: '2023-01-01T01:01:01.001Z' expiresAt: type: string format: date-time description: The time the grant expires. example: '2023-01-01T01:01:01.001Z' readOnly: true voidedAt: type: string format: date-time description: The time the grant was voided. example: '2023-01-01T01:01:01.001Z' recurrence: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The recurrence period of the grant. description: The grant. EntitlementMetered: type: object required: - type - createdAt - updatedAt - activeFrom - id - subjectKey - featureKey - featureId - lastReset - currentUsagePeriod - measureUsageFrom - usagePeriod properties: type: type: string enum: - metered isSoftLimit: type: boolean description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. title: Soft limit default: false isUnlimited: type: boolean description: Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future. deprecated: true default: false issueAfterReset: type: number format: double minimum: 0 description: |- You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. That 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. Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. title: Initial grant amount issueAfterResetPriority: type: integer format: uint8 minimum: 1 maximum: 255 description: Defines the grant priority for the default grant. title: Issue grant after reset priority default: 1 preserveOverageAtReset: type: boolean description: If true, the overage is preserved at reset. If false, the usage is reset to 0. title: Preserve overage at reset default: false createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true subjectKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The identifier key unique to the subject. NOTE: Subjects are being deprecated, please use the new customer APIs. example: customer-1 featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV lastReset: type: string format: date-time description: The time the last reset happened. example: '2023-01-01T01:01:01.001Z' readOnly: true currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. readOnly: true measureUsageFrom: type: string format: date-time 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' readOnly: true usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: THe usage period of the entitlement. readOnly: true description: |- Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems. Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage). deprecated: true EntitlementMeteredCalculatedFields: type: object required: - lastReset - currentUsagePeriod - measureUsageFrom - usagePeriod properties: lastReset: type: string format: date-time description: The time the last reset happened. example: '2023-01-01T01:01:01.001Z' readOnly: true currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. readOnly: true measureUsageFrom: type: string format: date-time 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' readOnly: true usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: THe usage period of the entitlement. readOnly: true description: Calculated fields for metered entitlements. EntitlementMeteredCreateInputs: type: object required: - type - usagePeriod properties: featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. type: type: string enum: - metered isSoftLimit: type: boolean description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. title: Soft limit default: false isUnlimited: type: boolean description: Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future. deprecated: true default: false usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The usage period associated with the entitlement. 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. issueAfterReset: type: number format: double minimum: 0 description: |- You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. That 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. Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. title: Initial grant amount issueAfterResetPriority: type: integer format: uint8 minimum: 1 maximum: 255 description: Defines the grant priority for the default grant. title: Issue grant after reset priority default: 1 preserveOverageAtReset: type: boolean description: If true, the overage is preserved at reset. If false, the usage is reset to 0. title: Preserve overage at reset default: false description: Create inpurs for metered entitlement deprecated: true EntitlementMeteredV2: type: object required: - type - createdAt - updatedAt - activeFrom - id - featureKey - featureId - lastReset - currentUsagePeriod - measureUsageFrom - usagePeriod - customerId properties: type: type: string enum: - metered isSoftLimit: type: boolean description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. title: Soft limit default: false preserveOverageAtReset: type: boolean description: If true, the overage is preserved at reset. If false, the usage is reset to 0. title: Preserve overage at reset default: false issueAfterReset: type: number format: double minimum: 0 description: |- You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. That 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. Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. title: Initial grant amount deprecated: true issueAfterResetPriority: type: integer format: uint8 minimum: 1 maximum: 255 description: Defines the grant priority for the default grant. title: Issue grant after reset priority deprecated: true default: 1 issue: allOf: - $ref: '#/components/schemas/IssueAfterReset' description: Issue after reset title: Issue after reset createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV lastReset: type: string format: date-time description: The time the last reset happened. example: '2023-01-01T01:01:01.001Z' readOnly: true currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. readOnly: true measureUsageFrom: type: string format: date-time 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' readOnly: true usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: THe usage period of the entitlement. readOnly: true customerKey: type: string description: The identifier key unique to the customer example: customer-1 customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The identifier unique to the customer example: 01ARZ3NDEKTSV4RRFFQ69G5FAV description: |- Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems. Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage). EntitlementMeteredV2CreateInputs: type: object required: - type - usagePeriod properties: featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. type: type: string enum: - metered isSoftLimit: type: boolean description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. title: Soft limit default: false usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The usage period associated with the entitlement. 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. preserveOverageAtReset: type: boolean description: If true, the overage is preserved at reset. If false, the usage is reset to 0. title: Preserve overage at reset default: false issueAfterReset: type: number format: double minimum: 0 description: |- You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. That 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. Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. title: Initial grant amount deprecated: true issueAfterResetPriority: type: integer format: uint8 minimum: 1 maximum: 255 description: Defines the grant priority for the default grant. title: Issue grant after reset priority deprecated: true default: 1 issue: allOf: - $ref: '#/components/schemas/IssueAfterReset' description: Issue after reset title: Issue after reset grants: type: array items: $ref: '#/components/schemas/EntitlementGrantCreateInputV2' description: Grants title: Grants description: Create inputs for metered entitlement EntitlementOrderBy: type: string enum: - createdAt - updatedAt description: Order by options for entitlements. EntitlementPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Entitlement' description: The items in the current page. description: Paginated response EntitlementStatic: type: object required: - type - config - createdAt - updatedAt - activeFrom - id - subjectKey - featureKey - featureId properties: type: type: string enum: - static config: type: string format: json 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"] }' createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true subjectKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The identifier key unique to the subject. NOTE: Subjects are being deprecated, please use the new customer APIs. example: customer-1 featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The defined usage period of the entitlement description: A static entitlement. deprecated: true EntitlementStaticCreateInputs: type: object required: - type - config properties: featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The feature the subject is entitled to use. Either featureKey or featureId is required. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriodCreateInput' description: The usage period associated with the entitlement. type: type: string enum: - static config: type: string format: json 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"] }' description: Create inputs for static entitlement deprecated: true EntitlementStaticV2: type: object required: - type - config - createdAt - updatedAt - activeFrom - id - featureKey - featureId - customerId properties: type: type: string enum: - static config: type: string format: json 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"] }' createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: The annotations of the entitlement. example: subscription.id: sub_123 readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the subject is entitled to use. example: example-feature-key featureId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The feature the subject is entitled to use. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV currentUsagePeriod: allOf: - $ref: '#/components/schemas/Period' description: The current usage period. usagePeriod: allOf: - $ref: '#/components/schemas/RecurringPeriod' description: The defined usage period of the entitlement customerKey: type: string description: The identifier key unique to the customer example: customer-1 customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The identifier unique to the customer example: 01ARZ3NDEKTSV4RRFFQ69G5FAV description: A static entitlement. EntitlementType: type: string enum: - metered - boolean - static description: Type of the entitlement. deprecated: true x-go-type: string EntitlementV2: type: object oneOf: - $ref: '#/components/schemas/EntitlementMeteredV2' - $ref: '#/components/schemas/EntitlementStaticV2' - $ref: '#/components/schemas/EntitlementBooleanV2' discriminator: propertyName: type mapping: metered: '#/components/schemas/EntitlementMeteredV2' static: '#/components/schemas/EntitlementStaticV2' boolean: '#/components/schemas/EntitlementBooleanV2' description: |- Entitlement templates are used to define the entitlements of a plan. Features are omitted from the entitlement template, as they are defined in the rate card. EntitlementV2CreateInputs: type: object oneOf: - $ref: '#/components/schemas/EntitlementMeteredV2CreateInputs' - $ref: '#/components/schemas/EntitlementStaticCreateInputs' - $ref: '#/components/schemas/EntitlementBooleanCreateInputs' discriminator: propertyName: type mapping: metered: '#/components/schemas/EntitlementMeteredV2CreateInputs' static: '#/components/schemas/EntitlementStaticCreateInputs' boolean: '#/components/schemas/EntitlementBooleanCreateInputs' description: Create inputs for entitlement EntitlementV2PaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/EntitlementV2' description: The items in the current page. description: Paginated response EntitlementValue: type: object required: - hasAccess properties: hasAccess: type: boolean description: Whether the subject has access to the feature. Shared accross all entitlement types. example: true readOnly: true balance: type: number format: double 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 readOnly: true usage: type: number format: double description: Only available for metered entitlements. Returns the total feature usage in the current period. example: 50 readOnly: true overage: type: number format: double 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 readOnly: true totalAvailableGrantAmount: type: number format: double 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 readOnly: true config: type: string description: Only available for static entitlements. The JSON parsable config of the entitlement. example: '{ key: "value" }' readOnly: true description: Entitlements are the core of OpenMeter access management. They define access to features for subjects. Entitlements can be metered, boolean, or static. ErrorExtension: type: object required: - field - code - message properties: field: type: string description: The path to the field. example: addons/pro/ratecards/token/featureKey readOnly: true code: type: string description: The machine readable description of the error. example: invalid_feature_key readOnly: true message: type: string description: The human readable description of the error. example: not found feature by key readOnly: true additionalProperties: {} description: Generic ErrorExtension as part of HTTPProblem.Extensions.[StatusCode] Event: type: object required: - id - source - specversion - type - subject properties: id: type: string minLength: 1 description: Identifies the event. example: 5c10fade-1c9e-4d6c-8275-c52c36731d3c source: type: string minLength: 1 format: uri-reference description: Identifies the context in which an event happened. example: service-name specversion: type: string minLength: 1 description: The version of the CloudEvents specification which the event uses. example: '1.0' default: '1.0' type: type: string minLength: 1 description: Contains a value describing the type of event related to the originating occurrence. example: com.example.someevent datacontenttype: type: string enum: - application/json nullable: true description: Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP. example: application/json dataschema: type: string format: uri nullable: true minLength: 1 description: Identifies the schema that data adheres to. subject: type: string minLength: 1 description: Describes the subject of the event in the context of the event producer (identified by source). example: customer-id time: type: string format: date-time description: Timestamp of when the occurrence happened. Must adhere to RFC 3339. example: '2023-01-01T01:01:01.001Z' nullable: true data: type: object additionalProperties: {} nullable: true description: |- The event payload. Optional, if present it must be a JSON object. description: |- CloudEvents Specification JSON Schema Optional properties are nullable according to the CloudEvents specification: OPTIONAL not omitted attributes MAY be represented as a null JSON value. example: id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c source: service-name specversion: '1.0' type: prompt subject: customer-id time: '2023-01-01T01:01:01.001Z' x-go-type-import: path: github.com/cloudevents/sdk-go/v2/event x-go-type: event.Event EventDeliveryAttemptResponse: type: object required: - body - durationMs properties: statusCode: type: integer description: Status code of the response if available. title: Status Code readOnly: true body: type: string description: The body of the response. title: Response Body readOnly: true durationMs: type: integer description: The duration of the response in milliseconds. title: Response Duration readOnly: true url: type: string description: URL where the event was sent in case of notification channel with webhook type. title: URL readOnly: true description: The response of the event delivery attempt. ExpirationDuration: type: string enum: - HOUR - DAY - WEEK - MONTH - YEAR description: The expiration duration enum ExpirationPeriod: type: object required: - duration - count properties: duration: allOf: - $ref: '#/components/schemas/ExpirationDuration' description: The unit of time for the expiration period. count: type: integer format: uint32 minimum: 1 maximum: 1000 description: The number of time units in the expiration period. example: 12 description: The grant expiration definition Feature: type: object required: - createdAt - updatedAt - key - name - id properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true archivedAt: type: string format: date-time description: Timestamp of when the resource was archived. example: '2023-01-01T01:01:01.001Z' title: Archival Time readOnly: true key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. title: The unique key of the feature name: type: string title: The human-readable name of the feature metadata: allOf: - $ref: '#/components/schemas/Metadata' title: Optional metadata example: key: value meterSlug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. title: Meter slug example: tokens_total meterGroupByFilters: type: object additionalProperties: type: string description: |- Optional meter group by filters. Useful if the meter scope is broader than what feature tracks. Example scenario would be a meter tracking all token use with groupBy fields for the model, then the feature could filter for model=gpt-4. ⚠️ __Deprecated__: Use advancedMeterGroupByFilters instead title: Meter group by filters deprecated: true example: model: gpt-4 type: input advancedMeterGroupByFilters: type: object additionalProperties: $ref: '#/components/schemas/FilterString' description: |- Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields. title: Advanced meter group by filters example: model: $in: - gpt-4 - gpt-4o type: $eq: input unitCost: allOf: - $ref: '#/components/schemas/FeatureUnitCost' description: |- Optional per-unit cost configuration. Use "manual" for a fixed per-unit cost, or "llm" to look up cost from the LLM cost database based on meter group-by properties. title: Unit cost id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Readonly unique ULID identifier. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV readOnly: true description: |- Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements. FeatureCostQueryResult: type: object required: - currency - data properties: from: type: string format: date-time description: Start of the queried period. example: '2023-01-01T01:01:01.001Z' to: type: string format: date-time description: End of the queried period. example: '2023-01-01T01:01:01.001Z' windowSize: allOf: - $ref: '#/components/schemas/WindowSize' description: The window size that the cost is aggregated. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the cost amounts. data: type: array items: $ref: '#/components/schemas/FeatureCostQueryRow' description: The cost data rows. description: Result of a feature cost query. FeatureCostQueryRow: type: object required: - usage - cost - currency - windowStart - windowEnd properties: usage: allOf: - $ref: '#/components/schemas/Numeric' description: The metered usage value for the period. cost: type: string allOf: - $ref: '#/components/schemas/Numeric' nullable: true description: The computed cost amount (usage × unit cost). Null when pricing is not available for the group-by combination. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the cost amount. detail: type: string description: Detail message when cost amount is null, explaining why the cost could not be resolved. windowStart: type: string format: date-time description: The start of the window the value is aggregated over. example: '2023-01-01T01:01:01.001Z' windowEnd: type: string format: date-time description: The end of the window the value is aggregated over. example: '2023-01-01T01:01:01.001Z' subject: type: string description: The subject the value is aggregated over. customerId: type: string description: The customer ID the value is aggregated over. groupBy: type: object additionalProperties: type: string nullable: true description: The group by values the value is aggregated over. description: A row in the result of a feature cost query. FeatureCreateInputs: type: object required: - key - name properties: key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. title: The unique key of the feature name: type: string title: The human-readable name of the feature metadata: allOf: - $ref: '#/components/schemas/Metadata' title: Optional metadata example: key: value meterSlug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A key is a unique string that is used to identify a resource. title: Meter slug example: tokens_total meterGroupByFilters: type: object additionalProperties: type: string description: |- Optional meter group by filters. Useful if the meter scope is broader than what feature tracks. Example scenario would be a meter tracking all token use with groupBy fields for the model, then the feature could filter for model=gpt-4. ⚠️ __Deprecated__: Use advancedMeterGroupByFilters instead title: Meter group by filters deprecated: true example: model: gpt-4 type: input advancedMeterGroupByFilters: type: object additionalProperties: $ref: '#/components/schemas/FilterString' description: |- Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields. title: Advanced meter group by filters example: model: $in: - gpt-4 - gpt-4o type: $eq: input unitCost: allOf: - $ref: '#/components/schemas/FeatureUnitCost' description: |- Optional per-unit cost configuration. Use "manual" for a fixed per-unit cost, or "llm" to look up cost from the LLM cost database based on meter group-by properties. title: Unit cost description: |- Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements. FeatureLLMUnitCost: type: object required: - type properties: type: type: string enum: - llm providerProperty: type: string description: |- Meter group-by property that holds the LLM provider. Use this when the meter has a group-by dimension for provider. Mutually exclusive with `provider`. title: Provider property provider: type: string description: |- Static LLM provider value (e.g., "openai", "anthropic"). Use this when the feature tracks a single provider. Mutually exclusive with `providerProperty`. title: Provider modelProperty: type: string description: |- Meter group-by property that holds the model ID. Use this when the meter has a group-by dimension for model. Mutually exclusive with `model`. title: Model property model: type: string description: |- Static model ID value (e.g., "gpt-4", "claude-3-5-sonnet"). Use this when the feature tracks a single model. Mutually exclusive with `modelProperty`. title: Model tokenTypeProperty: type: string description: |- Meter group-by property that holds the token type. Use this when the meter has a group-by dimension for token type. Mutually exclusive with `tokenType`. title: Token type property tokenType: type: string description: |- Static token type value. Use this when the feature tracks a single token type (e.g., only input tokens). Expected values: input, output, cache_read, reasoning, cache_write. Mutually exclusive with `tokenTypeProperty`. title: Token type pricing: allOf: - $ref: '#/components/schemas/FeatureLLMUnitCostPricing' description: |- Resolved per-token pricing from the LLM cost database. Only populated in responses when the feature's meter group-by filters specify exact provider and model values. title: Resolved pricing readOnly: true description: |- LLM cost lookup configuration. Maps meter group-by dimensions to LLM cost database fields. FeatureLLMUnitCostPricing: type: object required: - inputPerToken - outputPerToken properties: 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 cacheReadPerToken: allOf: - $ref: '#/components/schemas/Numeric' description: Cost per cache read token in USD. title: Cache read per token reasoningPerToken: allOf: - $ref: '#/components/schemas/Numeric' description: Cost per reasoning token in USD. title: Reasoning per token cacheWritePerToken: allOf: - $ref: '#/components/schemas/Numeric' description: Cost per cache write token in USD. title: Cache write per token description: Resolved per-token pricing from the LLM cost database. FeatureManualUnitCost: type: object required: - type - amount properties: type: type: string enum: - manual amount: allOf: - $ref: '#/components/schemas/Numeric' description: Fixed per-unit cost amount in USD. description: A fixed per-unit cost amount. FeatureMeta: type: object required: - id - key properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Unique identifier of a feature. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Feature Unique Identifier key: type: string description: |- The key is an immutable unique identifier of the feature used throughout the API, for example when interacting with a subject's entitlements. title: Feature Key example: gpt4_tokens description: Limited representation of a feature resource which includes only its unique identifiers (id, key). FeatureOrderBy: type: string enum: - id - key - name - createdAt - updatedAt description: Order by options for features. FeaturePaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Feature' description: The items in the current page. description: Paginated response FeatureUnitCost: type: object oneOf: - $ref: '#/components/schemas/FeatureManualUnitCost' - $ref: '#/components/schemas/FeatureLLMUnitCost' discriminator: propertyName: type mapping: manual: '#/components/schemas/FeatureManualUnitCost' llm: '#/components/schemas/FeatureLLMUnitCost' description: |- Per-unit cost configuration for a feature. Either a fixed manual amount or a dynamic LLM cost lookup. FeatureUnitCostType: type: string enum: - llm - manual description: The type of unit cost. FilterBoolean: type: object properties: $eq: type: boolean nullable: true description: The field must be equal to the provided value. x-omitempty: true description: A filter for a boolean field. FilterFloat: type: object properties: $eq: type: number format: double nullable: true description: The field must be equal to the provided value. x-omitempty: true $ne: type: number format: double nullable: true description: The field must not be equal to the provided value. x-omitempty: true $gt: type: number format: double nullable: true description: The field must be greater than the provided value. x-omitempty: true $gte: type: number format: double nullable: true description: The field must be greater than or equal to the provided value. x-omitempty: true $lt: type: number format: double nullable: true description: The field must be less than the provided value. x-omitempty: true $lte: type: number format: double nullable: true description: The field must be less than or equal to the provided value. x-omitempty: true $and: type: array items: $ref: '#/components/schemas/FilterFloat' nullable: true description: Provide a list of filters to be combined with a logical AND. x-omitempty: true $or: type: array items: $ref: '#/components/schemas/FilterFloat' nullable: true description: Provide a list of filters to be combined with a logical OR. x-omitempty: true description: A filter for a float field. FilterIDExact: type: object properties: $in: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH nullable: true description: The field must be in the provided list of values. x-omitempty: true description: A filter for a ID (ULID) field allowing only equality or inclusion. FilterInteger: type: object properties: $eq: type: integer nullable: true description: The field must be equal to the provided value. x-omitempty: true $ne: type: integer nullable: true description: The field must not be equal to the provided value. x-omitempty: true $gt: type: integer nullable: true description: The field must be greater than the provided value. x-omitempty: true $gte: type: integer nullable: true description: The field must be greater than or equal to the provided value. x-omitempty: true $lt: type: integer nullable: true description: The field must be less than the provided value. x-omitempty: true $lte: type: integer nullable: true description: The field must be less than or equal to the provided value. x-omitempty: true $and: type: array items: $ref: '#/components/schemas/FilterInteger' nullable: true description: Provide a list of filters to be combined with a logical AND. x-omitempty: true $or: type: array items: $ref: '#/components/schemas/FilterInteger' nullable: true description: Provide a list of filters to be combined with a logical OR. x-omitempty: true description: A filter for an integer field. FilterString: type: object properties: $eq: type: string nullable: true description: The field must be equal to the provided value. x-omitempty: true $ne: type: string nullable: true description: The field must not be equal to the provided value. x-omitempty: true $in: type: array items: type: string nullable: true description: The field must be in the provided list of values. x-omitempty: true $nin: type: array items: type: string nullable: true description: The field must not be in the provided list of values. x-omitempty: true $like: type: string nullable: true description: The field must match the provided value. x-omitempty: true $nlike: type: string nullable: true description: The field must not match the provided value. x-omitempty: true $ilike: type: string nullable: true description: The field must match the provided value, ignoring case. x-omitempty: true $nilike: type: string nullable: true description: The field must not match the provided value, ignoring case. x-omitempty: true $gt: type: string nullable: true description: The field must be greater than the provided value. x-omitempty: true $gte: type: string nullable: true description: The field must be greater than or equal to the provided value. x-omitempty: true $lt: type: string nullable: true description: The field must be less than the provided value. x-omitempty: true $lte: type: string nullable: true description: The field must be less than or equal to the provided value. x-omitempty: true $and: type: array items: $ref: '#/components/schemas/FilterString' nullable: true description: Provide a list of filters to be combined with a logical AND. x-omitempty: true $or: type: array items: $ref: '#/components/schemas/FilterString' nullable: true description: Provide a list of filters to be combined with a logical OR. x-omitempty: true description: A filter for a string field. FilterTime: type: object properties: $gt: type: string format: date-time nullable: true description: The field must be greater than the provided value. x-omitempty: true $gte: type: string format: date-time nullable: true description: The field must be greater than or equal to the provided value. x-omitempty: true $lt: type: string format: date-time nullable: true description: The field must be less than the provided value. x-omitempty: true $lte: type: string format: date-time nullable: true description: The field must be less than or equal to the provided value. x-omitempty: true $and: type: array items: $ref: '#/components/schemas/FilterTime' nullable: true description: Provide a list of filters to be combined with a logical AND. x-omitempty: true $or: type: array items: $ref: '#/components/schemas/FilterTime' nullable: true description: Provide a list of filters to be combined with a logical OR. x-omitempty: true description: A filter for a time field. FlatPrice: type: object required: - type - amount properties: type: type: string enum: - flat description: The type of the price. amount: allOf: - $ref: '#/components/schemas/Numeric' description: The amount of the flat price. description: Flat price. FlatPriceWithPaymentTerm: type: object required: - type - amount properties: type: type: string enum: - flat description: The type of the price. amount: allOf: - $ref: '#/components/schemas/Numeric' description: The amount of the flat price. paymentTerm: allOf: - $ref: '#/components/schemas/PricePaymentTerm' description: |- The payment term of the flat price. Defaults to in advance. default: in_advance description: Flat price with payment term. ForbiddenProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: The server understood the request but refuses to authorize it. GatewayTimeoutProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. GrantBurnDownHistorySegment: type: object required: - period - usage - overage - balanceAtStart - grantBalancesAtStart - balanceAtEnd - grantBalancesAtEnd - grantUsages properties: period: allOf: - $ref: '#/components/schemas/Period' description: The period of the segment. usage: type: number format: double description: The total usage of the grant in the period. example: 100 readOnly: true overage: type: number format: double description: Overuse that wasn't covered by grants. example: 100 readOnly: true balanceAtStart: type: number format: double description: entitlement balance at the start of the period. example: 100 readOnly: true grantBalancesAtStart: type: object additionalProperties: type: number format: double description: 'The balance breakdown of each active grant at the start of the period: GrantID: Balance' example: 01G65Z755AFWAKHE12NY0CQ9FH: 100 readOnly: true balanceAtEnd: type: number format: double description: The entitlement balance at the end of the period. example: 100 readOnly: true grantBalancesAtEnd: type: object additionalProperties: type: number format: double description: 'The balance breakdown of each active grant at the end of the period: GrantID: Balance' example: 01G65Z755AFWAKHE12NY0CQ9FH: 100 readOnly: true grantUsages: type: array items: $ref: '#/components/schemas/GrantUsageRecord' description: Which grants were actually burnt down in the period and by what amount. readOnly: true description: |- A segment of the grant burn down history. A given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period. GrantOrderBy: type: string enum: - id - createdAt - updatedAt description: Order by options for grants. GrantPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/EntitlementGrant' description: The items in the current page. description: Paginated response GrantUsageRecord: type: object required: - grantId - usage properties: grantId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The id of the grant example: 01G65Z755AFWAKHE12NY0CQ9FH usage: type: number format: double description: The usage in the period example: 100 description: Usage Record GrantV2PaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/EntitlementGrantV2' description: The items in the current page. description: Paginated response IDResource: type: object required: - id properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true description: IDResource is a resouce with an ID. IngestEventsBody: anyOf: - $ref: '#/components/schemas/Event' - type: array items: $ref: '#/components/schemas/Event' description: |- The body of the events request. Either a single event or a batch of events. IngestedEvent: type: object required: - event - ingestedAt - storedAt properties: event: allOf: - $ref: '#/components/schemas/Event' description: The original event ingested. customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The customer ID if the event is associated with a customer. example: 01G65Z755AFWAKHE12NY0CQ9FH validationError: type: string description: The validation error if the event failed validation. ingestedAt: type: string format: date-time description: The date and time the event was ingested. example: '2023-01-01T01:01:01.001Z' storedAt: type: string format: date-time description: The date and time the event was stored. example: '2023-01-01T01:01:01.001Z' description: An ingested event with optional validation error. example: event: id: 5c10fade-1c9e-4d6c-8275-c52c36731d3c source: service-name specversion: '1.0' type: prompt subject: customer-id time: '2023-01-01T01:01:01.001Z' ingestedAt: '2023-01-01T01:01:01.001Z' storedAt: '2023-01-01T01:01:02.001Z' IngestedEventCursorPaginatedResponse: type: object required: - items properties: items: type: array items: $ref: '#/components/schemas/IngestedEvent' maxItems: 100 description: The items in the response. nextCursor: type: string description: The cursor of the last item in the list. description: A response for cursor pagination. InstallMethod: type: string enum: - with_oauth2 - with_api_key - no_credentials_required description: Install method of the application. InternalServerErrorProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: The server encountered an unexpected condition that prevented it from fulfilling the request. Invoice: type: object required: - id - createdAt - updatedAt - type - supplier - customer - number - currency - totals - status - statusDetails - workflow properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true type: allOf: - $ref: '#/components/schemas/InvoiceType' description: |- Type of the invoice. The type of invoice determines the purpose of the invoice and how it should be handled. Supported types: - standard: A regular commercial invoice document between a supplier and customer. - credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document. readOnly: true supplier: allOf: - $ref: '#/components/schemas/BillingParty' description: The taxable entity supplying the goods or services. customer: allOf: - $ref: '#/components/schemas/BillingInvoiceCustomerExtendedDetails' description: Legal entity receiving the goods or services. number: allOf: - $ref: '#/components/schemas/InvoiceNumber' description: |- Number specifies the human readable key used to reference this Invoice. The invoice number can change in the draft phases, as we are allocating temporary draft invoice numbers, but it's final as soon as the invoice gets finalized (issued state). Please note that the number is (depending on the upstream settings) either unique for the whole organization or unique for the customer, or in multi (stripe) account setups unique for the account. readOnly: true currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- Currency for all invoice line items. Multi currency invoices are not supported yet. preceding: type: array items: $ref: '#/components/schemas/InvoiceDocumentRef' description: Key information regarding previous invoices and potentially details as to why they were corrected. readOnly: true totals: allOf: - $ref: '#/components/schemas/InvoiceTotals' description: Summary of all the invoice totals, including taxes (calculated). readOnly: true status: allOf: - $ref: '#/components/schemas/InvoiceStatus' description: |- The status of the invoice. This 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 issuedAt: type: string format: date-time description: |- The time the invoice was issued. Depending on the status of the invoice this can mean multiple things: - draft, gathering: The time the invoice will be issued based on the workflow settings. - issued: The time the invoice was issued. example: '2023-01-01T01:01:01.001Z' readOnly: true draftUntil: type: string format: date-time description: |- The time until the invoice is in draft status. On draft invoice creation it is calculated from the workflow settings. If manual approval is required, the draftUntil time is set. example: '2023-01-01T01:01:01.001Z' quantitySnapshotedAt: type: string format: date-time description: The time when the quantity snapshots on the invoice lines were taken. example: '2023-01-01T01:01:01.001Z' readOnly: true collectionAt: type: string format: date-time description: The time when the invoice will be/has been collected. example: '2023-01-01T01:01:01.001Z' readOnly: true dueAt: type: string format: date-time description: Due time of the fulfillment of the invoice (if available). example: '2023-01-01T01:01:01.001Z' 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. voidedAt: type: string format: date-time description: |- The time the invoice was voided. If the invoice was voided, this field will be set to the time the invoice was voided. example: '2023-01-01T01:01:01.001Z' readOnly: true sentToCustomerAt: type: string format: date-time description: The time the invoice was sent to customer. example: '2023-01-01T01:01:01.001Z' readOnly: true workflow: allOf: - $ref: '#/components/schemas/InvoiceWorkflowSettings' description: |- The workflow associated with the invoice. It is always a snapshot of the workflow settings at the time of invoice creation. The field is optional as it should be explicitly requested with expand options. lines: type: array items: $ref: '#/components/schemas/InvoiceLine' description: List of invoice lines representing each of the items sold to the customer. payment: allOf: - $ref: '#/components/schemas/InvoicePaymentTerms' description: Information on when, how, and to whom the invoice should be paid. readOnly: true validationIssues: type: array items: $ref: '#/components/schemas/ValidationIssue' description: Validation issues reported by the invoice workflow. readOnly: true externalIds: allOf: - $ref: '#/components/schemas/InvoiceAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true description: Invoice represents an invoice in the system. InvoiceAppExternalIds: type: object properties: invoicing: type: string description: The external ID of the invoice in the invoicing app if available. readOnly: true tax: type: string description: The external ID of the invoice in the tax app if available. readOnly: true payment: type: string description: The external ID of the invoice in the payment app if available. readOnly: true description: InvoiceAppExternalIds contains the external IDs of the invoice in other apps such as Stripe. InvoiceAvailableActionDetails: type: object required: - resultingState properties: resultingState: type: string description: |- The state the invoice will reach if the action is activated and all intermediate steps are successful. For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice. readOnly: true description: |- InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices. InvoiceAvailableActionInvoiceDetails: type: object description: |- InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for gathering invoices. InvoiceAvailableActions: type: object 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 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 invoice: allOf: - $ref: '#/components/schemas/InvoiceAvailableActionInvoiceDetails' description: Invoice a gathering invoice readOnly: true description: InvoiceAvailableActions represents the actions that can be performed on the invoice. InvoiceDetailedLine: type: object required: - name - createdAt - updatedAt - id - managedBy - status - currency - totals - period - invoiceAt - type properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the line. example: 01G65Z755AFWAKHE12NY0CQ9FH managedBy: allOf: - $ref: '#/components/schemas/InvoiceLineManagedBy' description: managedBy specifies if the line is manually added via the api or managed by OpenMeter. readOnly: true status: allOf: - $ref: '#/components/schemas/InvoiceLineStatus' description: |- Status of the line. External calls always create valid lines, other line types are managed by the billing engine of OpenMeter. readOnly: true discounts: allOf: - $ref: '#/components/schemas/InvoiceLineDiscounts' description: |- Discounts detailes applied to this line. New discounts can be added via the invoice's discounts API, to facilitate discounts that are affecting multiple lines. readOnly: true invoice: allOf: - $ref: '#/components/schemas/InvoiceReference' description: The invoice this item belongs to. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency of this line. taxes: type: array items: $ref: '#/components/schemas/InvoiceLineTaxItem' description: Taxes applied to the invoice totals. readOnly: true taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Tax config specify the tax configuration for this line. deprecated: true totals: allOf: - $ref: '#/components/schemas/InvoiceTotals' description: Totals for this line. readOnly: true period: allOf: - $ref: '#/components/schemas/Period' description: |- Period of the line item applies to for revenue recognition pruposes. Billing always treats periods as start being inclusive and end being exclusive. externalIds: allOf: - $ref: '#/components/schemas/InvoiceLineAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true subscription: allOf: - $ref: '#/components/schemas/InvoiceLineSubscriptionReference' description: Subscription are the references to the subscritpions that this line is related to. readOnly: true invoiceAt: type: string format: date-time description: The time this line item should be invoiced. example: '2023-01-01T01:01:01.001Z' deprecated: true type: type: string enum: - flat_fee description: Type of the line. deprecated: true readOnly: true perUnitAmount: allOf: - $ref: '#/components/schemas/Numeric' description: Price of the item being sold. deprecated: true paymentTerm: allOf: - $ref: '#/components/schemas/PricePaymentTerm' description: Payment term of the line. deprecated: true default: in_advance quantity: allOf: - $ref: '#/components/schemas/Numeric' description: Quantity of the item being sold. deprecated: true rateCard: allOf: - $ref: '#/components/schemas/InvoiceDetailedLineRateCard' description: The rate card that is used for this line. category: allOf: - $ref: '#/components/schemas/InvoiceDetailedLineCostCategory' description: Category of the flat fee. default: regular readOnly: true description: InvoiceDetailedLine represents a line item that is sold to the customer as a manually added fee. InvoiceDetailedLineCostCategory: type: string enum: - regular - commitment description: |- InvoiceDetailedLineCostCategory determines if the flat fee is a regular fee due to use due to a commitment. InvoiceDetailedLineRateCard: type: object required: - price properties: taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: |- The tax config of the rate card. When undefined, the tax config of the feature or the default tax config of the plan is used. title: Tax config price: type: object allOf: - $ref: '#/components/schemas/FlatPriceWithPaymentTerm' nullable: true description: |- The price of the rate card. When null, the feature or service is free. title: Price example: type: flat amount: '100' paymentTerm: in_arrears quantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- Quantity of the item being sold. Default: 1 discounts: allOf: - $ref: '#/components/schemas/BillingDiscounts' description: The discounts that are applied to the line. description: InvoiceDetailedLineRateCard represents the rate card (intent) for a flat fee line. InvoiceDiscountBase: type: object required: - createdAt - updatedAt - id - reason properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the charge or discount. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true reason: allOf: - $ref: '#/components/schemas/BillingDiscountReason' description: Reason code. readOnly: true description: type: string description: Text description as to why the discount was applied. readOnly: true externalIds: allOf: - $ref: '#/components/schemas/InvoiceLineAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true description: InvoiceDiscountBase represents a charge or discount that can be applied to a line or the entire invoice. InvoiceDocumentRef: type: object allOf: - $ref: '#/components/schemas/CreditNoteOriginalInvoiceRef' description: InvoiceDocumentRef is used to describe a reference to an existing document (invoice). InvoiceDocumentRefType: type: string enum: - credit_note_original_invoice description: InvoiceDocumentRefType defines the type of document that is being referenced. InvoiceExpand: type: string enum: - lines - preceding - workflow.apps description: InvoiceExpand specifies the parts of the invoice to expand in the list output. InvoiceGenericDocumentRef: type: object required: - type properties: type: allOf: - $ref: '#/components/schemas/InvoiceDocumentRefType' description: Type of the document referenced. readOnly: true reason: type: string description: Human readable description on why this reference is here or needs to be used. readOnly: true description: type: string description: Additional details about the document. readOnly: true description: |- Omitted fields: period: Tax period in which the referred document had an effect required by some tax regimes and formats. stamps: Seals of approval from other organisations that may need to be listed. ext: Extensions for additional codes that may be required. title: InvoiceGenericDocumentRef is used to describe an existing document or a specific part of it's contents. InvoiceLine: type: object required: - name - createdAt - updatedAt - id - managedBy - status - currency - totals - period - invoiceAt - type properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the line. example: 01G65Z755AFWAKHE12NY0CQ9FH managedBy: allOf: - $ref: '#/components/schemas/InvoiceLineManagedBy' description: managedBy specifies if the line is manually added via the api or managed by OpenMeter. readOnly: true status: allOf: - $ref: '#/components/schemas/InvoiceLineStatus' description: |- Status of the line. External calls always create valid lines, other line types are managed by the billing engine of OpenMeter. readOnly: true discounts: allOf: - $ref: '#/components/schemas/InvoiceLineDiscounts' description: |- Discounts detailes applied to this line. New discounts can be added via the invoice's discounts API, to facilitate discounts that are affecting multiple lines. readOnly: true invoice: allOf: - $ref: '#/components/schemas/InvoiceReference' description: The invoice this item belongs to. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency of this line. taxes: type: array items: $ref: '#/components/schemas/InvoiceLineTaxItem' description: Taxes applied to the invoice totals. readOnly: true taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Tax config specify the tax configuration for this line. deprecated: true totals: allOf: - $ref: '#/components/schemas/InvoiceTotals' description: Totals for this line. readOnly: true period: allOf: - $ref: '#/components/schemas/Period' description: |- Period of the line item applies to for revenue recognition pruposes. Billing always treats periods as start being inclusive and end being exclusive. invoiceAt: type: string format: date-time description: The time this line item should be invoiced. example: '2023-01-01T01:01:01.001Z' externalIds: allOf: - $ref: '#/components/schemas/InvoiceLineAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true subscription: allOf: - $ref: '#/components/schemas/InvoiceLineSubscriptionReference' description: Subscription are the references to the subscritpions that this line is related to. readOnly: true type: type: string enum: - usage_based description: Type of the line. deprecated: true readOnly: true price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' description: Price of the usage-based item being sold. deprecated: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature that the usage is based on. deprecated: true children: type: array items: $ref: '#/components/schemas/InvoiceDetailedLine' description: The lines detailing the item or service sold. readOnly: true rateCard: allOf: - $ref: '#/components/schemas/InvoiceUsageBasedRateCard' description: |- The rate card that is used for this line. The rate card captures the intent of the price and discounts for the usage-based item. quantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The quantity of the item being sold. Any usage discounts applied previously are deducted from this quantity. 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 preLinePeriodQuantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The quantity of the item used before this line's period. It is non-zero in case of progressive billing, when this shows how much of the usage was already billed. Any usage discounts applied previously are deducted from this quantity. readOnly: true meteredPreLinePeriodQuantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The metered quantity of the item used in before this line's period without any discounts applied. It is non-zero in case of progressive billing, when this shows how much of the usage was already billed. readOnly: true description: InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage. InvoiceLineAmountDiscount: type: object required: - createdAt - updatedAt - id - reason - amount properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the charge or discount. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true reason: allOf: - $ref: '#/components/schemas/BillingDiscountReason' description: Reason code. readOnly: true description: type: string description: Text description as to why the discount was applied. readOnly: true externalIds: allOf: - $ref: '#/components/schemas/InvoiceLineAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true amount: allOf: - $ref: '#/components/schemas/Numeric' description: Fixed discount amount to apply (calculated if percent present). title: Amount in the currency of the invoice readOnly: true description: InvoiceLineAmountDiscount represents an amount deducted from the line, and will be applied before taxes. InvoiceLineAppExternalIds: type: object properties: invoicing: type: string description: The external ID of the invoice in the invoicing app if available. readOnly: true tax: type: string description: The external ID of the invoice in the tax app if available. readOnly: true description: InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe. InvoiceLineBase: type: object required: - name - createdAt - updatedAt - id - type - managedBy - status - currency - totals - period - invoiceAt properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the line. example: 01G65Z755AFWAKHE12NY0CQ9FH type: allOf: - $ref: '#/components/schemas/InvoiceLineTypes' description: |- Type of the line. A line's type cannot be changed after creation. deprecated: true readOnly: true managedBy: allOf: - $ref: '#/components/schemas/InvoiceLineManagedBy' description: managedBy specifies if the line is manually added via the api or managed by OpenMeter. readOnly: true status: allOf: - $ref: '#/components/schemas/InvoiceLineStatus' description: |- Status of the line. External calls always create valid lines, other line types are managed by the billing engine of OpenMeter. readOnly: true discounts: allOf: - $ref: '#/components/schemas/InvoiceLineDiscounts' description: |- Discounts detailes applied to this line. New discounts can be added via the invoice's discounts API, to facilitate discounts that are affecting multiple lines. readOnly: true invoice: allOf: - $ref: '#/components/schemas/InvoiceReference' description: The invoice this item belongs to. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency of this line. taxes: type: array items: $ref: '#/components/schemas/InvoiceLineTaxItem' description: Taxes applied to the invoice totals. readOnly: true taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Tax config specify the tax configuration for this line. deprecated: true totals: allOf: - $ref: '#/components/schemas/InvoiceTotals' description: Totals for this line. readOnly: true period: allOf: - $ref: '#/components/schemas/Period' description: |- Period of the line item applies to for revenue recognition pruposes. Billing always treats periods as start being inclusive and end being exclusive. invoiceAt: type: string format: date-time description: The time this line item should be invoiced. example: '2023-01-01T01:01:01.001Z' externalIds: allOf: - $ref: '#/components/schemas/InvoiceLineAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true subscription: allOf: - $ref: '#/components/schemas/InvoiceLineSubscriptionReference' description: Subscription are the references to the subscritpions that this line is related to. readOnly: true description: |- InvoiceLine represents a single item or service sold to the customer. This is a base class for all line types, and should not be used directly. InvoiceLineDiscounts: type: object properties: amount: type: array items: $ref: '#/components/schemas/InvoiceLineAmountDiscount' description: |- Amount based discounts applied to the line. Amount based discounts are deduced from the total price of the line. usage: type: array items: $ref: '#/components/schemas/InvoiceLineUsageDiscount' description: |- Usage based discounts applied to the line. Usage based discounts are deduced from the usage of the line before price calculations are applied. description: InvoiceLineDiscounts represents the discounts applied to the invoice line by type. InvoiceLineManagedBy: type: string enum: - subscription - system - manual description: InvoiceLineManagedBy specifies who manages the line. InvoiceLineReplaceUpdate: type: object required: - name - period - invoiceAt properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Tax config specify the tax configuration for this line. deprecated: true period: allOf: - $ref: '#/components/schemas/Period' description: |- Period of the line item applies to for revenue recognition pruposes. Billing always treats periods as start being inclusive and end being exclusive. invoiceAt: type: string format: date-time description: The time this line item should be invoiced. example: '2023-01-01T01:01:01.001Z' price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' description: Price of the usage-based item being sold. deprecated: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature that the usage is based on. deprecated: true rateCard: allOf: - $ref: '#/components/schemas/InvoiceUsageBasedRateCard' description: |- The rate card that is used for this line. The rate card captures the intent of the price and discounts for the usage-based item. id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the line. example: 01G65Z755AFWAKHE12NY0CQ9FH description: |- InvoiceLineReplaceUpdate represents the update model for an UBP invoice line. This type makes ID optional to allow for creating new lines as part of the update. InvoiceLineStatus: type: string enum: - valid - detailed - split description: Line status specifies the status of the line. InvoiceLineSubscriptionReference: type: object required: - subscription - phase - item - billingPeriod properties: subscription: allOf: - $ref: '#/components/schemas/IDResource' description: The subscription. readOnly: true phase: allOf: - $ref: '#/components/schemas/IDResource' description: The phase of the subscription. readOnly: true item: allOf: - $ref: '#/components/schemas/IDResource' description: The item this line is related to. readOnly: true billingPeriod: allOf: - $ref: '#/components/schemas/Period' description: |- The billing period of the subscription. In case the subscription item's billing period is different from the subscription's billing period, this field will contain the billing period of the subscription itself. For example, in case of: - A monthly billed subscription anchored to 2025-01-01 - A subscription item billed daily An 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 will be 2025-01-01 to 2025-01-31. readOnly: true description: InvoiceLineSubscriptionReference contains the references to the subscription that this line is related to. InvoiceLineTaxBehavior: type: string enum: - inclusive - exclusive description: |- InvoiceLineTaxBehavior details how the tax item is applied to the base amount. Inclusive means the tax is included in the base amount. Exclusive means the tax is added to the base amount. InvoiceLineTaxItem: type: object properties: 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 the rate key (calculated if rate present). A nil percent implies that this 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 behavior: allOf: - $ref: '#/components/schemas/InvoiceLineTaxBehavior' description: Is the tax item inclusive or exclusive of the base amount. readOnly: true description: TaxConfig stores the configuration for a tax line relative to an invoice line. InvoiceLineTypes: type: string enum: - flat_fee - usage_based description: LineTypes represents the different types of lines that can be used in an invoice. deprecated: true InvoiceLineUsageDiscount: type: object required: - createdAt - updatedAt - id - reason - quantity properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the charge or discount. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true reason: allOf: - $ref: '#/components/schemas/BillingDiscountReason' description: Reason code. readOnly: true description: type: string description: Text description as to why the discount was applied. readOnly: true externalIds: allOf: - $ref: '#/components/schemas/InvoiceLineAppExternalIds' description: External IDs of the invoice in other apps such as Stripe. readOnly: true quantity: allOf: - $ref: '#/components/schemas/Numeric' description: The usage to apply. title: Usage quantity in the unit of the underlying meter readOnly: true preLinePeriodQuantity: allOf: - $ref: '#/components/schemas/Numeric' description: |- The usage discount already applied to the previous split lines. Only set if progressive billing is enabled and the line is a split line. title: Usage quantity in the unit of the underlying meter readOnly: true description: |- InvoiceLineUsageDiscount represents an usage-based discount applied to the line. The deduction is done before the pricing algorithm is applied. InvoiceNumber: type: string minLength: 1 maxLength: 256 description: |- InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app. The uniqueness depends on a lot of factors: - app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix) example: INV-2024-01-01-01 InvoiceOrderBy: type: string enum: - customer.name - issuedAt - status - createdAt - updatedAt - periodStart description: InvoiceOrderBy specifies the ordering options for invoice listing. InvoicePaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Invoice' description: The items in the current page. description: Paginated response InvoicePaymentTerms: type: object properties: terms: allOf: - $ref: '#/components/schemas/PaymentTerms' description: The terms of payment for the invoice. description: Payment contains details as to how the invoice should be paid. InvoicePendingLineCreate: type: object required: - name - period - invoiceAt properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Tax config specify the tax configuration for this line. deprecated: true period: allOf: - $ref: '#/components/schemas/Period' description: |- Period of the line item applies to for revenue recognition pruposes. Billing always treats periods as start being inclusive and end being exclusive. invoiceAt: type: string format: date-time description: The time this line item should be invoiced. example: '2023-01-01T01:01:01.001Z' price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' description: Price of the usage-based item being sold. deprecated: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature that the usage is based on. deprecated: true rateCard: allOf: - $ref: '#/components/schemas/InvoiceUsageBasedRateCard' description: |- The rate card that is used for this line. The rate card captures the intent of the price and discounts for the usage-based item. description: InvoicePendingLineCreate represents the create model for an invoice line that is sold to the customer based on usage. InvoicePendingLineCreateInput: type: object required: - currency - lines properties: currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency of the lines to be created. lines: type: array items: $ref: '#/components/schemas/InvoicePendingLineCreate' minItems: 1 description: The lines to be created. description: InvoicePendingLineCreate represents the create model for a pending invoice line. InvoicePendingLineCreateResponse: type: object required: - lines - invoice - isInvoiceNew properties: lines: type: array items: $ref: '#/components/schemas/InvoiceLine' description: The lines that were created. readOnly: true invoice: allOf: - $ref: '#/components/schemas/Invoice' description: The invoice containing the created lines. readOnly: true isInvoiceNew: type: boolean description: Whether the invoice was newly created. readOnly: true description: InvoicePendingLineCreateResponse represents the response from the create pending line endpoint. InvoicePendingLinesActionFiltersInput: type: object properties: lineIds: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH description: |- The pending line items to include in the invoice, if not provided: - all line items that have invoice_at < asOf will be included - [progressive billing only] all usage based line items will be included up to asOf, new usage-based line items will be staged for the rest of the billing cycle All lineIDs present in the list, must exists and must be invoicable as of asOf, or the action will fail. description: InvoicePendingLinesActionFiltersInput specifies which lines to include in the invoice. InvoicePendingLinesActionInput: type: object required: - customerId properties: filters: allOf: - $ref: '#/components/schemas/InvoicePendingLinesActionFiltersInput' description: Filters to apply when creating the invoice. asOf: type: string format: date-time description: |- The time as of which the invoice is created. If not provided, the current time is used. example: '2023-01-01T01:01:01.001Z' customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The customer ID for which to create the invoice. example: 01G65Z755AFWAKHE12NY0CQ9FH progressiveBillingOverride: type: boolean description: |- Override the progressive billing setting of the customer. Can be used to disable/enable progressive billing in case the business logic requires it, if not provided the billing profile's progressive billing setting will be used. description: |- BillingInvoiceActionInput is the input for creating an invoice. Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer operation. Empty invoices are not allowed. InvoiceReference: type: object required: - id properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the invoice. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true number: allOf: - $ref: '#/components/schemas/InvoiceNumber' description: The number of the invoice. readOnly: true description: Reference to an invoice. InvoiceReplaceUpdate: type: object required: - supplier - customer - lines - workflow properties: description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata supplier: allOf: - $ref: '#/components/schemas/BillingPartyReplaceUpdate' description: The supplier of the lines included in the invoice. customer: allOf: - $ref: '#/components/schemas/BillingPartyReplaceUpdate' description: The customer the invoice is sent to. lines: type: array items: $ref: '#/components/schemas/InvoiceLineReplaceUpdate' description: The lines included in the invoice. workflow: allOf: - $ref: '#/components/schemas/InvoiceWorkflowReplaceUpdate' description: The workflow settings for the invoice. description: InvoiceReplaceUpdate represents the update model for an invoice. InvoiceSimulationInput: type: object required: - currency - lines properties: number: allOf: - $ref: '#/components/schemas/InvoiceNumber' description: The number of the invoice. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- Currency for all invoice line items. Multi currency invoices are not supported yet. lines: type: array items: $ref: '#/components/schemas/InvoiceSimulationLine' description: Lines to be included in the generated invoice. description: InvoiceSimulationInput is the input for simulating an invoice. InvoiceSimulationLine: type: object required: - name - period - invoiceAt - quantity properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Tax config specify the tax configuration for this line. deprecated: true period: allOf: - $ref: '#/components/schemas/Period' description: |- Period of the line item applies to for revenue recognition pruposes. Billing always treats periods as start being inclusive and end being exclusive. invoiceAt: type: string format: date-time description: The time this line item should be invoiced. example: '2023-01-01T01:01:01.001Z' price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' description: Price of the usage-based item being sold. deprecated: true featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature that the usage is based on. deprecated: true rateCard: allOf: - $ref: '#/components/schemas/InvoiceUsageBasedRateCard' description: |- The rate card that is used for this line. The rate card captures the intent of the price and discounts for the usage-based item. quantity: allOf: - $ref: '#/components/schemas/Numeric' description: The quantity of the item being sold. preLinePeriodQuantity: allOf: - $ref: '#/components/schemas/Numeric' description: The quantity of the item used before this line's period, if the line is billed progressively. id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- ID of the line. If not specified it will be auto-generated. When discounts are specified, this must be provided, so that the discount can reference it. example: 01G65Z755AFWAKHE12NY0CQ9FH description: InvoiceSimulationLine represents a usage-based line item that can be input to the simulation endpoint. InvoiceStatus: type: string enum: - gathering - draft - issuing - issued - payment_processing - overdue - paid - uncollectible - voided description: InvoiceStatus describes the status of an invoice. InvoiceStatusDetails: type: object required: - immutable - failed - extendedStatus - availableActions properties: immutable: type: boolean description: Is the invoice editable? readOnly: true failed: type: boolean description: Is the invoice in a failed state? readOnly: true extendedStatus: type: string description: Extended status information for the invoice. readOnly: true availableActions: allOf: - $ref: '#/components/schemas/InvoiceAvailableActions' description: The actions that can be performed on the invoice. description: |- InvoiceStatusDetails represents the details of the invoice status. API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine the next steps of the invoice instead of the extendedStatus field. InvoiceTotals: type: object required: - amount - chargesTotal - discountsTotal - taxesInclusiveTotal - taxesExclusiveTotal - taxesTotal - total 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 discountsTotal: allOf: - $ref: '#/components/schemas/Numeric' description: The amount of value of the line that are due to discounts. readOnly: true taxesInclusiveTotal: allOf: - $ref: '#/components/schemas/Numeric' description: The total amount of taxes that are included in the line. 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 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 description: Totals contains the summaries of all calculations for the invoice. InvoiceType: type: string enum: - standard - credit_note description: |- InvoiceType represents the type of invoice. The type of invoice determines the purpose of the invoice and how it should be handled. InvoiceUsageBasedRateCard: type: object required: - price properties: featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the customer is entitled to use. title: Feature key taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: |- The tax config of the rate card. When undefined, the tax config of the feature or the default tax config of the plan is used. title: Tax config price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' nullable: true description: |- The price of the rate card. When null, the feature or service is free. discounts: allOf: - $ref: '#/components/schemas/BillingDiscounts' description: The discounts that are applied to the line. description: InvoiceUsageBasedRateCard represents the rate card (intent) for an usage-based line. InvoiceWorkflowInvoicingSettingsReplaceUpdate: type: object properties: autoAdvance: type: boolean description: Whether to automatically issue the invoice after the draftPeriod has passed. default: true draftPeriod: type: string format: ISO8601 description: The period for the invoice to be kept in draft status for manual reviews. example: P1D default: P0D dueAfter: type: string format: ISO8601 description: |- The period after which the invoice is due. With some payment solutions it's only applicable for manual collection method. example: P30D default: P30D defaultTaxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: Default tax configuration to apply to the invoices. description: InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow. InvoiceWorkflowReplaceUpdate: type: object required: - workflow properties: workflow: allOf: - $ref: '#/components/schemas/InvoiceWorkflowSettingsReplaceUpdate' description: The workflow used for this invoice. description: |- InvoiceWorkflowReplaceUpdate represents the update model for an invoice workflow. Fields that are immutable a re removed from the model. This is based on InvoiceWorkflowSettings. InvoiceWorkflowSettings: type: object required: - sourceBillingProfileId - workflow properties: apps: allOf: - $ref: '#/components/schemas/BillingProfileAppsOrReference' description: The apps that will be used to orchestrate the invoice's workflow. readOnly: true sourceBillingProfileId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- sourceBillingProfileID is the billing profile on which the workflow was based on. The profile is snapshotted on invoice creation, after which it can be altered independently of the profile itself. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true workflow: allOf: - $ref: '#/components/schemas/BillingWorkflow' description: The workflow details used by this invoice. description: |- InvoiceWorkflowSettings represents the workflow settings used by the invoice. This is a clone of the billing profile's workflow settings at the time of invoice creation with customer overrides considered. InvoiceWorkflowSettingsReplaceUpdate: type: object required: - invoicing - payment 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 description: |- Mutable workflow settings for an invoice. Other fields on the invoice's workflow are not mutable, they serve as a history of the invoice's workflow at creation time. IssueAfterReset: type: object required: - amount properties: amount: type: number format: double minimum: 0 description: The initial grant amount title: Initial grant amount priority: type: integer format: uint8 minimum: 1 maximum: 255 description: The priority of the issue after reset title: Issue grant after reset priority default: 1 description: Issue after reset ListAppsRequest: type: object properties: page: type: integer minimum: 1 description: |- Page index. Default is 1. example: 1 default: 1 pageSize: type: integer minimum: 1 maximum: 1000 description: |- The maximum number of items per page. Default is 100. example: 100 default: 100 description: Query params for listing installed apps ListEntitlementsResult: oneOf: - type: array items: $ref: '#/components/schemas/Entitlement' - $ref: '#/components/schemas/EntitlementPaginatedResponse' description: List entitlements result ListFeaturesResult: oneOf: - type: array items: $ref: '#/components/schemas/Feature' - $ref: '#/components/schemas/FeaturePaginatedResponse' description: List features result MarketplaceInstallRequestPayload: type: object properties: name: type: string description: |- Name of the application to install. If name is not provided defaults to the marketplace listing's name. createBillingProfile: type: boolean description: |- If true, a billing profile will be created for the app. The Stripe app will be also set as the default billing profile if the current default is a Sandbox app. default: true description: Marketplace install request payload. MarketplaceInstallResponse: type: object required: - app - defaultForCapabilityTypes properties: app: $ref: '#/components/schemas/App' defaultForCapabilityTypes: type: array items: $ref: '#/components/schemas/AppCapabilityType' description: Default for capabilities description: Marketplace install response. MarketplaceListing: type: object required: - type - name - description - capabilities - installMethods properties: type: allOf: - $ref: '#/components/schemas/AppType' description: The app's type name: type: string description: The app's name. description: type: string description: The app's description. capabilities: type: array items: $ref: '#/components/schemas/AppCapability' description: The app's capabilities. installMethods: type: array items: $ref: '#/components/schemas/InstallMethod' description: |- Install methods. List of methods to install the app. description: |- A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization. Marketplace apps only exist in config so they don't extend the Resource model. example: type: stripe name: Stripe description: Stripe integration allows you to collect payments with Stripe. capabilities: - type: calculateTax key: stripe_calculate_tax name: Calculate Tax description: Stripe Tax calculates tax portion of the invoices. - type: invoiceCustomers key: stripe_invoice_customers name: Invoice Customers description: Stripe invoices customers with due amount. - type: collectPayments key: stripe_collect_payments name: Collect Payments description: Stripe payments collects outstanding revenue with Stripe customer's default payment method. installMethods: - with_oauth2 - with_api_key MarketplaceListingPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/MarketplaceListing' description: The items in the current page. description: Paginated response MeasureUsageFrom: oneOf: - $ref: '#/components/schemas/MeasureUsageFromPreset' - $ref: '#/components/schemas/MeasureUsageFromTime' description: Measure usage from MeasureUsageFromPreset: type: string enum: - CURRENT_PERIOD_START - NOW description: Start of measurement options x-enum-varnames: - CurrentPeriodStart - Now MeasureUsageFromTime: type: string format: date-time description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' example: '2023-01-01T01:01:01.001Z' Metadata: type: object additionalProperties: type: string description: |- Set of key-value pairs. Metadata can be used to store additional information about a resource. example: externalId: 019142cc-a016-796a-8113-1a942fecd26d x-go-type: map[string]string Meter: type: object required: - id - createdAt - updatedAt - slug - aggregation - eventType properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true name: type: string minLength: 1 maxLength: 256 description: |- Human-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified. title: Display name slug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- A unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters. example: tokens_total aggregation: allOf: - $ref: '#/components/schemas/MeterAggregation' description: The aggregation type to use for the meter. example: SUM eventType: type: string minLength: 1 description: The event type to aggregate. example: prompt eventFrom: type: string format: date-time description: |- The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included. example: '2023-01-01T01:01:01.001Z' valueProperty: type: string minLength: 1 description: |- JSONPath expression to extract the value from the ingested event's data property. The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number. For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored. example: $.tokens groupBy: type: object additionalProperties: type: string description: |- Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters. example: type: $.type annotations: type: object allOf: - $ref: '#/components/schemas/Annotations' nullable: true description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true description: A meter is a configuration that defines how to match and aggregate events. example: id: 01G65Z755AFWAKHE12NY0CQ9FH slug: tokens_total name: Tokens Total description: AI Token Usage aggregation: SUM eventType: prompt valueProperty: $.tokens groupBy: model: $.model type: $.type createdAt: '2024-01-01T01:01:01.001Z' updatedAt: '2024-01-01T01:01:01.001Z' MeterAggregation: type: string enum: - SUM - COUNT - UNIQUE_COUNT - AVG - MIN - MAX - LATEST description: The aggregation type to use for the meter. x-enum-varnames: - Sum - Count - UniqueCount - Avg - Min - Max - Latest MeterCreate: type: object required: - slug - aggregation - eventType properties: description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata name: type: string minLength: 1 maxLength: 256 description: |- Human-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified. title: Display name slug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- A unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters. example: tokens_total aggregation: allOf: - $ref: '#/components/schemas/MeterAggregation' description: The aggregation type to use for the meter. example: SUM eventType: type: string minLength: 1 description: The event type to aggregate. example: prompt eventFrom: type: string format: date-time description: |- The date since the meter should include events. Useful to skip old events. If not specified, all historical events are included. example: '2023-01-01T01:01:01.001Z' valueProperty: type: string minLength: 1 description: |- JSONPath expression to extract the value from the ingested event's data property. The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number. For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored. example: $.tokens groupBy: type: object additionalProperties: type: string description: |- Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters. example: type: $.type description: A meter create model. example: slug: tokens_total name: Tokens Total description: AI Token Usage aggregation: SUM eventType: prompt valueProperty: $.tokens groupBy: model: $.model type: $.type MeterOrderBy: type: string enum: - key - name - aggregation - createdAt - updatedAt description: Order by options for meters. MeterQueryRequest: type: object properties: clientId: type: string minLength: 1 maxLength: 36 description: |- Client ID Useful to track progress of a query. example: f74e58ed-94ce-4041-ae06-cf45420451a3 from: type: string format: date-time description: |- Start date-time in RFC 3339 format. Inclusive. example: '2023-01-01T01:01:01.001Z' to: type: string format: date-time description: |- End date-time in RFC 3339 format. Inclusive. example: '2023-01-01T01:01:01.001Z' 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: type: string description: |- The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). If not specified, the UTC timezone will be used. example: UTC default: UTC subject: type: array items: type: string maxItems: 100 description: Filtering by multiple subjects. example: - subject-1 - subject-2 filterCustomerId: type: array items: type: string maxItems: 100 description: Filtering by multiple customers. example: - id-1 - id-2 filterGroupBy: type: object additionalProperties: type: array items: type: string description: Simple filter for group bys with exact match. example: model: - gpt-4-turbo - gpt-4o type: - prompt advancedMeterGroupByFilters: type: object additionalProperties: $ref: '#/components/schemas/FilterString' description: |- Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields. example: model: $in: - gpt-4 - gpt-4o type: $eq: input groupBy: type: array items: type: string maxItems: 100 description: |- If not specified a single aggregate will be returned for each subject and time window. `subject` is a reserved group by value. example: - model - type description: A meter query request. MeterQueryResult: type: object required: - data properties: from: type: string format: date-time description: |- The start of the period the usage is queried from. If not specified, the usage is queried from the beginning of time. example: '2023-01-01T01:01:01.001Z' to: type: string format: date-time description: |- The end of the period the usage is queried to. If not specified, the usage is queried up to the current time. example: '2023-01-01T01:01:01.001Z' windowSize: allOf: - $ref: '#/components/schemas/WindowSize' description: |- The window size that the usage is aggregated. If not specified, the usage is aggregated over the entire period. data: type: array items: $ref: '#/components/schemas/MeterQueryRow' description: |- The usage data. If no data is available, an empty array is returned. description: The result of a meter query. example: from: '2023-01-01T00:00:00Z' to: '2023-01-02T00:00:00Z' windowSize: DAY data: - value: 12 windowStart: '2023-01-01T00:00:00Z' windowEnd: '2023-01-02T00:00:00Z' subject: customer-1 groupBy: model: gpt-4-turbo type: prompt MeterQueryRow: type: object required: - value - windowStart - windowEnd - subject - groupBy properties: value: type: number format: double description: The aggregated value. windowStart: type: string format: date-time description: The start of the window the value is aggregated over. example: '2023-01-01T01:01:01.001Z' windowEnd: type: string format: date-time description: The end of the window the value is aggregated over. example: '2023-01-01T01:01:01.001Z' subject: type: string nullable: true description: |- The subject the value is aggregated over. If not specified, the value is aggregated over all subjects. customerId: type: string description: The customer ID the value is aggregated over. groupBy: type: object additionalProperties: type: string nullable: true description: The group by values the value is aggregated over. description: A row in the result of a meter query. example: value: 12 windowStart: '2023-01-01T00:00:00Z' windowEnd: '2023-01-02T00:00:00Z' subject: customer-1 groupBy: model: gpt-4-turbo type: prompt MeterUpdate: type: object properties: description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata name: type: string minLength: 1 maxLength: 256 description: |- Human-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified. title: Display name groupBy: type: object additionalProperties: type: string description: |- Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters. example: type: $.type description: |- A meter update model. Only the properties that can be updated are included. For example, the slug and aggregation cannot be updated. example: name: Tokens Total description: AI Token Usage groupBy: model: $.model type: $.type NotFoundProblemResponse: type: object 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. NotImplementedProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: The server does not support the functionality required to fulfill the request. NotificationChannel: type: object allOf: - $ref: '#/components/schemas/NotificationChannelWebhook' description: Notification channel. NotificationChannelCreateRequest: type: object allOf: - $ref: '#/components/schemas/NotificationChannelWebhookCreateRequest' description: Union type for requests creating new notification channel with certain type. NotificationChannelMeta: type: object required: - id - type properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification channel. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Channel Unique Identifier readOnly: true type: allOf: - $ref: '#/components/schemas/NotificationChannelType' description: Notification channel type. title: Channel Type description: Metadata only fields of a notification channel. NotificationChannelOrderBy: type: string enum: - id - type - createdAt - updatedAt description: Order by options for notification channels. NotificationChannelPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/NotificationChannel' description: The items in the current page. description: Paginated response NotificationChannelType: type: string enum: - WEBHOOK description: Type of the notification channel. x-enum-varnames: - Webhook NotificationChannelWebhook: type: object required: - createdAt - updatedAt - id - type - name - url properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification channel. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Channel Unique Identifier readOnly: true type: type: string enum: - WEBHOOK description: Notification channel type. title: Channel Type name: type: string minLength: 1 maxLength: 256 description: User friendly name of the channel. title: Channel Name example: customer-webhook disabled: type: boolean description: Whether the channel is disabled or not. title: Channel Disabled example: true default: false annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata url: type: string description: Webhook URL where the notification is sent. title: Webhook URL example: https://example.com/webhook customHeaders: type: object additionalProperties: type: string description: Custom HTTP headers sent as part of the webhook request. title: Custom HTTP Headers signingSecret: type: string pattern: ^(whsec_)?[a-zA-Z0-9+/=]{32,100}$ description: |- Signing secret used for webhook request validation on the receiving end. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 title: Signing Secret example: whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8 description: Notification channel with webhook type. NotificationChannelWebhookCreateRequest: type: object required: - type - name - url properties: type: type: string enum: - WEBHOOK description: Notification channel type. title: Channel Type name: type: string minLength: 1 maxLength: 256 description: User friendly name of the channel. title: Channel Name example: customer-webhook disabled: type: boolean description: Whether the channel is disabled or not. title: Channel Disabled example: true default: false metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata url: type: string description: Webhook URL where the notification is sent. title: Webhook URL example: https://example.com/webhook customHeaders: type: object additionalProperties: type: string description: Custom HTTP headers sent as part of the webhook request. title: Custom HTTP Headers signingSecret: type: string pattern: ^(whsec_)?[a-zA-Z0-9+/=]{32,100}$ description: |- Signing secret used for webhook request validation on the receiving end. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 title: Signing Secret example: whsec_S6g2HLnTwd9AhHwUIMFggVS9OfoPafN8 description: Request with input parameters for creating new notification channel with webhook type. NotificationEvent: type: object required: - id - type - createdAt - rule - deliveryStatus - payload properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier of the notification event. example: 01J2KNP1YTXQRXHTDJ4KPR7PZ0 title: Event Identifier readOnly: true type: allOf: - $ref: '#/components/schemas/NotificationEventType' description: Type of the notification event. title: Event Type readOnly: true createdAt: type: string format: date-time description: Timestamp when the notification event was created in RFC 3339 format. example: '2023-01-01T01:01:01.001Z' title: Creation Time readOnly: true rule: allOf: - $ref: '#/components/schemas/NotificationRule' description: The nnotification rule which generated this event. readOnly: true deliveryStatus: type: array items: $ref: '#/components/schemas/NotificationEventDeliveryStatus' description: The delivery status of the notification event. title: Delivery Status readOnly: true payload: allOf: - $ref: '#/components/schemas/NotificationEventPayload' description: Timestamp when the notification event was created in RFC 3339 format. readOnly: true annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true description: Type of the notification event. NotificationEventBalanceThresholdPayload: type: object required: - id - type - timestamp - data properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the notification event the payload belongs to. example: 01J2KNP1YTXQRXHTDJ4KPR7PZ0 title: Notification Event Identifier readOnly: true type: type: string enum: - entitlements.balance.threshold description: Type of the notification event. title: Notification Event Type readOnly: true timestamp: type: string format: date-time description: Timestamp when the notification event was created in RFC 3339 format. example: '2023-01-01T01:01:01.001Z' title: Creation Time readOnly: true data: allOf: - $ref: '#/components/schemas/NotificationEventBalanceThresholdPayloadData' description: The data of the payload. title: Payload Data readOnly: true description: Payload for notification event with `entitlements.balance.threshold` type. NotificationEventBalanceThresholdPayloadData: type: object required: - entitlement - feature - subject - value - threshold properties: entitlement: allOf: - $ref: '#/components/schemas/EntitlementMetered' title: Entitlement readOnly: true feature: allOf: - $ref: '#/components/schemas/Feature' title: Feature readOnly: true subject: allOf: - $ref: '#/components/schemas/Subject' title: Subject readOnly: true value: allOf: - $ref: '#/components/schemas/EntitlementValue' title: Entitlement Value readOnly: true customer: allOf: - $ref: '#/components/schemas/Customer' title: Customer readOnly: true threshold: allOf: - $ref: '#/components/schemas/NotificationRuleBalanceThresholdValue' title: Threshold readOnly: true description: Data of the payload for notification event with `entitlements.balance.threshold` type. NotificationEventDeliveryAttempt: type: object required: - state - response - timestamp properties: state: allOf: - $ref: '#/components/schemas/NotificationEventDeliveryStatusState' description: State of teh delivery attempt. title: State of teh delivery attempt example: SUCCESS readOnly: true response: allOf: - $ref: '#/components/schemas/EventDeliveryAttemptResponse' description: Response returned by the notification event recipient. title: Response returned by the notification event recipient readOnly: true timestamp: type: string format: date-time description: Timestamp of the delivery attempt. example: '2023-01-01T01:01:01.001Z' title: Timestamp of the delivery attempt readOnly: true description: The delivery attempt of the notification event. NotificationEventDeliveryStatus: type: object required: - state - reason - updatedAt - channel - attempts properties: state: allOf: - $ref: '#/components/schemas/NotificationEventDeliveryStatusState' description: Delivery state of the notification event to the channel. example: SUCCESS readOnly: true reason: type: string description: The reason of the last deliverry state update. title: State Reason example: Failed to dispatch event due to provider error. readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the status was last updated in RFC 3339 format. example: '2023-01-01T01:01:01.001Z' title: Last Update Time readOnly: true channel: allOf: - $ref: '#/components/schemas/NotificationChannelMeta' description: Notification channel the delivery status associated with. title: Notification Channel readOnly: true annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true nextAttempt: type: string format: date-time 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' title: Timestamp of the next delivery attempt readOnly: true attempts: type: array items: $ref: '#/components/schemas/NotificationEventDeliveryAttempt' description: List of delivery attempts. title: Delivery Attempts readOnly: true description: The delivery status of the notification event. NotificationEventDeliveryStatusState: type: string enum: - SUCCESS - FAILED - SENDING - PENDING - RESENDING description: The delivery state of the notification event to the channel. title: Delivery State x-enum-varnames: - Success - Failed - Sending - Pending - Resending NotificationEventEntitlementValuePayloadBase: type: object required: - entitlement - feature - subject - value properties: entitlement: allOf: - $ref: '#/components/schemas/EntitlementMetered' title: Entitlement readOnly: true feature: allOf: - $ref: '#/components/schemas/Feature' title: Feature readOnly: true subject: allOf: - $ref: '#/components/schemas/Subject' title: Subject readOnly: true value: allOf: - $ref: '#/components/schemas/EntitlementValue' title: Entitlement Value readOnly: true customer: allOf: - $ref: '#/components/schemas/Customer' title: Customer readOnly: true description: Base data for any payload with entitlement entitlement value. NotificationEventInvoiceCreatedPayload: type: object required: - id - type - timestamp - data properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the notification event the payload belongs to. example: 01J2KNP1YTXQRXHTDJ4KPR7PZ0 title: Notification Event Identifier readOnly: true type: type: string enum: - invoice.created description: Type of the notification event. title: Notification Event Type readOnly: true timestamp: type: string format: date-time description: Timestamp when the notification event was created in RFC 3339 format. example: '2023-01-01T01:01:01.001Z' title: Creation Time readOnly: true data: allOf: - $ref: '#/components/schemas/Invoice' description: The data of the payload. title: Payload Data readOnly: true description: Payload for notification event with `invoice.created` type. NotificationEventInvoiceUpdatedPayload: type: object required: - id - type - timestamp - data properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the notification event the payload belongs to. example: 01J2KNP1YTXQRXHTDJ4KPR7PZ0 title: Notification Event Identifier readOnly: true type: type: string enum: - invoice.updated description: Type of the notification event. title: Notification Event Type readOnly: true timestamp: type: string format: date-time description: Timestamp when the notification event was created in RFC 3339 format. example: '2023-01-01T01:01:01.001Z' title: Creation Time readOnly: true data: allOf: - $ref: '#/components/schemas/Invoice' description: The data of the payload. title: Payload Data readOnly: true description: Payload for notification event with `invoice.updated` type. NotificationEventOrderBy: type: string enum: - id - createdAt description: Order by options for notification channels. NotificationEventPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/NotificationEvent' description: The items in the current page. description: Paginated response NotificationEventPayload: type: object oneOf: - $ref: '#/components/schemas/NotificationEventResetPayload' - $ref: '#/components/schemas/NotificationEventBalanceThresholdPayload' - $ref: '#/components/schemas/NotificationEventInvoiceCreatedPayload' - $ref: '#/components/schemas/NotificationEventInvoiceUpdatedPayload' discriminator: propertyName: type mapping: entitlements.reset: '#/components/schemas/NotificationEventResetPayload' entitlements.balance.threshold: '#/components/schemas/NotificationEventBalanceThresholdPayload' invoice.created: '#/components/schemas/NotificationEventInvoiceCreatedPayload' invoice.updated: '#/components/schemas/NotificationEventInvoiceUpdatedPayload' description: The delivery status of the notification event. NotificationEventResendRequest: type: object properties: channels: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH description: Notification channels to which the event should be re-sent. title: Channels description: A notification event that will be re-sent. NotificationEventResetPayload: type: object required: - id - type - timestamp - data properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the notification event the payload belongs to. example: 01J2KNP1YTXQRXHTDJ4KPR7PZ0 title: Notification Event Identifier readOnly: true type: type: string enum: - entitlements.reset description: Type of the notification event. title: Notification Event Type readOnly: true timestamp: type: string format: date-time description: Timestamp when the notification event was created in RFC 3339 format. example: '2023-01-01T01:01:01.001Z' title: Creation Time readOnly: true data: allOf: - $ref: '#/components/schemas/NotificationEventEntitlementValuePayloadBase' description: The data of the payload. title: Payload Data readOnly: true description: Payload for notification event with `entitlements.reset` type. NotificationEventType: type: string enum: - entitlements.balance.threshold - entitlements.reset - invoice.created - invoice.updated description: Type of the notification event. NotificationRule: type: object oneOf: - $ref: '#/components/schemas/NotificationRuleBalanceThreshold' - $ref: '#/components/schemas/NotificationRuleEntitlementReset' - $ref: '#/components/schemas/NotificationRuleInvoiceCreated' - $ref: '#/components/schemas/NotificationRuleInvoiceUpdated' discriminator: propertyName: type mapping: entitlements.balance.threshold: '#/components/schemas/NotificationRuleBalanceThreshold' entitlements.reset: '#/components/schemas/NotificationRuleEntitlementReset' invoice.created: '#/components/schemas/NotificationRuleInvoiceCreated' invoice.updated: '#/components/schemas/NotificationRuleInvoiceUpdated' description: Notification Rule. NotificationRuleBalanceThreshold: type: object required: - createdAt - updatedAt - id - type - name - channels - thresholds properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification rule. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Rule Unique Identifier readOnly: true type: type: string enum: - entitlements.balance.threshold description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false channels: type: array items: $ref: '#/components/schemas/NotificationChannelMeta' description: List of notification channels the rule applies to. title: Channels assigned to Rule annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata thresholds: type: array items: $ref: '#/components/schemas/NotificationRuleBalanceThresholdValue' minItems: 1 maxItems: 10 description: List of thresholds the rule suppose to be triggered. title: Entitlement Balance Thresholds features: type: array items: $ref: '#/components/schemas/FeatureMeta' minItems: 1 description: Optional field containing list of features the rule applies to. title: Features description: Notification rule with entitlements.balance.threshold type. NotificationRuleBalanceThresholdCreateRequest: type: object required: - type - name - thresholds - channels properties: type: type: string enum: - entitlements.balance.threshold description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata thresholds: type: array items: $ref: '#/components/schemas/NotificationRuleBalanceThresholdValue' minItems: 1 maxItems: 10 description: List of thresholds the rule suppose to be triggered. title: Entitlement Balance Thresholds channels: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH minItems: 1 description: List of notification channels the rule is applied to. title: Channels features: type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- ULID (Universally Unique Lexicographically Sortable Identifier). A key is a unique string that is used to identify a resource. TODO: this is a temporary solution to support both ULID and Key in the same spec for codegen. minItems: 1 description: Optional field for defining the scope of notification by feature. It may contain features by id or key. title: Features description: Request with input parameters for creating new notification rule with entitlements.balance.threshold type. NotificationRuleBalanceThresholdValue: type: object required: - value - type properties: value: type: number format: double description: Value of the threshold. title: Threshold Value example: 100 type: allOf: - $ref: '#/components/schemas/NotificationRuleBalanceThresholdValueType' description: Type of the threshold. example: usage_value description: Threshold value with multiple supported types. NotificationRuleBalanceThresholdValueType: type: string enum: - PERCENT - NUMBER - balance_value - usage_percentage - usage_value description: |- Type of the rule in the balance threshold specification: * `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period * `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period * `usage_value`: threshold defined by the usage value in the current usage period * `NUMBER` (**deprecated**): see `usage_value` * `PERCENT` (**deprecated**): see `usage_percentage` title: Notification balance threshold type x-enum-varnames: - Percent - Number - BalanceValue - UsagePercentage - UsageValue NotificationRuleCreateRequest: type: object oneOf: - $ref: '#/components/schemas/NotificationRuleBalanceThresholdCreateRequest' - $ref: '#/components/schemas/NotificationRuleEntitlementResetCreateRequest' - $ref: '#/components/schemas/NotificationRuleInvoiceCreatedCreateRequest' - $ref: '#/components/schemas/NotificationRuleInvoiceUpdatedCreateRequest' discriminator: propertyName: type mapping: entitlements.balance.threshold: '#/components/schemas/NotificationRuleBalanceThresholdCreateRequest' entitlements.reset: '#/components/schemas/NotificationRuleEntitlementResetCreateRequest' invoice.created: '#/components/schemas/NotificationRuleInvoiceCreatedCreateRequest' invoice.updated: '#/components/schemas/NotificationRuleInvoiceUpdatedCreateRequest' description: Union type for requests creating new notification rule with certain type. NotificationRuleEntitlementReset: type: object required: - createdAt - updatedAt - id - type - name - channels properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification rule. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Rule Unique Identifier readOnly: true type: type: string enum: - entitlements.reset description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false channels: type: array items: $ref: '#/components/schemas/NotificationChannelMeta' description: List of notification channels the rule applies to. title: Channels assigned to Rule annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata features: type: array items: $ref: '#/components/schemas/FeatureMeta' minItems: 1 description: Optional field containing list of features the rule applies to. title: Features description: Notification rule with entitlements.reset type. NotificationRuleEntitlementResetCreateRequest: type: object required: - type - name - channels properties: type: type: string enum: - entitlements.reset description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata channels: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH minItems: 1 description: List of notification channels the rule is applied to. title: Channels features: type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- ULID (Universally Unique Lexicographically Sortable Identifier). A key is a unique string that is used to identify a resource. TODO: this is a temporary solution to support both ULID and Key in the same spec for codegen. minItems: 1 description: Optional field for defining the scope of notification by feature. It may contain features by id or key. title: Features description: Request with input parameters for creating new notification rule with entitlements.reset type. NotificationRuleInvoiceCreated: type: object required: - createdAt - updatedAt - id - type - name - channels properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification rule. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Rule Unique Identifier readOnly: true type: type: string enum: - invoice.created description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false channels: type: array items: $ref: '#/components/schemas/NotificationChannelMeta' description: List of notification channels the rule applies to. title: Channels assigned to Rule annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata description: Notification rule with invoice.created type. NotificationRuleInvoiceCreatedCreateRequest: type: object required: - type - name - channels properties: type: type: string enum: - invoice.created description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata channels: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH minItems: 1 description: List of notification channels the rule is applied to. title: Channels description: Request with input parameters for creating new notification rule with invoice.created type. NotificationRuleInvoiceUpdated: type: object required: - createdAt - updatedAt - id - type - name - channels properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification rule. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Rule Unique Identifier readOnly: true type: type: string enum: - invoice.updated description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false channels: type: array items: $ref: '#/components/schemas/NotificationChannelMeta' description: List of notification channels the rule applies to. title: Channels assigned to Rule annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata description: Notification rule with invoice.updated type. NotificationRuleInvoiceUpdatedCreateRequest: type: object required: - type - name - channels properties: type: type: string enum: - invoice.updated description: Notification rule type. title: Rule Type name: type: string minLength: 1 maxLength: 256 description: The user friendly name of the notification rule. title: Rule Name example: Balance threshold reached disabled: type: boolean description: Whether the rule is disabled or not. title: Rule Disabled example: true default: false metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata channels: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH minItems: 1 description: List of notification channels the rule is applied to. title: Channels description: Request with input parameters for creating new notification rule with invoice.updated type. NotificationRuleMeta: type: object required: - id - type properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: Identifies the notification rule. example: 01ARZ3NDEKTSV4RRFFQ69G5FAV title: Rule Unique Identifier readOnly: true type: allOf: - $ref: '#/components/schemas/NotificationEventType' description: Notification rule type. title: Rule Type readOnly: true description: Metadata only fields of a notification channel. NotificationRuleOrderBy: type: string enum: - id - type - createdAt - updatedAt description: Order by options for notification channels. NotificationRulePaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/NotificationRule' description: The items in the current page. description: Paginated response Numeric: type: string pattern: ^\-?[0-9]+(\.[0-9]+)?$ description: Numeric represents an arbitrary precision number. OAuth2AuthorizationCodeGrantErrorType: type: string enum: - invalid_request - unauthorized_client - access_denied - unsupported_response_type - invalid_scope - server_error - temporarily_unavailable description: OAuth2 authorization code grant error types. PackagePrice: type: object required: - type - amount - quantityPerPackage properties: type: type: string enum: - package description: The type of the price. amount: allOf: - $ref: '#/components/schemas/Numeric' description: The price of one package. title: Amount quantityPerPackage: allOf: - $ref: '#/components/schemas/Numeric' description: The quantity per package. title: Quantity per package description: |- Package price. The item is sold in packages. Each package contains quantityPerPackage items, the price of the package is set in amount. The total price of the usage will be enough packages that can accomodate all the usage. Examples (given a package size of 20, and an amount of $10): - if the quantity is 98, the price will be 5*$10=$50. - if the quantity is zero, the price will be 0*$10=$0, as even the first package is not purchased. - if the quantity is 20, the price will be 1*$10=$10, as the usage fits into the first package. - if the quantity is 20.1, the price will be 2*$10=$20, as the additional 0.1 usage (compared to the previous example) requires a new package. PackagePriceWithCommitments: type: object required: - type - amount - quantityPerPackage properties: type: type: string enum: - package description: The type of the price. amount: allOf: - $ref: '#/components/schemas/Numeric' description: The price of one package. title: Amount quantityPerPackage: allOf: - $ref: '#/components/schemas/Numeric' description: The quantity per package. title: Quantity per package minimumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is committed to spend at least the amount. title: Minimum amount maximumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is limited to spend at most the amount. title: Maximum amount description: Package price with spend commitments. PaymentDueDate: type: object required: - dueAt - amount properties: dueAt: type: string format: date-time description: When the payment is due. example: '2023-01-01T01:01:01.001Z' readOnly: true notes: type: string description: Other details to take into account for the due date. readOnly: true amount: allOf: - $ref: '#/components/schemas/Numeric' description: How much needs to be paid by the date. readOnly: true percent: allOf: - $ref: '#/components/schemas/Percentage' description: Percentage of the total that should 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 description: PaymentDueDate contains an amount that should be paid by the given date. PaymentTermDueDate: type: object required: - type - dueAt properties: type: type: string enum: - due_date description: Type of terms to be applied. detail: type: string description: Text detail of the chosen payment terms. readOnly: true notes: type: string description: Description of the conditions for payment. readOnly: true dueAt: type: array items: $ref: '#/components/schemas/PaymentDueDate' minItems: 1 description: When the payment is due. readOnly: true description: PaymentTermDueDate defines the terms for payment on a specific date. PaymentTermInstant: type: object required: - type properties: type: type: string enum: - instant description: Type of terms to be applied. detail: type: string description: Text detail of the chosen payment terms. readOnly: true notes: type: string description: Description of the conditions for payment. readOnly: true description: PaymentTermInstant defines the terms for payment on receipt of invoice. PaymentTermType: type: string enum: - due_date - instant description: PaymentTermType defines the type of terms to be applied. PaymentTerms: anyOf: - $ref: '#/components/schemas/PaymentTermInstant' - $ref: '#/components/schemas/PaymentTermDueDate' description: PaymentTerms defines the terms for payment. Percentage: type: number format: double description: |- Numeric representation of a percentage 50% is represented as 50 example: 50 x-go-package: github.com/openmeterio/openmeter/pkg/models x-go-type: models.Percentage Period: type: object required: - from - to properties: from: type: string format: date-time description: Period start time. example: '2023-01-01T01:01:01.001Z' to: type: string format: date-time description: Period end time. example: '2023-02-01T01:01:01.001Z' description: A period with a start and end time. Plan: type: object required: - id - name - createdAt - updatedAt - key - version - currency - billingCadence - status - phases - validationErrors properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key alignment: allOf: - $ref: '#/components/schemas/Alignment' description: Alignment configuration for the plan. version: type: integer minimum: 1 description: Version of the plan. Incremented when the plan is updated. title: Version default: 1 readOnly: true currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the plan. title: Currency default: USD billingCadence: type: string format: duration description: |- The default billing cadence for subscriptions using this plan. Defines how often customers are billed using ISO8601 duration format. Examples: "P1M" (monthly), "P3M" (quarterly), "P1Y" (annually). title: Billing cadence example: P1M proRatingConfig: allOf: - $ref: '#/components/schemas/ProRatingConfig' description: Default pro-rating configuration for subscriptions using this plan. title: Pro-rating configuration default: enabled: true mode: prorate_prices effectiveFrom: type: string format: date-time 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' title: Effective start date readOnly: true effectiveTo: type: string format: date-time 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' title: Effective end date readOnly: true status: allOf: - $ref: '#/components/schemas/PlanStatus' description: |- The status of the plan. Computed based on the effective start and end dates: - draft = no effectiveFrom - active = effectiveFrom <= now < effectiveTo - archived / inactive = effectiveTo <= now - scheduled = now < effectiveFrom < effectiveTo title: Status readOnly: true phases: type: array items: $ref: '#/components/schemas/PlanPhase' minItems: 1 description: |- The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. A 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. title: Plan phases validationErrors: type: array items: $ref: '#/components/schemas/ValidationError' nullable: true description: List of validation errors. title: Validation errors readOnly: true description: Plans provide a template for subscriptions. PlanAddon: type: object required: - createdAt - updatedAt - addon - fromPlanPhase - validationErrors properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the resource. title: Metadata addon: allOf: - $ref: '#/components/schemas/Addon' description: Add-on object. title: Addon readOnly: true fromPlanPhase: type: string 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 maxQuantity: type: integer description: |- The maximum number of times the add-on can be purchased for the plan. It is not applicable for add-ons with single instance type. title: Max quantity of the add-on validationErrors: type: array items: $ref: '#/components/schemas/ValidationError' nullable: true description: List of validation errors. title: Validation errors readOnly: true description: The PlanAddon describes the association between a plan and add-on. PlanAddonCreate: type: object required: - fromPlanPhase - addonId properties: metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the resource. title: Metadata fromPlanPhase: type: string 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 maxQuantity: type: integer description: |- The maximum number of times the add-on can be purchased for the plan. It is not applicable for add-ons with single instance type. title: Max quantity of the add-on addonId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The add-on unique identifier in ULID format. example: 01G65Z755AFWAKHE12NY0CQ9FH title: Add-on unique identifier description: A plan add-on assignment create request. PlanAddonOrderBy: type: string enum: - id - key - version - created_at - updated_at description: Order by options for plan add-on assignments. PlanAddonPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/PlanAddon' description: The items in the current page. description: Paginated response PlanAddonReplaceUpdate: type: object required: - fromPlanPhase properties: metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the resource. title: Metadata fromPlanPhase: type: string 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 maxQuantity: type: integer description: |- The maximum number of times the add-on can be purchased for the plan. It is not applicable for add-ons with single instance type. title: Max quantity of the add-on description: Resource update operation model. PlanCreate: type: object required: - name - key - currency - billingCadence - phases properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key alignment: allOf: - $ref: '#/components/schemas/Alignment' description: Alignment configuration for the plan. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: The currency code of the plan. title: Currency default: USD billingCadence: type: string format: duration description: |- The default billing cadence for subscriptions using this plan. Defines how often customers are billed using ISO8601 duration format. Examples: "P1M" (monthly), "P3M" (quarterly), "P1Y" (annually). title: Billing cadence example: P1M proRatingConfig: allOf: - $ref: '#/components/schemas/ProRatingConfig' description: Default pro-rating configuration for subscriptions using this plan. title: Pro-rating configuration default: enabled: true mode: prorate_prices phases: type: array items: $ref: '#/components/schemas/PlanPhase' minItems: 1 description: |- The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. A 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. title: Plan phases description: Resource create operation model. PlanOrderBy: type: string enum: - id - key - version - created_at - updated_at description: Order by options for plans. PlanPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Plan' description: The items in the current page. description: Paginated response PlanPhase: type: object required: - key - name - duration - rateCards properties: key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata duration: type: string format: duration nullable: true description: The duration of the phase. title: Duration example: P1Y rateCards: type: array items: $ref: '#/components/schemas/RateCard' description: The rate cards of the plan. title: Rate cards description: The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. PlanReference: type: object required: - id - key - version properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The plan ID. example: 01G65Z755AFWAKHE12NY0CQ9FH key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The plan key. version: type: integer description: The plan version. description: References an exact plan. PlanReferenceInput: type: object required: - key properties: key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The plan key. version: type: integer description: The plan version. description: References an exact plan defaulting to the current active version. PlanReplaceUpdate: type: object required: - name - billingCadence - phases properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata alignment: allOf: - $ref: '#/components/schemas/Alignment' description: Alignment configuration for the plan. billingCadence: type: string format: duration description: |- The default billing cadence for subscriptions using this plan. Defines how often customers are billed using ISO8601 duration format. Examples: "P1M" (monthly), "P3M" (quarterly), "P1Y" (annually). title: Billing cadence example: P1M proRatingConfig: allOf: - $ref: '#/components/schemas/ProRatingConfig' description: Default pro-rating configuration for subscriptions using this plan. title: Pro-rating configuration default: enabled: true mode: prorate_prices phases: type: array items: $ref: '#/components/schemas/PlanPhase' minItems: 1 description: |- The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses. A 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. title: Plan phases description: Resource update operation model. PlanStatus: type: string enum: - draft - active - archived - scheduled description: The status of a plan. PlanSubscriptionChange: type: object required: - timing - plan properties: timing: allOf: - $ref: '#/components/schemas/SubscriptionTiming' description: |- Timing configuration for the change, when the change should take effect. For changing a subscription, the accepted values depend on the subscription configuration. alignment: allOf: - $ref: '#/components/schemas/Alignment' description: What alignment settings the subscription should have. metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Arbitrary metadata associated with the subscription. plan: allOf: - $ref: '#/components/schemas/PlanReferenceInput' description: The plan reference to change to. startingPhase: type: string minLength: 1 description: |- The key of the phase to start the subscription in. If not provided, the subscription will start in the first phase of the plan. name: type: string description: The name of the Subscription. If not provided the plan name is used. description: type: string description: Description for the Subscription. billingAnchor: type: string format: date-time 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' description: Change subscription based on plan. PlanSubscriptionCreate: type: object required: - plan properties: alignment: allOf: - $ref: '#/components/schemas/Alignment' description: What alignment settings the subscription should have. metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Arbitrary metadata associated with the subscription. plan: allOf: - $ref: '#/components/schemas/PlanReferenceInput' description: The plan reference to change to. startingPhase: type: string minLength: 1 description: |- The key of the phase to start the subscription in. If not provided, the subscription will start in the first phase of the plan. name: type: string description: The name of the Subscription. If not provided the plan name is used. description: type: string description: Description for the Subscription. timing: allOf: - $ref: '#/components/schemas/SubscriptionTiming' description: |- Timing configuration for the change, when the change should take effect. The default is immediate. default: immediate customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the customer. Provide either the key or ID. Has presedence over the key. example: 01G65Z755AFWAKHE12NY0CQ9FH customerKey: type: string minLength: 1 maxLength: 256 description: The key of the customer. Provide either the key or ID. billingAnchor: type: string format: date-time 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' description: Create subscription based on plan. title: Create from plan PortalToken: type: object required: - subject properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true subject: type: string example: customer-1 expiresAt: type: string format: date-time description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' example: '2023-01-01T01:01:01.001Z' readOnly: true expired: type: boolean readOnly: true createdAt: type: string format: date-time description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' example: '2023-01-01T01:01:01.001Z' readOnly: true token: type: string description: The token is only returned at creation. example: om_portal_IAnD3PpWW2A2Wr8m9jfzeHlGX8xmCXwG.y5q4S-AWqFu6qjfaFz0zQq4Ez28RsnyVwJffX5qxMvo readOnly: true allowedMeterSlugs: type: array items: type: string description: Optional, if defined only the specified meters will be allowed. example: - tokens_total description: |- A consumer portal token. Validator doesn't obey required for readOnly properties See: https://github.com/stoplightio/spectral/issues/1274 PreconditionFailedProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: One or more conditions given in the request header fields evaluated to false when tested on the server. Price: type: object oneOf: - $ref: '#/components/schemas/FlatPrice' - $ref: '#/components/schemas/UnitPrice' - $ref: '#/components/schemas/TieredPrice' - $ref: '#/components/schemas/DynamicPrice' - $ref: '#/components/schemas/PackagePrice' discriminator: propertyName: type mapping: flat: '#/components/schemas/FlatPrice' unit: '#/components/schemas/UnitPrice' tiered: '#/components/schemas/TieredPrice' dynamic: '#/components/schemas/DynamicPrice' package: '#/components/schemas/PackagePrice' description: |- Price. One of: flat, unit, or tiered. PricePaymentTerm: type: string enum: - in_advance - in_arrears description: |- The payment term of a flat price. One of: in_advance or in_arrears. PriceTier: type: object required: - flatPrice - unitPrice properties: upToAmount: allOf: - $ref: '#/components/schemas/Numeric' description: |- Up to and including to this quantity will be contained in the tier. If null, the tier is open-ended. title: Up to quantity flatPrice: type: object allOf: - $ref: '#/components/schemas/FlatPrice' nullable: true description: The flat price component of the tier. title: Flat price component unitPrice: type: object allOf: - $ref: '#/components/schemas/UnitPrice' nullable: true description: The unit price component of the tier. title: Unit price component description: |- A price tier. At least one price component is required in each tier. PriceType: type: string enum: - flat - unit - tiered - dynamic - package description: The type of the price. ProRatingConfig: type: object required: - enabled - mode properties: enabled: type: boolean description: Whether pro-rating is enabled for this plan. title: Enable pro-rating default: true mode: allOf: - $ref: '#/components/schemas/ProRatingMode' description: How to handle pro-rating for billing period changes. title: Pro-rating mode default: prorate_prices description: Configuration for pro-rating behavior. ProRatingMode: type: string enum: - prorate_prices description: Pro-rating mode options for handling billing period changes. Progress: type: object required: - success - failed - total - updatedAt properties: success: type: integer format: uint64 description: Success is the number of items that succeeded failed: type: integer format: uint64 description: Failed is the number of items that failed total: type: integer format: uint64 description: The total number of items to process updatedAt: type: string format: date-time description: The time the progress was last updated example: '2023-01-01T01:01:01.001Z' description: Progress describes a progress of a task. RateCard: type: object oneOf: - $ref: '#/components/schemas/RateCardFlatFee' - $ref: '#/components/schemas/RateCardUsageBased' discriminator: propertyName: type mapping: flat_fee: '#/components/schemas/RateCardFlatFee' usage_based: '#/components/schemas/RateCardUsageBased' description: A rate card defines the pricing and entitlement of a feature or service. RateCardBooleanEntitlement: type: object required: - type properties: metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. type: type: string enum: - boolean description: Entitlement template of a boolean entitlement. RateCardEntitlement: type: object oneOf: - $ref: '#/components/schemas/RateCardMeteredEntitlement' - $ref: '#/components/schemas/RateCardStaticEntitlement' - $ref: '#/components/schemas/RateCardBooleanEntitlement' discriminator: propertyName: type mapping: metered: '#/components/schemas/RateCardMeteredEntitlement' static: '#/components/schemas/RateCardStaticEntitlement' boolean: '#/components/schemas/RateCardBooleanEntitlement' description: |- Entitlement templates are used to define the entitlements of a plan. Features are omitted from the entitlement template, as they are defined in the rate card. RateCardFlatFee: type: object required: - type - key - name - billingCadence - price properties: type: type: string enum: - flat_fee description: The type of the RateCard. title: RateCard type key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the customer is entitled to use. title: Feature key entitlementTemplate: allOf: - $ref: '#/components/schemas/RateCardEntitlement' description: |- The entitlement of the rate card. Only available when featureKey is set. taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: |- The tax config of the rate card. When undefined, the tax config of the feature or the default tax config of the plan is used. title: Tax config billingCadence: type: string format: duration nullable: true description: |- The billing cadence of the rate card. When null it means it is a one time fee. title: Billing cadence price: type: object allOf: - $ref: '#/components/schemas/FlatPriceWithPaymentTerm' nullable: true description: |- The price of the rate card. When null, the feature or service is free. title: Price example: type: flat amount: '100' paymentTerm: in_arrears discounts: allOf: - $ref: '#/components/schemas/Discounts' description: |- The discount of the rate card. For flat fee rate cards only percentage discounts are supported. Only available when price is set. title: Discounts description: A flat fee rate card defines a one-time purchase or a recurring fee. RateCardMeteredEntitlement: type: object required: - type properties: metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. type: type: string enum: - metered isSoftLimit: type: boolean description: If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true. title: Soft limit default: false issueAfterReset: type: number format: double minimum: 0 description: |- You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount. That 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. Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same. title: Initial grant amount issueAfterResetPriority: type: integer format: uint8 minimum: 1 maximum: 255 description: Defines the grant priority for the default grant. title: Issue grant after reset priority default: 1 preserveOverageAtReset: type: boolean description: If true, the overage is preserved at reset. If false, the usage is reset to 0. title: Preserve overage at reset default: false usagePeriod: type: string format: duration description: |- The interval of the metered entitlement. Defaults to the billing cadence of the rate card. title: Usage Period description: The entitlement template with a metered entitlement. RateCardStaticEntitlement: type: object required: - type - config properties: metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional metadata for the feature. type: type: string enum: - static config: type: string format: json 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"] }' description: Entitlement template of a static entitlement. RateCardType: type: string enum: - flat_fee - usage_based description: The type of the rate card. RateCardUsageBased: type: object required: - type - key - name - billingCadence - price properties: type: type: string enum: - usage_based description: The type of the RateCard. title: RateCard type key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature the customer is entitled to use. title: Feature key entitlementTemplate: allOf: - $ref: '#/components/schemas/RateCardEntitlement' description: |- The entitlement of the rate card. Only available when featureKey is set. taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: |- The tax config of the rate card. When undefined, the tax config of the feature or the default tax config of the plan is used. title: Tax config billingCadence: type: string format: duration description: The billing cadence of the rate card. title: Billing cadence price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' nullable: true description: |- The price of the rate card. When null, the feature or service is free. discounts: allOf: - $ref: '#/components/schemas/Discounts' description: |- The discounts of the rate card. Flat fee rate cards only support percentage discounts. title: Discounts description: A usage-based rate card defines a price based on usage. RateCardUsageBasedPrice: type: object oneOf: - $ref: '#/components/schemas/FlatPriceWithPaymentTerm' - $ref: '#/components/schemas/UnitPriceWithCommitments' - $ref: '#/components/schemas/TieredPriceWithCommitments' - $ref: '#/components/schemas/DynamicPriceWithCommitments' - $ref: '#/components/schemas/PackagePriceWithCommitments' discriminator: propertyName: type mapping: flat: '#/components/schemas/FlatPriceWithPaymentTerm' unit: '#/components/schemas/UnitPriceWithCommitments' tiered: '#/components/schemas/TieredPriceWithCommitments' dynamic: '#/components/schemas/DynamicPriceWithCommitments' package: '#/components/schemas/PackagePriceWithCommitments' description: The price of the usage based rate card. RecurringPeriod: type: object required: - interval - anchor - intervalISO properties: 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 anchor: type: string format: date-time description: A date-time anchor to base the recurring period on. example: '2023-01-01T01:01:01.001Z' title: Anchor time intervalISO: type: string format: duration description: The unit of time for the interval in ISO8601 format. description: Recurring period with an interval and an anchor. deprecated: true example: interval: DAY intervalISO: P1D anchor: '2023-01-01T01:01:01.001Z' RecurringPeriodCreateInput: type: object required: - interval properties: interval: allOf: - $ref: '#/components/schemas/RecurringPeriodInterval' description: The unit of time for the interval. title: Interval anchor: type: string format: date-time description: A date-time anchor to base the recurring period on. example: '2023-01-01T01:01:01.001Z' title: Anchor time description: Recurring period with an interval and an anchor. example: interval: DAY anchor: '2023-01-01T01:01:01.001Z' RecurringPeriodInterval: anyOf: - type: string pattern: ^P(?:\d+(?:\.\d+)?Y)?(?:\d+(?:\.\d+)?M)?(?:\d+(?:\.\d+)?W)?(?:\d+(?:\.\d+)?D)?(?:T(?:\d+(?:\.\d+)?H)?(?:\d+(?:\.\d+)?M)?(?:\d+(?:\.\d+)?S)?)?$ - $ref: '#/components/schemas/RecurringPeriodIntervalEnum' description: Period duration for the recurrence RecurringPeriodIntervalEnum: type: string enum: - DAY - WEEK - MONTH - YEAR description: |- The unit of time for the interval. One of: `day`, `week`, `month`, or `year`. RecurringPeriodV2: type: object required: - interval - anchor properties: 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 anchor: type: string format: date-time description: A date-time anchor to base the recurring period on. example: '2023-01-01T01:01:01.001Z' title: Anchor time description: Recurring period with an interval and an anchor. RemovePhaseShifting: type: string enum: - next - prev description: The direction of the phase shift when a phase is removed. ResetEntitlementUsageInput: type: object properties: effectiveAt: type: string format: date-time 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' retainAnchor: type: boolean description: |- Determines whether the usage period anchor is retained or reset to the effectiveAt time. - If true, the usage period anchor is retained. - If false, the usage period anchor is reset to the effectiveAt time. preserveOverage: type: boolean description: |- Determines whether the overage is preserved or forgiven, overriding the entitlement's default behavior. - If true, the overage is preserved. - If false, the overage is forgiven. description: Reset parameters SandboxApp: type: object required: - id - name - createdAt - updatedAt - listing - status - type properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true listing: allOf: - $ref: '#/components/schemas/MarketplaceListing' description: The marketplace listing that this installed app is based on. readOnly: true status: allOf: - $ref: '#/components/schemas/AppStatus' description: Status of the app connection. readOnly: true type: type: string enum: - sandbox description: The app's type is Sandbox. description: |- Sandbox app can be used for testing OpenMeter features. The app is not creating anything in external systems, thus it is safe to use for verifying OpenMeter features. SandboxAppReplaceUpdate: type: object required: - name - type properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata type: type: string enum: - sandbox description: The app's type is Sandbox. description: Resource update operation model. SandboxCustomerAppData: type: object required: - type properties: app: allOf: - $ref: '#/components/schemas/SandboxApp' description: The installed sandbox app this data belongs to. readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The app ID. If not provided, it will use the global default for the app type. example: 01G65Z755AFWAKHE12NY0CQ9FH title: App ID type: type: string enum: - sandbox description: The app name. title: App Type description: Sandbox Customer App Data. ServiceUnavailableProblemResponse: type: object 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. SortOrder: type: string enum: - ASC - DESC description: The order direction. SpendCommitments: type: object properties: minimumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is committed to spend at least the amount. title: Minimum amount maximumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is limited to spend at most the amount. title: Maximum amount description: |- Spending commitments. The customer is committed to spend at least the minimum amount and at most the maximum amount. StripeAPIKeyInput: type: object required: - secretAPIKey properties: secretAPIKey: type: string description: |- The Stripe API key input. Used to authenticate with the Stripe API. StripeApp: type: object required: - id - name - createdAt - updatedAt - listing - status - type - stripeAccountId - livemode - maskedAPIKey properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true listing: allOf: - $ref: '#/components/schemas/MarketplaceListing' description: The marketplace listing that this installed app is based on. readOnly: true status: allOf: - $ref: '#/components/schemas/AppStatus' description: Status of the app connection. readOnly: true type: type: string enum: - stripe description: The app's type is Stripe. stripeAccountId: type: string description: The Stripe account ID. readOnly: true livemode: type: boolean description: Livemode, true if the app is in production mode. readOnly: true maskedAPIKey: type: string description: |- The masked API key. Only shows the first 8 and last 3 characters. readOnly: true description: A installed Stripe app object. example: id: 01G65Z755AFWAKHE12NY0CQ9FH type: stripe name: Stripe status: ready listing: type: stripe name: Stripe description: Stripe integration allows you to collect payments with Stripe. capabilities: - type: calculateTax key: stripe_calculate_tax name: Calculate Tax description: Stripe Tax calculates tax portion of the invoices. - type: invoiceCustomers key: stripe_invoice_customers name: Invoice Customers description: Stripe invoices customers with due amount. - type: collectPayments key: stripe_collect_payments name: Collect Payments description: Stripe payments collects outstanding revenue with Stripe customer's default payment method. installMethods: - with_oauth2 - with_api_key createdAt: '2024-01-01T01:01:01.001Z' updatedAt: '2024-01-01T01:01:01.001Z' stripeAccountId: acct_123456789 livemode: true maskedAPIKey: sk_live_************abc StripeAppReadOrCreateOrUpdateOrDeleteOrQuery: type: object required: - id - name - createdAt - updatedAt - listing - status - type - stripeAccountId - livemode - maskedAPIKey properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true listing: allOf: - $ref: '#/components/schemas/MarketplaceListing' description: The marketplace listing that this installed app is based on. readOnly: true status: allOf: - $ref: '#/components/schemas/AppStatus' description: Status of the app connection. readOnly: true type: type: string enum: - stripe description: The app's type is Stripe. stripeAccountId: type: string description: The Stripe account ID. readOnly: true livemode: type: boolean description: Livemode, true if the app is in production mode. readOnly: true maskedAPIKey: type: string description: |- The masked API key. Only shows the first 8 and last 3 characters. readOnly: true secretAPIKey: type: string format: password description: The Stripe API key. description: A installed Stripe app object. example: id: 01G65Z755AFWAKHE12NY0CQ9FH type: stripe name: Stripe status: ready listing: type: stripe name: Stripe description: Stripe integration allows you to collect payments with Stripe. capabilities: - type: calculateTax key: stripe_calculate_tax name: Calculate Tax description: Stripe Tax calculates tax portion of the invoices. - type: invoiceCustomers key: stripe_invoice_customers name: Invoice Customers description: Stripe invoices customers with due amount. - type: collectPayments key: stripe_collect_payments name: Collect Payments description: Stripe payments collects outstanding revenue with Stripe customer's default payment method. installMethods: - with_oauth2 - with_api_key createdAt: '2024-01-01T01:01:01.001Z' updatedAt: '2024-01-01T01:01:01.001Z' stripeAccountId: acct_123456789 livemode: true maskedAPIKey: sk_live_************abc StripeAppReplaceUpdate: type: object required: - name - type properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata type: type: string enum: - stripe description: The app's type is Stripe. secretAPIKey: type: string format: password description: The Stripe API key. description: Resource update operation model. StripeCheckoutSessionMode: type: string enum: - setup description: Stripe CheckoutSession.mode StripeCustomerAppData: type: object required: - type - stripeCustomerId properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The app ID. If not provided, it will use the global default for the app type. example: 01G65Z755AFWAKHE12NY0CQ9FH title: App ID type: type: string enum: - stripe description: The app name. title: App Type stripeCustomerId: type: string description: The Stripe customer ID. stripeDefaultPaymentMethodId: type: string description: The Stripe default payment method ID. app: allOf: - $ref: '#/components/schemas/StripeApp' description: The installed stripe app this data belongs to. readOnly: true description: Stripe Customer App Data. example: type: stripe stripeCustomerId: cus_xxxxxxxxxxxxxx StripeCustomerAppDataBase: type: object required: - stripeCustomerId properties: stripeCustomerId: type: string description: The Stripe customer ID. stripeDefaultPaymentMethodId: type: string description: The Stripe default payment method ID. description: Stripe Customer App Data Base. StripeCustomerAppDataCreateOrUpdateItem: type: object required: - type - stripeCustomerId properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: |- The app ID. If not provided, it will use the global default for the app type. example: 01G65Z755AFWAKHE12NY0CQ9FH title: App ID type: type: string enum: - stripe description: The app name. title: App Type stripeCustomerId: type: string description: The Stripe customer ID. stripeDefaultPaymentMethodId: type: string description: The Stripe default payment method ID. description: Stripe Customer App Data. example: type: stripe stripeCustomerId: cus_xxxxxxxxxxxxxx StripeCustomerPortalSession: type: object required: - id - stripeCustomerId - configurationId - livemode - createdAt - returnUrl - locale - url properties: id: type: string description: |- The ID of the customer portal session. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id stripeCustomerId: type: string description: The ID of the stripe customer. configurationId: type: string description: |- Configuration used to customize the customer portal. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration livemode: type: boolean description: |- Livemode. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode createdAt: type: string format: date-time description: |- Created at. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-created example: '2023-01-01T01:01:01.001Z' returnUrl: type: string description: |- Return URL. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url locale: type: string description: |- Status. /** The IETF language tag of the locale customer portal is displayed in. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale url: type: string description: |- /** The ID of the customer.The URL to redirect the customer to after they have completed their requested actions. description: |- Stripe customer portal session. See: https://docs.stripe.com/api/customer_portal/sessions/object StripeTaxConfig: type: object required: - code properties: code: type: string pattern: ^txcd_\d{8}$ description: |- Product tax code. See: https://docs.stripe.com/tax/tax-codes title: Tax code example: txcd_10000000 description: The tax config for Stripe. StripeWebhookEvent: type: object required: - id - type - livemode - created - data properties: id: type: string description: The event ID. type: type: string description: The event type. livemode: type: boolean description: Live mode. created: type: integer format: int32 description: The event created timestamp. data: type: object properties: object: {} required: - object description: The event data. description: Stripe webhook event. StripeWebhookResponse: type: object required: - namespaceId - appId properties: namespaceId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH appId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH message: type: string description: Stripe webhook response. Subject: type: object required: - createdAt - updatedAt - id - key properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the subject. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true key: type: string description: |- A unique, human-readable identifier for the subject. This is typically a database ID or a customer key. example: customer-db-id-123 displayName: type: string nullable: true description: A human-readable display name for the subject. example: Customer Name metadata: type: object additionalProperties: {} nullable: true description: Metadata for the subject. example: hubspotId: '123456' currentPeriodStart: type: string format: date-time description: The start of the current period for the subject. example: '2023-01-01T00:00:00Z' deprecated: true currentPeriodEnd: type: string format: date-time description: The end of the current period for the subject. example: '2023-02-01T00:00:00Z' deprecated: true stripeCustomerId: type: string nullable: true description: The Stripe customer ID for the subject. deprecated: true example: cus_JMOlctsKV8 description: |- A subject is a unique identifier for a usage attribution by its key. Subjects only exist in the concept of metering. Subjects are optional to create and work as an enrichment for the subject key like displayName, metadata, etc. Subjects 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. For most use cases, a subject is equivalent to a customer. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. deprecated: true example: createdAt: '2025-01-01T01:01:01.001Z' updatedAt: '2025-02-01T01:01:01.001Z' deletedAt: '2025-03-01T01:01:01.001Z' id: 01G65Z755AFWAKHE12NY0CQ9FH key: customer-id displayName: Customer Name metadata: hubspotId: '123456' stripeCustomerId: cus_JMOlctsKV8 SubjectUpsert: type: object required: - key properties: key: type: string description: |- A unique, human-readable identifier for the subject. This is typically a database ID or a customer key. example: customer-db-id-123 displayName: type: string nullable: true description: A human-readable display name for the subject. example: Customer Name metadata: type: object additionalProperties: {} nullable: true description: Metadata for the subject. example: hubspotId: '123456' currentPeriodStart: type: string format: date-time description: The start of the current period for the subject. example: '2023-01-01T00:00:00Z' deprecated: true currentPeriodEnd: type: string format: date-time description: The end of the current period for the subject. example: '2023-02-01T00:00:00Z' deprecated: true stripeCustomerId: type: string nullable: true description: The Stripe customer ID for the subject. deprecated: true example: cus_JMOlctsKV8 description: |- A subject is a unique identifier for a user or entity. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead. deprecated: true example: key: customer-id displayName: Customer Name metadata: hubspotId: '123456' stripeCustomerId: cus_JMOlctsKV8 Subscription: type: object required: - id - name - createdAt - updatedAt - activeFrom - status - customerId - currency - billingCadence - billingAnchor properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true alignment: allOf: - $ref: '#/components/schemas/Alignment' description: Alignment configuration for the plan. status: allOf: - $ref: '#/components/schemas/SubscriptionStatus' description: The status of the subscription. readOnly: true customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The customer ID of the subscription. example: 01G65Z755AFWAKHE12NY0CQ9FH plan: allOf: - $ref: '#/components/schemas/PlanReference' description: The plan of the subscription. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- The currency code of the subscription. Will be revised once we add multi currency support. title: Currency default: USD billingCadence: type: string format: duration description: |- The billing cadence for the subscriptions. Defines how often customers are billed using ISO8601 duration format. Examples: "P1M" (monthly), "P3M" (quarterly), "P1Y" (annually). title: Billing cadence example: P1M readOnly: true proRatingConfig: allOf: - $ref: '#/components/schemas/ProRatingConfig' description: The pro-rating configuration for the subscriptions. title: Pro-rating configuration default: enabled: true mode: prorate_prices readOnly: true billingAnchor: type: string format: date-time description: The normalizedbilling anchor of the subscription. example: '2023-01-01T01:01:01.001Z' title: Billing anchor readOnly: true description: Subscription is an exact subscription instance. SubscriptionAddon: type: object required: - id - name - createdAt - updatedAt - activeFrom - addon - quantityAt - quantity - timeline - subscriptionId - rateCards properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' readOnly: true activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' readOnly: true addon: type: object properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the add-on. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A semi-unique identifier for the resource. title: Key readOnly: true version: type: integer minimum: 1 description: The version of the Add-on which templates this instance. title: Version default: 1 readOnly: true instanceType: allOf: - $ref: '#/components/schemas/AddonInstanceType' description: The instance type of the add-on. title: InstanceType readOnly: true required: - id - key - version - instanceType description: Partially populated add-on properties. title: Addon quantityAt: type: string format: date-time description: For which point in time the quantity was resolved to. example: '2025-01-05T00:00:00Z' title: QuantityAt readOnly: true quantity: type: integer minimum: 0 description: The quantity of the add-on. Always 1 for single instance add-ons. title: Quantity example: 1 timeline: type: array items: $ref: '#/components/schemas/SubscriptionAddonTimelineSegment' description: The timeline of the add-on. The returned periods are sorted and continuous. title: Timeline example: - quantity: 1 activeFrom: '2025-01-01T00:00:00Z' activeTo: '2025-01-02T00:00:00Z' - quantity: 0 activeFrom: '2025-01-02T00:00:00Z' activeTo: '2025-01-03T00:00:00Z' - quantity: 1 activeFrom: '2025-01-03T00:00:00Z' readOnly: true subscriptionId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the subscription. example: 01G65Z755AFWAKHE12NY0CQ9FH title: SubscriptionID readOnly: true rateCards: type: array items: $ref: '#/components/schemas/SubscriptionAddonRateCard' description: The rate cards of the add-on. title: Rate cards readOnly: true description: A subscription add-on, represents concrete instances of an add-on for a given subscription. SubscriptionAddonCreate: type: object required: - name - quantity - timing - addon properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata quantity: type: integer minimum: 0 description: The quantity of the add-on. Always 1 for single instance add-ons. title: Quantity example: 1 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 addon: type: object properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The ID of the add-on. example: 01G65Z755AFWAKHE12NY0CQ9FH required: - id description: The add-on to create. title: Addon description: A subscription add-on create body. SubscriptionAddonRateCard: type: object required: - rateCard - affectedSubscriptionItemIds properties: rateCard: allOf: - $ref: '#/components/schemas/RateCard' description: The rate card. title: Rate card affectedSubscriptionItemIds: type: array items: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH description: The IDs of the subscription items that this rate card belongs to. title: Affected subscription item IDs readOnly: true description: A rate card for a subscription add-on. SubscriptionAddonTimelineSegment: type: object required: - activeFrom - quantity properties: activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' quantity: type: integer minimum: 0 description: The quantity of the add-on for the given period. title: Quantity example: 1 readOnly: true description: A subscription add-on event. SubscriptionAddonUpdate: type: object properties: name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata quantity: type: integer minimum: 0 description: The quantity of the add-on. Always 1 for single instance add-ons. title: Quantity example: 1 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 description: Resource create or update operation model. SubscriptionAlignment: type: object properties: billablesMustAlign: type: boolean description: |- Whether all Billable items and RateCards must align. Alignment means the Price's BillingCadence must align for both duration and anchor time. deprecated: true currentAlignedBillingPeriod: allOf: - $ref: '#/components/schemas/Period' description: The current billing period. Only has value if the subscription is aligned and active. description: Alignment details enriched with the current billing period. SubscriptionBadRequestErrorResponse: type: object required: - type - title - detail - instance properties: type: type: string format: uri description: Type contains a URI that identifies the problem type. example: about:blank default: about:blank title: type: string description: A a short, human-readable summary of the problem type. example: Bad Request status: type: integer format: int16 minimum: 400 maximum: 599 description: The HTTP status code generated by the origin server for this occurrence of the problem. example: 400 detail: type: string description: A human-readable explanation specific to this occurrence of the problem. example: The request body must be a JSON object. instance: type: string format: uri description: A URI reference that identifies the specific occurrence of the problem. example: urn:request:local/JMOlctsKV8-000001 extensions: allOf: - $ref: '#/components/schemas/SubscriptionErrorExtensions' description: Additional properties specific to the problem type may be present. 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. SubscriptionChange: oneOf: - $ref: '#/components/schemas/PlanSubscriptionChange' - $ref: '#/components/schemas/CustomSubscriptionChange' description: Change a subscription. SubscriptionChangeResponseBody: type: object required: - current - next 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 description: Response body for subscription change. SubscriptionConflictErrorResponse: type: object required: - type - title - detail - instance properties: type: type: string format: uri description: Type contains a URI that identifies the problem type. example: about:blank default: about:blank title: type: string description: A a short, human-readable summary of the problem type. example: Bad Request status: type: integer format: int16 minimum: 400 maximum: 599 description: The HTTP status code generated by the origin server for this occurrence of the problem. example: 400 detail: type: string description: A human-readable explanation specific to this occurrence of the problem. example: The request body must be a JSON object. instance: type: string format: uri description: A URI reference that identifies the specific occurrence of the problem. example: urn:request:local/JMOlctsKV8-000001 extensions: allOf: - $ref: '#/components/schemas/SubscriptionErrorExtensions' description: Additional properties specific to the problem type may be present. description: |- The request could not be completed due to a conflict with the current state of the target resource. Variants with ErrorExtensions specific to subscriptions. SubscriptionCreate: oneOf: - $ref: '#/components/schemas/PlanSubscriptionCreate' - $ref: '#/components/schemas/CustomSubscriptionCreate' description: Create a subscription. SubscriptionEdit: type: object required: - customizations properties: customizations: type: array items: $ref: '#/components/schemas/SubscriptionEditOperation' maxItems: 100 description: |- Batch processing commands for manipulating running subscriptions. The key format is `/phases/{phaseKey}` or `/phases/{phaseKey}/items/{itemKey}`. 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. description: Subscription edit input. SubscriptionEditOperation: type: object 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' discriminator: propertyName: op mapping: add_item: '#/components/schemas/EditSubscriptionAddItem' remove_item: '#/components/schemas/EditSubscriptionRemoveItem' add_phase: '#/components/schemas/EditSubscriptionAddPhase' remove_phase: '#/components/schemas/EditSubscriptionRemovePhase' stretch_phase: '#/components/schemas/EditSubscriptionStretchPhase' unschedule_edit: '#/components/schemas/EditSubscriptionUnscheduleEdit' description: The operation to be performed on the subscription. SubscriptionErrorExtensions: type: object properties: validationErrors: type: array items: $ref: '#/components/schemas/ErrorExtension' required: - validationErrors description: Error extensions for the Subscription Errors. SubscriptionExpanded: type: object required: - id - name - createdAt - updatedAt - activeFrom - status - customerId - currency - billingCadence - billingAnchor - phases properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' annotations: allOf: - $ref: '#/components/schemas/Annotations' description: Set of key-value pairs managed by the system. Cannot be modified by user. title: Annotations readOnly: true status: allOf: - $ref: '#/components/schemas/SubscriptionStatus' description: The status of the subscription. readOnly: true customerId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The customer ID of the subscription. example: 01G65Z755AFWAKHE12NY0CQ9FH plan: allOf: - $ref: '#/components/schemas/PlanReference' description: The plan of the subscription. currency: allOf: - $ref: '#/components/schemas/CurrencyCode' description: |- The currency code of the subscription. Will be revised once we add multi currency support. title: Currency default: USD billingCadence: type: string format: duration description: |- The billing cadence for the subscriptions. Defines how often customers are billed using ISO8601 duration format. Examples: "P1M" (monthly), "P3M" (quarterly), "P1Y" (annually). title: Billing cadence example: P1M readOnly: true proRatingConfig: allOf: - $ref: '#/components/schemas/ProRatingConfig' description: The pro-rating configuration for the subscriptions. title: Pro-rating configuration default: enabled: true mode: prorate_prices readOnly: true billingAnchor: type: string format: date-time description: The normalizedbilling anchor of the subscription. example: '2023-01-01T01:01:01.001Z' title: Billing anchor readOnly: true alignment: allOf: - $ref: '#/components/schemas/SubscriptionAlignment' description: Alignment details enriched with the current billing period. phases: type: array items: $ref: '#/components/schemas/SubscriptionPhaseExpanded' description: The phases of the subscription. description: Expanded subscription SubscriptionItem: type: object required: - id - name - createdAt - updatedAt - activeFrom - key - billingCadence - price properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true activeFrom: type: string format: date-time description: The cadence start of the resource. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The cadence end of the resource. example: '2023-01-01T01:01:01.001Z' key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: |- The identifier of the RateCard. SubscriptionItem/RateCard can be identified, it has a reference: 1. If a Feature is associated with the SubscriptionItem, it is identified by the Feature 1.1 It can be an ID reference, for an exact version of the Feature (Features can change across versions) 1.2 It can be a Key reference, which always refers to the latest (active or inactive) version of a Feature 2. If a Feature is not associated with the SubscriptionItem, it is referenced by the Price We 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. featureKey: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: The feature's key (if present). billingCadence: type: string format: duration nullable: true description: |- The billing cadence of the rate card. When null, the rate card is a one-time purchase. title: Billing cadence price: allOf: - $ref: '#/components/schemas/RateCardUsageBasedPrice' nullable: true description: |- The price of the rate card. When null, the feature or service is free. title: Price example: type: flat amount: '100' paymentTerm: in_arrears discounts: allOf: - $ref: '#/components/schemas/Discounts' description: The discounts applied to the rate card. title: Discounts included: allOf: - $ref: '#/components/schemas/SubscriptionItemIncluded' description: Describes what access is gained via the SubscriptionItem taxConfig: allOf: - $ref: '#/components/schemas/TaxConfig' description: |- The tax config of the Subscription Item. When undefined, the tax config of the feature or the default tax config of the plan is used. title: Tax config description: The actual contents of the Subscription, what the user gets, what they pay, etc... SubscriptionItemIncluded: type: object required: - feature properties: feature: allOf: - $ref: '#/components/schemas/Feature' description: The feature the customer is entitled to use. entitlement: allOf: - $ref: '#/components/schemas/Entitlement' description: The entitlement of the Subscription Item. description: Included contents like Entitlement, or the Feature. SubscriptionPaginatedResponse: type: object required: - totalCount - page - pageSize - items properties: totalCount: type: integer description: The total number of items. example: 500 page: type: integer description: The page index. example: 1 pageSize: type: integer description: The maximum number of items per page. example: 100 items: type: array items: $ref: '#/components/schemas/Subscription' description: The items in the current page. description: Paginated response SubscriptionPhase: type: object required: - id - name - createdAt - updatedAt - key - activeFrom properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A locally unique identifier for the resource. discounts: allOf: - $ref: '#/components/schemas/Discounts' description: The discounts on the plan. title: Discounts activeFrom: type: string format: date-time description: The time from which the phase is active. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The until which the Phase is active. example: '2023-01-01T01:01:01.001Z' description: Subscription phase, analogous to plan phases. SubscriptionPhaseCreate: type: object required: - startAfter - key - name properties: startAfter: type: string format: duration nullable: true description: |- Interval after the subscription starts to transition to the phase. When null, the phase starts immediately after the subscription starts. title: Start after example: P1Y duration: type: string format: duration description: |- The intended duration of the new phase. Duration is required when the phase will not be the last phase. title: Duration example: P1M discounts: allOf: - $ref: '#/components/schemas/Discounts' description: The discounts on the plan. title: Discounts key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A locally unique identifier for the phase. name: type: string description: The name of the phase. description: type: string description: The description of the phase. description: Subscription phase create input. SubscriptionPhaseExpanded: type: object required: - id - name - createdAt - updatedAt - key - activeFrom - items - itemTimelines properties: id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: A unique identifier for the resource. example: 01G65Z755AFWAKHE12NY0CQ9FH title: ID readOnly: true name: type: string minLength: 1 maxLength: 256 description: Human-readable name for the resource. Between 1 and 256 characters. title: Display name description: type: string maxLength: 1024 description: Optional description of the resource. Maximum 1024 characters. title: Description metadata: type: object allOf: - $ref: '#/components/schemas/Metadata' nullable: true description: Additional metadata for the resource. title: Metadata createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true key: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$ description: A locally unique identifier for the resource. discounts: allOf: - $ref: '#/components/schemas/Discounts' description: The discounts on the plan. title: Discounts activeFrom: type: string format: date-time description: The time from which the phase is active. example: '2023-01-01T01:01:01.001Z' activeTo: type: string format: date-time description: The until which the Phase is active. example: '2023-01-01T01:01:01.001Z' items: type: array items: $ref: '#/components/schemas/SubscriptionItem' description: |- The items of the phase. The structure is flattened to better conform to the Plan API. The timelines are flattened according to the following rules: - for the current phase, the `items` contains only the active item for each key - for past phases, the `items` contains only the last item for each key - for future phases, the `items` contains only the first version of the item for each key itemTimelines: type: object additionalProperties: type: array items: $ref: '#/components/schemas/SubscriptionItem' description: Includes all versions of the items on each key, including all edits, scheduled changes, etc... description: Expanded subscription phase SubscriptionStatus: type: string enum: - active - inactive - canceled - scheduled description: Subscription status. SubscriptionTiming: oneOf: - $ref: '#/components/schemas/SubscriptionTimingEnum' - type: string format: date-time description: '[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.' example: '2023-01-01T01:01:01.001Z' description: |- Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned. SubscriptionTimingEnum: type: string enum: - immediate - next_billing_cycle description: |- Subscription edit timing. When immediate, the requested changes take effect immediately. When nextBillingCycle, the requested changes take effect at the next billing cycle. TaxBehavior: type: string enum: - inclusive - exclusive description: |- Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price. TaxConfig: type: object properties: behavior: allOf: - $ref: '#/components/schemas/TaxBehavior' description: |- Tax behavior. If not specified the billing profile is used to determine the tax behavior. If not specified in the billing profile, the provider's default behavior is used. title: Tax behavior stripe: allOf: - $ref: '#/components/schemas/StripeTaxConfig' description: Stripe tax config. title: Stripe tax config customInvoicing: allOf: - $ref: '#/components/schemas/CustomInvoicingTaxConfig' description: Custom invoicing tax config. title: Custom invoicing tax config description: Set of provider specific tax configs. TieredPrice: type: object required: - type - mode - tiers properties: type: type: string enum: - tiered description: |- The type of the price. One of: flat, unit, or tiered. mode: allOf: - $ref: '#/components/schemas/TieredPriceMode' description: |- Defines if the tiering mode is volume-based or graduated: - In `volume`-based tiering, the maximum quantity within a period determines the per unit price. - In `graduated` tiering, pricing can change as the quantity grows. title: Mode tiers: type: array items: $ref: '#/components/schemas/PriceTier' minItems: 1 description: |- The tiers of the tiered price. At least one price component is required in each tier. title: Tiers description: Tiered price. TieredPriceMode: type: string enum: - volume - graduated description: The mode of the tiered price. TieredPriceWithCommitments: type: object required: - type - mode - tiers properties: type: type: string enum: - tiered description: |- The type of the price. One of: flat, unit, or tiered. mode: allOf: - $ref: '#/components/schemas/TieredPriceMode' description: |- Defines if the tiering mode is volume-based or graduated: - In `volume`-based tiering, the maximum quantity within a period determines the per unit price. - In `graduated` tiering, pricing can change as the quantity grows. title: Mode tiers: type: array items: $ref: '#/components/schemas/PriceTier' minItems: 1 description: |- The tiers of the tiered price. At least one price component is required in each tier. title: Tiers minimumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is committed to spend at least the amount. title: Minimum amount maximumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is limited to spend at most the amount. title: Maximum amount description: Tiered price with spend commitments. ULIDOrExternalKey: anyOf: - type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ULID (Universally Unique Lexicographically Sortable Identifier). example: 01G65Z755AFWAKHE12NY0CQ9FH - type: string minLength: 1 maxLength: 256 description: ExternalKey is a looser version of key. description: ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key. x-go-type: string UnauthorizedProblemResponse: type: object allOf: - $ref: '#/components/schemas/UnexpectedProblemResponse' description: The request has not been applied because it lacks valid authentication credentials for the target resource. UnexpectedProblemResponse: type: object required: - type - title - detail - instance properties: type: type: string format: uri description: Type contains a URI that identifies the problem type. example: about:blank default: about:blank title: type: string description: A a short, human-readable summary of the problem type. example: Bad Request status: type: integer format: int16 minimum: 400 maximum: 599 description: The HTTP status code generated by the origin server for this occurrence of the problem. example: 400 detail: type: string description: A human-readable explanation specific to this occurrence of the problem. example: The request body must be a JSON object. instance: type: string format: uri description: A URI reference that identifies the specific occurrence of the problem. example: urn:request:local/JMOlctsKV8-000001 extensions: type: object additionalProperties: {} description: Additional properties specific to the problem type may be present. example: validationErrors: - code: validation_error message: Validation error otherAttribute: otherValue additionalProperties: {} description: |- A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present. x-go-type-import: path: github.com/openmeterio/openmeter/pkg/models x-go-type: models.StatusProblem UnitPrice: type: object required: - type - amount properties: type: type: string enum: - unit description: The type of the price. amount: allOf: - $ref: '#/components/schemas/Numeric' description: The amount of the unit price. description: Unit price. UnitPriceWithCommitments: type: object required: - type - amount properties: type: type: string enum: - unit description: The type of the price. amount: allOf: - $ref: '#/components/schemas/Numeric' description: The amount of the unit price. minimumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is committed to spend at least the amount. title: Minimum amount maximumAmount: allOf: - $ref: '#/components/schemas/Numeric' description: The customer is limited to spend at most the amount. title: Maximum amount description: Unit price with spend commitments. ValidationError: type: object required: - field - code - message properties: field: type: string description: The path to the field. example: addons/pro/ratecards/token/featureKey readOnly: true code: type: string description: The machine readable description of the error. example: invalid_feature_key readOnly: true message: type: string description: The human readable description of the error. example: not found feature by key readOnly: true attributes: allOf: - $ref: '#/components/schemas/Annotations' description: Additional attributes. readOnly: true description: Validation errors providing detailed description of the issue. ValidationErrorProblemResponse: type: object required: - type - title - detail - instance properties: type: type: string format: uri description: Type contains a URI that identifies the problem type. example: about:blank default: about:blank title: type: string description: A a short, human-readable summary of the problem type. example: Bad Request status: type: integer format: int16 minimum: 400 maximum: 599 description: The HTTP status code generated by the origin server for this occurrence of the problem. example: 400 detail: type: string description: A human-readable explanation specific to this occurrence of the problem. example: The request body must be a JSON object. instance: type: string format: uri description: A URI reference that identifies the specific occurrence of the problem. example: urn:request:local/JMOlctsKV8-000001 extensions: type: object properties: validationErrors: type: array items: $ref: '#/components/schemas/ValidationError' description: Validation issues. readOnly: true description: A BadRequestError with a validationErrors extension. ValidationIssue: type: object required: - createdAt - updatedAt - id - severity - component - message properties: createdAt: type: string format: date-time description: Timestamp of when the resource was created. example: '2024-01-01T01:01:01.001Z' title: Creation Time readOnly: true updatedAt: type: string format: date-time description: Timestamp of when the resource was last updated. example: '2024-01-01T01:01:01.001Z' title: Last Update Time readOnly: true deletedAt: type: string format: date-time description: Timestamp of when the resource was permanently deleted. example: '2024-01-01T01:01:01.001Z' title: Deletion Time readOnly: true id: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: ID of the charge or discount. example: 01G65Z755AFWAKHE12NY0CQ9FH readOnly: true severity: allOf: - $ref: '#/components/schemas/ValidationIssueSeverity' description: The severity of the issue. readOnly: true field: type: string description: The field that the issue is related to, if available in JSON path format. readOnly: true code: type: string description: Machine indentifiable code for the issue, if available. readOnly: true component: type: string description: Component reporting the issue. readOnly: true message: type: string description: A human-readable description of the issue. readOnly: true metadata: allOf: - $ref: '#/components/schemas/Metadata' description: Additional context for the issue. readOnly: true description: |- ValidationIssue captures any validation issues related to the invoice. Issues with severity "critical" will prevent the invoice from being issued. ValidationIssueSeverity: type: string enum: - critical - warning description: |- ValidationIssueSeverity describes the severity of a validation issue. Issues with severity "critical" will prevent the invoice from being issued. VoidInvoiceActionCreate: type: object required: - percentage - action properties: 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) action: allOf: - $ref: '#/components/schemas/VoidInvoiceLineActionCreate' description: The action to take on the line items. description: InvoiceVoidAction describes how to handle the voided line items. VoidInvoiceActionCreateItem: type: object required: - percentage - action properties: 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) action: allOf: - $ref: '#/components/schemas/VoidInvoiceLineActionCreateItem' description: The action to take on the line items. description: InvoiceVoidAction describes how to handle the voided line items. VoidInvoiceActionInput: type: object required: - action - reason properties: action: allOf: - $ref: '#/components/schemas/VoidInvoiceActionCreate' description: The action to take on the voided line items. reason: type: string description: The reason for voiding the invoice. overrides: type: array items: $ref: '#/components/schemas/VoidInvoiceActionLineOverride' nullable: true description: |- Per line item overrides for the action. If not specified, the `action` will be applied to all line items. description: Request to void an invoice VoidInvoiceActionLineOverride: type: object required: - lineId - action properties: lineId: type: string pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ description: The line item ID to override. example: 01G65Z755AFWAKHE12NY0CQ9FH action: allOf: - $ref: '#/components/schemas/VoidInvoiceActionCreateItem' description: The action to take on the line item. description: VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding. VoidInvoiceLineActionCreate: type: object oneOf: - $ref: '#/components/schemas/VoidInvoiceLineDiscardAction' - $ref: '#/components/schemas/VoidInvoiceLinePendingActionCreate' discriminator: propertyName: type mapping: discard: '#/components/schemas/VoidInvoiceLineDiscardAction' pending: '#/components/schemas/VoidInvoiceLinePendingActionCreate' description: VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. VoidInvoiceLineActionCreateItem: type: object oneOf: - $ref: '#/components/schemas/VoidInvoiceLineDiscardAction' - $ref: '#/components/schemas/VoidInvoiceLinePendingActionCreateItem' discriminator: propertyName: type mapping: discard: '#/components/schemas/VoidInvoiceLineDiscardAction' pending: '#/components/schemas/VoidInvoiceLinePendingActionCreateItem' description: VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding. VoidInvoiceLineActionType: type: string enum: - discard - pending description: VoidInvoiceLineActionType describes how to handle the voidied line item in the invoice. VoidInvoiceLineDiscardAction: type: object required: - type properties: type: type: string enum: - discard description: The action to take on the line item. description: VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice. VoidInvoiceLinePendingActionCreate: type: object required: - type properties: type: type: string enum: - pending description: The action to take on the line item. nextInvoiceAt: type: string format: date-time description: |- The time at which the line item should be invoiced again. If not provided, the line item will be re-invoiced now. example: '2023-01-01T01:01:01.001Z' description: VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. VoidInvoiceLinePendingActionCreateItem: type: object required: - type properties: type: type: string enum: - pending description: The action to take on the line item. nextInvoiceAt: type: string format: date-time description: |- The time at which the line item should be invoiced again. If not provided, the line item will be re-invoiced now. example: '2023-01-01T01:01:01.001Z' description: VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice. WindowSize: type: string enum: - MINUTE - HOUR - DAY - MONTH description: Aggregation window size. x-enum-varnames: - Minute - Hour - Day - Month WindowedBalanceHistory: type: object required: - windowedHistory - burndownHistory properties: windowedHistory: type: array items: $ref: '#/components/schemas/BalanceHistoryWindow' description: |- The windowed balance history. - It only returns rows for windows where there was usage. - The windows are inclusive at their start and exclusive at their end. - The last window may be smaller than the window size and is inclusive at both ends. burndownHistory: type: array items: $ref: '#/components/schemas/GrantBurnDownHistorySegment' description: Grant burndown history. description: The windowed balance history. securitySchemes: PortalTokenAuth: type: http scheme: Bearer description: Consumer portal token. servers: - url: https://127.0.0.1 description: Local variables: {}