openapi: 3.0.3 info: title: Lotus API version: 0.9.1 description: Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric. paths: /api/credits/: get: operationId: api_credits_list parameters: - in: query name: currency_code schema: type: string minLength: 1 description: Filter to adjustments in a specific currency - in: query name: customer_id schema: type: string minLength: 1 description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend required: true - in: query name: effective_after schema: type: string format: date-time description: Filter to adjustments that are effective after this date - in: query name: effective_before schema: type: string format: date-time description: Filter to adjustments that are effective before this date - in: query name: expires_after schema: type: string format: date-time description: Filter to adjustments that expire after this date - in: query name: expires_before schema: type: string format: date-time description: Filter to adjustments that expire before this date - in: query name: issued_after schema: type: string format: date-time description: Filter to adjustments that were issued after this date - in: query name: issued_before schema: type: string format: date-time description: Filter to adjustments that were issued before this date - in: query name: status schema: type: array items: enum: - active - inactive type: string default: - active - inactive description: Filter to a specific set of adjustment statuses. Defaults to both active and inactive. tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/CustomerBalanceAdjustment' description: '' post: operationId: api_credits_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomerBalanceAdjustmentCreateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CustomerBalanceAdjustmentCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/CustomerBalanceAdjustmentCreateRequest' required: true security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/CustomerBalanceAdjustment' description: '' /api/credits/{credit_id}/update/: post: operationId: api_credits_update_create parameters: - in: path name: credit_id schema: type: string required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomerBalanceAdjustmentUpdateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CustomerBalanceAdjustmentUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/CustomerBalanceAdjustmentUpdateRequest' security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/CustomerBalanceAdjustment' description: '' /api/credits/{credit_id}/void/: post: operationId: api_credits_void_create parameters: - in: path name: credit_id schema: type: string required: true tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/CustomerBalanceAdjustment' description: '' /api/customer_feature_access/: get: operationId: api_customer_feature_access_list parameters: - in: query name: customer_id schema: type: string minLength: 1 description: The customer_id of the customer you want to check access. required: true - in: query name: feature_name schema: type: string minLength: 1 description: Name of the feature to check access for. required: true - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. This must be passed in as a stringified JSON object. tags: - api security: - OrganizationApiKeyAuth: [] TokenAuth: [] deprecated: true responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/GetFeatureAccess' description: '' /api/customer_metric_access/: get: operationId: api_customer_metric_access_list parameters: - in: query name: customer_id schema: type: string minLength: 1 description: The customer_id of the customer you want to check access. required: true - in: query name: event_name schema: type: string nullable: true minLength: 1 description: The name of the event you are checking access for. - in: query name: metric_id schema: type: string format: uuid nullable: true description: The metric_id of the metric you are checking access for. Please note that you must porovide exactly one of event_name and metric_id are mutually; a validation error will be thrown if both or none are provided. - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. This must be passed in as a stringified JSON object. tags: - api security: - OrganizationApiKeyAuth: [] TokenAuth: [] deprecated: true responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/GetEventAccess' description: '' /api/customers/: get: operationId: api_customers_list tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Customer' description: '' post: operationId: api_customers_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomerCreateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CustomerCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/CustomerCreateRequest' required: true security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/Customer' description: '' /api/customers/{customer_id}/: get: operationId: api_customers_retrieve parameters: - in: path name: customer_id schema: type: string description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend required: true tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Customer' description: '' /api/feature_access/: get: operationId: api_feature_access_retrieve parameters: - in: query name: customer_id schema: type: string minLength: 1 description: The customer_id of the customer you want to check access. required: true - in: query name: feature_id schema: type: string format: uuid description: The feature_id of the feature you want to check access for. required: true - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: "The subscription filters that are applied to this plan's relationship\ \ with the customer. If your billing model does not have the ability multiple\ \ plans or subscriptions per customer, this is likely not relevant for you. " tags: - api security: - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/FeatureAccessResponse' description: '' /api/invoice_url/: get: operationId: api_invoice_url_retrieve parameters: - in: query name: invoice_id schema: type: string format: uuid nullable: true description: The invoice_id of the invoice you want to get the PDF URL for. - in: query name: invoice_number schema: type: string minLength: 1 nullable: true description: The invoice_number of the invoice you want to get the PDF URL for. tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/GetInvoicePdfURLResponse' description: '' /api/invoices/: get: operationId: api_invoices_list parameters: - in: query name: customer_id schema: type: string minLength: 1 description: A filter for invoices for a specific customer - in: query name: payment_status schema: type: array items: enum: - unpaid - paid type: string default: - paid description: A filter for invoices with a specific payment status tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Invoice' description: '' /api/invoices/{invoice_id}/: get: operationId: api_invoices_retrieve parameters: - in: path name: invoice_id schema: type: string format: uuid required: true tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Invoice' description: '' patch: operationId: api_invoices_partial_update parameters: - in: path name: invoice_id schema: type: string format: uuid required: true tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedInvoiceUpdateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedInvoiceUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/PatchedInvoiceUpdateRequest' security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/InvoiceUpdate' description: '' /api/metric_access/: get: operationId: api_metric_access_retrieve parameters: - in: query name: customer_id schema: type: string minLength: 1 description: The customer_id of the customer you want to check access. required: true - in: query name: metric_id schema: type: string format: uuid description: The metric_id of the metric you want to check access for. required: true - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: 'Used if you want to restrict the access check to only plans that fulfill certain subscription filter criteria. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. ' tags: - api security: - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/MetricAccessResponse' description: '' /api/ping/: get: operationId: api_ping_retrieve tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ConfirmConnected' description: '' /api/plans/: get: operationId: api_plans_list tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Plan' description: '' /api/plans/{plan_id}/: get: operationId: api_plans_retrieve parameters: - in: path name: plan_id schema: type: string format: uuid required: true tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Plan' description: '' /api/subscriptions/: get: operationId: api_subscriptions_list parameters: - in: query name: customer_id schema: type: string minLength: 1 description: Filter to a specific customer. required: true - in: query name: plan_id schema: type: string format: uuid description: Filter to a specific plan. - in: query name: range_end schema: type: string format: date-time description: If specified, will only return subscriptions with a start date before this date. - in: query name: range_start schema: type: string format: date-time description: If specified, will only return subscriptions with an end date after this date. - in: query name: status schema: type: array items: enum: - active - ended - not_started type: string default: - active description: Filter to a specific set of subscription statuses. Defaults to active. - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. tags: - api security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionRecord' description: '' /api/subscriptions/add/: post: operationId: api_subscriptions_add_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/SubscriptionRecordCreateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/SubscriptionRecordCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SubscriptionRecordCreateRequest' required: true security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SubscriptionRecord' description: '' /api/subscriptions/addons/add/: post: operationId: api_subscriptions_addons_add_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/AddOnSubscriptionRecordCreateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/AddOnSubscriptionRecordCreateRequest' multipart/form-data: schema: $ref: '#/components/schemas/AddOnSubscriptionRecordCreateRequest' required: true security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/AddOnSubscriptionRecord' description: '' /api/subscriptions/addons/cancel/: post: operationId: api_subscriptions_addons_cancel_create parameters: - in: query name: addon_id schema: type: string format: uuid description: Filter to a specific addon. required: true - in: query name: attached_customer_id schema: type: string minLength: 1 description: Filter to a specific customer. required: true - in: query name: attached_plan_id schema: type: string format: uuid description: Filter to a specific plan. required: true - in: query name: attached_subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/SubscriptionRecordCancelRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/SubscriptionRecordCancelRequest' multipart/form-data: schema: $ref: '#/components/schemas/SubscriptionRecordCancelRequest' security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/AddOnSubscriptionRecord' description: '' /api/subscriptions/addons/update/: post: operationId: api_subscriptions_addons_update_create parameters: - in: query name: addon_id schema: type: string format: uuid description: Filter to a specific addon. required: true - in: query name: attached_customer_id schema: type: string minLength: 1 description: Filter to a specific customer. required: true - in: query name: attached_plan_id schema: type: string format: uuid description: Filter to a specific plan. required: true - in: query name: attached_subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/AddonSubscriptionRecordUpdateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/AddonSubscriptionRecordUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/AddonSubscriptionRecordUpdateRequest' security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/AddOnSubscriptionRecord' description: '' /api/subscriptions/cancel/: post: operationId: api_subscriptions_cancel_create parameters: - in: query name: customer_id schema: type: string minLength: 1 description: Filter to a specific customer. required: true - in: query name: plan_id schema: type: string format: uuid description: Filter to a specific plan. If not specified, all plans will be included in the cancellation request. - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/SubscriptionRecordCancelRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/SubscriptionRecordCancelRequest' multipart/form-data: schema: $ref: '#/components/schemas/SubscriptionRecordCancelRequest' security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionRecord' description: '' /api/subscriptions/update/: post: operationId: api_subscriptions_update_create parameters: - in: query name: customer_id schema: type: string minLength: 1 description: Filter to a specific customer. required: true - in: query name: plan_id schema: type: string format: uuid description: Filter to a specific plan. required: true - in: query name: subscription_filters schema: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/SubscriptionRecordUpdateRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/SubscriptionRecordUpdateRequest' multipart/form-data: schema: $ref: '#/components/schemas/SubscriptionRecordUpdateRequest' security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionRecord' description: '' /api/track/: post: operationId: api_track_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchEventRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/BatchEventRequest' multipart/form-data: schema: $ref: '#/components/schemas/BatchEventRequest' required: true security: - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/TrackEventSuccess' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/TrackEventFailure' description: '' /api/verify_idems_received/: post: operationId: api_verify_idems_received_create tags: - api requestBody: content: application/json: schema: $ref: '#/components/schemas/ConfirmIdemsReceivedRequestRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ConfirmIdemsReceivedRequestRequest' multipart/form-data: schema: $ref: '#/components/schemas/ConfirmIdemsReceivedRequestRequest' required: true security: - knoxTokenAuth: [] - OrganizationApiKeyAuth: [] TokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ConfirmIdemsReceived' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ConfirmIdemsReceivedFailure' description: '' components: schemas: APIToken: type: object properties: name: type: string description: A free-form name for the API key. Need not be unique. 50 characters max. maxLength: 50 prefix: type: string readOnly: true expiry_date: type: string format: date-time nullable: true title: Expires description: Once API key expires, clients cannot use it anymore. created: type: string format: date-time readOnly: true required: - created - prefix APITokenCreateResponse: type: object properties: api_key: $ref: '#/components/schemas/APIToken' key: type: string required: - api_key - key APITokenRequest: type: object properties: name: type: string minLength: 1 description: A free-form name for the API key. Need not be unique. 50 characters max. maxLength: 50 expiry_date: type: string format: date-time nullable: true title: Expires description: Once API key expires, clients cannot use it anymore. APITokenRollResponse: type: object properties: api_key: $ref: '#/components/schemas/APIToken' key: type: string required: - api_key - key AccessMethodsSubscriptionRecord: type: object properties: start_date: type: string format: date-time readOnly: true description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. end_date: type: string format: date-time readOnly: true description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' plan: $ref: '#/components/schemas/LightweightPlanVersion' required: - end_date - plan - start_date - subscription_filters Action: type: object description: DRF serializer for :class:`~activity.models.Action`. properties: id: type: integer readOnly: true actor: type: string readOnly: true verb: type: string maxLength: 255 action_object: type: string readOnly: true target: type: string readOnly: true public: type: boolean description: type: string nullable: true timestamp: type: string format: date-time required: - action_object - actor - id - target - verb AddOn: type: object properties: addon_name: type: string description: The name of the add-on plan. addon_id: type: string description: The ID of the add-on plan. description: type: string description: The description of the add-on plan. flat_rate: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true readOnly: true components: type: array items: $ref: '#/components/schemas/PlanComponent' features: type: array items: $ref: '#/components/schemas/Feature' currency: allOf: - $ref: '#/components/schemas/PricingUnit' description: Currency of the plan. Can only be null if the flat fee is 0 and all components are of type free. active_instances: type: integer readOnly: true description: The number of active instances of the add-on plan. invoice_when: enum: - invoice_on_attach - invoice_on_subscription_end readOnly: true billing_frequency: enum: - one_time - recurring readOnly: true addon_type: enum: - usage_based - flat type: string readOnly: true required: - active_instances - addon_id - addon_name - addon_type - billing_frequency - components - currency - description - features - flat_rate - invoice_when AddOnCreateRequest: type: object properties: addon_name: type: string minLength: 1 description: The name of the add-on plan. description: type: string nullable: true minLength: 1 description: The description of the add-on plan. recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' nullable: true components: type: array items: $ref: '#/components/schemas/PlanComponentCreateRequest' nullable: true features: type: array items: type: string format: uuid currency_code: type: string minLength: 1 nullable: true invoice_when: enum: - invoice_on_attach - invoice_on_subscription_end billing_frequency: enum: - one_time - recurring required: - addon_name - billing_frequency - description - invoice_when AddOnSubscriptionRecord: type: object properties: customer: $ref: '#/components/schemas/LightweightCustomer' addon: $ref: '#/components/schemas/LightweightAddon' start_date: type: string format: date-time readOnly: true description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. end_date: type: string format: date-time readOnly: true description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. parent: $ref: '#/components/schemas/LightweightSubscriptionRecord' fully_billed: type: boolean readOnly: true description: Whether the subscription has been fully billed and finalized. auto_renew: type: boolean readOnly: true description: Whether the subscription automatically renews. Defaults to true. required: - addon - auto_renew - customer - end_date - fully_billed - parent - start_date AddOnSubscriptionRecordCreateRequest: type: object properties: attach_to_customer_id: type: string minLength: 1 description: The add-on will be applied to this customer's subscription. attach_to_plan_id: type: string format: uuid description: The add-on will be applied to the subscription with this plan ID. attach_to_subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: In the case the customer has multiple subscriptions with the same plan ID, the subscription filters should be used to specify which subscription to apply the add-on to. addon_id: type: string format: uuid description: The add-on to be applied to the subscription. quantity: type: integer minimum: 1 default: 1 description: The quantity of the add-on to be applied to the subscription. Flat fees of add-ons will be multiplied by this quantity. Usage-based components of add-ons will be unaffected by the quantity. required: - addon_id - attach_to_customer_id - attach_to_plan_id AddonSubscriptionRecordUpdateRequest: type: object properties: invoicing_behavior: enum: - add_to_next_invoice - invoice_now type: string default: invoice_now description: The invoicing behavior to use when changing the quantity. Invoice now will recalculate the amount due immediately, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation. turn_off_auto_renew: type: boolean description: Turn off auto renew for the addon end_date: type: string format: date-time description: Change the end date for the addon. quantity: type: integer description: Change the quantity of the susbcription to be this number. Address: type: object properties: city: type: string description: City, district, suburb, town, or village maxLength: 50 country: enum: - AW - AF - AO - AI - AX - AL - AD - AE - AR - AM - AS - AQ - TF - AG - AU - AT - AZ - BI - BE - BJ - BQ - BF - BD - BG - BH - BS - BA - BL - BY - BZ - BM - BO - BR - BB - BN - BT - BV - BW - CF - CA - CC - CH - CL - CN - CI - CM - CD - CG - CK - CO - KM - CV - CR - CU - CW - CX - KY - CY - CZ - DE - DJ - DM - DK - DO - DZ - EC - EG - ER - EH - ES - EE - ET - FI - FJ - FK - FR - FO - FM - GA - GB - GE - GG - GH - GI - GN - GP - GM - GW - GQ - GR - GD - GL - GT - GF - GU - GY - HK - HM - HN - HR - HT - HU - ID - IM - IN - IO - IE - IR - IQ - IS - IL - IT - JM - JE - JO - JP - KZ - KE - KG - KH - KI - KN - KR - KW - LA - LB - LR - LY - LC - LI - LK - LS - LT - LU - LV - MO - MF - MA - MC - MD - MG - MV - MX - MH - MK - ML - MT - MM - ME - MN - MP - MZ - MR - MS - MQ - MU - MW - MY - YT - NA - NC - NE - NF - NG - NI - NU - NL - NO - NP - NR - NZ - OM - PK - PA - PN - PE - PH - PW - PG - PL - PR - KP - PT - PY - PS - PF - QA - RE - RO - RU - RW - SA - SD - SN - SG - GS - SH - SJ - SB - SL - SV - SM - SO - PM - RS - SS - ST - SR - SK - SI - SE - SZ - SX - SC - SY - TC - TD - TG - TH - TJ - TK - TM - TL - TO - TT - TN - TR - TV - TW - TZ - UG - UA - UM - UY - US - UZ - VA - VC - VE - VG - VI - VN - VU - WF - WS - YE - ZA - ZM - ZW type: string description: Two-letter country code (ISO 3166-1 alpha-2) line1: type: string description: Address line 1 (e.g., street, PO Box, or company name) maxLength: 100 line2: type: string nullable: true description: Address line 2 (e.g., apartment, suite, unit, or building) postal_code: type: string description: ZIP or postal code maxLength: 20 state: type: string nullable: true description: State, county, province, or region maxLength: 30 required: - city - country - line1 - postal_code AddressRequest: type: object properties: city: type: string minLength: 1 description: City, district, suburb, town, or village maxLength: 50 country: enum: - AW - AF - AO - AI - AX - AL - AD - AE - AR - AM - AS - AQ - TF - AG - AU - AT - AZ - BI - BE - BJ - BQ - BF - BD - BG - BH - BS - BA - BL - BY - BZ - BM - BO - BR - BB - BN - BT - BV - BW - CF - CA - CC - CH - CL - CN - CI - CM - CD - CG - CK - CO - KM - CV - CR - CU - CW - CX - KY - CY - CZ - DE - DJ - DM - DK - DO - DZ - EC - EG - ER - EH - ES - EE - ET - FI - FJ - FK - FR - FO - FM - GA - GB - GE - GG - GH - GI - GN - GP - GM - GW - GQ - GR - GD - GL - GT - GF - GU - GY - HK - HM - HN - HR - HT - HU - ID - IM - IN - IO - IE - IR - IQ - IS - IL - IT - JM - JE - JO - JP - KZ - KE - KG - KH - KI - KN - KR - KW - LA - LB - LR - LY - LC - LI - LK - LS - LT - LU - LV - MO - MF - MA - MC - MD - MG - MV - MX - MH - MK - ML - MT - MM - ME - MN - MP - MZ - MR - MS - MQ - MU - MW - MY - YT - NA - NC - NE - NF - NG - NI - NU - NL - NO - NP - NR - NZ - OM - PK - PA - PN - PE - PH - PW - PG - PL - PR - KP - PT - PY - PS - PF - QA - RE - RO - RU - RW - SA - SD - SN - SG - GS - SH - SJ - SB - SL - SV - SM - SO - PM - RS - SS - ST - SR - SK - SI - SE - SZ - SX - SC - SY - TC - TD - TG - TH - TJ - TK - TM - TL - TO - TT - TN - TR - TV - TW - TZ - UG - UA - UM - UY - US - UZ - VA - VC - VE - VG - VI - VN - VU - WF - WS - YE - ZA - ZM - ZW type: string description: Two-letter country code (ISO 3166-1 alpha-2) line1: type: string minLength: 1 description: Address line 1 (e.g., street, PO Box, or company name) maxLength: 100 line2: type: string nullable: true minLength: 1 description: Address line 2 (e.g., apartment, suite, unit, or building) postal_code: type: string minLength: 1 description: ZIP or postal code maxLength: 20 state: type: string nullable: true minLength: 1 description: State, county, province, or region maxLength: 30 required: - city - country - line1 - postal_code AllSubstitutionResults: type: object properties: substitution_results: type: array items: $ref: '#/components/schemas/SingleSubstitution' original_plans_revenue: type: number format: double new_plans_revenue: type: number format: double pct_revenue_change: type: number format: double nullable: true BacktestCreate: type: object properties: start_date: type: string format: date end_date: type: string format: date kpis: type: array items: enum: - total_revenue type: string backtest_name: type: string maxLength: 100 required: - backtest_name - end_date - kpis - start_date BacktestCreateRequest: type: object properties: start_date: type: string format: date end_date: type: string format: date substitutions: type: array items: $ref: '#/components/schemas/BacktestSubstitutionMultiRequest' writeOnly: true kpis: type: array items: enum: - total_revenue type: string backtest_name: type: string minLength: 1 maxLength: 100 required: - backtest_name - end_date - kpis - start_date - substitutions BacktestDetail: type: object properties: end_date: type: string format: date time_created: type: string format: date-time status: enum: - running - completed - failed type: string backtest_results: $ref: '#/components/schemas/AllSubstitutionResults' start_date: type: string format: date backtest_id: type: string backtest_name: type: string maxLength: 100 backtest_substitutions: type: array items: $ref: '#/components/schemas/BacktestSubstitution' kpis: type: object additionalProperties: {} required: - backtest_id - backtest_name - backtest_results - backtest_substitutions - end_date - start_date BacktestSubstitution: type: object properties: new_plan: $ref: '#/components/schemas/PlanVersionDetail' original_plan: $ref: '#/components/schemas/PlanVersionDetail' required: - new_plan - original_plan BacktestSubstitutionMulti: type: object properties: new_plan: type: string format: uuid original_plans: type: array items: type: string format: uuid required: - new_plan - original_plans BacktestSubstitutionMultiRequest: type: object properties: new_plan: type: string format: uuid original_plans: type: array items: type: string format: uuid required: - new_plan - original_plans BacktestSummary: type: object properties: backtest_name: type: string maxLength: 100 start_date: type: string format: date end_date: type: string format: date time_created: type: string format: date-time kpis: type: object additionalProperties: {} status: enum: - running - completed - failed type: string backtest_id: type: string required: - backtest_id - backtest_name - end_date - start_date BatchEventRequest: type: object properties: batch: type: array items: $ref: '#/components/schemas/EventRequest' required: - batch CategoricalFilter: type: object properties: property_name: type: string maxLength: 100 operator: enum: - isin - isnotin type: string comparison_value: type: array items: type: string required: - comparison_value - operator - property_name CategoricalFilterRequest: type: object properties: property_name: type: string minLength: 1 maxLength: 100 operator: enum: - isin - isnotin type: string comparison_value: type: array items: type: string minLength: 1 required: - comparison_value - operator - property_name ChangeUserOrganizationRequestRequest: type: object properties: transfer_to_organization_id: type: string minLength: 1 description: The organization ID to transfer to required: - transfer_to_organization_id ComponentUsage: type: object properties: event_name: type: string description: The name of the event you are checking access for. metric_name: type: string description: The name of the metric. metric_id: type: string description: The metric_id of the metric. This metric_id can be found in the Lotus frontend if you haven't seen it before. metric_usage: type: number format: double description: The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. metric_free_limit: type: number format: double nullable: true description: If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be null if you did not specify a free tier for this metric. metric_total_limit: type: number format: double nullable: true description: The total limit of the metric. Will be null if you did not specify a limit for this metric. required: - event_name - metric_free_limit - metric_id - metric_name - metric_total_limit - metric_usage ConfirmConnected: type: object properties: organization_id: type: string required: - organization_id ConfirmIdemsReceived: type: object properties: status: enum: - success type: string ids_not_found: type: array items: type: string required: - ids_not_found - status ConfirmIdemsReceivedFailure: type: object properties: status: enum: - failure type: string error: type: string required: - error - status ConfirmIdemsReceivedRequestRequest: type: object properties: idempotency_ids: type: array items: type: string minLength: 1 number_days_lookback: type: integer default: 30 customer_id: type: string minLength: 1 required: - idempotency_ids CostAnalysis: type: object properties: per_day: type: array items: $ref: '#/components/schemas/SingleDayCostAnalysis' total_cost: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true total_revenue: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true margin: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - margin - per_day - total_cost - total_revenue CreditDrawdown: type: object properties: credit_id: type: string amount: type: number format: double maximum: 0 minimum: -10000000000 exclusiveMinimum: true description: type: string nullable: true applied_at: type: string format: date-time required: - amount - applied_at - credit_id Customer: type: object properties: customer_id: type: string email: type: string format: email customer_name: type: string invoices: type: array items: $ref: '#/components/schemas/LightweightInvoice' readOnly: true total_amount_due: type: number format: double readOnly: true subscriptions: type: array items: $ref: '#/components/schemas/SubscriptionRecord' readOnly: true integrations: allOf: - $ref: '#/components/schemas/CustomerIntegrations' readOnly: true description: A dictionary containing the customer's integrations. Keys are the integration type, and the value is a dictionary containing the integration's properties, which can vary by integration. default_currency: $ref: '#/components/schemas/PricingUnit' payment_provider: enum: - stripe - braintree - type: string nullable: true payment_provider_id: type: string nullable: true readOnly: true has_payment_method: type: boolean readOnly: true address: allOf: - $ref: '#/components/schemas/Address' nullable: true readOnly: true deprecated: true billing_address: allOf: - $ref: '#/components/schemas/Address' nullable: true readOnly: true shipping_address: allOf: - $ref: '#/components/schemas/Address' nullable: true readOnly: true tax_rate: type: number format: double maximum: 1000 minimum: -1000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true nullable: true description: Tax rate as percentage. For example, 10.5 for 10.5% timezone: enum: - Africa/Abidjan - Africa/Accra - Africa/Addis_Ababa - Africa/Algiers - Africa/Asmara - Africa/Bamako - Africa/Bangui - Africa/Banjul - Africa/Bissau - Africa/Blantyre - Africa/Brazzaville - Africa/Bujumbura - Africa/Cairo - Africa/Casablanca - Africa/Ceuta - Africa/Conakry - Africa/Dakar - Africa/Dar_es_Salaam - Africa/Djibouti - Africa/Douala - Africa/El_Aaiun - Africa/Freetown - Africa/Gaborone - Africa/Harare - Africa/Johannesburg - Africa/Juba - Africa/Kampala - Africa/Khartoum - Africa/Kigali - Africa/Kinshasa - Africa/Lagos - Africa/Libreville - Africa/Lome - Africa/Luanda - Africa/Lubumbashi - Africa/Lusaka - Africa/Malabo - Africa/Maputo - Africa/Maseru - Africa/Mbabane - Africa/Mogadishu - Africa/Monrovia - Africa/Nairobi - Africa/Ndjamena - Africa/Niamey - Africa/Nouakchott - Africa/Ouagadougou - Africa/Porto-Novo - Africa/Sao_Tome - Africa/Tripoli - Africa/Tunis - Africa/Windhoek - America/Adak - America/Anchorage - America/Anguilla - America/Antigua - America/Araguaina - America/Argentina/Buenos_Aires - America/Argentina/Catamarca - America/Argentina/Cordoba - America/Argentina/Jujuy - America/Argentina/La_Rioja - America/Argentina/Mendoza - America/Argentina/Rio_Gallegos - America/Argentina/Salta - America/Argentina/San_Juan - America/Argentina/San_Luis - America/Argentina/Tucuman - America/Argentina/Ushuaia - America/Aruba - America/Asuncion - America/Atikokan - America/Bahia - America/Bahia_Banderas - America/Barbados - America/Belem - America/Belize - America/Blanc-Sablon - America/Boa_Vista - America/Bogota - America/Boise - America/Cambridge_Bay - America/Campo_Grande - America/Cancun - America/Caracas - America/Cayenne - America/Cayman - America/Chicago - America/Chihuahua - America/Ciudad_Juarez - America/Costa_Rica - America/Creston - America/Cuiaba - America/Curacao - America/Danmarkshavn - America/Dawson - America/Dawson_Creek - America/Denver - America/Detroit - America/Dominica - America/Edmonton - America/Eirunepe - America/El_Salvador - America/Fort_Nelson - America/Fortaleza - America/Glace_Bay - America/Goose_Bay - America/Grand_Turk - America/Grenada - America/Guadeloupe - America/Guatemala - America/Guayaquil - America/Guyana - America/Halifax - America/Havana - America/Hermosillo - America/Indiana/Indianapolis - America/Indiana/Knox - America/Indiana/Marengo - America/Indiana/Petersburg - America/Indiana/Tell_City - America/Indiana/Vevay - America/Indiana/Vincennes - America/Indiana/Winamac - America/Inuvik - America/Iqaluit - America/Jamaica - America/Juneau - America/Kentucky/Louisville - America/Kentucky/Monticello - America/Kralendijk - America/La_Paz - America/Lima - America/Los_Angeles - America/Lower_Princes - America/Maceio - America/Managua - America/Manaus - America/Marigot - America/Martinique - America/Matamoros - America/Mazatlan - America/Menominee - America/Merida - America/Metlakatla - America/Mexico_City - America/Miquelon - America/Moncton - America/Monterrey - America/Montevideo - America/Montserrat - America/Nassau - America/New_York - America/Nome - America/Noronha - America/North_Dakota/Beulah - America/North_Dakota/Center - America/North_Dakota/New_Salem - America/Nuuk - America/Ojinaga - America/Panama - America/Paramaribo - America/Phoenix - America/Port-au-Prince - America/Port_of_Spain - America/Porto_Velho - America/Puerto_Rico - America/Punta_Arenas - America/Rankin_Inlet - America/Recife - America/Regina - America/Resolute - America/Rio_Branco - America/Santarem - America/Santiago - America/Santo_Domingo - America/Sao_Paulo - America/Scoresbysund - America/Sitka - America/St_Barthelemy - America/St_Johns - America/St_Kitts - America/St_Lucia - America/St_Thomas - America/St_Vincent - America/Swift_Current - America/Tegucigalpa - America/Thule - America/Tijuana - America/Toronto - America/Tortola - America/Vancouver - America/Whitehorse - America/Winnipeg - America/Yakutat - America/Yellowknife - Antarctica/Casey - Antarctica/Davis - Antarctica/DumontDUrville - Antarctica/Macquarie - Antarctica/Mawson - Antarctica/McMurdo - Antarctica/Palmer - Antarctica/Rothera - Antarctica/Syowa - Antarctica/Troll - Antarctica/Vostok - Arctic/Longyearbyen - Asia/Aden - Asia/Almaty - Asia/Amman - Asia/Anadyr - Asia/Aqtau - Asia/Aqtobe - Asia/Ashgabat - Asia/Atyrau - Asia/Baghdad - Asia/Bahrain - Asia/Baku - Asia/Bangkok - Asia/Barnaul - Asia/Beirut - Asia/Bishkek - Asia/Brunei - Asia/Chita - Asia/Choibalsan - Asia/Colombo - Asia/Damascus - Asia/Dhaka - Asia/Dili - Asia/Dubai - Asia/Dushanbe - Asia/Famagusta - Asia/Gaza - Asia/Hebron - Asia/Ho_Chi_Minh - Asia/Hong_Kong - Asia/Hovd - Asia/Irkutsk - Asia/Jakarta - Asia/Jayapura - Asia/Jerusalem - Asia/Kabul - Asia/Kamchatka - Asia/Karachi - Asia/Kathmandu - Asia/Khandyga - Asia/Kolkata - Asia/Krasnoyarsk - Asia/Kuala_Lumpur - Asia/Kuching - Asia/Kuwait - Asia/Macau - Asia/Magadan - Asia/Makassar - Asia/Manila - Asia/Muscat - Asia/Nicosia - Asia/Novokuznetsk - Asia/Novosibirsk - Asia/Omsk - Asia/Oral - Asia/Phnom_Penh - Asia/Pontianak - Asia/Pyongyang - Asia/Qatar - Asia/Qostanay - Asia/Qyzylorda - Asia/Riyadh - Asia/Sakhalin - Asia/Samarkand - Asia/Seoul - Asia/Shanghai - Asia/Singapore - Asia/Srednekolymsk - Asia/Taipei - Asia/Tashkent - Asia/Tbilisi - Asia/Tehran - Asia/Thimphu - Asia/Tokyo - Asia/Tomsk - Asia/Ulaanbaatar - Asia/Urumqi - Asia/Ust-Nera - Asia/Vientiane - Asia/Vladivostok - Asia/Yakutsk - Asia/Yangon - Asia/Yekaterinburg - Asia/Yerevan - Atlantic/Azores - Atlantic/Bermuda - Atlantic/Canary - Atlantic/Cape_Verde - Atlantic/Faroe - Atlantic/Madeira - Atlantic/Reykjavik - Atlantic/South_Georgia - Atlantic/St_Helena - Atlantic/Stanley - Australia/Adelaide - Australia/Brisbane - Australia/Broken_Hill - Australia/Darwin - Australia/Eucla - Australia/Hobart - Australia/Lindeman - Australia/Lord_Howe - Australia/Melbourne - Australia/Perth - Australia/Sydney - Canada/Atlantic - Canada/Central - Canada/Eastern - Canada/Mountain - Canada/Newfoundland - Canada/Pacific - Europe/Amsterdam - Europe/Andorra - Europe/Astrakhan - Europe/Athens - Europe/Belgrade - Europe/Berlin - Europe/Bratislava - Europe/Brussels - Europe/Bucharest - Europe/Budapest - Europe/Busingen - Europe/Chisinau - Europe/Copenhagen - Europe/Dublin - Europe/Gibraltar - Europe/Guernsey - Europe/Helsinki - Europe/Isle_of_Man - Europe/Istanbul - Europe/Jersey - Europe/Kaliningrad - Europe/Kirov - Europe/Kyiv - Europe/Lisbon - Europe/Ljubljana - Europe/London - Europe/Luxembourg - Europe/Madrid - Europe/Malta - Europe/Mariehamn - Europe/Minsk - Europe/Monaco - Europe/Moscow - Europe/Oslo - Europe/Paris - Europe/Podgorica - Europe/Prague - Europe/Riga - Europe/Rome - Europe/Samara - Europe/San_Marino - Europe/Sarajevo - Europe/Saratov - Europe/Simferopol - Europe/Skopje - Europe/Sofia - Europe/Stockholm - Europe/Tallinn - Europe/Tirane - Europe/Ulyanovsk - Europe/Vaduz - Europe/Vatican - Europe/Vienna - Europe/Vilnius - Europe/Volgograd - Europe/Warsaw - Europe/Zagreb - Europe/Zurich - GMT - Indian/Antananarivo - Indian/Chagos - Indian/Christmas - Indian/Cocos - Indian/Comoro - Indian/Kerguelen - Indian/Mahe - Indian/Maldives - Indian/Mauritius - Indian/Mayotte - Indian/Reunion - Pacific/Apia - Pacific/Auckland - Pacific/Bougainville - Pacific/Chatham - Pacific/Chuuk - Pacific/Easter - Pacific/Efate - Pacific/Fakaofo - Pacific/Fiji - Pacific/Funafuti - Pacific/Galapagos - Pacific/Gambier - Pacific/Guadalcanal - Pacific/Guam - Pacific/Honolulu - Pacific/Kanton - Pacific/Kiritimati - Pacific/Kosrae - Pacific/Kwajalein - Pacific/Majuro - Pacific/Marquesas - Pacific/Midway - Pacific/Nauru - Pacific/Niue - Pacific/Norfolk - Pacific/Noumea - Pacific/Pago_Pago - Pacific/Palau - Pacific/Pitcairn - Pacific/Pohnpei - Pacific/Port_Moresby - Pacific/Rarotonga - Pacific/Saipan - Pacific/Tahiti - Pacific/Tarawa - Pacific/Tongatapu - Pacific/Wake - Pacific/Wallis - US/Alaska - US/Arizona - US/Central - US/Eastern - US/Hawaii - US/Mountain - US/Pacific - UTC type: string required: - billing_address - customer_id - customer_name - default_currency - email - has_payment_method - integrations - invoices - payment_provider - payment_provider_id - shipping_address - subscriptions - tax_rate - timezone - total_amount_due CustomerBalanceAdjustment: type: object properties: credit_id: type: string customer: $ref: '#/components/schemas/LightweightCustomer' amount: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true amount_remaining: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true readOnly: true currency: $ref: '#/components/schemas/PricingUnit' description: type: string readOnly: true nullable: true effective_at: type: string format: date-time readOnly: true expires_at: type: string format: date-time readOnly: true nullable: true status: enum: - active - inactive type: string readOnly: true amount_paid: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true amount_paid_currency: allOf: - $ref: '#/components/schemas/PricingUnit' nullable: true drawdowns: type: array items: $ref: '#/components/schemas/CreditDrawdown' readOnly: true required: - amount - amount_paid - amount_paid_currency - amount_remaining - credit_id - currency - customer - description - drawdowns - effective_at - expires_at - status CustomerBalanceAdjustmentCreateRequest: type: object properties: customer_id: type: string minLength: 1 description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend amount: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true writeOnly: true currency_code: type: string minLength: 1 writeOnly: true description: type: string writeOnly: true nullable: true effective_at: type: string format: date-time writeOnly: true expires_at: type: string format: date-time writeOnly: true nullable: true amount_paid: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true amount_paid_currency_code: type: string minLength: 1 writeOnly: true required: - amount - currency_code - customer_id CustomerBalanceAdjustmentUpdateRequest: type: object properties: description: type: string nullable: true expires_at: type: string format: date-time nullable: true CustomerBraintreeIntegration: type: object properties: braintree_id: type: string has_payment_method: type: boolean required: - braintree_id - has_payment_method CustomerCreateRequest: type: object properties: customer_name: type: string nullable: true description: The display name of the customer maxLength: 100 customer_id: type: string minLength: 1 description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend maxLength: 50 pattern: ^[-a-zA-Z0-9_]+$ email: type: string format: email minLength: 1 description: The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider payment_provider: enum: - stripe - braintree type: string description: The payment provider this customer is associated with. Currently, only Stripe is supported. payment_provider_id: type: string writeOnly: true nullable: true minLength: 1 description: The customer's ID in the specified payment provider. Please note that payment_provider and payment_provider_id are mutually necessary. properties: type: object additionalProperties: {} nullable: true description: Extra metadata for the customer default_currency_code: type: string minLength: 1 writeOnly: true description: The currency code this customer will be invoiced in. Codes are 3 letters, e.g. 'USD'. address: allOf: - $ref: '#/components/schemas/AddressRequest' nullable: true deprecated: true billing_address: allOf: - $ref: '#/components/schemas/AddressRequest' nullable: true shipping_address: allOf: - $ref: '#/components/schemas/AddressRequest' nullable: true tax_rate: type: number format: double maximum: 999.999900000000025102053768932819366455078125 minimum: 0 nullable: true description: Tax rate as percentage. For example, 10.5 for 10.5% required: - customer_id - email CustomerIntegrations: type: object properties: stripe: allOf: - $ref: '#/components/schemas/CustomerStripeIntegration' nullable: true braintree: allOf: - $ref: '#/components/schemas/CustomerBraintreeIntegration' nullable: true CustomerStripeIntegration: type: object properties: stripe_id: type: string has_payment_method: type: boolean required: - has_payment_method - stripe_id CustomerSummary: type: object properties: customer_name: type: string nullable: true description: The display name of the customer maxLength: 100 customer_id: type: string description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend maxLength: 50 pattern: ^[-a-zA-Z0-9_]+$ subscriptions: type: array items: $ref: '#/components/schemas/SubscriptionCustomerSummary' readOnly: true required: - subscriptions CustomerUpdate: type: object properties: default_currency_code: type: string billing_address: allOf: - $ref: '#/components/schemas/Address' nullable: true shipping_address: allOf: - $ref: '#/components/schemas/Address' nullable: true tax_rate: type: number format: double maximum: 999.999900000000025102053768932819366455078125 minimum: 0 nullable: true description: Tax rate as percentage. For example, 10.5 for 10.5% timezone: enum: - Africa/Abidjan - Africa/Accra - Africa/Addis_Ababa - Africa/Algiers - Africa/Asmara - Africa/Bamako - Africa/Bangui - Africa/Banjul - Africa/Bissau - Africa/Blantyre - Africa/Brazzaville - Africa/Bujumbura - Africa/Cairo - Africa/Casablanca - Africa/Ceuta - Africa/Conakry - Africa/Dakar - Africa/Dar_es_Salaam - Africa/Djibouti - Africa/Douala - Africa/El_Aaiun - Africa/Freetown - Africa/Gaborone - Africa/Harare - Africa/Johannesburg - Africa/Juba - Africa/Kampala - Africa/Khartoum - Africa/Kigali - Africa/Kinshasa - Africa/Lagos - Africa/Libreville - Africa/Lome - Africa/Luanda - Africa/Lubumbashi - Africa/Lusaka - Africa/Malabo - Africa/Maputo - Africa/Maseru - Africa/Mbabane - Africa/Mogadishu - Africa/Monrovia - Africa/Nairobi - Africa/Ndjamena - Africa/Niamey - Africa/Nouakchott - Africa/Ouagadougou - Africa/Porto-Novo - Africa/Sao_Tome - Africa/Tripoli - Africa/Tunis - Africa/Windhoek - America/Adak - America/Anchorage - America/Anguilla - America/Antigua - America/Araguaina - America/Argentina/Buenos_Aires - America/Argentina/Catamarca - America/Argentina/Cordoba - America/Argentina/Jujuy - America/Argentina/La_Rioja - America/Argentina/Mendoza - America/Argentina/Rio_Gallegos - America/Argentina/Salta - America/Argentina/San_Juan - America/Argentina/San_Luis - America/Argentina/Tucuman - America/Argentina/Ushuaia - America/Aruba - America/Asuncion - America/Atikokan - America/Bahia - America/Bahia_Banderas - America/Barbados - America/Belem - America/Belize - America/Blanc-Sablon - America/Boa_Vista - America/Bogota - America/Boise - America/Cambridge_Bay - America/Campo_Grande - America/Cancun - America/Caracas - America/Cayenne - America/Cayman - America/Chicago - America/Chihuahua - America/Ciudad_Juarez - America/Costa_Rica - America/Creston - America/Cuiaba - America/Curacao - America/Danmarkshavn - America/Dawson - America/Dawson_Creek - America/Denver - America/Detroit - America/Dominica - America/Edmonton - America/Eirunepe - America/El_Salvador - America/Fort_Nelson - America/Fortaleza - America/Glace_Bay - America/Goose_Bay - America/Grand_Turk - America/Grenada - America/Guadeloupe - America/Guatemala - America/Guayaquil - America/Guyana - America/Halifax - America/Havana - America/Hermosillo - America/Indiana/Indianapolis - America/Indiana/Knox - America/Indiana/Marengo - America/Indiana/Petersburg - America/Indiana/Tell_City - America/Indiana/Vevay - America/Indiana/Vincennes - America/Indiana/Winamac - America/Inuvik - America/Iqaluit - America/Jamaica - America/Juneau - America/Kentucky/Louisville - America/Kentucky/Monticello - America/Kralendijk - America/La_Paz - America/Lima - America/Los_Angeles - America/Lower_Princes - America/Maceio - America/Managua - America/Manaus - America/Marigot - America/Martinique - America/Matamoros - America/Mazatlan - America/Menominee - America/Merida - America/Metlakatla - America/Mexico_City - America/Miquelon - America/Moncton - America/Monterrey - America/Montevideo - America/Montserrat - America/Nassau - America/New_York - America/Nome - America/Noronha - America/North_Dakota/Beulah - America/North_Dakota/Center - America/North_Dakota/New_Salem - America/Nuuk - America/Ojinaga - America/Panama - America/Paramaribo - America/Phoenix - America/Port-au-Prince - America/Port_of_Spain - America/Porto_Velho - America/Puerto_Rico - America/Punta_Arenas - America/Rankin_Inlet - America/Recife - America/Regina - America/Resolute - America/Rio_Branco - America/Santarem - America/Santiago - America/Santo_Domingo - America/Sao_Paulo - America/Scoresbysund - America/Sitka - America/St_Barthelemy - America/St_Johns - America/St_Kitts - America/St_Lucia - America/St_Thomas - America/St_Vincent - America/Swift_Current - America/Tegucigalpa - America/Thule - America/Tijuana - America/Toronto - America/Tortola - America/Vancouver - America/Whitehorse - America/Winnipeg - America/Yakutat - America/Yellowknife - Antarctica/Casey - Antarctica/Davis - Antarctica/DumontDUrville - Antarctica/Macquarie - Antarctica/Mawson - Antarctica/McMurdo - Antarctica/Palmer - Antarctica/Rothera - Antarctica/Syowa - Antarctica/Troll - Antarctica/Vostok - Arctic/Longyearbyen - Asia/Aden - Asia/Almaty - Asia/Amman - Asia/Anadyr - Asia/Aqtau - Asia/Aqtobe - Asia/Ashgabat - Asia/Atyrau - Asia/Baghdad - Asia/Bahrain - Asia/Baku - Asia/Bangkok - Asia/Barnaul - Asia/Beirut - Asia/Bishkek - Asia/Brunei - Asia/Chita - Asia/Choibalsan - Asia/Colombo - Asia/Damascus - Asia/Dhaka - Asia/Dili - Asia/Dubai - Asia/Dushanbe - Asia/Famagusta - Asia/Gaza - Asia/Hebron - Asia/Ho_Chi_Minh - Asia/Hong_Kong - Asia/Hovd - Asia/Irkutsk - Asia/Jakarta - Asia/Jayapura - Asia/Jerusalem - Asia/Kabul - Asia/Kamchatka - Asia/Karachi - Asia/Kathmandu - Asia/Khandyga - Asia/Kolkata - Asia/Krasnoyarsk - Asia/Kuala_Lumpur - Asia/Kuching - Asia/Kuwait - Asia/Macau - Asia/Magadan - Asia/Makassar - Asia/Manila - Asia/Muscat - Asia/Nicosia - Asia/Novokuznetsk - Asia/Novosibirsk - Asia/Omsk - Asia/Oral - Asia/Phnom_Penh - Asia/Pontianak - Asia/Pyongyang - Asia/Qatar - Asia/Qostanay - Asia/Qyzylorda - Asia/Riyadh - Asia/Sakhalin - Asia/Samarkand - Asia/Seoul - Asia/Shanghai - Asia/Singapore - Asia/Srednekolymsk - Asia/Taipei - Asia/Tashkent - Asia/Tbilisi - Asia/Tehran - Asia/Thimphu - Asia/Tokyo - Asia/Tomsk - Asia/Ulaanbaatar - Asia/Urumqi - Asia/Ust-Nera - Asia/Vientiane - Asia/Vladivostok - Asia/Yakutsk - Asia/Yangon - Asia/Yekaterinburg - Asia/Yerevan - Atlantic/Azores - Atlantic/Bermuda - Atlantic/Canary - Atlantic/Cape_Verde - Atlantic/Faroe - Atlantic/Madeira - Atlantic/Reykjavik - Atlantic/South_Georgia - Atlantic/St_Helena - Atlantic/Stanley - Australia/Adelaide - Australia/Brisbane - Australia/Broken_Hill - Australia/Darwin - Australia/Eucla - Australia/Hobart - Australia/Lindeman - Australia/Lord_Howe - Australia/Melbourne - Australia/Perth - Australia/Sydney - Canada/Atlantic - Canada/Central - Canada/Eastern - Canada/Mountain - Canada/Newfoundland - Canada/Pacific - Europe/Amsterdam - Europe/Andorra - Europe/Astrakhan - Europe/Athens - Europe/Belgrade - Europe/Berlin - Europe/Bratislava - Europe/Brussels - Europe/Bucharest - Europe/Budapest - Europe/Busingen - Europe/Chisinau - Europe/Copenhagen - Europe/Dublin - Europe/Gibraltar - Europe/Guernsey - Europe/Helsinki - Europe/Isle_of_Man - Europe/Istanbul - Europe/Jersey - Europe/Kaliningrad - Europe/Kirov - Europe/Kyiv - Europe/Lisbon - Europe/Ljubljana - Europe/London - Europe/Luxembourg - Europe/Madrid - Europe/Malta - Europe/Mariehamn - Europe/Minsk - Europe/Monaco - Europe/Moscow - Europe/Oslo - Europe/Paris - Europe/Podgorica - Europe/Prague - Europe/Riga - Europe/Rome - Europe/Samara - Europe/San_Marino - Europe/Sarajevo - Europe/Saratov - Europe/Simferopol - Europe/Skopje - Europe/Sofia - Europe/Stockholm - Europe/Tallinn - Europe/Tirane - Europe/Ulyanovsk - Europe/Vaduz - Europe/Vatican - Europe/Vienna - Europe/Vilnius - Europe/Volgograd - Europe/Warsaw - Europe/Zagreb - Europe/Zurich - GMT - Indian/Antananarivo - Indian/Chagos - Indian/Christmas - Indian/Cocos - Indian/Comoro - Indian/Kerguelen - Indian/Mahe - Indian/Maldives - Indian/Mauritius - Indian/Mayotte - Indian/Reunion - Pacific/Apia - Pacific/Auckland - Pacific/Bougainville - Pacific/Chatham - Pacific/Chuuk - Pacific/Easter - Pacific/Efate - Pacific/Fakaofo - Pacific/Fiji - Pacific/Funafuti - Pacific/Galapagos - Pacific/Gambier - Pacific/Guadalcanal - Pacific/Guam - Pacific/Honolulu - Pacific/Kanton - Pacific/Kiritimati - Pacific/Kosrae - Pacific/Kwajalein - Pacific/Majuro - Pacific/Marquesas - Pacific/Midway - Pacific/Nauru - Pacific/Niue - Pacific/Norfolk - Pacific/Noumea - Pacific/Pago_Pago - Pacific/Palau - Pacific/Pitcairn - Pacific/Pohnpei - Pacific/Port_Moresby - Pacific/Rarotonga - Pacific/Saipan - Pacific/Tahiti - Pacific/Tarawa - Pacific/Tongatapu - Pacific/Wake - Pacific/Wallis - US/Alaska - US/Arizona - US/Central - US/Eastern - US/Hawaii - US/Mountain - US/Pacific - UTC type: string required: - default_currency_code - timezone CustomerWithRevenue: type: object properties: customer_id: type: string description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend maxLength: 50 pattern: ^[-a-zA-Z0-9_]+$ total_amount_due: type: number format: double readOnly: true required: - total_amount_due DayMetricUsage: type: object properties: date: type: string format: date customer_usages: type: object additionalProperties: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - customer_usages - date DemoLoginFailure: type: object properties: detail: type: string required: - detail DemoLoginRequestRequest: type: object properties: username: type: string minLength: 1 password: type: string minLength: 1 required: - password - username DemoLoginSuccess: type: object properties: detail: type: string token: type: string user: $ref: '#/components/schemas/User' required: - detail - token - user DemoRegistrationDetailRequest: type: object properties: email: type: string minLength: 1 password: type: string minLength: 1 username: type: string minLength: 1 required: - email - password - username DemoRegistrationFailure: type: object properties: detail: type: string required: - detail DemoRegistrationRequest: type: object properties: register: $ref: '#/components/schemas/DemoRegistrationDetailRequest' required: - register DemoRegistrationSuccess: type: object properties: detail: type: string token: type: string user: $ref: '#/components/schemas/User' required: - detail - token - user DraftInvoice: type: object properties: invoice_id: type: string end_date: type: string format: date readOnly: true start_date: type: string format: date readOnly: true cost_due: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true issue_date: type: string format: date-time readOnly: true line_items: type: array items: $ref: '#/components/schemas/GroupedLineItem' readOnly: true due_date: type: string format: date-time readOnly: true nullable: true currency: $ref: '#/components/schemas/PricingUnit' required: - cost_due - currency - due_date - end_date - invoice_id - issue_date - line_items - start_date DraftInvoiceResponse: type: object properties: invoice: type: array items: $ref: '#/components/schemas/DraftInvoice' EmailRequest: type: object properties: email: type: string format: email minLength: 1 required: - email Event: type: object properties: event_name: type: string description: String name of the event, corresponds to definition in metrics maxLength: 100 properties: type: object additionalProperties: {} description: Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under time_created: type: string format: date-time description: The time that the event occured, represented as a datetime in ISO 8601 in the UTC timezome. idempotency_id: type: string description: A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. You can use the same idempotency_id again after 7 days customer_id: type: string description: The id of the customer that this event is associated with, usually the customer id in your backend required: - customer_id - event_name - idempotency_id - time_created EventRequest: type: object properties: event_name: type: string minLength: 1 description: String name of the event, corresponds to definition in metrics maxLength: 100 properties: type: object additionalProperties: {} description: Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under time_created: type: string format: date-time description: The time that the event occured, represented as a datetime in ISO 8601 in the UTC timezome. idempotency_id: type: string minLength: 1 description: A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. You can use the same idempotency_id again after 7 days customer_id: type: string minLength: 1 description: The id of the customer that this event is associated with, usually the customer id in your backend required: - customer_id - event_name - idempotency_id - time_created ExternalPlanLink: type: object properties: source: enum: - stripe - braintree type: string external_plan_id: type: string maxLength: 100 required: - external_plan_id - source ExternalPlanLinkRequest: type: object properties: plan_id: type: string format: uuid writeOnly: true source: enum: - stripe - braintree type: string external_plan_id: type: string minLength: 1 maxLength: 100 required: - external_plan_id - plan_id - source Feature: type: object properties: feature_id: type: string feature_name: type: string readOnly: true feature_description: type: string readOnly: true nullable: true required: - feature_description - feature_id - feature_name FeatureAccessPerSubscription: type: object properties: subscription: $ref: '#/components/schemas/AccessMethodsSubscriptionRecord' access: type: boolean required: - access - subscription FeatureAccessResponse: type: object properties: customer: $ref: '#/components/schemas/LightweightCustomer' access: type: boolean description: Whether or not the customer has access to this feature. The default behavior for this is whether any of the customer's plans have access to this feature. If you have specified subscription filters, then this will be whether any of the customer's plans that match the subscription filters have access to this feature. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend. feature: $ref: '#/components/schemas/Feature' access_per_subscription: type: array items: $ref: '#/components/schemas/FeatureAccessPerSubscription' required: - access - access_per_subscription - customer - feature FeatureCreateRequest: type: object properties: feature_name: type: string minLength: 1 maxLength: 50 feature_description: type: string nullable: true required: - feature_name GetEventAccess: type: object properties: plan_id: type: string description: The plan_id of the plan we are checking that has access to this feature. subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' description: The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. usage_per_component: type: array items: $ref: '#/components/schemas/ComponentUsage' description: "The usage of each component of the plan the customer is on.\ \ Only components that match the request will be included: If metric_id\ \ is provided, this will be a list of length 1. If event_name is provided,\ \ this will be a list of length 1 or more depending on how many components\ \ of the customer's plan use this event." required: - plan_id - subscription_filters - usage_per_component GetFeatureAccess: type: object properties: feature_name: type: string description: Name of the feature to check access for. plan_id: type: string description: The plan_id of the plan we are checking that has access to this feature. subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' description: The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. access: type: boolean description: Whether or not the plan has access to this feature. If your customer can have multiple plans or subscriptions, then you must check the 'access' across all returned plans to determine if the customer can access this feature. required: - access - feature_name - plan_id - subscription_filters GetInvoicePdfURLResponse: type: object properties: url: type: string format: uri required: - url GroupedLineItem: type: object properties: plan_name: type: string subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' subtotal: type: number format: double maximum: 100000000 minimum: -100000000 exclusiveMaximum: true exclusiveMinimum: true start_date: type: string format: date-time end_date: type: string format: date-time sub_items: type: array items: $ref: '#/components/schemas/LightweightInvoiceLineItem' required: - end_date - plan_name - start_date - sub_items - subscription_filters - subtotal ImportCustomerFailure: type: object properties: status: enum: - error type: string detail: type: string required: - detail - status ImportCustomerSuccess: type: object properties: status: enum: - success type: string detail: type: string required: - detail - status ImportCustomersRequestRequest: type: object properties: source: enum: - stripe - braintree type: string required: - source ImportPaymentObjectFailure: type: object properties: status: enum: - error type: string detail: type: string required: - detail - status ImportPaymentObjectSuccess: type: object properties: status: enum: - success type: string detail: type: string required: - detail - status ImportPaymentObjectsRequestRequest: type: object properties: source: enum: - stripe - braintree type: string required: - source InitResetPasswordSuccess: type: object properties: email: type: string required: - email InitialExternalPlanLink: type: object properties: source: enum: - stripe - braintree type: string external_plan_id: type: string maxLength: 100 required: - external_plan_id - source InitialExternalPlanLinkRequest: type: object properties: source: enum: - stripe - braintree type: string external_plan_id: type: string minLength: 1 maxLength: 100 required: - external_plan_id - source InitialPlanVersionRequest: type: object properties: components: type: array items: $ref: '#/components/schemas/PlanComponentCreateRequest' nullable: true recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' nullable: true description: type: string writeOnly: true nullable: true price_adjustment: $ref: '#/components/schemas/PriceAdjustmentRequest' usage_billing_frequency: enum: - monthly - quarterly - end_of_period - '' - type: string writeOnly: true nullable: true currency_code: type: string minLength: 1 transition_to_plan_id: type: string format: uuid month_anchor: type: integer maximum: 12 minimum: 1 writeOnly: true nullable: true features: type: array items: type: string format: uuid nullable: true day_anchor: type: integer maximum: 31 minimum: 1 writeOnly: true nullable: true InviteRequestRequest: type: object properties: email: type: string format: email minLength: 1 required: - email InviteResponse: type: object properties: email: type: string format: email required: - email Invoice: type: object properties: invoice_id: type: string invoice_number: type: string readOnly: true cost_due: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true currency: $ref: '#/components/schemas/PricingUnit' issue_date: type: string format: date-time readOnly: true payment_status: enum: - draft - voided - paid - unpaid readOnly: true external_payment_obj_id: type: string readOnly: true nullable: true external_payment_obj_type: enum: - stripe - braintree - type: string nullable: true line_items: type: array items: $ref: '#/components/schemas/InvoiceLineItem' customer: $ref: '#/components/schemas/LightweightCustomerSerializerForInvoice' due_date: type: string format: date-time readOnly: true nullable: true start_date: type: string format: date readOnly: true end_date: type: string format: date readOnly: true seller: $ref: '#/components/schemas/Seller' invoice_pdf: type: string format: uri readOnly: true nullable: true required: - cost_due - currency - customer - due_date - end_date - external_payment_obj_id - external_payment_obj_type - invoice_id - invoice_number - invoice_pdf - issue_date - line_items - payment_status - seller - start_date InvoiceCreatedRequest: type: object properties: payload: $ref: '#/components/schemas/InvoiceRequest' required: - payload InvoiceLineItem: type: object properties: name: type: string maxLength: 100 start_date: type: string format: date-time end_date: type: string format: date-time quantity: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true subtotal: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true billing_type: enum: - in_arrears - in_advance - one_time - type: string nullable: true metadata: type: object additionalProperties: {} nullable: true plan: allOf: - $ref: '#/components/schemas/LightweightPlanVersion' nullable: true readOnly: true subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' nullable: true readOnly: true required: - billing_type - end_date - metadata - name - plan - quantity - start_date - subscription_filters - subtotal InvoiceLineItemRequest: type: object properties: name: type: string minLength: 1 maxLength: 100 start_date: type: string format: date-time end_date: type: string format: date-time quantity: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true subtotal: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true billing_type: enum: - in_arrears - in_advance - one_time - type: string nullable: true metadata: type: object additionalProperties: {} nullable: true required: - billing_type - end_date - metadata - name - quantity - start_date - subtotal InvoicePaidRequest: type: object properties: payload: $ref: '#/components/schemas/InvoiceRequest' required: - payload InvoiceRequest: type: object properties: invoice_id: type: string minLength: 1 currency: $ref: '#/components/schemas/PricingUnitRequest' external_payment_obj_type: enum: - stripe - braintree - type: string nullable: true line_items: type: array items: $ref: '#/components/schemas/InvoiceLineItemRequest' seller: $ref: '#/components/schemas/SellerRequest' required: - currency - external_payment_obj_type - invoice_id - line_items - seller InvoiceUpdate: type: object properties: payment_status: enum: - paid - unpaid type: string required: - payment_status LightweightAddon: type: object properties: addon_name: type: string description: The name of the add-on plan. addon_id: type: string description: The ID of the add-on plan. addon_type: enum: - flat - usage_based type: string readOnly: true billing_frequency: enum: - one_time - recurring readOnly: true required: - addon_id - addon_name - addon_type - billing_frequency LightweightAddonRequest: type: object properties: addon_name: type: string minLength: 1 description: The name of the add-on plan. addon_id: type: string minLength: 1 description: The ID of the add-on plan. required: - addon_id - addon_name LightweightAddonSubscriptionRecord: type: object properties: start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. addon: $ref: '#/components/schemas/LightweightAddon' fully_billed: type: boolean description: Whether the subscription has been fully billed and finalized. required: - addon - end_date - fully_billed - start_date LightweightAddonSubscriptionRecordRequest: type: object properties: start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. addon: $ref: '#/components/schemas/LightweightAddonRequest' fully_billed: type: boolean description: Whether the subscription has been fully billed and finalized. required: - addon - end_date - fully_billed - start_date LightweightCustomer: type: object properties: customer_name: type: string readOnly: true nullable: true description: The display name of the customer email: type: string format: email readOnly: true nullable: true description: The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider customer_id: type: string readOnly: true description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend pattern: ^[-a-zA-Z0-9_]+$ required: - customer_id - customer_name - email LightweightCustomerSerializerForInvoice: type: object properties: customer_name: type: string readOnly: true nullable: true description: The display name of the customer email: type: string format: email readOnly: true nullable: true description: The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider customer_id: type: string readOnly: true description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend pattern: ^[-a-zA-Z0-9_]+$ address: allOf: - $ref: '#/components/schemas/Address' nullable: true readOnly: true required: - customer_id - customer_name - email LightweightInvoice: type: object properties: invoice_id: type: string end_date: type: string format: date readOnly: true seller: $ref: '#/components/schemas/Seller' invoice_number: type: string readOnly: true payment_status: enum: - draft - voided - paid - unpaid readOnly: true start_date: type: string format: date readOnly: true issue_date: type: string format: date-time readOnly: true cost_due: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true due_date: type: string format: date-time readOnly: true nullable: true currency: $ref: '#/components/schemas/PricingUnit' external_payment_obj_type: enum: - stripe - braintree - type: string nullable: true external_payment_obj_id: type: string readOnly: true nullable: true invoice_pdf: type: string format: uri readOnly: true nullable: true required: - cost_due - currency - due_date - end_date - external_payment_obj_id - invoice_id - invoice_number - invoice_pdf - issue_date - payment_status - seller - start_date - external_payment_obj_type LightweightInvoiceLineItem: type: object properties: end_date: type: string format: date-time subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' nullable: true readOnly: true subtotal: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true name: type: string maxLength: 100 start_date: type: string format: date-time billing_type: enum: - in_arrears - in_advance - one_time - type: string nullable: true plan: allOf: - $ref: '#/components/schemas/LightweightPlanVersion' nullable: true readOnly: true quantity: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true required: - billing_type - end_date - name - plan - quantity - start_date - subscription_filters - subtotal LightweightMetric: type: object properties: metric_id: type: string event_name: type: string readOnly: true description: Name of the event that this metric is tracking. metric_name: type: string required: - event_name - metric_id - metric_name LightweightOrganization: type: object properties: organization_id: type: string organization_name: type: string maxLength: 100 organization_type: enum: - Production - Development - Demo - Internal Demo type: string readOnly: true current: type: boolean readOnly: true required: - current - organization_id - organization_name - organization_type LightweightPlanVersion: type: object properties: plan_name: type: string plan_id: type: string version: type: integer readOnly: true version_id: type: string readOnly: true required: - plan_id - plan_name - version - version_id LightweightPlanVersionRequest: type: object properties: plan_name: type: string minLength: 1 plan_id: type: string minLength: 1 required: - plan_id - plan_name LightweightSubscriptionRecord: type: object properties: end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' readOnly: true fully_billed: type: boolean description: Whether the subscription has been fully billed and finalized. start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. billing_plan: $ref: '#/components/schemas/LightweightPlanVersion' addons: type: array items: $ref: '#/components/schemas/LightweightAddonSubscriptionRecord' auto_renew: type: boolean description: Whether the subscription automatically renews. Defaults to true. is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. customer: $ref: '#/components/schemas/LightweightCustomer' plan_detail: allOf: - $ref: '#/components/schemas/LightweightPlanVersion' readOnly: true required: - addons - auto_renew - billing_plan - customer - end_date - fully_billed - is_new - plan_detail - start_date - subscription_filters LightweightSubscriptionRecordRequest: type: object properties: end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. fully_billed: type: boolean description: Whether the subscription has been fully billed and finalized. start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. billing_plan: $ref: '#/components/schemas/LightweightPlanVersionRequest' addons: type: array items: $ref: '#/components/schemas/LightweightAddonSubscriptionRecordRequest' auto_renew: type: boolean description: Whether the subscription automatically renews. Defaults to true. is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. required: - addons - auto_renew - billing_plan - end_date - fully_billed - is_new - start_date LightweightUser: type: object properties: username: type: string description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. pattern: ^[\w.@+-]+$ maxLength: 150 email: type: string format: email maxLength: 254 required: - email - username LoginFailure: type: object properties: detail: type: string required: - detail LoginRequestRequest: type: object properties: username: type: string minLength: 1 password: type: string minLength: 1 required: - password - username LoginSuccess: type: object properties: detail: type: string token: type: string user: $ref: '#/components/schemas/User' required: - detail - token - user LogoutFailure: type: object properties: detail: type: string required: - detail LogoutSuccess: type: object properties: detail: type: string required: - detail Metric: type: object properties: metric_id: type: string event_name: type: string readOnly: true description: Name of the event that this metric is tracking. property_name: type: string readOnly: true nullable: true description: The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. aggregation_type: type: string granularity: enum: - seconds - minutes - hours - days - months - quarters - years - total - type: string readOnly: true nullable: true description: The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. event_type: enum: - delta - total - type: string readOnly: true nullable: true description: Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. metric_type: enum: - counter - rate - custom - gauge type: string readOnly: true description: The type of metric that this is. Please refer to our documentation for an explanation of the different types. metric_name: type: string numeric_filters: type: array items: $ref: '#/components/schemas/NumericFilter' categorical_filters: type: array items: $ref: '#/components/schemas/CategoricalFilter' is_cost_metric: type: boolean readOnly: true description: Whether or not this metric is a cost metric (used to track costs to your business). custom_sql: type: string readOnly: true nullable: true description: A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. proration: enum: - seconds - minutes - hours - days - months - quarters - years - total - type: string readOnly: true nullable: true description: The proration of the metric. Only applies to metrics of type 'gauge'. required: - aggregation_type - categorical_filters - custom_sql - event_name - event_type - granularity - is_cost_metric - metric_id - metric_name - metric_type - numeric_filters - property_name - proration MetricAccessPerSubscription: type: object properties: subscription: $ref: '#/components/schemas/AccessMethodsSubscriptionRecord' metric_usage: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true description: The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. For examnple, for a gauge metric, the `metric_usage` is the current value of the gauge, while the billable usage is the accumulated tiem at each gauge level at the end of the subscription. metric_free_limit: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true description: If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be 0 if you didn't specify a free limit for this metric or this subscription doesn't have access to this metric, and null if the free tier is unlimited. metric_total_limit: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true description: The total limit of the metric. Will be 0 if this subscription doesn't have access to this metric, and null if there is no limit to this metric. required: - metric_free_limit - metric_total_limit - metric_usage - subscription MetricAccessResponse: type: object properties: customer: $ref: '#/components/schemas/LightweightCustomer' access: type: boolean description: Whether or not the customer has access to this metric. The default behavior for this is whether all of the customer's plans (that have access to the metric) are below the total limit of the metric. If you have specified subscription filters, then this will be whether all of the customer's plans that match the subscription filters are below the total limit of the metric. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend. metric: $ref: '#/components/schemas/LightweightMetric' access_per_subscription: type: array items: $ref: '#/components/schemas/MetricAccessPerSubscription' required: - access - access_per_subscription - customer - metric MetricCreateRequest: type: object properties: event_name: type: string writeOnly: true minLength: 1 description: Name of the event that this metric is tracking. maxLength: 50 property_name: type: string writeOnly: true nullable: true minLength: 1 description: The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. maxLength: 50 usage_aggregation_type: enum: - count - sum - max - unique - latest - average - type: string writeOnly: true nullable: true description: The type of aggregation that should be used for this metric. Please refer to our documentation for an explanation of the different types. billable_aggregation_type: enum: - count - sum - max - unique - latest - average - type: string writeOnly: true nullable: true granularity: enum: - seconds - minutes - hours - days - months - quarters - years - total - type: string writeOnly: true nullable: true description: The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. event_type: enum: - delta - total - type: string writeOnly: true nullable: true description: Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. metric_type: enum: - counter - rate - custom - gauge type: string writeOnly: true description: The type of metric that this is. Please refer to our documentation for an explanation of the different types. metric_name: type: string minLength: 1 proration: enum: - seconds - minutes - hours - days - months - quarters - years - total - type: string writeOnly: true nullable: true description: The proration of the metric. Only applies to metrics of type 'gauge'. properties: type: object additionalProperties: {} writeOnly: true nullable: true is_cost_metric: type: boolean writeOnly: true default: false description: Whether or not this metric is a cost metric (used to track costs to your business). custom_sql: type: string writeOnly: true nullable: true description: A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. categorical_filters: type: array items: $ref: '#/components/schemas/CategoricalFilterRequest' numeric_filters: type: array items: $ref: '#/components/schemas/NumericFilterRequest' required: - metric_name - metric_type MetricRequest: type: object properties: metric_id: type: string minLength: 1 aggregation_type: type: string minLength: 1 metric_name: type: string minLength: 1 numeric_filters: type: array items: $ref: '#/components/schemas/NumericFilterRequest' categorical_filters: type: array items: $ref: '#/components/schemas/CategoricalFilterRequest' required: - aggregation_type - categorical_filters - metric_id - metric_name - numeric_filters MetricRevenue: type: object properties: metric_name: type: string original_plan_revenue: type: number format: double new_plan_revenue: type: number format: double required: - metric_name - new_plan_revenue - original_plan_revenue MetricUpdate: type: object properties: billable_metric_name: type: string nullable: true maxLength: 50 status: enum: - active - archived type: string NumericFilter: type: object properties: property_name: type: string maxLength: 100 operator: enum: - gte - gt - eq - lt - lte type: string comparison_value: type: number format: double required: - comparison_value - operator - property_name NumericFilterRequest: type: object properties: property_name: type: string minLength: 1 maxLength: 100 operator: enum: - gte - gt - eq - lt - lte type: string comparison_value: type: number format: double required: - comparison_value - operator - property_name Organization: type: object properties: organization_id: type: string organization_name: type: string maxLength: 100 users: type: array items: $ref: '#/components/schemas/OrganizationUser' readOnly: true default_currency: $ref: '#/components/schemas/PricingUnit' available_currencies: type: array items: $ref: '#/components/schemas/PricingUnit' readOnly: true plan_tags: type: array items: $ref: '#/components/schemas/Tag' readOnly: true tax_rate: type: number format: double maximum: 999.999900000000025102053768932819366455078125 minimum: 0 nullable: true description: Tax rate as percentage. For example, 10.5 for 10.5% payment_grace_period: type: integer maximum: 365 minimum: 0 nullable: true readOnly: true linked_organizations: type: array items: $ref: '#/components/schemas/LightweightOrganization' readOnly: true current_user: allOf: - $ref: '#/components/schemas/LightweightUser' readOnly: true address: allOf: - $ref: '#/components/schemas/Address' nullable: true readOnly: true team_name: type: string readOnly: true subscription_filter_keys: type: array items: type: string readOnly: true timezone: enum: - Africa/Abidjan - Africa/Accra - Africa/Addis_Ababa - Africa/Algiers - Africa/Asmara - Africa/Bamako - Africa/Bangui - Africa/Banjul - Africa/Bissau - Africa/Blantyre - Africa/Brazzaville - Africa/Bujumbura - Africa/Cairo - Africa/Casablanca - Africa/Ceuta - Africa/Conakry - Africa/Dakar - Africa/Dar_es_Salaam - Africa/Djibouti - Africa/Douala - Africa/El_Aaiun - Africa/Freetown - Africa/Gaborone - Africa/Harare - Africa/Johannesburg - Africa/Juba - Africa/Kampala - Africa/Khartoum - Africa/Kigali - Africa/Kinshasa - Africa/Lagos - Africa/Libreville - Africa/Lome - Africa/Luanda - Africa/Lubumbashi - Africa/Lusaka - Africa/Malabo - Africa/Maputo - Africa/Maseru - Africa/Mbabane - Africa/Mogadishu - Africa/Monrovia - Africa/Nairobi - Africa/Ndjamena - Africa/Niamey - Africa/Nouakchott - Africa/Ouagadougou - Africa/Porto-Novo - Africa/Sao_Tome - Africa/Tripoli - Africa/Tunis - Africa/Windhoek - America/Adak - America/Anchorage - America/Anguilla - America/Antigua - America/Araguaina - America/Argentina/Buenos_Aires - America/Argentina/Catamarca - America/Argentina/Cordoba - America/Argentina/Jujuy - America/Argentina/La_Rioja - America/Argentina/Mendoza - America/Argentina/Rio_Gallegos - America/Argentina/Salta - America/Argentina/San_Juan - America/Argentina/San_Luis - America/Argentina/Tucuman - America/Argentina/Ushuaia - America/Aruba - America/Asuncion - America/Atikokan - America/Bahia - America/Bahia_Banderas - America/Barbados - America/Belem - America/Belize - America/Blanc-Sablon - America/Boa_Vista - America/Bogota - America/Boise - America/Cambridge_Bay - America/Campo_Grande - America/Cancun - America/Caracas - America/Cayenne - America/Cayman - America/Chicago - America/Chihuahua - America/Ciudad_Juarez - America/Costa_Rica - America/Creston - America/Cuiaba - America/Curacao - America/Danmarkshavn - America/Dawson - America/Dawson_Creek - America/Denver - America/Detroit - America/Dominica - America/Edmonton - America/Eirunepe - America/El_Salvador - America/Fort_Nelson - America/Fortaleza - America/Glace_Bay - America/Goose_Bay - America/Grand_Turk - America/Grenada - America/Guadeloupe - America/Guatemala - America/Guayaquil - America/Guyana - America/Halifax - America/Havana - America/Hermosillo - America/Indiana/Indianapolis - America/Indiana/Knox - America/Indiana/Marengo - America/Indiana/Petersburg - America/Indiana/Tell_City - America/Indiana/Vevay - America/Indiana/Vincennes - America/Indiana/Winamac - America/Inuvik - America/Iqaluit - America/Jamaica - America/Juneau - America/Kentucky/Louisville - America/Kentucky/Monticello - America/Kralendijk - America/La_Paz - America/Lima - America/Los_Angeles - America/Lower_Princes - America/Maceio - America/Managua - America/Manaus - America/Marigot - America/Martinique - America/Matamoros - America/Mazatlan - America/Menominee - America/Merida - America/Metlakatla - America/Mexico_City - America/Miquelon - America/Moncton - America/Monterrey - America/Montevideo - America/Montserrat - America/Nassau - America/New_York - America/Nome - America/Noronha - America/North_Dakota/Beulah - America/North_Dakota/Center - America/North_Dakota/New_Salem - America/Nuuk - America/Ojinaga - America/Panama - America/Paramaribo - America/Phoenix - America/Port-au-Prince - America/Port_of_Spain - America/Porto_Velho - America/Puerto_Rico - America/Punta_Arenas - America/Rankin_Inlet - America/Recife - America/Regina - America/Resolute - America/Rio_Branco - America/Santarem - America/Santiago - America/Santo_Domingo - America/Sao_Paulo - America/Scoresbysund - America/Sitka - America/St_Barthelemy - America/St_Johns - America/St_Kitts - America/St_Lucia - America/St_Thomas - America/St_Vincent - America/Swift_Current - America/Tegucigalpa - America/Thule - America/Tijuana - America/Toronto - America/Tortola - America/Vancouver - America/Whitehorse - America/Winnipeg - America/Yakutat - America/Yellowknife - Antarctica/Casey - Antarctica/Davis - Antarctica/DumontDUrville - Antarctica/Macquarie - Antarctica/Mawson - Antarctica/McMurdo - Antarctica/Palmer - Antarctica/Rothera - Antarctica/Syowa - Antarctica/Troll - Antarctica/Vostok - Arctic/Longyearbyen - Asia/Aden - Asia/Almaty - Asia/Amman - Asia/Anadyr - Asia/Aqtau - Asia/Aqtobe - Asia/Ashgabat - Asia/Atyrau - Asia/Baghdad - Asia/Bahrain - Asia/Baku - Asia/Bangkok - Asia/Barnaul - Asia/Beirut - Asia/Bishkek - Asia/Brunei - Asia/Chita - Asia/Choibalsan - Asia/Colombo - Asia/Damascus - Asia/Dhaka - Asia/Dili - Asia/Dubai - Asia/Dushanbe - Asia/Famagusta - Asia/Gaza - Asia/Hebron - Asia/Ho_Chi_Minh - Asia/Hong_Kong - Asia/Hovd - Asia/Irkutsk - Asia/Jakarta - Asia/Jayapura - Asia/Jerusalem - Asia/Kabul - Asia/Kamchatka - Asia/Karachi - Asia/Kathmandu - Asia/Khandyga - Asia/Kolkata - Asia/Krasnoyarsk - Asia/Kuala_Lumpur - Asia/Kuching - Asia/Kuwait - Asia/Macau - Asia/Magadan - Asia/Makassar - Asia/Manila - Asia/Muscat - Asia/Nicosia - Asia/Novokuznetsk - Asia/Novosibirsk - Asia/Omsk - Asia/Oral - Asia/Phnom_Penh - Asia/Pontianak - Asia/Pyongyang - Asia/Qatar - Asia/Qostanay - Asia/Qyzylorda - Asia/Riyadh - Asia/Sakhalin - Asia/Samarkand - Asia/Seoul - Asia/Shanghai - Asia/Singapore - Asia/Srednekolymsk - Asia/Taipei - Asia/Tashkent - Asia/Tbilisi - Asia/Tehran - Asia/Thimphu - Asia/Tokyo - Asia/Tomsk - Asia/Ulaanbaatar - Asia/Urumqi - Asia/Ust-Nera - Asia/Vientiane - Asia/Vladivostok - Asia/Yakutsk - Asia/Yangon - Asia/Yekaterinburg - Asia/Yerevan - Atlantic/Azores - Atlantic/Bermuda - Atlantic/Canary - Atlantic/Cape_Verde - Atlantic/Faroe - Atlantic/Madeira - Atlantic/Reykjavik - Atlantic/South_Georgia - Atlantic/St_Helena - Atlantic/Stanley - Australia/Adelaide - Australia/Brisbane - Australia/Broken_Hill - Australia/Darwin - Australia/Eucla - Australia/Hobart - Australia/Lindeman - Australia/Lord_Howe - Australia/Melbourne - Australia/Perth - Australia/Sydney - Canada/Atlantic - Canada/Central - Canada/Eastern - Canada/Mountain - Canada/Newfoundland - Canada/Pacific - Europe/Amsterdam - Europe/Andorra - Europe/Astrakhan - Europe/Athens - Europe/Belgrade - Europe/Berlin - Europe/Bratislava - Europe/Brussels - Europe/Bucharest - Europe/Budapest - Europe/Busingen - Europe/Chisinau - Europe/Copenhagen - Europe/Dublin - Europe/Gibraltar - Europe/Guernsey - Europe/Helsinki - Europe/Isle_of_Man - Europe/Istanbul - Europe/Jersey - Europe/Kaliningrad - Europe/Kirov - Europe/Kyiv - Europe/Lisbon - Europe/Ljubljana - Europe/London - Europe/Luxembourg - Europe/Madrid - Europe/Malta - Europe/Mariehamn - Europe/Minsk - Europe/Monaco - Europe/Moscow - Europe/Oslo - Europe/Paris - Europe/Podgorica - Europe/Prague - Europe/Riga - Europe/Rome - Europe/Samara - Europe/San_Marino - Europe/Sarajevo - Europe/Saratov - Europe/Simferopol - Europe/Skopje - Europe/Sofia - Europe/Stockholm - Europe/Tallinn - Europe/Tirane - Europe/Ulyanovsk - Europe/Vaduz - Europe/Vatican - Europe/Vienna - Europe/Vilnius - Europe/Volgograd - Europe/Warsaw - Europe/Zagreb - Europe/Zurich - GMT - Indian/Antananarivo - Indian/Chagos - Indian/Christmas - Indian/Cocos - Indian/Comoro - Indian/Kerguelen - Indian/Mahe - Indian/Maldives - Indian/Mauritius - Indian/Mayotte - Indian/Reunion - Pacific/Apia - Pacific/Auckland - Pacific/Bougainville - Pacific/Chatham - Pacific/Chuuk - Pacific/Easter - Pacific/Efate - Pacific/Fakaofo - Pacific/Fiji - Pacific/Funafuti - Pacific/Galapagos - Pacific/Gambier - Pacific/Guadalcanal - Pacific/Guam - Pacific/Honolulu - Pacific/Kanton - Pacific/Kiritimati - Pacific/Kosrae - Pacific/Kwajalein - Pacific/Majuro - Pacific/Marquesas - Pacific/Midway - Pacific/Nauru - Pacific/Niue - Pacific/Norfolk - Pacific/Noumea - Pacific/Pago_Pago - Pacific/Palau - Pacific/Pitcairn - Pacific/Pohnpei - Pacific/Port_Moresby - Pacific/Rarotonga - Pacific/Saipan - Pacific/Tahiti - Pacific/Tarawa - Pacific/Tongatapu - Pacific/Wake - Pacific/Wallis - US/Alaska - US/Arizona - US/Central - US/Eastern - US/Hawaii - US/Mountain - US/Pacific - UTC type: string stripe_account_id: type: string nullable: true readOnly: true braintree_merchant_id: type: string nullable: true readOnly: true required: - address - available_currencies - braintree_merchant_id - current_user - default_currency - linked_organizations - organization_id - organization_name - payment_grace_period - plan_tags - stripe_account_id - subscription_filter_keys - team_name - timezone - users OrganizationCreateRequest: type: object properties: organization_name: type: string minLength: 1 maxLength: 100 default_currency_code: type: string minLength: 1 organization_type: enum: - development - production type: string default: development required: - organization_name OrganizationSetting: type: object properties: setting_id: type: string setting_name: enum: - generate_customer_after_creating_in_lotus - gen_cust_in_braintree_after_lotus - subscription_filter_keys - payment_grace_period type: string setting_values: type: object additionalProperties: {} setting_group: enum: - stripe - braintree - billing type: string required: - setting_id - setting_name - setting_values OrganizationSettingUpdate: type: object properties: setting_values: type: object additionalProperties: {} OrganizationUser: type: object properties: username: type: string description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. pattern: ^[\w.@+-]+$ maxLength: 150 email: type: string format: email maxLength: 254 role: type: string readOnly: true status: enum: - Active - Invited type: string default: Active required: - email - role - username PaginatedActionList: type: object properties: next: type: string nullable: true previous: type: string nullable: true results: type: array items: $ref: '#/components/schemas/Action' PaginatedEventList: type: object properties: next: type: string nullable: true previous: type: string nullable: true results: type: array items: $ref: '#/components/schemas/Event' PatchedCustomerUpdateRequest: type: object properties: default_currency_code: type: string minLength: 1 billing_address: allOf: - $ref: '#/components/schemas/AddressRequest' nullable: true shipping_address: allOf: - $ref: '#/components/schemas/AddressRequest' nullable: true tax_rate: type: number format: double maximum: 999.999900000000025102053768932819366455078125 minimum: 0 nullable: true description: Tax rate as percentage. For example, 10.5 for 10.5% timezone: enum: - Africa/Abidjan - Africa/Accra - Africa/Addis_Ababa - Africa/Algiers - Africa/Asmara - Africa/Bamako - Africa/Bangui - Africa/Banjul - Africa/Bissau - Africa/Blantyre - Africa/Brazzaville - Africa/Bujumbura - Africa/Cairo - Africa/Casablanca - Africa/Ceuta - Africa/Conakry - Africa/Dakar - Africa/Dar_es_Salaam - Africa/Djibouti - Africa/Douala - Africa/El_Aaiun - Africa/Freetown - Africa/Gaborone - Africa/Harare - Africa/Johannesburg - Africa/Juba - Africa/Kampala - Africa/Khartoum - Africa/Kigali - Africa/Kinshasa - Africa/Lagos - Africa/Libreville - Africa/Lome - Africa/Luanda - Africa/Lubumbashi - Africa/Lusaka - Africa/Malabo - Africa/Maputo - Africa/Maseru - Africa/Mbabane - Africa/Mogadishu - Africa/Monrovia - Africa/Nairobi - Africa/Ndjamena - Africa/Niamey - Africa/Nouakchott - Africa/Ouagadougou - Africa/Porto-Novo - Africa/Sao_Tome - Africa/Tripoli - Africa/Tunis - Africa/Windhoek - America/Adak - America/Anchorage - America/Anguilla - America/Antigua - America/Araguaina - America/Argentina/Buenos_Aires - America/Argentina/Catamarca - America/Argentina/Cordoba - America/Argentina/Jujuy - America/Argentina/La_Rioja - America/Argentina/Mendoza - America/Argentina/Rio_Gallegos - America/Argentina/Salta - America/Argentina/San_Juan - America/Argentina/San_Luis - America/Argentina/Tucuman - America/Argentina/Ushuaia - America/Aruba - America/Asuncion - America/Atikokan - America/Bahia - America/Bahia_Banderas - America/Barbados - America/Belem - America/Belize - America/Blanc-Sablon - America/Boa_Vista - America/Bogota - America/Boise - America/Cambridge_Bay - America/Campo_Grande - America/Cancun - America/Caracas - America/Cayenne - America/Cayman - America/Chicago - America/Chihuahua - America/Ciudad_Juarez - America/Costa_Rica - America/Creston - America/Cuiaba - America/Curacao - America/Danmarkshavn - America/Dawson - America/Dawson_Creek - America/Denver - America/Detroit - America/Dominica - America/Edmonton - America/Eirunepe - America/El_Salvador - America/Fort_Nelson - America/Fortaleza - America/Glace_Bay - America/Goose_Bay - America/Grand_Turk - America/Grenada - America/Guadeloupe - America/Guatemala - America/Guayaquil - America/Guyana - America/Halifax - America/Havana - America/Hermosillo - America/Indiana/Indianapolis - America/Indiana/Knox - America/Indiana/Marengo - America/Indiana/Petersburg - America/Indiana/Tell_City - America/Indiana/Vevay - America/Indiana/Vincennes - America/Indiana/Winamac - America/Inuvik - America/Iqaluit - America/Jamaica - America/Juneau - America/Kentucky/Louisville - America/Kentucky/Monticello - America/Kralendijk - America/La_Paz - America/Lima - America/Los_Angeles - America/Lower_Princes - America/Maceio - America/Managua - America/Manaus - America/Marigot - America/Martinique - America/Matamoros - America/Mazatlan - America/Menominee - America/Merida - America/Metlakatla - America/Mexico_City - America/Miquelon - America/Moncton - America/Monterrey - America/Montevideo - America/Montserrat - America/Nassau - America/New_York - America/Nome - America/Noronha - America/North_Dakota/Beulah - America/North_Dakota/Center - America/North_Dakota/New_Salem - America/Nuuk - America/Ojinaga - America/Panama - America/Paramaribo - America/Phoenix - America/Port-au-Prince - America/Port_of_Spain - America/Porto_Velho - America/Puerto_Rico - America/Punta_Arenas - America/Rankin_Inlet - America/Recife - America/Regina - America/Resolute - America/Rio_Branco - America/Santarem - America/Santiago - America/Santo_Domingo - America/Sao_Paulo - America/Scoresbysund - America/Sitka - America/St_Barthelemy - America/St_Johns - America/St_Kitts - America/St_Lucia - America/St_Thomas - America/St_Vincent - America/Swift_Current - America/Tegucigalpa - America/Thule - America/Tijuana - America/Toronto - America/Tortola - America/Vancouver - America/Whitehorse - America/Winnipeg - America/Yakutat - America/Yellowknife - Antarctica/Casey - Antarctica/Davis - Antarctica/DumontDUrville - Antarctica/Macquarie - Antarctica/Mawson - Antarctica/McMurdo - Antarctica/Palmer - Antarctica/Rothera - Antarctica/Syowa - Antarctica/Troll - Antarctica/Vostok - Arctic/Longyearbyen - Asia/Aden - Asia/Almaty - Asia/Amman - Asia/Anadyr - Asia/Aqtau - Asia/Aqtobe - Asia/Ashgabat - Asia/Atyrau - Asia/Baghdad - Asia/Bahrain - Asia/Baku - Asia/Bangkok - Asia/Barnaul - Asia/Beirut - Asia/Bishkek - Asia/Brunei - Asia/Chita - Asia/Choibalsan - Asia/Colombo - Asia/Damascus - Asia/Dhaka - Asia/Dili - Asia/Dubai - Asia/Dushanbe - Asia/Famagusta - Asia/Gaza - Asia/Hebron - Asia/Ho_Chi_Minh - Asia/Hong_Kong - Asia/Hovd - Asia/Irkutsk - Asia/Jakarta - Asia/Jayapura - Asia/Jerusalem - Asia/Kabul - Asia/Kamchatka - Asia/Karachi - Asia/Kathmandu - Asia/Khandyga - Asia/Kolkata - Asia/Krasnoyarsk - Asia/Kuala_Lumpur - Asia/Kuching - Asia/Kuwait - Asia/Macau - Asia/Magadan - Asia/Makassar - Asia/Manila - Asia/Muscat - Asia/Nicosia - Asia/Novokuznetsk - Asia/Novosibirsk - Asia/Omsk - Asia/Oral - Asia/Phnom_Penh - Asia/Pontianak - Asia/Pyongyang - Asia/Qatar - Asia/Qostanay - Asia/Qyzylorda - Asia/Riyadh - Asia/Sakhalin - Asia/Samarkand - Asia/Seoul - Asia/Shanghai - Asia/Singapore - Asia/Srednekolymsk - Asia/Taipei - Asia/Tashkent - Asia/Tbilisi - Asia/Tehran - Asia/Thimphu - Asia/Tokyo - Asia/Tomsk - Asia/Ulaanbaatar - Asia/Urumqi - Asia/Ust-Nera - Asia/Vientiane - Asia/Vladivostok - Asia/Yakutsk - Asia/Yangon - Asia/Yekaterinburg - Asia/Yerevan - Atlantic/Azores - Atlantic/Bermuda - Atlantic/Canary - Atlantic/Cape_Verde - Atlantic/Faroe - Atlantic/Madeira - Atlantic/Reykjavik - Atlantic/South_Georgia - Atlantic/St_Helena - Atlantic/Stanley - Australia/Adelaide - Australia/Brisbane - Australia/Broken_Hill - Australia/Darwin - Australia/Eucla - Australia/Hobart - Australia/Lindeman - Australia/Lord_Howe - Australia/Melbourne - Australia/Perth - Australia/Sydney - Canada/Atlantic - Canada/Central - Canada/Eastern - Canada/Mountain - Canada/Newfoundland - Canada/Pacific - Europe/Amsterdam - Europe/Andorra - Europe/Astrakhan - Europe/Athens - Europe/Belgrade - Europe/Berlin - Europe/Bratislava - Europe/Brussels - Europe/Bucharest - Europe/Budapest - Europe/Busingen - Europe/Chisinau - Europe/Copenhagen - Europe/Dublin - Europe/Gibraltar - Europe/Guernsey - Europe/Helsinki - Europe/Isle_of_Man - Europe/Istanbul - Europe/Jersey - Europe/Kaliningrad - Europe/Kirov - Europe/Kyiv - Europe/Lisbon - Europe/Ljubljana - Europe/London - Europe/Luxembourg - Europe/Madrid - Europe/Malta - Europe/Mariehamn - Europe/Minsk - Europe/Monaco - Europe/Moscow - Europe/Oslo - Europe/Paris - Europe/Podgorica - Europe/Prague - Europe/Riga - Europe/Rome - Europe/Samara - Europe/San_Marino - Europe/Sarajevo - Europe/Saratov - Europe/Simferopol - Europe/Skopje - Europe/Sofia - Europe/Stockholm - Europe/Tallinn - Europe/Tirane - Europe/Ulyanovsk - Europe/Vaduz - Europe/Vatican - Europe/Vienna - Europe/Vilnius - Europe/Volgograd - Europe/Warsaw - Europe/Zagreb - Europe/Zurich - GMT - Indian/Antananarivo - Indian/Chagos - Indian/Christmas - Indian/Cocos - Indian/Comoro - Indian/Kerguelen - Indian/Mahe - Indian/Maldives - Indian/Mauritius - Indian/Mayotte - Indian/Reunion - Pacific/Apia - Pacific/Auckland - Pacific/Bougainville - Pacific/Chatham - Pacific/Chuuk - Pacific/Easter - Pacific/Efate - Pacific/Fakaofo - Pacific/Fiji - Pacific/Funafuti - Pacific/Galapagos - Pacific/Gambier - Pacific/Guadalcanal - Pacific/Guam - Pacific/Honolulu - Pacific/Kanton - Pacific/Kiritimati - Pacific/Kosrae - Pacific/Kwajalein - Pacific/Majuro - Pacific/Marquesas - Pacific/Midway - Pacific/Nauru - Pacific/Niue - Pacific/Norfolk - Pacific/Noumea - Pacific/Pago_Pago - Pacific/Palau - Pacific/Pitcairn - Pacific/Pohnpei - Pacific/Port_Moresby - Pacific/Rarotonga - Pacific/Saipan - Pacific/Tahiti - Pacific/Tarawa - Pacific/Tongatapu - Pacific/Wake - Pacific/Wallis - US/Alaska - US/Arizona - US/Central - US/Eastern - US/Hawaii - US/Mountain - US/Pacific - UTC type: string PatchedInvoiceUpdateRequest: type: object properties: payment_status: enum: - paid - unpaid type: string PatchedMetricUpdateRequest: type: object properties: billable_metric_name: type: string nullable: true maxLength: 50 status: enum: - active - archived type: string PatchedOrganizationSettingUpdateRequest: type: object properties: setting_values: type: object additionalProperties: {} PatchedOrganizationUpdateRequest: type: object properties: default_currency_code: type: string minLength: 1 address: allOf: - $ref: '#/components/schemas/AddressRequest' nullable: true tax_rate: type: number format: double maximum: 999.999900000000025102053768932819366455078125 minimum: 0 nullable: true description: Tax rate as percentage. For example, 10.5 for 10.5% payment_grace_period: type: integer maximum: 365 minimum: 0 nullable: true plan_tags: type: array items: $ref: '#/components/schemas/TagRequest' subscription_filter_keys: type: array items: type: string minLength: 1 timezone: enum: - Africa/Abidjan - Africa/Accra - Africa/Addis_Ababa - Africa/Algiers - Africa/Asmara - Africa/Bamako - Africa/Bangui - Africa/Banjul - Africa/Bissau - Africa/Blantyre - Africa/Brazzaville - Africa/Bujumbura - Africa/Cairo - Africa/Casablanca - Africa/Ceuta - Africa/Conakry - Africa/Dakar - Africa/Dar_es_Salaam - Africa/Djibouti - Africa/Douala - Africa/El_Aaiun - Africa/Freetown - Africa/Gaborone - Africa/Harare - Africa/Johannesburg - Africa/Juba - Africa/Kampala - Africa/Khartoum - Africa/Kigali - Africa/Kinshasa - Africa/Lagos - Africa/Libreville - Africa/Lome - Africa/Luanda - Africa/Lubumbashi - Africa/Lusaka - Africa/Malabo - Africa/Maputo - Africa/Maseru - Africa/Mbabane - Africa/Mogadishu - Africa/Monrovia - Africa/Nairobi - Africa/Ndjamena - Africa/Niamey - Africa/Nouakchott - Africa/Ouagadougou - Africa/Porto-Novo - Africa/Sao_Tome - Africa/Tripoli - Africa/Tunis - Africa/Windhoek - America/Adak - America/Anchorage - America/Anguilla - America/Antigua - America/Araguaina - America/Argentina/Buenos_Aires - America/Argentina/Catamarca - America/Argentina/Cordoba - America/Argentina/Jujuy - America/Argentina/La_Rioja - America/Argentina/Mendoza - America/Argentina/Rio_Gallegos - America/Argentina/Salta - America/Argentina/San_Juan - America/Argentina/San_Luis - America/Argentina/Tucuman - America/Argentina/Ushuaia - America/Aruba - America/Asuncion - America/Atikokan - America/Bahia - America/Bahia_Banderas - America/Barbados - America/Belem - America/Belize - America/Blanc-Sablon - America/Boa_Vista - America/Bogota - America/Boise - America/Cambridge_Bay - America/Campo_Grande - America/Cancun - America/Caracas - America/Cayenne - America/Cayman - America/Chicago - America/Chihuahua - America/Ciudad_Juarez - America/Costa_Rica - America/Creston - America/Cuiaba - America/Curacao - America/Danmarkshavn - America/Dawson - America/Dawson_Creek - America/Denver - America/Detroit - America/Dominica - America/Edmonton - America/Eirunepe - America/El_Salvador - America/Fort_Nelson - America/Fortaleza - America/Glace_Bay - America/Goose_Bay - America/Grand_Turk - America/Grenada - America/Guadeloupe - America/Guatemala - America/Guayaquil - America/Guyana - America/Halifax - America/Havana - America/Hermosillo - America/Indiana/Indianapolis - America/Indiana/Knox - America/Indiana/Marengo - America/Indiana/Petersburg - America/Indiana/Tell_City - America/Indiana/Vevay - America/Indiana/Vincennes - America/Indiana/Winamac - America/Inuvik - America/Iqaluit - America/Jamaica - America/Juneau - America/Kentucky/Louisville - America/Kentucky/Monticello - America/Kralendijk - America/La_Paz - America/Lima - America/Los_Angeles - America/Lower_Princes - America/Maceio - America/Managua - America/Manaus - America/Marigot - America/Martinique - America/Matamoros - America/Mazatlan - America/Menominee - America/Merida - America/Metlakatla - America/Mexico_City - America/Miquelon - America/Moncton - America/Monterrey - America/Montevideo - America/Montserrat - America/Nassau - America/New_York - America/Nome - America/Noronha - America/North_Dakota/Beulah - America/North_Dakota/Center - America/North_Dakota/New_Salem - America/Nuuk - America/Ojinaga - America/Panama - America/Paramaribo - America/Phoenix - America/Port-au-Prince - America/Port_of_Spain - America/Porto_Velho - America/Puerto_Rico - America/Punta_Arenas - America/Rankin_Inlet - America/Recife - America/Regina - America/Resolute - America/Rio_Branco - America/Santarem - America/Santiago - America/Santo_Domingo - America/Sao_Paulo - America/Scoresbysund - America/Sitka - America/St_Barthelemy - America/St_Johns - America/St_Kitts - America/St_Lucia - America/St_Thomas - America/St_Vincent - America/Swift_Current - America/Tegucigalpa - America/Thule - America/Tijuana - America/Toronto - America/Tortola - America/Vancouver - America/Whitehorse - America/Winnipeg - America/Yakutat - America/Yellowknife - Antarctica/Casey - Antarctica/Davis - Antarctica/DumontDUrville - Antarctica/Macquarie - Antarctica/Mawson - Antarctica/McMurdo - Antarctica/Palmer - Antarctica/Rothera - Antarctica/Syowa - Antarctica/Troll - Antarctica/Vostok - Arctic/Longyearbyen - Asia/Aden - Asia/Almaty - Asia/Amman - Asia/Anadyr - Asia/Aqtau - Asia/Aqtobe - Asia/Ashgabat - Asia/Atyrau - Asia/Baghdad - Asia/Bahrain - Asia/Baku - Asia/Bangkok - Asia/Barnaul - Asia/Beirut - Asia/Bishkek - Asia/Brunei - Asia/Chita - Asia/Choibalsan - Asia/Colombo - Asia/Damascus - Asia/Dhaka - Asia/Dili - Asia/Dubai - Asia/Dushanbe - Asia/Famagusta - Asia/Gaza - Asia/Hebron - Asia/Ho_Chi_Minh - Asia/Hong_Kong - Asia/Hovd - Asia/Irkutsk - Asia/Jakarta - Asia/Jayapura - Asia/Jerusalem - Asia/Kabul - Asia/Kamchatka - Asia/Karachi - Asia/Kathmandu - Asia/Khandyga - Asia/Kolkata - Asia/Krasnoyarsk - Asia/Kuala_Lumpur - Asia/Kuching - Asia/Kuwait - Asia/Macau - Asia/Magadan - Asia/Makassar - Asia/Manila - Asia/Muscat - Asia/Nicosia - Asia/Novokuznetsk - Asia/Novosibirsk - Asia/Omsk - Asia/Oral - Asia/Phnom_Penh - Asia/Pontianak - Asia/Pyongyang - Asia/Qatar - Asia/Qostanay - Asia/Qyzylorda - Asia/Riyadh - Asia/Sakhalin - Asia/Samarkand - Asia/Seoul - Asia/Shanghai - Asia/Singapore - Asia/Srednekolymsk - Asia/Taipei - Asia/Tashkent - Asia/Tbilisi - Asia/Tehran - Asia/Thimphu - Asia/Tokyo - Asia/Tomsk - Asia/Ulaanbaatar - Asia/Urumqi - Asia/Ust-Nera - Asia/Vientiane - Asia/Vladivostok - Asia/Yakutsk - Asia/Yangon - Asia/Yekaterinburg - Asia/Yerevan - Atlantic/Azores - Atlantic/Bermuda - Atlantic/Canary - Atlantic/Cape_Verde - Atlantic/Faroe - Atlantic/Madeira - Atlantic/Reykjavik - Atlantic/South_Georgia - Atlantic/St_Helena - Atlantic/Stanley - Australia/Adelaide - Australia/Brisbane - Australia/Broken_Hill - Australia/Darwin - Australia/Eucla - Australia/Hobart - Australia/Lindeman - Australia/Lord_Howe - Australia/Melbourne - Australia/Perth - Australia/Sydney - Canada/Atlantic - Canada/Central - Canada/Eastern - Canada/Mountain - Canada/Newfoundland - Canada/Pacific - Europe/Amsterdam - Europe/Andorra - Europe/Astrakhan - Europe/Athens - Europe/Belgrade - Europe/Berlin - Europe/Bratislava - Europe/Brussels - Europe/Bucharest - Europe/Budapest - Europe/Busingen - Europe/Chisinau - Europe/Copenhagen - Europe/Dublin - Europe/Gibraltar - Europe/Guernsey - Europe/Helsinki - Europe/Isle_of_Man - Europe/Istanbul - Europe/Jersey - Europe/Kaliningrad - Europe/Kirov - Europe/Kyiv - Europe/Lisbon - Europe/Ljubljana - Europe/London - Europe/Luxembourg - Europe/Madrid - Europe/Malta - Europe/Mariehamn - Europe/Minsk - Europe/Monaco - Europe/Moscow - Europe/Oslo - Europe/Paris - Europe/Podgorica - Europe/Prague - Europe/Riga - Europe/Rome - Europe/Samara - Europe/San_Marino - Europe/Sarajevo - Europe/Saratov - Europe/Simferopol - Europe/Skopje - Europe/Sofia - Europe/Stockholm - Europe/Tallinn - Europe/Tirane - Europe/Ulyanovsk - Europe/Vaduz - Europe/Vatican - Europe/Vienna - Europe/Vilnius - Europe/Volgograd - Europe/Warsaw - Europe/Zagreb - Europe/Zurich - GMT - Indian/Antananarivo - Indian/Chagos - Indian/Christmas - Indian/Cocos - Indian/Comoro - Indian/Kerguelen - Indian/Mahe - Indian/Maldives - Indian/Mauritius - Indian/Mayotte - Indian/Reunion - Pacific/Apia - Pacific/Auckland - Pacific/Bougainville - Pacific/Chatham - Pacific/Chuuk - Pacific/Easter - Pacific/Efate - Pacific/Fakaofo - Pacific/Fiji - Pacific/Funafuti - Pacific/Galapagos - Pacific/Gambier - Pacific/Guadalcanal - Pacific/Guam - Pacific/Honolulu - Pacific/Kanton - Pacific/Kiritimati - Pacific/Kosrae - Pacific/Kwajalein - Pacific/Majuro - Pacific/Marquesas - Pacific/Midway - Pacific/Nauru - Pacific/Niue - Pacific/Norfolk - Pacific/Noumea - Pacific/Pago_Pago - Pacific/Palau - Pacific/Pitcairn - Pacific/Pohnpei - Pacific/Port_Moresby - Pacific/Rarotonga - Pacific/Saipan - Pacific/Tahiti - Pacific/Tarawa - Pacific/Tongatapu - Pacific/Wake - Pacific/Wallis - US/Alaska - US/Arizona - US/Central - US/Eastern - US/Hawaii - US/Mountain - US/Pacific - UTC type: string payment_provider: enum: - stripe - braintree type: string description: To udpate a payment provider's ID, specify the payment provider you want to update in this field, and the payment_provider_id in the corresponding field. payment_provider_id: type: string minLength: 1 nango_connected: type: boolean PatchedPlanUpdateRequest: type: object properties: plan_name: type: string minLength: 1 description: Name of the plan maxLength: 100 status: enum: - active - archived type: string tags: type: array items: $ref: '#/components/schemas/TagRequest' PatchedPlanVersionUpdateRequest: type: object properties: description: type: string nullable: true status: enum: - active - archived type: string make_active_type: enum: - replace_immediately - replace_on_active_version_renewal - grandfather_active type: string replace_immediately_type: enum: - end_current_subscription_and_bill - end_current_subscription_dont_bill - change_subscription_plan type: string transition_to_plan_id: type: string format: uuid writeOnly: true PaymentProcesorPostDataRequest: type: object properties: payment_processor: enum: - stripe - braintree type: string data: type: object additionalProperties: {} required: - data - payment_processor PaymentProcesorPostRequestRequest: type: object properties: pp_info: $ref: '#/components/schemas/PaymentProcesorPostDataRequest' required: - pp_info PaymentProcesorPostResponse: type: object properties: payment_processor: enum: - stripe - braintree type: string success: type: boolean details: type: string required: - details - payment_processor - success PeriodMetricRevenueResponse: type: object properties: total_revenue_period_1: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true total_revenue_period_2: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true earned_revenue_period_1: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true earned_revenue_period_2: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - earned_revenue_period_1 - earned_revenue_period_2 - total_revenue_period_1 - total_revenue_period_2 PeriodMetricUsageResponse: type: object properties: metrics: type: object additionalProperties: $ref: '#/components/schemas/PeriodSingleMetricUsage' required: - metrics PeriodSingleMetricUsage: type: object properties: data: type: array items: $ref: '#/components/schemas/DayMetricUsage' required: - data PeriodSubscriptionsResponse: type: object properties: period_1_total_subscriptions: type: integer period_1_new_subscriptions: type: integer period_2_total_subscriptions: type: integer period_2_new_subscriptions: type: integer required: - period_1_new_subscriptions - period_1_total_subscriptions - period_2_new_subscriptions - period_2_total_subscriptions Plan: type: object properties: plan_name: type: string description: Name of the plan maxLength: 100 plan_duration: enum: - monthly - quarterly - yearly - type: string nullable: true description: Duration of the plan status: enum: - active - archived - experimental type: string external_links: type: array items: $ref: '#/components/schemas/InitialExternalPlanLink' description: The external links that this plan has. plan_id: type: string parent_plan: allOf: - $ref: '#/components/schemas/PlanNameAndID' nullable: true target_customer: allOf: - $ref: '#/components/schemas/LightweightCustomer' nullable: true display_version: $ref: '#/components/schemas/PlanVersion' num_versions: type: integer readOnly: true description: The number of versions that this plan has. active_subscriptions: type: integer readOnly: true description: The number of active subscriptions that this plan has across all versions. tags: type: array items: $ref: '#/components/schemas/Tag' readOnly: true description: The tags that this plan has. required: - active_subscriptions - display_version - external_links - num_versions - plan_duration - plan_id - plan_name - status - tags - parent_plan - target_customer PlanComponent: type: object properties: billable_metric: $ref: '#/components/schemas/Metric' tiers: type: array items: $ref: '#/components/schemas/PriceTier' pricing_unit: $ref: '#/components/schemas/PricingUnit' required: - billable_metric - pricing_unit - tiers PlanComponentCreateRequest: type: object properties: metric_id: type: string format: uuid writeOnly: true tiers: type: array items: $ref: '#/components/schemas/PriceTierCreateRequest' required: - metric_id PlanCreateRequest: type: object properties: plan_name: type: string writeOnly: true minLength: 1 description: Name of the plan maxLength: 100 plan_duration: enum: - monthly - quarterly - yearly - type: string writeOnly: true nullable: true description: Duration of the plan status: enum: - active - archived - experimental type: string writeOnly: true initial_external_links: type: array items: $ref: '#/components/schemas/InitialExternalPlanLinkRequest' initial_version: $ref: '#/components/schemas/InitialPlanVersionRequest' parent_plan_id: type: string format: uuid target_customer_id: type: string minLength: 1 description: The id provided when creating the customer, we suggest matching with your internal customer id in your backend tags: type: array items: $ref: '#/components/schemas/TagRequest' required: - initial_version - plan_name PlanDetail: type: object properties: plan_name: type: string description: Name of the plan maxLength: 100 plan_duration: enum: - monthly - quarterly - yearly - type: string nullable: true description: Duration of the plan status: enum: - active - archived - experimental type: string external_links: type: array items: $ref: '#/components/schemas/InitialExternalPlanLink' description: The external links that this plan has. plan_id: type: string parent_plan: allOf: - $ref: '#/components/schemas/PlanNameAndID' nullable: true target_customer: allOf: - $ref: '#/components/schemas/LightweightCustomer' nullable: true display_version: allOf: - $ref: '#/components/schemas/PlanVersionDetail' readOnly: true num_versions: type: integer readOnly: true description: The number of versions that this plan has. active_subscriptions: type: integer readOnly: true description: The number of active subscriptions that this plan has across all versions. tags: type: array items: $ref: '#/components/schemas/Tag' readOnly: true description: The tags that this plan has. versions: type: array items: $ref: '#/components/schemas/PlanVersionDetail' readOnly: true required: - active_subscriptions - display_version - external_links - num_versions - parent_plan - plan_duration - plan_id - plan_name - status - tags - target_customer - versions PlanNameAndID: type: object properties: plan_name: type: string description: Name of the plan maxLength: 100 plan_id: type: string required: - plan_id - plan_name PlanRepresentation: type: object properties: plan_name: type: string plan_id: type: string plan_revenue: type: number format: double required: - plan_id - plan_name - plan_revenue PlanUpdate: type: object properties: plan_name: type: string description: Name of the plan maxLength: 100 status: enum: - active - archived type: string tags: type: array items: $ref: '#/components/schemas/Tag' PlanVersion: type: object properties: description: type: string readOnly: true nullable: true flat_fee_billing_type: enum: - in_advance - in_arrears type: string readOnly: true deprecated: true flat_rate: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true readOnly: true deprecated: true recurring_charges: type: array items: $ref: '#/components/schemas/RecurringCharge' readOnly: true components: type: array items: $ref: '#/components/schemas/PlanComponent' features: type: array items: $ref: '#/components/schemas/Feature' price_adjustment: allOf: - $ref: '#/components/schemas/PriceAdjustment' nullable: true usage_billing_frequency: enum: - monthly - quarterly - end_of_period - type: string readOnly: true nullable: true version: type: integer readOnly: true status: enum: - active - retiring - grandfathered - archived - inactive type: string readOnly: true plan_name: type: string currency: $ref: '#/components/schemas/PricingUnit' required: - components - currency - description - features - flat_fee_billing_type - flat_rate - plan_name - price_adjustment - recurring_charges - status - usage_billing_frequency - version PlanVersionCreateRequest: type: object properties: description: type: string writeOnly: true nullable: true plan_id: type: string format: uuid recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' nullable: true components: type: array items: $ref: '#/components/schemas/PlanComponentCreateRequest' nullable: true features: type: array items: type: string format: uuid nullable: true price_adjustment: $ref: '#/components/schemas/PriceAdjustmentRequest' usage_billing_frequency: enum: - monthly - quarterly - end_of_period - '' - type: string writeOnly: true nullable: true day_anchor: type: integer maximum: 31 minimum: 1 writeOnly: true nullable: true month_anchor: type: integer maximum: 12 minimum: 1 writeOnly: true nullable: true make_active: type: boolean make_active_type: enum: - replace_immediately - replace_on_active_version_renewal - grandfather_active type: string replace_immediately_type: enum: - end_current_subscription_and_bill - end_current_subscription_dont_bill - change_subscription_plan type: string transition_to_plan_id: type: string format: uuid currency_code: type: string minLength: 1 required: - make_active PlanVersionDetail: type: object properties: description: type: string readOnly: true nullable: true flat_fee_billing_type: enum: - in_advance - in_arrears type: string readOnly: true deprecated: true flat_rate: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true readOnly: true deprecated: true recurring_charges: type: array items: $ref: '#/components/schemas/RecurringCharge' readOnly: true components: type: array items: $ref: '#/components/schemas/PlanComponent' features: type: array items: $ref: '#/components/schemas/Feature' price_adjustment: allOf: - $ref: '#/components/schemas/PriceAdjustment' nullable: true usage_billing_frequency: enum: - monthly - quarterly - end_of_period - type: string readOnly: true nullable: true version: type: integer readOnly: true status: enum: - active - retiring - grandfathered - archived - inactive type: string readOnly: true plan_name: type: string currency: $ref: '#/components/schemas/PricingUnit' version_id: type: string readOnly: true plan_id: type: string readOnly: true alerts: type: array items: $ref: '#/components/schemas/UsageAlert' readOnly: true active_subscriptions: type: integer readOnly: true required: - active_subscriptions - alerts - components - currency - description - features - flat_fee_billing_type - flat_rate - plan_id - plan_name - price_adjustment - recurring_charges - status - usage_billing_frequency - version - version_id PlanVersionUpdate: type: object properties: description: type: string nullable: true status: enum: - active - archived type: string make_active_type: enum: - replace_immediately - replace_on_active_version_renewal - grandfather_active type: string replace_immediately_type: enum: - end_current_subscription_and_bill - end_current_subscription_dont_bill - change_subscription_plan type: string PlansByNumCustomers: type: object properties: results: type: array items: $ref: '#/components/schemas/SinglePlanNumCustomers' status: enum: - success type: string required: - results - status PriceAdjustment: type: object properties: price_adjustment_name: type: string maxLength: 100 price_adjustment_description: type: string nullable: true price_adjustment_type: enum: - percentage - fixed - price_override type: string price_adjustment_amount: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - price_adjustment_amount - price_adjustment_description - price_adjustment_name - price_adjustment_type PriceAdjustmentRequest: type: object properties: price_adjustment_name: type: string minLength: 1 default: '' price_adjustment_description: type: string nullable: true price_adjustment_type: enum: - percentage - fixed - price_override type: string price_adjustment_amount: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - price_adjustment_amount - price_adjustment_type PriceTier: type: object properties: type: enum: - flat - per_unit - free readOnly: true range_start: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true range_end: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true cost_per_batch: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true metric_units_per_batch: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true batch_rounding_type: enum: - round_up - round_down - round_nearest - no_rounding - nullable: true readOnly: true required: - batch_rounding_type - cost_per_batch - metric_units_per_batch - range_end - range_start - type PriceTierCreateRequest: type: object properties: type: enum: - flat - per_unit - free type: string range_start: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true range_end: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true cost_per_batch: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true metric_units_per_batch: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true nullable: true batch_rounding_type: enum: - round_up - round_down - round_nearest - no_rounding - type: string nullable: true default: no_rounding required: - range_start - type PricingUnit: type: object properties: code: type: string maxLength: 10 name: type: string maxLength: 100 symbol: type: string maxLength: 10 required: - code - name - symbol PricingUnitRequest: type: object properties: code: type: string minLength: 1 maxLength: 10 name: type: string minLength: 1 maxLength: 100 symbol: type: string minLength: 1 maxLength: 10 required: - code - name - symbol Product: type: object properties: name: type: string maxLength: 100 description: type: string nullable: true product_id: type: string maxLength: 100 pattern: ^[-a-zA-Z0-9_]+$ status: enum: - active - archived type: string required: - name - status ProductRequest: type: object properties: name: type: string minLength: 1 maxLength: 100 description: type: string nullable: true product_id: type: string minLength: 1 maxLength: 100 pattern: ^[-a-zA-Z0-9_]+$ status: enum: - active - archived type: string required: - name - status RecurringCharge: type: object properties: name: type: string charge_timing: enum: - in_advance - in_arrears type: string readOnly: true charge_behavior: enum: - prorate - full type: string readOnly: true amount: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true pricing_unit: $ref: '#/components/schemas/PricingUnit' required: - amount - charge_behavior - charge_timing - name - pricing_unit RecurringChargeCreateRequest: type: object properties: name: type: string minLength: 1 charge_timing: enum: - in_advance - in_arrears type: string charge_behavior: enum: - prorate - full type: string default: prorate amount: type: number format: double maximum: 10000000000 minimum: 0 exclusiveMaximum: true pricing_unit_code: type: string minLength: 1 required: - amount - charge_timing - name RegistrationDetailRequest: type: object properties: organization_name: type: string industry: type: string email: type: string minLength: 1 password: type: string minLength: 1 username: type: string minLength: 1 required: - email - industry - organization_name - password - username RegistrationFailure: type: object properties: detail: type: string required: - detail RegistrationRequest: type: object properties: register: $ref: '#/components/schemas/RegistrationDetailRequest' required: - register RegistrationSuccess: type: object properties: detail: type: string token: type: string user: $ref: '#/components/schemas/User' required: - detail - token - user ResetPasswordRequestRequest: type: object properties: userId: type: string minLength: 1 password: type: string minLength: 1 token: type: string minLength: 1 required: - password - token - userId ResetPasswordSuccess: type: object properties: detail: type: string token: type: string required: - detail - token RevenueDate: type: object properties: date: type: string format: date original_plan_revenue: type: number format: double new_plan_revenue: type: number format: double required: - date - new_plan_revenue - original_plan_revenue Seller: type: object properties: name: type: string address: allOf: - $ref: '#/components/schemas/Address' nullable: true readOnly: true phone: type: string nullable: true maxLength: 20 email: type: string format: email nullable: true maxLength: 254 required: - name SellerRequest: type: object properties: name: type: string minLength: 1 phone: type: string nullable: true maxLength: 20 email: type: string format: email nullable: true maxLength: 254 required: - name SessionSuccess: type: object properties: isAuthenticated: type: boolean required: - isAuthenticated SingleCustomerValue: type: object properties: customer_id: type: string customer_name: type: string value: type: number format: double required: - customer_id - customer_name - value SingleDayCostAnalysis: type: object properties: date: type: string format: date cost_data: type: array items: $ref: '#/components/schemas/SingleMetricCost' revenue: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - cost_data - date - revenue SingleMetricCost: type: object properties: metric: $ref: '#/components/schemas/Metric' cost: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - cost - metric SinglePaymentProcesor: type: object properties: payment_provider_name: type: string connected: type: boolean redirect_url: type: string format: uri self_hosted: type: boolean connection_id: type: string nullable: true working: type: boolean required: - connected - connection_id - payment_provider_name - redirect_url - self_hosted - working SinglePlanNumCustomers: type: object properties: plan_name: type: string num_customers: type: integer percent_total: type: number format: double required: - num_customers - percent_total - plan_name SingleSubstitution: type: object properties: substitution_name: type: string original_plan: $ref: '#/components/schemas/PlanRepresentation' new_plan: $ref: '#/components/schemas/PlanRepresentation' pct_revenue_change: type: number format: double nullable: true results: $ref: '#/components/schemas/SingleSubstitutionResults' required: - new_plan - original_plan - pct_revenue_change - results - substitution_name SingleSubstitutionResults: type: object properties: cumulative_revenue: type: array items: $ref: '#/components/schemas/RevenueDate' revenue_by_metric: type: array items: $ref: '#/components/schemas/MetricRevenue' top_customers: $ref: '#/components/schemas/TopCustomers' required: - cumulative_revenue - revenue_by_metric - top_customers SubscriptionCategoricalFilter: type: object properties: value: type: string property_name: type: string description: "The string name of the property to filter on. Example: 'product_id'" required: - property_name - value SubscriptionCategoricalFilterRequest: type: object properties: value: type: string minLength: 1 property_name: type: string minLength: 1 description: "The string name of the property to filter on. Example: 'product_id'" required: - property_name - value SubscriptionCustomerSummary: type: object properties: billing_plan_name: type: string plan_version: type: string end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. auto_renew: type: boolean description: Whether the subscription automatically renews. Defaults to true. required: - billing_plan_name - end_date - plan_version SubscriptionRecord: type: object properties: start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. auto_renew: type: boolean description: Whether the subscription automatically renews. Defaults to true. is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' customer: $ref: '#/components/schemas/LightweightCustomer' billing_plan: $ref: '#/components/schemas/LightweightPlanVersion' fully_billed: type: boolean description: Whether the subscription has been fully billed and finalized. addons: type: array items: $ref: '#/components/schemas/LightweightAddonSubscriptionRecord' required: - addons - auto_renew - billing_plan - customer - end_date - fully_billed - is_new - start_date - subscription_filters SubscriptionRecordCancelRequest: type: object properties: flat_fee_behavior: enum: - refund - charge_prorated - charge_full - type: string nullable: true description: When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of teh subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged. usage_behavior: enum: - bill_full - bill_none type: string default: bill_full description: If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full. invoicing_behavior: enum: - add_to_next_invoice - invoice_now type: string default: invoice_now description: Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now. SubscriptionRecordCreateRequest: type: object properties: start_date: type: string format: date-time description: The date the subscription starts. This should be a string in YYYY-MM-DD format of the date in UTC time. end_date: type: string format: date-time description: The date the subscription ends. This should be a string in YYYY-MM-DD format of the date in UTC time. If you don’t set it (recommended), we will use the information in the billing plan to automatically calculate this. auto_renew: type: boolean description: Whether the subscription automatically renews. Defaults to true. is_new: type: boolean subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' description: Add filter key, value pairs that define which events will be applied to this plan subscription. customer_id: type: string minLength: 1 description: The id provided when creating the customer writeOnly: true plan_id: type: string format: uuid writeOnly: true description: The Lotus plan_id, found in the billing plan object required: - customer_id - plan_id - start_date SubscriptionRecordRequest: type: object properties: start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. end_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. auto_renew: type: boolean description: Whether the subscription automatically renews. Defaults to true. is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. subscription_filters: type: array items: $ref: '#/components/schemas/SubscriptionCategoricalFilterRequest' billing_plan: $ref: '#/components/schemas/LightweightPlanVersionRequest' fully_billed: type: boolean description: Whether the subscription has been fully billed and finalized. addons: type: array items: $ref: '#/components/schemas/LightweightAddonSubscriptionRecordRequest' required: - addons - auto_renew - billing_plan - end_date - fully_billed - is_new - start_date - subscription_filters SubscriptionRecordUpdateRequest: type: object properties: replace_plan_id: type: string format: uuid writeOnly: true description: If provided, will replace the current subscription's plan with this plan. If this is provided,turn_off_auto_renew and end_date will be ignored. The provided plan must have the same duration as the current plan. invoicing_behavior: enum: - add_to_next_invoice - invoice_now type: string default: invoice_now description: The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation. usage_behavior: enum: - transfer_to_new_subscription - keep_separate type: string default: transfer_to_new_subscription description: The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas reset_usage will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month. turn_off_auto_renew: type: boolean description: Turn off auto renew for the subscription end_date: type: string format: date-time description: Change the end date for the subscription. Tag: type: object properties: tag_name: type: string maxLength: 50 tag_hex: type: string nullable: true maxLength: 7 tag_color: type: string nullable: true maxLength: 20 required: - tag_name TagRequest: type: object properties: tag_name: type: string minLength: 1 maxLength: 50 tag_hex: type: string nullable: true minLength: 1 maxLength: 7 tag_color: type: string nullable: true minLength: 1 maxLength: 20 required: - tag_name TimezonesResponse: type: object properties: timezones: type: array items: type: string required: - timezones TopCustomers: type: object properties: original_plan_revenue: type: array items: $ref: '#/components/schemas/SingleCustomerValue' new_plan_revenue: type: array items: $ref: '#/components/schemas/SingleCustomerValue' biggest_pct_increase: type: array items: $ref: '#/components/schemas/SingleCustomerValue' biggest_pct_decrease: type: array items: $ref: '#/components/schemas/SingleCustomerValue' required: - biggest_pct_decrease - biggest_pct_increase - new_plan_revenue - original_plan_revenue TrackEventFailure: type: object properties: success: enum: - none type: string failed_events: type: object additionalProperties: {} required: - failed_events - success TrackEventSuccess: type: object properties: success: enum: - all - some type: string failed_events: type: object additionalProperties: {} required: - failed_events - success TransferSubscriptionsFailure: type: object properties: status: enum: - error type: string detail: type: string required: - detail - status TransferSubscriptionsRequestRequest: type: object properties: source: enum: - stripe - braintree type: string end_now: type: boolean required: - end_now - source TransferSubscriptionsSuccess: type: object properties: status: enum: - success type: string detail: type: string required: - detail - status UsageAlert: type: object properties: usage_alert_id: type: string readOnly: true metric: $ref: '#/components/schemas/Metric' plan_version: $ref: '#/components/schemas/LightweightPlanVersion' threshold: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - metric - plan_version - threshold - usage_alert_id UsageAlertCreate: type: object properties: metric_id: type: string format: uuid plan_version_id: type: string format: uuid threshold: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - metric_id - plan_version_id - threshold UsageAlertCreateRequest: type: object properties: metric_id: type: string format: uuid plan_version_id: type: string format: uuid threshold: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - metric_id - plan_version_id - threshold UsageAlertPayloadRequest: type: object properties: subscription: $ref: '#/components/schemas/LightweightSubscriptionRecordRequest' usage_alert: $ref: '#/components/schemas/UsageAlertRequest' usage: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true time_triggered: type: string format: date-time required: - subscription - time_triggered - usage - usage_alert UsageAlertRequest: type: object properties: metric: $ref: '#/components/schemas/MetricRequest' plan_version: $ref: '#/components/schemas/LightweightPlanVersionRequest' threshold: type: number format: double maximum: 10000000000 minimum: -10000000000 exclusiveMaximum: true exclusiveMinimum: true required: - metric - plan_version - threshold UsageAlertTriggeredRequest: type: object properties: payload: $ref: '#/components/schemas/UsageAlertPayloadRequest' required: - payload User: type: object properties: username: type: string description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. pattern: ^[\w.@+-]+$ maxLength: 150 email: type: string format: email maxLength: 254 organization_name: type: string organization_id: type: string required: - email - organization_id - organization_name - username UserRequest: type: object properties: username: type: string minLength: 1 description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. pattern: ^[\w.@+-]+$ maxLength: 150 email: type: string format: email minLength: 1 maxLength: 254 organization_name: type: string minLength: 1 organization_id: type: string minLength: 1 required: - email - organization_id - organization_name - username WebhookEndpoint: type: object properties: webhook_endpoint_id: type: string readOnly: true name: type: string nullable: true maxLength: 100 webhook_url: type: string maxLength: 100 webhook_secret: type: string readOnly: true triggers: type: array items: $ref: '#/components/schemas/WebhookTrigger' readOnly: true required: - triggers - webhook_endpoint_id - webhook_secret - webhook_url WebhookEndpointRequest: type: object properties: name: type: string nullable: true maxLength: 100 webhook_url: type: string minLength: 1 maxLength: 100 triggers_in: type: array items: enum: - invoice.created - invoice.paid - usage_alert.triggered type: string writeOnly: true required: - triggers_in - webhook_url WebhookTrigger: type: object properties: trigger_name: enum: - invoice.created - invoice.paid - usage_alert.triggered type: string required: - trigger_name WebhookTriggerRequest: type: object properties: trigger_name: enum: - invoice.created - invoice.paid - usage_alert.triggered type: string required: - trigger_name securitySchemes: OrganizationApiKeyAuth: type: apiKey in: header name: X-API-KEY basicAuth: type: http scheme: basic knoxTokenAuth: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token"