info: title: Vayu API version: 1.0.0 description: >- The Vayu API is a RESTful API that allows you to submit events for processing and storage & manage billing related entities. The API is secured using the Bearer Authentication scheme with JWT tokens. To obtain a JWT token, please contact Vayu at team@withvayu.com contact: email: dev@withvayu.com name: Vayu, Inc url: https://withvayu.com openapi: 3.0.0 servers: - url: https://connect.withvayu.com description: Production server - url: https://staging-connect.withvayu.com description: Sandbox server tags: - name: auth description: The auth tag is used for endpoints related to authentication and authorization. - name: events description: The events tag is used for endpoints related to event ingestion. - name: customers description: The customers tag is used for endpoints related to customer management. - name: meters description: The meters tag is used for endpoints related to meter management. - name: contracts description: The contracts tag is used for endpoints related to contract management. - name: invoices description: The invoices tag is used for endpoints related to invoice management. - name: credits description: The credits tag is used for endpoints related to credit management. - name: webhooks description: The webhooks tag is used for endpoints related to webhook management. components: securitySchemes: BearerAuthorizer: type: http scheme: bearer bearerFormat: JWT requestBodies: CreateCatalogProductRequest: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCatalogProductRequest" UpdateCatalogProductRequest: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateCatalogProductRequest" CreateCustomerRequest: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCustomerRequest" UpdateCustomerRequest: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateCustomerRequest" UpdateMeterRequest: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateMeterRequest" CreateContractRequest: required: true content: application/json: schema: $ref: "#/components/schemas/CreateContractRequest" CreateMeasurementRequest: required: true content: application/json: schema: $ref: "#/components/schemas/CreateMeasurementRequest" CreateCustomerRelationRequest: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCustomerRelationRequest" LoginRequest: required: true content: application/json: schema: $ref: "#/components/schemas/LoginRequest" DeleteEventsByRefsRequest: required: true description: A list of event refs to delete. The request deletes the matching events for the authenticated account. content: application/json: schema: $ref: "#/components/schemas/DeleteEventsByRefsRequest" EventsDryRunRequest: required: true description: >- An array of events following the EventInput schema. This request body should be included in the PUT request to '/events' Up to 1000 events or a total payload max size of 256KB content: application/json: schema: $ref: "#/components/schemas/EventsDryRunRequest" SendEventsRequest: required: true description: >- An array of events following the EventInput schema. This request body should be included in the PUT request to '/events' Up to 1000 events or a total payload max size of 256KB content: application/json: schema: $ref: "#/components/schemas/SendEventsRequest" GrantCreditsRequest: required: true content: application/json: schema: $ref: "#/components/schemas/GrantCreditsRequest" DeductCreditsRequest: required: true content: application/json: schema: $ref: "#/components/schemas/DeductCreditsRequest" WebhookSubscribeRequest: required: true description: Subscribe to webhooks and receive event notifications. content: application/json: schema: $ref: "#/components/schemas/WebhookSubscribeRequest" SubmitCloudUsageRequest: required: true content: application/json: schema: $ref: "#/components/schemas/SubmitCloudUsageRequest" responses: CreateCatalogProductResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/CreateCatalogProductResponse" ListCatalogProductsResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListCatalogProductsResponse" GetCatalogProductResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/GetCatalogProductResponse" UpdateCatalogProductResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/UpdateCatalogProductResponse" DeleteCatalogProductResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/DeleteCatalogProductResponse" CreateCustomerResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/CreateCustomerResponse" ListCustomersResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListCustomersResponse" GetCustomerResponse: description: response contains the customer matching the provided externalId content: application/json: schema: $ref: "#/components/schemas/GetCustomerResponse" UpdateCustomerResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/UpdateCustomerResponse" DeleteCustomerResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/DeleteCustomerResponse" GetMeterResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/GetMeterResponse" UpdateMeterResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/UpdateMeterResponse" DeleteMeterResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/DeleteMeterResponse" ListMetersResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListMetersResponse" GetContractResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/GetContractResponse" DeleteContractResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/DeleteContractResponse" CreateContractResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/CreateContractResponse" CreateMeasurementResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/CreateMeasurementResponse" ListMeasurementsResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListMeasurementsResponse" GetMeasurementResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/GetMeasurementResponse" DeleteMeasurementResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/DeleteMeasurementResponse" GetInvoiceResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/GetInvoiceResponse" CreateCustomerRelationResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/CreateCustomerRelationResponse" GetCustomerRelationResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/GetCustomerRelationResponse" LoginResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/LoginResponse" DeleteEventsByRefsResponse: description: Contains the events that were removed along with deletion metadata. content: application/json: schema: $ref: "#/components/schemas/DeleteEventsByRefsResponse" EventsDryRunResponse: description: Events with their corresponding meter and customer data. content: application/json: schema: $ref: "#/components/schemas/EventsDryRunResponse" QueryEventsResponse: description: response contains an array of events content: application/json: schema: $ref: "#/components/schemas/QueryEventsResponse" SendEventsResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/SendEventsResponse" GetEventResponse: description: response contains the event matching the provided refId content: application/json: schema: $ref: "#/components/schemas/GetEventResponse" DeleteEventResponse: description: Contains the event that was deleted content: application/json: schema: $ref: "#/components/schemas/DeleteEventResponse" ListCreditLedgerEntriesResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListCreditLedgerEntriesResponse" RequestSuccess: description: RequestSuccess GetCustomerByNameResponse: description: response contains the customer matching the provided name content: application/json: schema: $ref: "#/components/schemas/GetCustomerByNameResponse" GetCustomerProductsConsumptionsResponse: description: response contains the products consumptions by the customer id content: application/json: schema: $ref: "#/components/schemas/GetCustomerProductsConsumptionsResponse" GetCustomerProductsConsumptionsByAliasResponse: description: response contains the products consumptions by the customer alias content: application/json: schema: $ref: "#/components/schemas/GetCustomerProductsConsumptionsByAliasResponse" GetCustomerByIntegrationIdResponse: description: response contains the customer matching the provided integration id content: application/json: schema: $ref: "#/components/schemas/GetCustomerByIntegrationIdResponse" GetContractByIntegrationIdResponse: description: Response contains the contract matching the provided integration id content: application/json: schema: $ref: "#/components/schemas/GetContractByIntegrationIdResponse" ListContractsResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListContractsResponse" InvoicePaymentStatusResponse: description: Invoice payment status information including payment status, amounts, and dates. content: application/json: schema: $ref: "#/components/schemas/InvoicePaymentStatusResponse" ListInvoicesResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/ListInvoicesResponse" GetProductConsumptionResponse: description: The response from the get product consumption action content: application/json: schema: $ref: "#/components/schemas/GetProductConsumptionResponse" SubmitCloudUsageResponse: description: RequestSuccess content: application/json: schema: $ref: "#/components/schemas/SubmitCloudUsageResponse" parameters: {} schemas: CreateCatalogProductRequest: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product required: - name CreateCatalogProductResponse: type: object properties: catalogProduct: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt required: - catalogProduct ListCatalogProductsResponse: type: object properties: catalogProducts: type: array items: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - catalogProducts - total - hasMore GetCatalogProductResponse: type: object properties: catalogProduct: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt required: - catalogProduct UpdateCatalogProductRequest: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product additionalProperties: false UpdateCatalogProductResponse: type: object properties: catalogProduct: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt required: - catalogProduct DeleteCatalogProductResponse: type: object properties: catalogProduct: type: object properties: name: type: string minLength: 1 description: The name of the catalog product description: type: string description: The description of the catalog product externalId: type: string description: The external ID of the catalog product id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - name - id - createdAt - updatedAt - deletedAt required: - catalogProduct Contact: type: object properties: name: type: string email: type: string format: email title: type: string phone: type: string pattern: ^\+?[1-9]\d{4,15}$ receiveInvoiceEmail: type: boolean CustomerSource: type: string nullable: true enum: - Stripe - VayuEventsApi - Api - Salesforce - HubSpot description: The source of the customer CustomerCloudProviderSettings: type: object nullable: true properties: cloudProvider: type: string enum: - AWS cloudProviderMarketplaceId: type: string customerIdentifier: type: string description: Cloud provider settings for the customer Address: type: object nullable: true properties: country: type: string nullable: true city: type: string nullable: true addressText: type: string nullable: true state: type: string nullable: true postalCode: type: string nullable: true description: The address of the customer Currency: type: string nullable: true enum: - USD - EUR - GBP - ILS - CAD - AUD - COP - BRL description: The billing currency of the customer IntegrationEntityTypes: type: string enum: - Account - Invoice - SalesOrder - Item - Deal - Company - Opportunity description: The entity type in the integration (e.g., "Opportunity", "Deal") CustomFieldValueTypes: type: string enum: - String - Number - Boolean description: 'The type of the value: "String", "Number", or "Boolean"' CustomField: type: object properties: integrationSource: type: string enum: - NetSuite - QuickBooks - Stripe - Salesforce - Hubspot - Vayu - Slack - S3 - Morning - Snowflake - Anrok - Connact - Xero description: The integration provider (e.g., "Salesforce", "HubSpot") integrationEntityType: $ref: "#/components/schemas/IntegrationEntityTypes" fieldPath: type: string description: The path to the field in the integration (e.g., "root.path.field") vayuCustomFieldName: type: string description: The name of the field in Vayu (e.g., "AE Name") valueType: $ref: "#/components/schemas/CustomFieldValueTypes" value: nullable: true description: The actual value of the custom field required: - vayuCustomFieldName - valueType CreateCustomerRequest: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer required: - name CreateCustomerResponse: type: object properties: customer: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt required: - customer ListCustomersResponse: type: object properties: customers: type: array items: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - customers - total - hasMore GetCustomerResponse: type: object properties: customer: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt required: - customer UpdateCustomerRequest: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer additionalProperties: false UpdateCustomerResponse: type: object properties: customer: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt required: - customer DeleteCustomerResponse: type: object properties: customer: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - name - id - createdAt - updatedAt - deletedAt required: - customer AggregationOperator: type: string enum: - Count - Sum - Distinct - Max - Min - Average - First - Last description: The aggregation method defines how the events should be summed to represent a usage value. AggregationMethod: type: object properties: operator: $ref: "#/components/schemas/AggregationOperator" field: type: string description: The field inside the "data" property to apply the aggregation method to. instanceKey: type: string description: The fields that is used to group different events together when measuring the usage. required: - operator description: The aggregation method defines how the events should be summed to represent a usage value. CriterionOperator: type: string enum: - Equals - DoesntEqual - Has - In - Contains - DoesntContain - LargerThan - LowerThan - LowerEqualTo - LargerEqualTo - Exists - DoesntExists Criterion: type: object properties: field: type: string minLength: 1 operator: $ref: "#/components/schemas/CriterionOperator" value: type: string minLength: 1 required: - field - operator - value Condition: type: object properties: criterions: type: array items: $ref: "#/components/schemas/Criterion" minItems: 1 required: - criterions Filter: type: object properties: conditions: type: array items: $ref: "#/components/schemas/Condition" minItems: 1 required: - conditions description: >- The filter to apply to the events to be included in the meter. The filter object contains an array of Conditions, each condition represents a logical OR statement. Each condition contains an array of Criteria (criterions), each criterion represents a logical AND statement. GetMeterResponse: type: object properties: meter: type: object properties: name: type: string minLength: 1 description: The name of the meter eventName: type: string minLength: 1 description: The name of the event that the meter is tracking. aggregationMethod: $ref: "#/components/schemas/AggregationMethod" filter: $ref: "#/components/schemas/Filter" id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - eventName - aggregationMethod - id - createdAt - updatedAt required: - meter UpdateMeterRequest: type: object properties: name: type: string minLength: 1 description: The name of the meter eventName: type: string minLength: 1 description: The name of the event that the meter is tracking. aggregationMethod: $ref: "#/components/schemas/AggregationMethod" filter: $ref: "#/components/schemas/Filter" additionalProperties: false UpdateMeterResponse: type: object properties: meter: type: object properties: name: type: string minLength: 1 description: The name of the meter eventName: type: string minLength: 1 description: The name of the event that the meter is tracking. aggregationMethod: $ref: "#/components/schemas/AggregationMethod" filter: $ref: "#/components/schemas/Filter" id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - eventName - aggregationMethod - id - createdAt - updatedAt required: - meter DeleteMeterResponse: type: object properties: meter: type: object properties: name: type: string minLength: 1 description: The name of the meter eventName: type: string minLength: 1 description: The name of the event that the meter is tracking. aggregationMethod: $ref: "#/components/schemas/AggregationMethod" filter: $ref: "#/components/schemas/Filter" id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - name - eventName - aggregationMethod - id - createdAt - updatedAt - deletedAt required: - meter ListMetersResponse: type: object properties: meters: type: array items: type: object properties: name: type: string minLength: 1 description: The name of the meter eventName: type: string minLength: 1 description: The name of the event that the meter is tracking. aggregationMethod: $ref: "#/components/schemas/AggregationMethod" filter: $ref: "#/components/schemas/Filter" id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - eventName - aggregationMethod - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - meters - total - hasMore ExternalUsageReset: type: integer nullable: true description: "Interval in months at which cumulative usage resets for tier calculation. Must be one of: 1, 2, 3, 6, 12" ExternalOverageStrategy: type: string nullable: true enum: - IGNORE - BLOCK - UPGRADE_PLAN - TOP_UP default: IGNORE description: The strategy to apply when the overage occurs PaymentTerm: type: string nullable: true enum: - Prepayment - Postpayment description: The payment term of the product. Can be prepayment or postpayment. If not provided, the payment term will be determined by the pricing model. ProductCloudProviderSettings: type: object nullable: true properties: cloudProvider: type: string enum: - AWS cloudProviderMarketplaceId: type: string dimension: type: string description: Cloud provider settings for the product ProductGroup: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing minItems: 1 description: The products that the product group is associated with baseAmount: type: number nullable: true description: The base amount for the customer to pay even if the amount based on usage is lower commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product group. units are aggregated for all products in the group isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. required: - displayName - products CustomFieldValue: type: object properties: customFieldDefinitionId: type: string value: type: string fieldName: type: string required: - customFieldDefinitionId ContractStatus: type: string enum: - InReview - Active - Inactive - Expired - Terminated - PendingTermination - Error description: The status of the contract GetContractResponse: type: object properties: contract: type: object properties: startDate: type: string description: The start date of the contract format: date-time customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the contract is associated with name: type: string description: The name of the contract salesForceOpportunityId: type: string nullable: true description: The id of the sales force opportunity that the contract is associated with endDate: type: string nullable: true description: The end date of the contract format: date-time signatureDate: type: string nullable: true description: The signature date of the contract format: date-time products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing description: The products that the contract is associated with productGroups: type: array items: $ref: "#/components/schemas/ProductGroup" description: Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc. accountManager: type: string nullable: true description: The name of the account manager of the contract shouldProRateInvoices: type: boolean description: Whether to pro rate the invoices for the contract. If not provided, it will default to false deprecated: true autoRenewContract: type: boolean description: Whether the contract is set to auto renew. If not provided, it will be treated as true customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) customFieldValues: type: array nullable: true items: $ref: "#/components/schemas/CustomFieldValue" description: The stored custom field values associated with the contract status: $ref: "#/components/schemas/ContractStatus" purchaseOrder: type: string description: The purchase order number of the contract id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - startDate - customerId - name - id - createdAt - updatedAt required: - contract DeleteContractResponse: type: object properties: contract: type: object properties: startDate: type: string description: The start date of the contract format: date-time customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the contract is associated with name: type: string description: The name of the contract salesForceOpportunityId: type: string nullable: true description: The id of the sales force opportunity that the contract is associated with endDate: type: string nullable: true description: The end date of the contract format: date-time signatureDate: type: string nullable: true description: The signature date of the contract format: date-time products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing description: The products that the contract is associated with productGroups: type: array items: $ref: "#/components/schemas/ProductGroup" description: Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc. accountManager: type: string nullable: true description: The name of the account manager of the contract shouldProRateInvoices: type: boolean description: Whether to pro rate the invoices for the contract. If not provided, it will default to false deprecated: true autoRenewContract: type: boolean description: Whether the contract is set to auto renew. If not provided, it will be treated as true customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) customFieldValues: type: array nullable: true items: $ref: "#/components/schemas/CustomFieldValue" description: The stored custom field values associated with the contract status: $ref: "#/components/schemas/ContractStatus" purchaseOrder: type: string description: The purchase order number of the contract id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - startDate - customerId - name - id - createdAt - updatedAt - deletedAt required: - contract CreateContractRequest: type: object properties: startDate: type: string description: The start date of the contract format: date-time customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the contract is associated with name: type: string description: The name of the contract salesForceOpportunityId: type: string nullable: true description: The id of the sales force opportunity that the contract is associated with endDate: type: string nullable: true description: The end date of the contract format: date-time signatureDate: type: string nullable: true description: The signature date of the contract format: date-time products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing description: The products that the contract is associated with productGroups: type: array items: $ref: "#/components/schemas/ProductGroup" description: Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc. accountManager: type: string nullable: true description: The name of the account manager of the contract shouldProRateInvoices: type: boolean description: Whether to pro rate the invoices for the contract. If not provided, it will default to false deprecated: true autoRenewContract: type: boolean description: Whether the contract is set to auto renew. If not provided, it will be treated as true customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) customFieldValues: type: array nullable: true items: $ref: "#/components/schemas/CustomFieldValue" description: The stored custom field values associated with the contract status: $ref: "#/components/schemas/ContractStatus" purchaseOrder: type: string description: The purchase order number of the contract required: - startDate - customerId - name CreateContractResponse: type: object properties: contract: type: object properties: startDate: type: string description: The start date of the contract format: date-time customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the contract is associated with name: type: string description: The name of the contract salesForceOpportunityId: type: string nullable: true description: The id of the sales force opportunity that the contract is associated with endDate: type: string nullable: true description: The end date of the contract format: date-time signatureDate: type: string nullable: true description: The signature date of the contract format: date-time products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing description: The products that the contract is associated with productGroups: type: array items: $ref: "#/components/schemas/ProductGroup" description: Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc. accountManager: type: string nullable: true description: The name of the account manager of the contract shouldProRateInvoices: type: boolean description: Whether to pro rate the invoices for the contract. If not provided, it will default to false deprecated: true autoRenewContract: type: boolean description: Whether the contract is set to auto renew. If not provided, it will be treated as true customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) customFieldValues: type: array nullable: true items: $ref: "#/components/schemas/CustomFieldValue" description: The stored custom field values associated with the contract status: $ref: "#/components/schemas/ContractStatus" purchaseOrder: type: string description: The purchase order number of the contract id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - startDate - customerId - name - id - createdAt - updatedAt required: - contract CreateMeasurementRequest: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The customer for whom usage will be attributed meterId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The meter/product that is being measured usageDate: type: object properties: year: type: integer minimum: 0 month: type: integer minimum: 0 maximum: 12 day: type: integer minimum: 1 maximum: 31 required: - year - month - day description: The day the usage took place value: type: number description: The updated value of product units consumed by the customer, for the product for given day required: - customerId - meterId - usageDate - value CreateMeasurementResponse: type: object properties: measurement: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The customer for whom usage will be attributed meterId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The meter/product that is being measured usageDate: type: object properties: year: type: integer minimum: 0 month: type: integer minimum: 0 maximum: 12 day: type: integer minimum: 1 maximum: 31 required: - year - month - day description: The day the usage took place value: type: number description: The updated value of product units consumed by the customer, for the product for given day id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - customerId - meterId - usageDate - value - id - createdAt - updatedAt required: - measurement ListMeasurementsResponse: type: object properties: measurements: type: array items: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The customer for whom usage will be attributed meterId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The meter/product that is being measured usageDate: type: object properties: year: type: integer minimum: 0 month: type: integer minimum: 0 maximum: 12 day: type: integer minimum: 1 maximum: 31 required: - year - month - day description: The day the usage took place value: type: number description: The updated value of product units consumed by the customer, for the product for given day id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - customerId - meterId - usageDate - value - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - measurements - total - hasMore GetMeasurementResponse: type: object properties: measurement: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The customer for whom usage will be attributed meterId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The meter/product that is being measured usageDate: type: object properties: year: type: integer minimum: 0 month: type: integer minimum: 0 maximum: 12 day: type: integer minimum: 1 maximum: 31 required: - year - month - day description: The day the usage took place value: type: number description: The updated value of product units consumed by the customer, for the product for given day id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - customerId - meterId - usageDate - value - id - createdAt - updatedAt required: - measurement DeleteMeasurementResponse: type: object properties: measurement: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The customer for whom usage will be attributed meterId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The meter/product that is being measured usageDate: type: object properties: year: type: integer minimum: 0 month: type: integer minimum: 0 maximum: 12 day: type: integer minimum: 1 maximum: 31 required: - year - month - day description: The day the usage took place value: type: number description: The updated value of product units consumed by the customer, for the product for given day id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - customerId - meterId - usageDate - value - id - createdAt - updatedAt - deletedAt required: - measurement FullDayPeriod: type: object properties: startTime: type: string format: date-time endTime: type: string format: date-time required: - startTime - endTime description: The billing cycle of the invoice, consists of a start and end date InvoiceBillingStatus: type: string enum: - None - Paid - Rejected - PendingPayment - Overdue description: The billing status of the invoice PaymentInfo: type: object properties: transactionId: type: string date: type: string format: date-time paymentMethod: type: string paymentMethodId: type: string amount: type: number currency: $ref: "#/components/schemas/Currency" status: type: string note: type: string customerId: type: string depositTo: type: object properties: id: type: string name: type: string required: - name description: The payment information of the invoice LineItem: type: object properties: invoiceId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the invoice that the line item is a part of revenueBreakdown: type: object properties: total: type: number subtotal: type: number overage: type: number discount: type: number creditsUsed: type: number tax: type: number required: - total - subtotal - overage - discount - creditsUsed - tax description: The revenue breakdown of the line item required: - invoiceId - revenueBreakdown GetInvoiceResponse: type: object properties: invoice: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the invoice is associated with contractId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the contract that the invoice is associated with name: type: string minLength: 1 description: The name of the invoice, usually a description of the billing period billingCycle: $ref: "#/components/schemas/FullDayPeriod" revenueBreakdown: type: object properties: total: type: number subtotal: type: number overage: type: number discount: type: number creditsUsed: type: number tax: type: number required: - total - subtotal - overage - discount - creditsUsed - tax description: The breakdown of the revenue for the invoice billingStatus: $ref: "#/components/schemas/InvoiceBillingStatus" paymentInfo: $ref: "#/components/schemas/PaymentInfo" dueDate: type: string nullable: true description: The due date of the invoice format: date-time accountId: type: string description: The id of the account that the invoice is associated with lineItems: type: array items: $ref: "#/components/schemas/LineItem" description: The line items of the invoice, each representing a product charge amount: type: number description: The total amount of the invoice id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - customerId - name - billingCycle - revenueBreakdown - billingStatus - dueDate - accountId - lineItems - amount - id - createdAt - updatedAt required: - invoice CreateCustomerRelationRequest: type: object properties: vayuParentCustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: Identifier of the parent customer in Vayu. vayuChildCustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: Identifier of the child customer in Vayu. required: - vayuParentCustomerId - vayuChildCustomerId CreateCustomerRelationResponse: type: object properties: customerRelation: type: object properties: vayuParentCustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: Identifier of the parent customer in Vayu. vayuChildCustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: Identifier of the child customer in Vayu. id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - vayuParentCustomerId - vayuChildCustomerId - id - createdAt - updatedAt required: - customerRelation GetCustomerRelationResponse: type: object properties: customerRelation: type: object properties: vayuParentCustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: Identifier of the parent customer in Vayu. vayuChildCustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: Identifier of the child customer in Vayu. id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - vayuParentCustomerId - vayuChildCustomerId - id - createdAt - updatedAt required: - customerRelation LoginRequest: type: object properties: refreshToken: type: string description: The refresh token issued for the authentication process. It is required to obtain a new access token. required: - refreshToken LoginResponse: type: object properties: accessToken: type: string description: The new access token to be used for subsequent API calls. It is set to expire every hour. required: - accessToken DeleteEventsByRefsRequest: type: object properties: refs: type: array items: type: string minLength: 1 minItems: 1 maxItems: 1000 required: - refs DeleteEventsByRefsResponse: type: object properties: events: type: array items: type: object properties: name: type: string description: The distinctive label assigned to an event, serving as a critical identifier for categorizing and pricing events within the system's backend infrastructure. example: api_call timestamp: type: string description: The temporal marker denoting the exact moment of event occurrence. The timestamp is formatted as an ISO 8601 string and is expressed in Coordinated Universal Time (UTC). i.e. YYYY-MM-DDTHH:MM:SS.SSSZ format: date-time example: 2023-09-13T18:25:43.511Z customerAlias: type: string minLength: 1 description: A pseudonymous or otherwise obfuscated identifier uniquely assigned to each customer. example: customer_12345 ref: type: string description: A universally unique identifier (UUID) or other form of high-entropy string serving as an immutable reference for each event entry. example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 data: type: object nullable: true additionalProperties: nullable: true description: A schema-less JSON object encapsulating miscellaneous attributes and metrics associated with the event. example: key1: processing_duration key2: api_url id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - name - timestamp - customerAlias - ref - id - createdAt - updatedAt - deletedAt description: The events that were deleted required: - events Event: type: object properties: name: type: string description: The distinctive label assigned to an event, serving as a critical identifier for categorizing and pricing events within the system's backend infrastructure. example: api_call timestamp: type: string description: The temporal marker denoting the exact moment of event occurrence. The timestamp is formatted as an ISO 8601 string and is expressed in Coordinated Universal Time (UTC). i.e. YYYY-MM-DDTHH:MM:SS.SSSZ format: date-time example: 2023-09-13T18:25:43.511Z customerAlias: type: string minLength: 1 description: A pseudonymous or otherwise obfuscated identifier uniquely assigned to each customer. example: customer_12345 ref: type: string description: A universally unique identifier (UUID) or other form of high-entropy string serving as an immutable reference for each event entry. example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 data: type: object nullable: true additionalProperties: nullable: true description: A schema-less JSON object encapsulating miscellaneous attributes and metrics associated with the event. example: key1: processing_duration key2: api_url required: - name - timestamp - customerAlias - ref EventsDryRunRequest: type: object properties: events: type: array items: $ref: "#/components/schemas/Event" minItems: 1 maxItems: 1000 required: - events Meter: type: object properties: name: type: string minLength: 1 description: The name of the meter eventName: type: string minLength: 1 description: The name of the event that the meter is tracking. aggregationMethod: $ref: "#/components/schemas/AggregationMethod" filter: $ref: "#/components/schemas/Filter" required: - name - eventName - aggregationMethod EventsDryRunResponseObject: type: object properties: event: type: object properties: timestamp: type: string format: date-time customerAlias: type: string minLength: 1 accountId: type: string pattern: ^[0-9a-fA-F]{24}$ data: type: object nullable: true additionalProperties: nullable: true ref: type: string name: type: string required: - timestamp - customerAlias - accountId - ref - name matchedCustomer: type: string nullable: true meterWithValues: type: array items: allOf: - $ref: "#/components/schemas/Meter" - type: object properties: value: type: number nullable: true instanceValue: nullable: true required: - value required: - event - meterWithValues EventsDryRunResponse: type: object properties: events: type: array items: $ref: "#/components/schemas/EventsDryRunResponseObject" required: - events QueryEventsResponse: type: object properties: events: type: array items: type: object properties: name: type: string description: The distinctive label assigned to an event, serving as a critical identifier for categorizing and pricing events within the system's backend infrastructure. example: api_call timestamp: type: string description: The temporal marker denoting the exact moment of event occurrence. The timestamp is formatted as an ISO 8601 string and is expressed in Coordinated Universal Time (UTC). i.e. YYYY-MM-DDTHH:MM:SS.SSSZ format: date-time example: 2023-09-13T18:25:43.511Z customerAlias: type: string minLength: 1 description: A pseudonymous or otherwise obfuscated identifier uniquely assigned to each customer. example: customer_12345 ref: type: string description: A universally unique identifier (UUID) or other form of high-entropy string serving as an immutable reference for each event entry. example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 data: type: object nullable: true additionalProperties: nullable: true description: A schema-less JSON object encapsulating miscellaneous attributes and metrics associated with the event. example: key1: processing_duration key2: api_url id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - timestamp - customerAlias - ref - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - events - total - hasMore SendEventsRequest: type: object properties: events: type: array items: $ref: "#/components/schemas/Event" minItems: 1 maxItems: 1000 required: - events InvalidEvent: type: object properties: event: allOf: - $ref: "#/components/schemas/Event" - description: The original event that failed validation. error: type: string description: The error message indicating the reason the event failed validation. example: Event ref already exists. required: - event - error SendEventsResponse: type: object properties: validEvents: type: array items: $ref: "#/components/schemas/Event" description: An array of events that were successfully processed and sent to the queue. invalidEvents: type: array items: $ref: "#/components/schemas/InvalidEvent" description: An array of events that failed validation and were not sent to the queue. Each object contains the event and the error message. required: - validEvents - invalidEvents GetEventResponse: type: object properties: event: type: object properties: name: type: string description: The distinctive label assigned to an event, serving as a critical identifier for categorizing and pricing events within the system's backend infrastructure. example: api_call timestamp: type: string description: The temporal marker denoting the exact moment of event occurrence. The timestamp is formatted as an ISO 8601 string and is expressed in Coordinated Universal Time (UTC). i.e. YYYY-MM-DDTHH:MM:SS.SSSZ format: date-time example: 2023-09-13T18:25:43.511Z customerAlias: type: string minLength: 1 description: A pseudonymous or otherwise obfuscated identifier uniquely assigned to each customer. example: customer_12345 ref: type: string description: A universally unique identifier (UUID) or other form of high-entropy string serving as an immutable reference for each event entry. example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 data: type: object nullable: true additionalProperties: nullable: true description: A schema-less JSON object encapsulating miscellaneous attributes and metrics associated with the event. example: key1: processing_duration key2: api_url id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - timestamp - customerAlias - ref - id - createdAt - updatedAt description: The event matching the provided refId required: - event DeleteEventResponse: type: object properties: event: type: object properties: name: type: string description: The distinctive label assigned to an event, serving as a critical identifier for categorizing and pricing events within the system's backend infrastructure. example: api_call timestamp: type: string description: The temporal marker denoting the exact moment of event occurrence. The timestamp is formatted as an ISO 8601 string and is expressed in Coordinated Universal Time (UTC). i.e. YYYY-MM-DDTHH:MM:SS.SSSZ format: date-time example: 2023-09-13T18:25:43.511Z customerAlias: type: string minLength: 1 description: A pseudonymous or otherwise obfuscated identifier uniquely assigned to each customer. example: customer_12345 ref: type: string description: A universally unique identifier (UUID) or other form of high-entropy string serving as an immutable reference for each event entry. example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 data: type: object nullable: true additionalProperties: nullable: true description: A schema-less JSON object encapsulating miscellaneous attributes and metrics associated with the event. example: key1: processing_duration key2: api_url id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time deletedAt: type: string required: - name - timestamp - customerAlias - ref - id - createdAt - updatedAt - deletedAt description: The event matching the provided refId required: - event BillingCycleStatus: type: string enum: - Grant - Deduct IntegrationProviders: type: string enum: - Hubspot - Stripe - NetSuite - Salesforce - QuickBooks - Slack - S3 - Vayu - Morning - Anrok - Snowflake - Connact - Xero SyncStatus: type: string enum: - None - Synced - Failed IntegrationEntity: type: object properties: updatedAt: type: string format: date-time integrationProvider: $ref: "#/components/schemas/IntegrationProviders" integrationExternalId: type: string syncStatus: $ref: "#/components/schemas/SyncStatus" metadata: type: object nullable: true additionalProperties: nullable: true rawSyncedData: type: object nullable: true additionalProperties: nullable: true required: - updatedAt - integrationProvider - integrationExternalId - syncStatus CreditLedgerEntry: type: object properties: id: type: string pattern: ^[0-9a-fA-F]{24}$ createdAt: type: string format: date-time type: $ref: "#/components/schemas/BillingCycleStatus" amount: type: number balanceAfterEntry: type: number invoiceId: type: string erpId: type: string contractId: type: string integrationEntities: type: array items: $ref: "#/components/schemas/IntegrationEntity" required: - id - createdAt - type - amount - balanceAfterEntry - integrationEntities ListCreditLedgerEntriesResponse: type: object properties: entries: type: array items: $ref: "#/components/schemas/CreditLedgerEntry" description: The credit ledger entries for the customer. required: - entries GrantCreditsRequest: type: object properties: creditAmount: type: number description: The amount of credits to be granted to the user. customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The ID of the customer to whom the credits will be granted. required: - creditAmount - customerId DeductCreditsRequest: type: object properties: creditAmount: type: number description: The amount of credits to be deducted from the user. customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The ID of the customer to whom the credits will be deducted from. required: - creditAmount - customerId NotificationEventType: type: string enum: - AnonymousCustomer - Overage - UpcomingRenewal - InvoiceApproved - CustomerPortalLinkSent - NewCustomerWithoutContract - MonthEndReport - UnchargedEvents - TierCrossed - CommitmentCrossed - FinalTierExceeded - InvoicePaymentStatusChanged WebhookSubscribeRequest: type: object properties: callbackUrl: type: string eventType: $ref: "#/components/schemas/NotificationEventType" required: - callbackUrl - eventType GetCustomerByNameResponse: type: object properties: customer: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt description: The customer matching the provided name required: - customer ProductConsumption: type: object properties: productId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the product. productName: type: string minLength: 1 description: The name of the product. example: Vayu Product provisionedAmount: type: number minimum: 0 description: The amount of units provisioned to the customer. example: 10 consumedAmount: type: number minimum: 0 description: The amount of units consumed by the customer. example: 10 usagePercentage: type: number minimum: 0 description: The percentage of the provisioned amount that has been consumed. hasAccess: type: boolean description: Whether the customer has access to the product. example: true remainingAmount: type: number description: The amount of units remaining to consume. example: 10 exceededAmount: type: number description: The amount of units exceeded. example: 10 required: - productId - productName - provisionedAmount - consumedAmount - usagePercentage - hasAccess GetCustomerProductsConsumptionsResponse: type: object properties: productsConsumptions: type: array items: $ref: "#/components/schemas/ProductConsumption" required: - productsConsumptions GetCustomerProductsConsumptionsByAliasResponse: type: object properties: productsConsumptions: type: array items: $ref: "#/components/schemas/ProductConsumption" required: - productsConsumptions GetCustomerByIntegrationIdResponse: type: object properties: customer: type: object properties: name: type: string description: The name of the customer aliases: type: array nullable: true items: type: string default: [] description: The aliases of the customer used to match events to the customer. contacts: type: array nullable: true items: $ref: "#/components/schemas/Contact" description: The contacts of the customer. Contact marked as primary is the target for invoice sharing. source: $ref: "#/components/schemas/CustomerSource" legalName: type: string nullable: true description: The legal name of the customer taxIds: type: array nullable: true items: type: string default: [] description: The tax IDs of the customer taxId: type: string nullable: true description: The tax ID of the customer (deprecated, use taxIds instead) deprecated: true cloudProviderSettings: $ref: "#/components/schemas/CustomerCloudProviderSettings" externalId: type: string description: The external ID of the customer customerErpId: type: string nullable: true description: The ID of the customer in the ERP system address: $ref: "#/components/schemas/Address" salesForceAccountId: type: string nullable: true description: The ID of the customer in the Salesforce system dueDays: type: string nullable: true enum: - END_OF_MONTH - SAME_DAY - 15_DAYS - 30_DAYS - 45_DAYS - 60_DAYS - 90_DAYS description: The due days of the customer currency: $ref: "#/components/schemas/Currency" customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) subsidiary: type: string nullable: true description: The name of the subsidiary of the customer id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - name - id - createdAt - updatedAt GetContractByIntegrationIdResponse: type: object properties: contract: type: object properties: startDate: type: string description: The start date of the contract format: date-time customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the contract is associated with name: type: string description: The name of the contract salesForceOpportunityId: type: string nullable: true description: The id of the sales force opportunity that the contract is associated with endDate: type: string nullable: true description: The end date of the contract format: date-time signatureDate: type: string nullable: true description: The signature date of the contract format: date-time products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing description: The products that the contract is associated with productGroups: type: array items: $ref: "#/components/schemas/ProductGroup" description: Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc. accountManager: type: string nullable: true description: The name of the account manager of the contract shouldProRateInvoices: type: boolean description: Whether to pro rate the invoices for the contract. If not provided, it will default to false deprecated: true autoRenewContract: type: boolean description: Whether the contract is set to auto renew. If not provided, it will be treated as true customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) customFieldValues: type: array nullable: true items: $ref: "#/components/schemas/CustomFieldValue" description: The stored custom field values associated with the contract status: $ref: "#/components/schemas/ContractStatus" purchaseOrder: type: string description: The purchase order number of the contract id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - startDate - customerId - name - id - createdAt - updatedAt ListContractsResponse: type: object properties: contracts: type: array items: type: object properties: startDate: type: string description: The start date of the contract format: date-time customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the contract is associated with name: type: string description: The name of the contract salesForceOpportunityId: type: string nullable: true description: The id of the sales force opportunity that the contract is associated with endDate: type: string nullable: true description: The end date of the contract format: date-time signatureDate: type: string nullable: true description: The signature date of the contract format: date-time products: type: array items: type: object properties: displayName: type: string description: The display name of the product description: type: string nullable: true description: The description of the product scheduling: type: object properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: The scheduling of the product pricing: oneOf: - type: object properties: type: type: string enum: - ONE_TIME description: Discriminator identifying this as a one-time charge price: type: number minimum: 0 description: Fixed price charged once required: - type - price - type: object properties: type: type: string enum: - CONTRACT_TERMS description: Discriminator identifying this as contract terms (fixed or installment) pricing price: type: number minimum: 0 description: Total contract price installments: type: array nullable: true items: type: object properties: installmentDate: type: string description: Date on which this installment is due (ISO 8601 date) format: date-time amount: type: number minimum: 0 description: Amount due for this installment required: - installmentDate - amount description: Optional schedule of installment payments; if omitted the full price is due at once required: - type - price - type: object properties: type: type: string enum: - SUBSCRIPTION description: Discriminator identifying this as a flat recurring subscription charge price: type: number minimum: 0 description: Flat price charged each billing period subscriptionCadence: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the subscription charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. required: - type - price - subscriptionCadence - type: object properties: type: type: string enum: - TIERED description: Discriminator identifying this as tiered (volume-based) pricing tiers: type: array items: type: object properties: fromInclusive: type: number minimum: 0 description: Start of the tier range (inclusive) toExclusive: type: number nullable: true minimum: 0 description: End of the tier range (exclusive). Omit for the final unbounded tier rate: type: number nullable: true minimum: 0 description: Per-unit rate charged for usage within this tier flatFee: type: number nullable: true minimum: 0 description: Flat fee charged when usage falls within this tier packageSize: type: number nullable: true minimum: 0 description: Number of units per package; the rate is applied per package rather than per unit required: - fromInclusive description: List of pricing tiers defining rate, flat fee, and usage range for each tier subscriptionCadence: type: object nullable: true properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The frequency at which the tiered charge recurs. When the billing interval spans multiple cadence periods, the invoice amount is multiplied accordingly. autoUpgrade: type: boolean nullable: true description: When true, the customer is locked into the highest tier reached during the period and will not drop back to a lower tier until the next billing period or contract renewal. prorate: type: boolean nullable: true description: When true, charges are prorated based on the fraction of the billing period used isRevShare: type: boolean nullable: true description: When true, the pricing model represents a revenue share arrangement. Tier rates are displayed as percentages in the UI rather than currency amounts, though the underlying rate value remains a decimal fraction and calculations are unaffected. baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. usageReset: $ref: "#/components/schemas/ExternalUsageReset" required: - type - tiers - type: object properties: type: type: string enum: - PER_UNIT description: Discriminator identifying this as usage-based per-unit pricing price: type: number minimum: 0 description: Price charged per unit of usage chunkSize: type: number nullable: true minimum: 0 exclusiveMinimum: true description: Number of units per billing chunk; usage is rounded up to the nearest chunk usageReset: allOf: - $ref: "#/components/schemas/ExternalUsageReset" - description: "Interval in months at which cumulative usage resets. Must be one of: 1, 2, 3, 6, 12" baseAmount: type: number nullable: true minimum: 0 description: Minimum charge for the billing period. If the usage-based cost exceeds this amount, the higher usage cost is charged instead. required: - type - price description: The pricing of the product catalogProductId: type: string nullable: true description: The id of the a product from the catalog to connect the contract product to productErpId: type: string nullable: true description: The id of the product in NetSuite ERP nsClass: type: string nullable: true description: The class of the product in NetSuite ERP nsClassId: type: string nullable: true description: The id of the class of the product in NetSuite ERP commitment: type: object nullable: true properties: units: type: number minimum: 0 description: Units to commit the customer for price: type: number nullable: true minimum: 0 description: Price to charge the customer for the committed units scheduling: type: object nullable: true properties: billingDay: type: integer minimum: 1 maximum: 31 default: 1 description: The day of the month that the product is billed duration: type: object properties: unit: type: string enum: - DAY - WEEK - MONTH - YEAR default: MONTH description: "The unit of the duration. One of: MONTH, YEAR. Defaults to MONTH." value: type: integer minimum: 0 maximum: 1000 description: The numeric length of the duration. Must be a positive integer up to 1000. required: - unit - value description: The duration of the product required: - duration description: Scheduling in case of recurring commitment overageStrategy: $ref: "#/components/schemas/ExternalOverageStrategy" required: - units description: The commitment of the product paymentTerm: $ref: "#/components/schemas/PaymentTerm" isCalendarAligned: type: boolean description: Whether the invoicing period should be calendar aligned. If not provided, it will default to false. ONE_TIME and COMMERCIAL_TERMS pricing models cannot be calendar aligned. This field is ignored if the product is part of a ProductGroup. cloudProviderSettings: $ref: "#/components/schemas/ProductCloudProviderSettings" required: - displayName - scheduling - pricing description: The products that the contract is associated with productGroups: type: array items: $ref: "#/components/schemas/ProductGroup" description: Product groups are list of products that can be grouped as a single line item with shared settings like ERP settings, commitment settings, etc. accountManager: type: string nullable: true description: The name of the account manager of the contract shouldProRateInvoices: type: boolean description: Whether to pro rate the invoices for the contract. If not provided, it will default to false deprecated: true autoRenewContract: type: boolean description: Whether the contract is set to auto renew. If not provided, it will be treated as true customFields: type: array nullable: true items: $ref: "#/components/schemas/CustomField" description: Custom fields from CRM systems (Salesforce, HubSpot, etc.) customFieldValues: type: array nullable: true items: $ref: "#/components/schemas/CustomFieldValue" description: The stored custom field values associated with the contract status: $ref: "#/components/schemas/ContractStatus" purchaseOrder: type: string description: The purchase order number of the contract id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - startDate - customerId - name - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - contracts - total - hasMore InvoicePaymentStatusResponse: type: object properties: invoiceId: type: string pattern: ^[0-9a-fA-F]{24}$ billingStatus: $ref: "#/components/schemas/InvoiceBillingStatus" amountDue: type: number amountPaid: type: number total: type: number dueDate: type: string format: date-time paidAt: type: string format: date-time invoicePdfUrl: type: string required: - invoiceId - billingStatus - amountDue - amountPaid - total ListInvoicesResponse: type: object properties: invoices: type: array items: type: object properties: customerId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the customer that the invoice is associated with contractId: type: string pattern: ^[0-9a-fA-F]{24}$ description: The id of the contract that the invoice is associated with name: type: string minLength: 1 description: The name of the invoice, usually a description of the billing period billingCycle: $ref: "#/components/schemas/FullDayPeriod" revenueBreakdown: type: object properties: total: type: number subtotal: type: number overage: type: number discount: type: number creditsUsed: type: number tax: type: number required: - total - subtotal - overage - discount - creditsUsed - tax description: The breakdown of the revenue for the invoice billingStatus: $ref: "#/components/schemas/InvoiceBillingStatus" paymentInfo: $ref: "#/components/schemas/PaymentInfo" dueDate: type: string nullable: true description: The due date of the invoice format: date-time accountId: type: string description: The id of the account that the invoice is associated with lineItems: type: array items: $ref: "#/components/schemas/LineItem" description: The line items of the invoice, each representing a product charge amount: type: number description: The total amount of the invoice id: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time required: - customerId - name - billingCycle - revenueBreakdown - billingStatus - dueDate - accountId - lineItems - amount - id - createdAt - updatedAt total: type: number hasMore: type: boolean nextCursor: type: string required: - invoices - total - hasMore GetProductConsumptionResponse: type: object properties: productConsumption: allOf: - $ref: "#/components/schemas/ProductConsumption" - description: The product consumption data required: - productConsumption UsageWindow: type: object properties: start: type: string format: date-time description: The start timestamp of the usage window in ISO 8601 format end: type: string format: date-time description: The end timestamp of the usage window in ISO 8601 format required: - start - end description: The time window for which the usage was submitted PartnerSubmissionDetail: type: object properties: receivedAt: type: string description: The timestamp when the submission was received by the partner status: type: string enum: - SUCCESS - ERROR description: The status of the partner submission error: nullable: true description: Error details if the submission failed, null otherwise required: - receivedAt - status CloudUsageResult: type: object properties: status: type: string enum: - ACCEPTED - REJECTED description: The status of the cloud usage submission result errorCode: type: string description: Error code if the submission was rejected usageWindow: $ref: "#/components/schemas/UsageWindow" errorMessage: type: string description: Detailed error message if the submission was rejected correlationId: type: string description: Unique identifier for tracing the submission through the system idempotencyKey: type: string pattern: ^vayu-\S{24}-\S{24}-\S{24}-\S{24}-\d{13}$ description: Key used to ensure the submission is processed exactly once meterDimension: type: string description: The dimension of the meter being reported (e.g., API_CALLS, STORAGE_GB) acceptedQuantity: type: number description: The quantity that was accepted by the cloud provider partnerSubmission: type: object additionalProperties: $ref: "#/components/schemas/PartnerSubmissionDetail" description: Details of submissions to partner systems, keyed by request ID quantitySubmitted: type: number description: The total quantity that was submitted timestampSubmitted: type: string format: date-time description: The timestamp when the usage was submitted awsCustomerIdentifier: type: string description: The AWS customer identifier associated with this usage required: - status - usageWindow - correlationId - idempotencyKey - meterDimension - acceptedQuantity - partnerSubmission - quantitySubmitted - timestampSubmitted - awsCustomerIdentifier SubmitCloudUsageRequest: type: object properties: results: type: array items: $ref: "#/components/schemas/CloudUsageResult" description: Array of usage submission results from the cloud provider productCode: type: string description: The product code identifying the cloud marketplace product required: - results - productCode SubmitCloudUsageResponse: type: object properties: {} Limit: type: number minimum: 1 maximum: 1000 default: 10 Cursor: type: string CatalogProductId: type: string pattern: ^[0-9a-fA-F]{24}$ CustomerId: type: string pattern: ^[0-9a-fA-F]{24}$ MeterId: type: string pattern: ^[0-9a-fA-F]{24}$ ContractId: type: string pattern: ^[0-9a-fA-F]{24}$ MeasurementId: type: string pattern: ^[0-9a-fA-F]{24}$ InvoiceId: type: string pattern: ^[0-9a-fA-F]{24}$ CustomerRelationId: type: string pattern: ^[0-9a-fA-F]{24}$ StartTime: type: string format: date-time EndTime: type: string format: date-time EventName: type: string minLength: 1 CustomerAlias: type: string minLength: 1 RefId: type: string ExternalId: type: string Name: type: string Alias: type: string IntegrationType: type: string enum: - Hubspot - Stripe - NetSuite - Salesforce - QuickBooks - Slack - S3 - Vayu - Morning - Anrok - Snowflake - Connact - Xero IntegrationId: type: string ProductId: type: string paths: /catalogProducts: post: tags: - catalog-products operationId: createCatalogProduct description: Create a new Catalog product. summary: Create Catalog product security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/CreateCatalogProductRequest" responses: "200": $ref: "#/components/responses/CreateCatalogProductResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error get: tags: - catalog-products operationId: listCatalogProducts description: Get a list of Catalog products. summary: List Catalog products security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor responses: "200": $ref: "#/components/responses/ListCatalogProductsResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /catalogProducts/{catalogProductId}: get: tags: - catalog-products operationId: getCatalogProduct description: Get a Catalog product by id. summary: Get Catalog product security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CatalogProductId" required: true in: path name: catalogProductId responses: "200": $ref: "#/components/responses/GetCatalogProductResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error put: tags: - catalog-products operationId: updateCatalogProduct description: Update a Catalog product by id. summary: Update Catalog product security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/UpdateCatalogProductRequest" parameters: - schema: $ref: "#/components/schemas/CatalogProductId" required: true in: path name: catalogProductId responses: "200": $ref: "#/components/responses/UpdateCatalogProductResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error delete: tags: - catalog-products operationId: deleteCatalogProduct description: Delete a Catalog product by id. summary: Delete Catalog product security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CatalogProductId" required: true in: path name: catalogProductId responses: "200": $ref: "#/components/responses/DeleteCatalogProductResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /customers: post: tags: - customers operationId: createCustomer description: Create a new Customer. summary: Create Customer security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/CreateCustomerRequest" responses: "200": $ref: "#/components/responses/CreateCustomerResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error get: tags: - customers operationId: listCustomers description: Get a list of Customers. summary: List Customers security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor responses: "200": $ref: "#/components/responses/ListCustomersResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /customers/{customerId}: get: tags: - customers operationId: getCustomer description: Get a Customer by id. summary: Get Customer security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CustomerId" required: true in: path name: customerId responses: "200": $ref: "#/components/responses/GetCustomerResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error put: tags: - customers operationId: updateCustomer description: Update a Customer by id. summary: Update Customer security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/UpdateCustomerRequest" parameters: - schema: $ref: "#/components/schemas/CustomerId" required: true in: path name: customerId responses: "200": $ref: "#/components/responses/UpdateCustomerResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error delete: tags: - customers operationId: deleteCustomer description: Delete a Customer by id. summary: Delete Customer security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CustomerId" required: true in: path name: customerId responses: "200": $ref: "#/components/responses/DeleteCustomerResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /meters/{meterId}: get: tags: - meters operationId: getMeter description: Get a Meter by id. summary: Get Meter security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/MeterId" required: true in: path name: meterId responses: "200": $ref: "#/components/responses/GetMeterResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error put: tags: - meters operationId: updateMeter description: Update a Meter by id. summary: Update Meter security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/UpdateMeterRequest" parameters: - schema: $ref: "#/components/schemas/MeterId" required: true in: path name: meterId responses: "200": $ref: "#/components/responses/UpdateMeterResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error delete: tags: - meters operationId: deleteMeter description: Delete a Meter by id. summary: Delete Meter security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/MeterId" required: true in: path name: meterId responses: "200": $ref: "#/components/responses/DeleteMeterResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /meters: get: tags: - meters operationId: listMeters description: Get a list of Meters. summary: List Meters security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor responses: "200": $ref: "#/components/responses/ListMetersResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /contracts/{contractId}: get: tags: - contracts operationId: getContract description: Get a Contract by id. summary: Get Contract security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/ContractId" required: true in: path name: contractId responses: "200": $ref: "#/components/responses/GetContractResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error delete: tags: - contracts operationId: deleteContract description: Delete a Contract by id. summary: Delete Contract security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/ContractId" required: true in: path name: contractId responses: "200": $ref: "#/components/responses/DeleteContractResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /contracts: post: tags: - contracts operationId: createContract description: Create a new Contract. summary: Create Contract security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/CreateContractRequest" responses: "200": $ref: "#/components/responses/CreateContractResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error get: tags: - contracts operationId: listContracts description: List contracts for the account. Optionally filter by customerId to retrieve contracts for a specific customer. summary: List contracts security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor - schema: $ref: "#/components/schemas/CustomerId" required: false in: query name: customerId responses: "200": $ref: "#/components/responses/ListContractsResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /measurements: post: tags: - measurements operationId: createMeasurement description: Create a new Measurement. summary: Create Measurement security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/CreateMeasurementRequest" responses: "200": $ref: "#/components/responses/CreateMeasurementResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error get: tags: - measurements operationId: listMeasurements description: Get a list of Measurements. summary: List Measurements security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor responses: "200": $ref: "#/components/responses/ListMeasurementsResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /measurements/{measurementId}: get: tags: - measurements operationId: getMeasurement description: Get a Measurement by id. summary: Get Measurement security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/MeasurementId" required: true in: path name: measurementId responses: "200": $ref: "#/components/responses/GetMeasurementResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error delete: tags: - measurements operationId: deleteMeasurement description: Delete a Measurement by id. summary: Delete Measurement security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/MeasurementId" required: true in: path name: measurementId responses: "200": $ref: "#/components/responses/DeleteMeasurementResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /invoices/{invoiceId}: get: tags: - invoices operationId: getInvoice description: Get a Invoice by id. summary: Get Invoice security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/InvoiceId" required: true in: path name: invoiceId responses: "200": $ref: "#/components/responses/GetInvoiceResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /customer-relations: post: tags: - customers operationId: createCustomerRelation description: Create a new Customer relation. summary: Create Customer relation security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/CreateCustomerRelationRequest" responses: "200": $ref: "#/components/responses/CreateCustomerRelationResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /customer-relations/{customerRelationId}: get: tags: - customers operationId: getCustomerRelation description: Get a Customer relation by id. summary: Get Customer relation security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CustomerRelationId" required: true in: path name: customerRelationId responses: "200": $ref: "#/components/responses/GetCustomerRelationResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /login: post: tags: - auth operationId: login description: >- This endpoint is designed to acquire a temporary access token. Submit the auth token in the request body to obtain a new access token. Use this new token for subsequent API calls. Token is set to expire every hour. summary: Login by obtaining a new access token requestBody: $ref: "#/components/requestBodies/LoginRequest" responses: "200": $ref: "#/components/responses/LoginResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /events/delete-by-refs: post: tags: - events operationId: deleteEventsByRefs description: Delete multiple events, identified by ref, in a single request. summary: Delete events by refs security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/DeleteEventsByRefsRequest" responses: "200": $ref: "#/components/responses/DeleteEventsByRefsResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /events/dry-run: post: tags: - events operationId: sendEventsDryRun description: "Use this endpoint to send an array of events for processing. Make sure to comply with the request schema for each event. NOTE: this is a dry run and will not result in actual storage of the events." summary: Submit a batch of events for testing security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/EventsDryRunRequest" responses: "200": $ref: "#/components/responses/EventsDryRunResponse" "400": description: Bad Request "401": description: Unauthorized "413": description: Request Entity Too Large "429": description: Too Many Requests "500": description: Internal Server Error /events: get: tags: - events operationId: queryEvents description: Fetch events occurring within a specified timestamp range. An optional event name can be provided to further filter the events. summary: Query events by timestamp period and optional event name security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/StartTime" required: true in: query name: startTime - schema: $ref: "#/components/schemas/EndTime" required: true in: query name: endTime - schema: $ref: "#/components/schemas/EventName" required: false in: query name: eventName - schema: $ref: "#/components/schemas/CustomerAlias" required: false in: query name: customerAlias - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor responses: "200": $ref: "#/components/responses/QueryEventsResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error post: tags: - events operationId: sendEvents description: Use this endpoint to send an array of events for processing and storage. Make sure to comply with the request schema for each event. summary: Submit a batch of events for ingestion security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/SendEventsRequest" responses: "200": $ref: "#/components/responses/SendEventsResponse" "400": description: Bad Request "401": description: Unauthorized "413": description: Request Entity Too Large "429": description: Too Many Requests "500": description: Internal Server Error /events/{refId}: get: tags: - events operationId: getEventByRefId description: Use this endpoint to get a specific event using its reference ID. summary: Get event by refId security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/RefId" required: true in: path name: refId responses: "200": $ref: "#/components/responses/GetEventResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error delete: tags: - events operationId: deleteEventByRefId description: Use this endpoint to remove a specific event using its reference ID. summary: Delete an event by refId security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/RefId" required: true in: path name: refId responses: "200": $ref: "#/components/responses/DeleteEventResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /credits: get: tags: - credits operationId: listCreditLedgerEntries description: This endpoint is used to retrieve the credit ledger entries for a specific customer. summary: Retrieve credit ledger entries for customer. security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CustomerId" required: true in: query name: customerId - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor responses: "200": $ref: "#/components/responses/ListCreditLedgerEntriesResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /credits/grant: post: tags: - credits operationId: grantCredits description: >- This endpoint is used to grant credits to a customer. Submit the credit amount and customer ID in the request body to grant the credits. The granted credits will be added to the customer's account. summary: Grant credits to a customer credit ledger security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/GrantCreditsRequest" responses: "200": $ref: "#/components/responses/RequestSuccess" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /credits/deduct: post: tags: - credits operationId: deductCredits description: >- This endpoint is used to deduct credits from the specified customer account. Submit the credit amount and customer ID in the request body to deduct the credits. The deducted credits will be subtracted from the customer's account. summary: Deduct credits from customer credit ledger security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/DeductCreditsRequest" responses: "200": $ref: "#/components/responses/RequestSuccess" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /webhook: post: tags: - webhooks operationId: webhookSubscribe description: Use this endpoint to subscribe to webhooks and receive event notifications. summary: Subscribe to webhooks security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/WebhookSubscribeRequest" responses: "200": $ref: "#/components/responses/RequestSuccess" "400": description: Bad Request "401": description: Unauthorized "413": description: Request Entity Too Large "429": description: Too Many Requests "500": description: Internal Server Error /customers/externalId/{externalId}: get: tags: - customers operationId: getCustomerByExternalId description: Use this endpoint to get a specific customer using its external Id. summary: Get customer by externalId security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/ExternalId" required: true in: path name: externalId responses: "200": $ref: "#/components/responses/GetCustomerResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /customers/name/{name}: get: tags: - customers operationId: getCustomerByName description: Use this endpoint to get a specific customer using its name. summary: Get customer by name security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Name" required: true in: path name: name responses: "200": $ref: "#/components/responses/GetCustomerByNameResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /customers/products-consumptions/{customerId}: get: tags: - customers operationId: getCustomerProductsConsumptions description: Use this endpoint to get the products consumptions by the customer id. summary: Get products consumptions by customer id security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/CustomerId" required: true in: path name: customerId responses: "200": $ref: "#/components/responses/GetCustomerProductsConsumptionsResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /customers/products-consumptions/alias/{alias}: get: tags: - customers operationId: getCustomerProductsConsumptionsByAlias description: Use this endpoint to get the products consumptions by the customer alias. summary: Get products consumptions by customer alias security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Alias" required: true in: path name: alias responses: "200": $ref: "#/components/responses/GetCustomerProductsConsumptionsByAliasResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /customers/integration/{integrationType}/{integrationId}: get: tags: - customers operationId: getCustomerByIntegrationId description: Use this endpoint to get a specific customer using its integration provider and identifier. summary: Get customer by integration id security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/IntegrationType" required: true in: path name: integrationType - schema: $ref: "#/components/schemas/IntegrationId" required: true in: path name: integrationId responses: "200": $ref: "#/components/responses/GetCustomerByIntegrationIdResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /contracts/integration/{integrationType}/{integrationId}: get: tags: - contracts operationId: getContractByIntegrationId description: Use this endpoint to get a specific contract using its integration provider and identifier. summary: Get contract by integration id security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/IntegrationType" required: true in: path name: integrationType - schema: $ref: "#/components/schemas/IntegrationId" required: true in: path name: integrationId responses: "200": $ref: "#/components/responses/GetContractByIntegrationIdResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /invoices/{invoiceId}/payment-status: get: tags: - invoices operationId: getInvoicePaymentStatus description: Use this endpoint to retrieve payment status information for a specific invoice, including payment status, amount due, amount paid, total, due date, paid date, and invoice PDF URL. summary: Get invoice payment status security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/InvoiceId" required: true in: path name: invoiceId responses: "200": $ref: "#/components/responses/InvoicePaymentStatusResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /invoices: get: tags: - invoices operationId: listInvoices description: List invoices for the account. Optionally filter by customerId to retrieve invoices for a specific customer. summary: List invoices security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/Limit" required: false in: query name: limit - schema: $ref: "#/components/schemas/Cursor" required: false in: query name: cursor - schema: $ref: "#/components/schemas/CustomerId" required: false in: query name: customerId responses: "200": $ref: "#/components/responses/ListInvoicesResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error /product-consumption/{productId}: get: tags: - product-consumptions operationId: getProductConsumption description: Use this action to get the consumption data for a product summary: Get product consumption security: - BearerAuthorizer: [] parameters: - schema: $ref: "#/components/schemas/ProductId" required: true in: path name: productId responses: "200": $ref: "#/components/responses/GetProductConsumptionResponse" "400": description: Bad Request "401": description: Unauthorized "404": description: Not Found "429": description: Too Many Requests "500": description: Internal Server Error /cloudUsageSubmission: post: tags: - cloud-usage-submission operationId: submitCloudUsage description: Submit cloud usage data summary: Submit cloud usage security: - BearerAuthorizer: [] requestBody: $ref: "#/components/requestBodies/SubmitCloudUsageRequest" responses: "200": $ref: "#/components/responses/SubmitCloudUsageResponse" "400": description: Bad Request "401": description: Unauthorized "429": description: Too Many Requests "500": description: Internal Server Error