# Health check # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Rillet Accounting API", "version": "v3.0" }, "x-readme": { "headers": [ { "key": "X-Rillet-API-Version", "value": "3" } ] }, "servers": [ { "url": "https://api.rillet.com", "description": "Production server url" }, { "url": "https://sandbox.api.rillet.com", "description": "Test server url" } ], "security": [ { "bearerAuth": [] } ], "paths": { "/health": { "get": { "tags": [ "Health" ], "operationId": "health", "summary": "Health check", "responses": { "200": { "description": "OK" } }, "parameters": [] } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } }, "parameters": { "X-Rillet-Signature": { "name": "X-Rillet-Signature", "in": "header", "schema": { "type": "string" }, "required": true, "description": "Signature of the webhook event. Computed using HMAC-SHA256 and AES encrypted with the configured webhook token. The contents of the body are prefixed with the timestamp and id before hashing." }, "X-Rillet-Timestamp": { "name": "X-Rillet-Timestamp", "in": "header", "schema": { "type": "string", "format": "date-time" }, "required": true, "description": "Timestamp of the webhook event in ISO-8601 format" }, "X-Rillet-Id": { "name": "X-Rillet-Id", "in": "header", "schema": { "type": "string", "format": "uuid" }, "required": true, "description": "ID of the webhook event" }, "X-Rillet-Entity": { "name": "X-Rillet-Entity", "in": "header", "schema": { "type": "string" }, "required": true, "description": "Entity type of the webhook event" }, "X-Rillet-Event": { "name": "X-Rillet-Event", "in": "header", "schema": { "type": "string" }, "required": true, "description": "Event type of the webhook event" } }, "schemas": { "ContractStatus": { "type": "string", "enum": [ "ACTIVE", "IN_EFFECT", "CANCELLED", "ENDED", "AMENDED" ] }, "InvoiceStatus": { "type": "string", "enum": [ "UNPAID", "PAID", "PARTIALLY_PAID", "UNBILLED", "CREDITED", "PARTIALLY_CREDITED" ] }, "BillStatus": { "type": "string", "enum": [ "UNPAID", "PAID", "PARTIALLY_PAID", "CREDITED", "PARTIALLY_CREDITED", "APPLIED" ] }, "CurrencyCode": { "type": "string", "description": "Currency code following ISO-4217", "example": "USD" }, "MonetaryAmount": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Monetary amount in decimal format, using a period (.) as the decimal separator. (e.g. '1.01' in $ currency represents 1$ and 1 cent.)", "example": "1.01" }, "currency": { "$ref": "#/components/schemas/CurrencyCode" } } }, "RoundedMonetaryAmount": { "type": "object", "description": "A monetary amount that must be rounded to the currency's default decimal places (e.g., 2 decimal places for USD).", "x-class-extra-annotation": "@io.rillet.common.infra.validators.IsRoundedAmount", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "string", "description": "Monetary amount in decimal format, using a period (.) as the decimal separator. Must be rounded to the currency's default decimal places (e.g. '1.01' in USD represents 1 dollar and 1 cent).", "example": "1.01" }, "currency": { "$ref": "#/components/schemas/CurrencyCode" } } }, "CountryCode": { "type": "string", "description": "Two-letter country code (ISO 3166-1 alpha-2).", "example": "US" }, "RevenuePattern": { "type": "string", "enum": [ "DAILY", "EVEN_PERIOD" ], "description": "DAILY means that the revenue is divided equally per day in the revenue period. EVEN_PERIOD means that the revenue is divided equally for each calendar month in the revenue period." }, "FixedPrice": { "type": "object", "required": [ "amount" ], "properties": { "amount": { "$ref": "#/components/schemas/MonetaryAmount" } } }, "RecurringPrice": { "type": "object", "required": [ "interval_months" ], "properties": { "interval_months": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 12, "example": 1 } } }, "Price": { "discriminator": { "propertyName": "type", "mapping": { "FIXED_RECURRING": "#/components/schemas/FixedRecurringPrice", "ONE_TIME": "#/components/schemas/OneTimePrice", "USAGE": "#/components/schemas/UsagePrice" } }, "oneOf": [ { "$ref": "#/components/schemas/FixedRecurringPrice" }, { "$ref": "#/components/schemas/OneTimePrice" }, { "$ref": "#/components/schemas/UsagePrice" } ], "example": { "type": "FIXED_RECURRING", "amount": { "amount": "10.00", "currency": "USD" }, "interval_months": 1 } }, "FixedRecurringPrice": { "allOf": [ { "$ref": "#/components/schemas/FixedPrice" }, { "$ref": "#/components/schemas/RecurringPrice" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "default": "FIXED_RECURRING" } } } ] }, "OneTimePrice": { "allOf": [ { "$ref": "#/components/schemas/FixedPrice" }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "default": "ONE_TIME" } } } ] }, "UsagePrice": { "allOf": [ { "$ref": "#/components/schemas/RecurringPrice" }, { "type": "object", "required": [ "type", "billing_scheme" ], "properties": { "type": { "type": "string", "default": "USAGE" }, "billing_scheme": { "$ref": "#/components/schemas/BillingScheme" } } } ] }, "BillingScheme": { "discriminator": { "propertyName": "type", "mapping": { "PER_UNIT": "#/components/schemas/PerUnitBilling", "TIERED": "#/components/schemas/TieredBilling" } }, "oneOf": [ { "$ref": "#/components/schemas/PerUnitBilling" }, { "$ref": "#/components/schemas/TieredBilling" } ] }, "PerUnitBilling": { "type": "object", "required": [ "type", "amount", "units" ], "properties": { "type": { "type": "string", "default": "PER_UNIT" }, "amount": { "$ref": "#/components/schemas/MonetaryAmount" }, "units": { "type": "integer", "format": "int32", "minimum": 1, "example": 1 } } }, "TieredBilling": { "type": "object", "required": [ "type", "mode", "tiers" ], "properties": { "type": { "type": "string", "default": "TIERED" }, "mode": { "type": "string", "enum": [ "GRADUATED", "METERED" ], "description": "In metered tiering, the maximum quantity within a period determines the price. In graduated tiering, pricing changes as the quantity grows – the price from each tier up to the reported quantity is accumulated." }, "tiers": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/Tier" } } }, "description": "All tiers except for the highest have to define a value for upTo. There cannot be more than one tier with the same upTo value." }, "Tier": { "type": "object", "required": [ "up_to" ], "properties": { "up_to": { "type": "integer", "format": "int32", "minimum": 1, "example": 10 }, "flat_price": { "$ref": "#/components/schemas/MonetaryAmount" }, "per_unit_price": { "$ref": "#/components/schemas/MonetaryAmount" } }, "description": "At least one of flatPrice or perUnitPrice has to be defined. flatPrice is the price for the entire tier. perUnitPrice is price for units relevant to the tier." }, "TaxRateWithOptionalAmount": { "type": "object", "required": [ "country", "description", "percentage", "type" ], "properties": { "percentage": { "type": "number", "minimum": 0, "maximum": 100, "example": 0 }, "tax_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "country": { "$ref": "#/components/schemas/CountryCode" }, "type": { "type": "string", "enum": [ "VAT", "SALES_TAX" ] }, "description": { "type": "string" } } }, "TaxRate": { "allOf": [ { "$ref": "#/components/schemas/TaxRateWithOptionalAmount" } ], "required": [ "tax_amount" ] }, "ExpenseTaxRate": { "allOf": [ { "$ref": "#/components/schemas/TaxRate" }, { "type": "object", "required": [ "coverage" ], "properties": { "tax_code": { "type": "string", "description": "Code of a predefined tax rate. When provided, the rate's percentage, country, and description are used instead of the inline values." }, "coverage": { "type": "string", "enum": [ "INCLUSIVE", "EXCLUSIVE" ] } } } ] }, "CustomerRequest": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "example": "Bob" }, "name_on_invoice": { "type": "string", "example": "Bob Johnson" }, "address": { "$ref": "#/components/schemas/Address" }, "shipping_address": { "$ref": "#/components/schemas/Address" }, "emails": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/CustomerEmail" } }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } }, "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "send_invoices_automatically": { "type": "boolean", "default": false, "description": "When set to true, invoices for this customer will be automatically sent via email on the invoice date." }, "send_payment_reminders": { "type": "boolean", "default": false, "description": "When set to true, an email will be sent to customers periodically if they have not paid an invoice." }, "fields": { "allOf": [ { "$ref": "#/components/schemas/FieldAssignments" } ], "nullable": true } } }, "Discount": { "oneOf": [ { "$ref": "#/components/schemas/AmountDiscount" }, { "$ref": "#/components/schemas/PercentageDiscount" } ], "discriminator": { "propertyName": "type", "mapping": { "AMOUNT": "#/components/schemas/AmountDiscount", "PERCENTAGE": "#/components/schemas/PercentageDiscount" } }, "example": { "type": "AMOUNT", "amount_off": { "amount": "10.00", "currency": "USD" } } }, "AmountDiscount": { "type": "object", "required": [ "amount_off" ], "properties": { "amount_off": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "type": { "type": "string", "default": "AMOUNT" } } }, "PercentageDiscount": { "type": "object", "required": [ "percentage_off" ], "properties": { "percentage_off": { "type": "number", "format": "double", "minimum": 0, "maximum": 100, "example": 10 }, "type": { "type": "string", "default": "PERCENTAGE" } } }, "Invoicing": { "oneOf": [ { "$ref": "#/components/schemas/MonthlyInvoicing" }, { "$ref": "#/components/schemas/MonthlyProratedInvoicing" }, { "$ref": "#/components/schemas/QuarterlyInvoicing" }, { "$ref": "#/components/schemas/SemiAnnualInvoicing" }, { "$ref": "#/components/schemas/YearlyInvoicing" } ], "discriminator": { "propertyName": "interval", "mapping": { "MONTHLY": "#/components/schemas/MonthlyInvoicing", "MONTHLY_PRORATED": "#/components/schemas/MonthlyProratedInvoicing", "QUARTERLY": "#/components/schemas/QuarterlyInvoicing", "SEMI_ANNUAL": "#/components/schemas/SemiAnnualInvoicing", "YEARLY": "#/components/schemas/YearlyInvoicing" } } }, "MonthlyInvoicing": { "type": "object", "required": [ "payment_terms", "interval", "day" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "MONTHLY" }, "day": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 31, "example": 1 } } }, "MonthlyProratedInvoicing": { "type": "object", "required": [ "payment_terms", "interval", "day" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "MONTHLY_PRORATED" }, "day": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 31, "example": 1 } }, "description": "Monthly prorated invoicing is only available for contracts with usage products and a minimum usage commitment.\n" }, "QuarterlyInvoicing": { "type": "object", "required": [ "payment_terms", "interval", "month_day" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "QUARTERLY" }, "month_day": { "type": "string", "pattern": "^--\\d{2}-\\d{2}$", "description": "A string in --MM-dd format. Invoices will be created starting on that date and every 3 months.", "example": "--01-01" } } }, "SemiAnnualInvoicing": { "type": "object", "required": [ "payment_terms", "interval", "month_day" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "SEMI_ANNUAL" }, "month_day": { "type": "string", "pattern": "^--\\d{2}-\\d{2}$", "description": "A string in --MM-dd format. Invoices will be created starting on that date and every 6 months.", "example": "--01-01" } } }, "YearlyInvoicing": { "type": "object", "required": [ "payment_terms", "interval", "month_day" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "YEARLY" }, "month_day": { "type": "string", "pattern": "^--\\d{2}-\\d{2}$", "description": "A string in --MM-dd format", "example": "--01-01" } } }, "OverageInvoicing": { "oneOf": [ { "$ref": "#/components/schemas/OverageMonthlyInvoicing" }, { "$ref": "#/components/schemas/OverageMonthlyProratedInvoicing" }, { "$ref": "#/components/schemas/OverageQuarterlyInvoicing" }, { "$ref": "#/components/schemas/OverageSemiAnnualInvoicing" }, { "$ref": "#/components/schemas/OverageYearlyInvoicing" } ], "discriminator": { "propertyName": "interval", "mapping": { "MONTHLY": "#/components/schemas/OverageMonthlyInvoicing", "MONTHLY_PRORATED": "#/components/schemas/OverageMonthlyProratedInvoicing", "QUARTERLY": "#/components/schemas/OverageQuarterlyInvoicing", "SEMI_ANNUAL": "#/components/schemas/OverageSemiAnnualInvoicing", "YEARLY": "#/components/schemas/OverageYearlyInvoicing" } } }, "OverageMonthlyInvoicing": { "type": "object", "required": [ "payment_terms", "interval" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "MONTHLY" } } }, "OverageMonthlyProratedInvoicing": { "type": "object", "required": [ "payment_terms", "interval" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "MONTHLY_PRORATED" } }, "description": "Monthly prorated invoicing is only available for contracts with usage products and a minimum usage commitment.\n" }, "OverageQuarterlyInvoicing": { "type": "object", "required": [ "payment_terms", "interval" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "QUARTERLY" } } }, "OverageSemiAnnualInvoicing": { "type": "object", "required": [ "payment_terms", "interval" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "SEMI_ANNUAL" } } }, "OverageYearlyInvoicing": { "type": "object", "required": [ "payment_terms", "interval" ], "properties": { "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "interval": { "type": "string", "default": "YEARLY" } } }, "Address": { "type": "object", "required": [ "city", "country", "line1", "state", "zip_code" ], "properties": { "line1": { "type": "string", "example": "123 Main St" }, "line2": { "type": "string", "example": "Apt 4B" }, "city": { "type": "string", "example": "Nashville" }, "state": { "type": "string", "example": "TN" }, "zip_code": { "type": "string", "example": "37201" }, "country": { "$ref": "#/components/schemas/CountryCode" } } }, "CustomerEmail": { "type": "object", "required": [ "email", "type" ], "properties": { "email": { "type": "string", "example": "bobjohnson@somedomain.com" }, "type": { "type": "string", "enum": [ "MAIN_SENDER", "CC", "BCC" ] } } }, "Customer": { "required": [ "id", "name", "updated_at" ], "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp in UTC timezone (must end with 'Z')" } } }, { "$ref": "#/components/schemas/CustomerRequest" } ] }, "WebhookContract": { "type": "object", "required": [ "close_date", "customer_id", "id", "invoicing", "items", "name", "start_date", "status", "total_value", "subsidiary_id" ], "properties": { "id": { "type": "string", "format": "uuid" }, "customer_id": { "type": "string", "format": "uuid" }, "subsidiary_id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "example": "New API Contract" }, "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/WebhookContractItem" } }, "status": { "$ref": "#/components/schemas/ContractStatus" }, "start_date": { "type": "string", "format": "date" }, "end_date": { "type": "string", "format": "date" }, "close_date": { "type": "string", "format": "date" }, "invoicing": { "$ref": "#/components/schemas/Invoicing", "description": "Mandatory for contracts with scope different than REVENUE_RECOGNITION_ONLY." }, "usage_overage_invoicing": { "$ref": "#/components/schemas/OverageInvoicing", "description": "When set, allows the invoicing of usage overages at a separate frequency from the regular invoicing of the contract." }, "total_value": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } }, "exchange_rate": { "$ref": "#/components/schemas/ExchangeRate" }, "usage_commitment": { "$ref": "#/components/schemas/UsageCommitment" } } }, "UsageCommitment": { "type": "object", "required": [ "amount", "revenue_account" ], "properties": { "amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "revenue_account": { "$ref": "#/components/schemas/AccountCode" } } }, "ExchangeRate": { "type": "object", "required": [ "base", "date", "rate", "target" ], "properties": { "base": { "$ref": "#/components/schemas/CurrencyCode" }, "target": { "$ref": "#/components/schemas/CurrencyCode" }, "rate": { "type": "string" }, "date": { "type": "string", "format": "date" } } }, "ExternalReference": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "type": "string", "example": "xyzSystemId" }, "id": { "type": "string", "example": "234" }, "url": { "type": "string", "format": "uri", "example": "https://xyzsystempage.com/ids/234" } }, "description": "For requests, only pre-defined custom IDs are accepted. In responses, an object imported through an integration (e.g. Stripe) would return the provider's object ID." }, "WebhookContractItem": { "type": "object", "required": [ "id", "price", "product_id", "quantity", "revenue_pattern", "start_date", "status", "total_value", "external_references" ], "properties": { "id": { "type": "string", "format": "uuid" }, "product_id": { "type": "string", "format": "uuid" }, "price": { "$ref": "#/components/schemas/Price" }, "quantity": { "type": "number", "minimum": 1, "example": 1 }, "total_value": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "revenue_pattern": { "$ref": "#/components/schemas/RevenuePattern" }, "discount": { "$ref": "#/components/schemas/Discount" }, "tax_rate": { "$ref": "#/components/schemas/TaxRate" }, "start_date": { "type": "string", "format": "date" }, "end_date": { "type": "string", "format": "date" }, "status": { "type": "string", "enum": [ "AMENDED", "ACTIVE" ] }, "amending": { "type": "string", "format": "uuid", "description": "When set, references the item this item is amending." }, "fields": { "$ref": "#/components/schemas/FieldAssignments" }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } } } }, "Invoice": { "type": "object", "required": [ "amount_due", "customer_id", "due_date", "id", "invoice_date", "invoice_number", "items", "net_amount", "overdue", "payment_terms", "status", "subsidiary_id", "subtotal", "taxed_amount", "total", "total_discount", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "subsidiary_id": { "type": "string", "format": "uuid" }, "invoice_number": { "type": "string", "example": "INV01" }, "customer_id": { "type": "string", "format": "uuid" }, "contract_id": { "type": "string", "format": "uuid" }, "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "due_date": { "type": "string", "format": "date" }, "invoice_date": { "type": "string", "format": "date" }, "address": { "$ref": "#/components/schemas/Address", "description": "Sender address" }, "customer_address": { "$ref": "#/components/schemas/Address" }, "shipping_address": { "$ref": "#/components/schemas/Address" }, "bank_account": { "$ref": "#/components/schemas/InvoicingBankAccount" }, "status": { "$ref": "#/components/schemas/InvoiceStatus" }, "net_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "amount_due": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "total": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "example": 0 }, "subtotal": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "total_discount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "purchase_order_number": { "type": "string", "example": "1" }, "exchange_rate": { "$ref": "#/components/schemas/ExchangeRate" }, "taxed_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "memo": { "type": "string" }, "overdue": { "type": "boolean" }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } }, "updated_at": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp in UTC timezone (must end with 'Z')" } } }, "InvoiceItem": { "type": "object", "required": [ "description", "gross_rate", "id", "quantity", "revenue", "taxed_amount", "total_amount", "total_discount", "product_id", "external_references" ], "properties": { "id": { "type": "string", "format": "uuid" }, "description": { "type": "string", "example": "Description" }, "revenue": { "$ref": "#/components/schemas/ItemRevenue" }, "total_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "total_discount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "taxed_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "gross_rate": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "quantity": { "type": "number", "example": 1 }, "product_id": { "type": "string", "format": "uuid" }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } } } }, "CreditMemo": { "type": "object", "required": [ "address", "amount_due", "customer_id", "due_date", "id", "credit_memo_date", "credit_memo_number", "items", "net_amount", "status", "subsidiary_id", "taxed_amount", "total", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "subsidiary_id": { "type": "string", "format": "uuid" }, "credit_memo_number": { "type": "string", "example": "CM01" }, "customer_id": { "type": "string", "format": "uuid" }, "invoice_id": { "type": "string", "format": "uuid" }, "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/CreditMemoItem" } }, "credit_memo_date": { "type": "string", "format": "date" }, "address": { "$ref": "#/components/schemas/Address" }, "status": { "enum": [ "UNPAID", "REFUNDED", "APPLIED", "APPLIED_TO_BALANCE" ] }, "net_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "total": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "exchange_rate": { "$ref": "#/components/schemas/ExchangeRate" }, "taxed_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } }, "updated_at": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp in UTC timezone (must end with 'Z')" } } }, "CreditMemoItem": { "type": "object", "required": [ "description", "net_amount", "id", "quantity", "revenue", "total_amount", "product_id" ], "properties": { "id": { "type": "string", "format": "uuid" }, "description": { "type": "string", "example": "Description" }, "revenue": { "$ref": "#/components/schemas/ItemRevenue" }, "total_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "taxed_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "net_amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "quantity": { "type": "number", "example": 1 }, "product_id": { "type": "string", "format": "uuid" } } }, "ItemRevenue": { "type": "object", "properties": { "period": { "$ref": "#/components/schemas/CalendarPeriod", "description": "Represents the period in which the service was rendered. This period is used for revenue recognition – the revenue is spread over this period. If not provided, the period starts and ends on the invoice date." }, "pattern": { "$ref": "#/components/schemas/RevenuePattern", "description": "If not provided, the one from the product will be used." }, "account_code": { "$ref": "#/components/schemas/AccountCode", "description": "If not provided, the one from the product will be used." } } }, "AccountCode": { "type": "string", "description": "The account code found in the Chart of Accounts", "example": "11112" }, "CalendarPeriod": { "type": "object", "required": [ "end", "start" ], "properties": { "start": { "type": "string", "format": "date" }, "end": { "type": "string", "format": "date" } } }, "InvoicingBankAccount": { "type": "object", "required": [ "id", "ach_account", "ach_routing", "bank_name" ], "properties": { "id": { "type": "string", "format": "uuid" }, "ach_account": { "type": "string" }, "ach_routing": { "type": "string" }, "bank_name": { "type": "string" }, "bank_address": { "type": "string" }, "swift_code": { "type": "string" }, "payment_instructions": { "type": "string" } } }, "JournalEntryRelatedEntity": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "CUSTOMER", "VENDOR" ] } } }, "JournalEntry": { "type": "object", "required": [ "id", "date", "name", "currency", "items", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "subsidiary_id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "currency": { "$ref": "#/components/schemas/CurrencyCode" }, "related_entity": { "$ref": "#/components/schemas/JournalEntryRelatedEntity" }, "items": { "type": "array", "minItems": 2, "items": { "$ref": "#/components/schemas/JournalEntryItem" } }, "date": { "type": "string", "format": "date", "description": "The date this journal entry was posted to the general ledger." }, "reversal_date": { "type": "string", "format": "date" }, "attachmentUrl": { "type": "string", "format": "uri" }, "exchange_rate": { "$ref": "#/components/schemas/ExchangeRate" }, "updated_at": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp in UTC timezone (must end with 'Z')" } } }, "JournalEntryItem": { "type": "object", "required": [ "id", "amount", "account_code", "side" ], "properties": { "id": { "type": "string", "format": "uuid" }, "description": { "type": "string" }, "amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "account_code": { "$ref": "#/components/schemas/AccountCode" }, "side": { "type": "string", "enum": [ "DEBIT", "CREDIT" ] }, "fields": { "$ref": "#/components/schemas/FieldAssignments" } } }, "VendorRequest": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "example": "MyVendor" }, "account_code": { "$ref": "#/components/schemas/AccountCode" }, "address": { "$ref": "#/components/schemas/Address" }, "email": { "type": "string" }, "payment_terms": { "type": "integer", "format": "int32", "minimum": 0, "maximum": 180 }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } }, "ten_ninety_nine_eligible": { "type": "boolean" }, "tax_id": { "type": "string", "example": "123" }, "fields": { "$ref": "#/components/schemas/FieldAssignments" } } }, "VendorResponse": { "allOf": [ { "$ref": "#/components/schemas/VendorRequest" }, { "type": "object", "required": [ "id", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } ] }, "CreateBillRequest": { "type": "object", "required": [ "vendor_id", "expense_number", "items", "bill_date", "due_date" ], "properties": { "vendor_id": { "type": "string", "format": "uuid" }, "expense_number": { "type": "string", "example": "B123" }, "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/BillItemRequest" } }, "bill_date": { "type": "string", "format": "date" }, "due_date": { "type": "string", "format": "date" }, "impact_date": { "type": "string", "format": "date" }, "subsidiary_id": { "type": "string", "format": "uuid" }, "external_references": { "uniqueItems": true, "type": "array", "items": { "$ref": "#/components/schemas/ExternalReference" } }, "exchange_rate": { "$ref": "#/components/schemas/ExchangeRate" } } }, "Bill": { "allOf": [ { "$ref": "#/components/schemas/CreateBillRequest" }, { "type": "object", "required": [ "id", "status", "updated_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/BillStatus" }, "updated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the bill was last modified" }, "items": { "type": "array", "minItems": 1, "items": { "$ref": "#/components/schemas/BillItem" } } } } ] }, "BillItemRequest": { "type": "object", "required": [ "account_code", "amount" ], "properties": { "description": { "type": "string", "example": "API Bill" }, "account_code": { "$ref": "#/components/schemas/AccountCode" }, "amount": { "$ref": "#/components/schemas/RoundedMonetaryAmount" }, "tax_rate": { "$ref": "#/components/schemas/ExpenseTaxRate" }, "service_period": { "$ref": "#/components/schemas/CalendarPeriod" }, "fields": { "$ref": "#/components/schemas/FieldAssignments" } } }, "BillItem": { "allOf": [ { "$ref": "#/components/schemas/BillItemRequest" }, { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uuid" } } } ] }, "FieldAssignments": { "type": "array", "items": { "type": "object", "required": [ "field_id", "field_value_id" ], "properties": { "field_id": { "type": "string", "format": "uuid" }, "field_value_id": { "type": "string", "format": "uuid" } } } }, "WebhookResponse": { "description": "A placeholder indicating a response from a webhook. The contents of this response are ignored.", "type": "string" } } }, "webhooks": { "invoice-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "invoice-created-webhook", "description": "Webhook to notify when an invoice is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "INVOICE" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } }, "required": true }, "responses": { "200": { "description": "No Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "invoice-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "invoice-updated-webhook", "description": "Webhook to notify when an invoice is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "INVOICE" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "invoice-payment-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "invoice-payment-updated-webhook", "description": "Webhook to notify when an invoice is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "INVOICE" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "PAYMENT_UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invoice" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "invoice-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "invoice-deleted-webhook", "description": "Webhook to notify when an invoice is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "INVOICE" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted invoice", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "contract-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "contract-created-webhook", "description": "Webhook to notify when a contract is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CONTRACT" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookContract" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "contract-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "contract-updated-webhook", "description": "Webhook to notify when a contract is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CONTRACT" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookContract" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "contract-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "contract-deleted-webhook", "description": "Webhook to notify when a contract is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CONTRACT" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted contract", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "credit-memo-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "credit-memo-created-webhook", "description": "Webhook to notify when a credit memo is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CREDIT_MEMO" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditMemo" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "credit-memo-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "credit-memo-updated-webhook", "description": "Webhook to notify when a credit memo is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CREDIT_MEMO" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditMemo" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "credit-memo-payment-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "credit-memo-payment-updated-webhook", "description": "Webhook to notify when a credit memo payment is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CREDIT_MEMO" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "PAYMENT_UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditMemo" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "credit-memo-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "credit-memo-deleted-webhook", "description": "Webhook to notify when a credit memo is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CREDIT_MEMO" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted credit memo", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "customer-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "customer-created-webhook", "description": "Webhook to notify when a customer is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CUSTOMER" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "customer-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "customer-updated-webhook", "description": "Webhook to notify when a customer is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CUSTOMER" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Customer" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "customer-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "customer-deleted-webhook", "description": "Webhook to notify when a customer is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "CUSTOMER" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted customer", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "bill-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "bill-created-webhook", "description": "Webhook to notify when a bill is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "BILL" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Bill" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "bill-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "bill-updated-webhook", "description": "Webhook to notify when a bill is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "BILL" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Bill" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "bill-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "bill-deleted-webhook", "description": "Webhook to notify when a bill is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "BILL" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted bill", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "vendor-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "vendor-created-webhook", "description": "Webhook to notify when a vendor is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "VENDOR" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VendorResponse" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "vendor-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "vendor-updated-webhook", "description": "Webhook to notify when a vendor is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "VENDOR" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VendorResponse" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "vendor-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "vendor-deleted-webhook", "description": "Webhook to notify when a vendor is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "VENDOR" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted vendor", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "journal-entry-created": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "journal-entry-created-webhook", "description": "Webhook to notify when a journal entry is created.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "JOURNAL_ENTRY" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "CREATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JournalEntry" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "journal-entry-updated": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "journal-entry-updated-webhook", "description": "Webhook to notify when a journal entry is updated.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "JOURNAL_ENTRY" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "UPDATED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JournalEntry" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } }, "journal-entry-deleted": { "post": { "tags": [ "Webhooks" ], "x-blank-ext": "No effect. Added to work around codegen bug: https://github.com/OpenAPITools/openapi-generator/issues/20175", "operationId": "journal-entry-deleted-webhook", "description": "Webhook to notify when a journal entry is deleted.\n", "parameters": [ { "$ref": "#/components/parameters/X-Rillet-Signature" }, { "$ref": "#/components/parameters/X-Rillet-Timestamp" }, { "$ref": "#/components/parameters/X-Rillet-Id" }, { "$ref": "#/components/parameters/X-Rillet-Entity", "schema": { "type": "string", "enum": [ "JOURNAL_ENTRY" ] } }, { "$ref": "#/components/parameters/X-Rillet-Event", "schema": { "type": "string", "enum": [ "DELETED" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "The id of the deleted journal entry", "type": "string", "format": "uuid" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookResponse" } } } } } } } } } ```