openapi: 3.0.3 info: title: Campfire Developer APIs Accounts Payable Revenue Recognition API version: 1.0.0 description: '## Introduction Campfire''s developer APIs offer granular access to Campfire''s core accounting, revenue recognition, and financial data features. These APIs are designed to be used by developers to build custom integrations, automate workflows, and perform any other programmatic operations. ' servers: - url: https://api.meetcampfire.com description: Production server tags: - name: Revenue Recognition description: Operations related to revenue recognition, contract management, and contract data aggregation. paths: /rr/api/v1/contracts: get: operationId: list_contracts description: "\n Retrieve a list of contracts with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n\n When download=true, triggers an async workflow that generates a ZIP file with\n contracts_summary.csv and contracts_detail.csv, uploads to S3, and sends an email\n with the download link.\n " summary: List Contracts parameters: - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedContractList' description: '' x-mint: mcp: enabled: true name: get_contracts description: Retrieve contract information with optional filtering post: operationId: create_contract description: "\n Create a new contract.\n\n Evergreen vs standard:\n - Standard contract: set is_evergreen=false and provide a fixed contract_end_date.\n - Evergreen contract: set is_evergreen=true and leave contract_end_date as null.\n The system manages a rolling effective_end_date, exposes working_end_date for downstream usage,\n and returns evergreen_locked_date for immutable historical boundary rules.\n\n Additional evergreen constraints:\n - is_evergreen and auto_renew cannot both be true.\n - billing_frequency is required for evergreen behavior.\n - skip_evergreen_invoice_generation is creation-time only and cannot be changed on existing contracts.\n - skip_evergreen_invoice_generation=true skips only Campfire's auto-generated evergreen invoices.\n Revenue transactions still generate.\n " summary: Create Contract tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/Contract' examples: CreateStandardContract: value: client: 101 entity: 11 deal_name: Platform Annual - Fixed Term contract_start_date: '2026-01-01' contract_end_date: '2026-12-31' currency: USD billing_frequency: annual is_evergreen: false auto_renew: false auto_send_invoices: false skip_evergreen_invoice_generation: false summary: Create Standard Contract CreateEvergreenContractWithGeneratedInvoices: value: client: 101 entity: 11 deal_name: Platform Evergreen - Monthly contract_start_date: '2026-01-01' contract_end_date: null currency: USD billing_frequency: monthly is_evergreen: true auto_renew: false auto_send_invoices: true skip_evergreen_invoice_generation: false summary: Create Evergreen Contract with Generated Invoices CreateEvergreenContractWithoutGeneratedInvoices: value: client: 101 entity: 11 deal_name: Platform Evergreen - Imported Invoices contract_start_date: '2026-01-01' contract_end_date: null currency: USD billing_frequency: monthly is_evergreen: true auto_renew: false auto_send_invoices: false auto_apply_customer_stripe_config_to_invoices: false skip_evergreen_invoice_generation: true summary: Create Evergreen Contract without Generated Invoices application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Contract' multipart/form-data: schema: $ref: '#/components/schemas/Contract' security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/Contract' description: '' /rr/api/v1/contracts/{contract_id}/bundles: get: operationId: list_contract_bundles description: "\n Retrieve a list of contract bundles with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Contract Bundles parameters: - in: path name: contract_id schema: type: integer required: true - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/ContractBundle' description: '' post: operationId: create_contract_bundle description: "\n Create a new contract bundle.\n\n Evergreen vs standard:\n - Standard contracts require a fixed bundle end_date.\n - Evergreen contracts allow end_date to be null (open-ended) or set to a billing-period end date.\n Evergreen bundle start/end dates must align with billing period boundaries.\n\n Evergreen-specific option:\n - rebalance_journal_entries_indefinitely=true keeps invoice-journal rebalancing in sync as the evergreen\n contract extends.\n " summary: Create Contract Bundle parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractBundle' examples: CreateStandardContractBundle: value: contract: 9001 bundle_name: Standard Allocation Bundle start_date: '2026-01-01' end_date: '2026-12-31' rebalance_journal_entries_indefinitely: false lines: - product: 1201 amount: '7000.00' - product: 1202 amount: '3000.00' summary: Create Standard Contract Bundle CreateEvergreenContractBundle: value: contract: 9002 bundle_name: Evergreen Allocation Bundle start_date: '2026-04-01' end_date: null rebalance_journal_entries_indefinitely: true lines: - product: 1201 amount: '6500.00' - product: 1202 amount: '3500.00' summary: Create Evergreen Contract Bundle application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractBundle' multipart/form-data: schema: $ref: '#/components/schemas/ContractBundle' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/ContractBundle' description: '' /rr/api/v1/contracts/{contract_id}/bundles/{id}: get: operationId: rr_api_v1_contracts_bundles_retrieve summary: Retrieve Contract Bundle parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractBundle' description: '' put: operationId: rr_api_v1_contracts_bundles_update summary: Update Contract Bundle parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractBundle' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractBundle' multipart/form-data: schema: $ref: '#/components/schemas/ContractBundle' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractBundle' description: '' patch: operationId: rr_api_v1_contracts_bundles_partial_update summary: Partial Update Contract Bundle parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractBundle' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractBundle' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractBundle' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractBundle' description: '' delete: operationId: rr_api_v1_contracts_bundles_destroy summary: Delete Contract Bundle parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{contract_id}/milestones: get: operationId: list_contract_milestones description: "\n Retrieve a list of milestones for a specific contract with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Contract Milestones parameters: - in: path name: contract_id schema: type: integer required: true - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedContractMilestoneList' description: '' post: operationId: create_contract_milestone description: Create a new milestone for a contract. This will automatically create an associated revenue transaction. summary: Create Contract Milestone parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractMilestone' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractMilestone' multipart/form-data: schema: $ref: '#/components/schemas/ContractMilestone' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/ContractMilestone' description: '' /rr/api/v1/contracts/{contract_id}/milestones/{milestone_id}/allocations: get: operationId: rr_api_v1_contracts_milestones_allocations_retrieve description: Retrieve the current bundle allocation details for a contract subscription, milestone, or usage. summary: Get Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: milestone_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' put: operationId: rr_api_v1_contracts_milestones_allocations_update description: "\n Update the bundle allocations for a contract item.\n\n The sum of all line amounts must equal the bundle's total_amount.\n Changes will cascade to related RevenueTransactions and JournalEntries.\n " summary: Update Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: milestone_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' multipart/form-data: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' patch: operationId: rr_api_v1_contracts_milestones_allocations_partial_update description: Partially update bundle allocations. Same behavior as PUT. summary: Partial Update Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: milestone_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' /rr/api/v1/contracts/{contract_id}/milestones/{id}: get: operationId: rr_api_v1_contracts_milestones_retrieve summary: Retrieve Contract Milestone parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractMilestone' description: '' put: operationId: rr_api_v1_contracts_milestones_update summary: Update Contract Milestone parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractMilestone' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractMilestone' multipart/form-data: schema: $ref: '#/components/schemas/ContractMilestone' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractMilestone' description: '' patch: operationId: rr_api_v1_contracts_milestones_partial_update summary: Partial Update Contract Milestone parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractMilestone' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractMilestone' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractMilestone' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractMilestone' description: '' delete: operationId: rr_api_v1_contracts_milestones_destroy summary: Delete Contract Milestone parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commit-summary: get: operationId: get_prepaid_commit_summary summary: Get Prepaid Commit Summary parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commits: get: operationId: list_prepaid_commits summary: List Prepaid Commits parameters: - in: path name: contract_id schema: type: integer required: true - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedContractPrepaidCommitList' description: '' post: operationId: create_prepaid_commit summary: Create Prepaid Commit parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractPrepaidCommit' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractPrepaidCommit' multipart/form-data: schema: $ref: '#/components/schemas/ContractPrepaidCommit' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/ContractPrepaidCommit' description: '' /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/consumption: get: operationId: list_prepaid_commit_consumption summary: List Prepaid Commit Consumption parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedContractPrepaidCommitConsumptionList' description: '' post: operationId: create_prepaid_commit_consumption summary: Create Prepaid Commit Consumption parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/RecordConsumptionInput' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/RecordConsumptionInput' multipart/form-data: schema: $ref: '#/components/schemas/RecordConsumptionInput' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/RecordConsumptionInput' description: '' /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/consumption/{id}: put: operationId: update_prepaid_commit_consumption summary: Update Prepaid Commit Consumption parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body delete: operationId: delete_prepaid_commit_consumption summary: Delete Prepaid Commit Consumption parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/process-adjustments: post: operationId: process_prepaid_commit_adjustments description: Process adjustment events for a prepaid commit and create credit memos. summary: Process Prepaid Commit Adjustments parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/usage-events: get: operationId: list_prepaid_commit_usage_events summary: List Prepaid Commit Usage Events parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedPrepaidUsageEventList' description: '' /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/usage-events/distinct-values: get: operationId: get_prepaid_commit_usage_event_distinct_values description: Return distinct values for a given JSONB data field, for filter dropdowns. summary: Get Prepaid Commit Usage Event Distinct Values parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/usage-events/template: get: operationId: get_prepaid_commit_usage_events_template description: Download a CSV template (commit-scoped). summary: Get Prepaid Commit Usage Events Template parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commits/{commit_id}/usage-events/upload: post: operationId: upload_prepaid_commit_usage_events description: Upload a CSV of usage events for a specific prepaid commit (commit-scoped). summary: Upload Prepaid Commit Usage Events parameters: - in: path name: commit_id schema: type: integer required: true - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/contracts/{contract_id}/prepaid-commits/{id}: get: operationId: get_prepaid_commit summary: Retrieve Prepaid Commit parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractPrepaidCommit' description: '' put: operationId: update_prepaid_commit summary: Update Prepaid Commit parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractPrepaidCommit' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractPrepaidCommit' multipart/form-data: schema: $ref: '#/components/schemas/ContractPrepaidCommit' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractPrepaidCommit' description: '' patch: operationId: partial_update_prepaid_commit summary: Partial Update Prepaid Commit parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractPrepaidCommit' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractPrepaidCommit' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractPrepaidCommit' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractPrepaidCommit' description: '' delete: operationId: delete_prepaid_commit summary: Delete Prepaid Commit parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{contract_id}/subscriptions: get: operationId: list_contract_subscriptions description: "\n Retrieve a list of contract subscriptions with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Contract Subscriptions parameters: - in: path name: contract_id schema: type: integer required: true - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/ContractSubscription' description: '' post: operationId: create_contract_subscription description: "\n Create a new contract subscription.\n\n Evergreen vs standard:\n - Standard contract subscriptions generally provide explicit lines and fixed start/end dates.\n - Evergreen contract subscriptions can provide period_amount to auto-generate lines. Their dates must align\n to billing period boundaries and must not exceed the contract's current working_end_date.\n\n Notes:\n - Usage and milestone subscription flows are not supported for evergreen contracts.\n - For evergreen contracts, period_amount is the source-of-truth amount per billing period.\n - renewal_behavior:\n - FOLLOW_CONTRACT: subscription follows evergreen contract extension windows.\n - FIXED_END: subscription keeps its own fixed end_date and does not extend automatically.\n " summary: Create Contract Subscription parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractSubscription' examples: CreateStandardSubscription: value: contract: 9001 product: 300 start_date: '2026-01-01' end_date: '2026-12-31' mrr: '2500.00' lines: - start_date: '2026-01-01' end_date: '2026-12-31' total_value: '30000.00' mrr: '2500.00' summary: Create Standard Subscription CreateEvergreenSubscriptionWithPeriodAmount: value: contract: 9002 product: 300 start_date: '2026-04-01' renewal_behavior: FOLLOW_CONTRACT period_amount: '10000.00' lines: [] summary: Create Evergreen Subscription with period_amount CreateEvergreenSubscriptionWithFixedEndDate: value: contract: 9002 product: 300 start_date: '2026-04-01' end_date: '2026-06-30' renewal_behavior: FIXED_END period_amount: '10000.00' lines: [] summary: Create Evergreen Subscription with fixed end date application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractSubscription' multipart/form-data: schema: $ref: '#/components/schemas/ContractSubscription' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/ContractSubscription' description: '' /rr/api/v1/contracts/{contract_id}/subscriptions/{id}: get: operationId: rr_api_v1_contracts_subscriptions_retrieve summary: Retrieve Contract Subscription parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractSubscription' description: '' put: operationId: rr_api_v1_contracts_subscriptions_update summary: Update Contract Subscription parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractSubscription' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractSubscription' multipart/form-data: schema: $ref: '#/components/schemas/ContractSubscription' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractSubscription' description: '' patch: operationId: rr_api_v1_contracts_subscriptions_partial_update summary: Partial Update Contract Subscription parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractSubscription' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractSubscription' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractSubscription' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractSubscription' description: '' delete: operationId: rr_api_v1_contracts_subscriptions_destroy summary: Delete Contract Subscription parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{contract_id}/subscriptions/{subscription_id}/allocations: get: operationId: rr_api_v1_contracts_subscriptions_allocations_retrieve description: Retrieve the current bundle allocation details for a contract subscription, milestone, or usage. summary: Get Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: subscription_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' put: operationId: rr_api_v1_contracts_subscriptions_allocations_update description: "\n Update the bundle allocations for a contract item.\n\n The sum of all line amounts must equal the bundle's total_amount.\n Changes will cascade to related RevenueTransactions and JournalEntries.\n " summary: Update Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: subscription_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' multipart/form-data: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' patch: operationId: rr_api_v1_contracts_subscriptions_allocations_partial_update description: Partially update bundle allocations. Same behavior as PUT. summary: Partial Update Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: subscription_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' /rr/api/v1/contracts/{contract_id}/tier-price-overrides: get: operationId: rr_api_v1_contracts_tier_price_overrides_list summary: List Contract Tier Price Overrides parameters: - in: path name: contract_id schema: type: integer required: true - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedTierPriceOverrideList' description: '' post: operationId: rr_api_v1_contracts_tier_price_overrides_create summary: Create Contract Tier Price Override parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/TierPriceOverride' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TierPriceOverride' multipart/form-data: schema: $ref: '#/components/schemas/TierPriceOverride' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/TierPriceOverride' description: '' /rr/api/v1/contracts/{contract_id}/usage: get: operationId: rr_api_v1_contracts_usage_list description: List usage revenue records summary: List Contract Usage Revenue parameters: - in: path name: contract_id schema: type: integer required: true - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedContractUsageList' description: '' post: operationId: rr_api_v1_contracts_usage_create description: List usage revenue records summary: Create Contract Usage Revenue parameters: - in: path name: contract_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractUsage' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractUsage' multipart/form-data: schema: $ref: '#/components/schemas/ContractUsage' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/ContractUsage' description: '' /rr/api/v1/contracts/{contract_id}/usage/{id}: get: operationId: rr_api_v1_contracts_usage_retrieve description: Retrieve, update, and delete contract usage revenue records summary: Retrieve Contract Usage Revenue parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractUsage' description: '' put: operationId: rr_api_v1_contracts_usage_update description: Retrieve, update, and delete contract usage revenue records summary: Update Contract Usage Revenue parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractUsage' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractUsage' multipart/form-data: schema: $ref: '#/components/schemas/ContractUsage' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractUsage' description: '' patch: operationId: rr_api_v1_contracts_usage_partial_update description: Retrieve, update, and delete contract usage revenue records summary: Partially Update Contract Usage Revenue parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractUsage' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractUsage' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractUsage' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractUsage' description: '' delete: operationId: rr_api_v1_contracts_usage_destroy description: Retrieve, update, and delete contract usage revenue records summary: Delete Contract Usage Revenue parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{contract_id}/usage/{usage_id}/allocations: get: operationId: rr_api_v1_contracts_usage_allocations_retrieve description: Retrieve the current bundle allocation details for a contract subscription, milestone, or usage. summary: Get Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: usage_id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' put: operationId: rr_api_v1_contracts_usage_allocations_update description: "\n Update the bundle allocations for a contract item.\n\n The sum of all line amounts must equal the bundle's total_amount.\n Changes will cascade to related RevenueTransactions and JournalEntries.\n " summary: Update Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: usage_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' multipart/form-data: schema: $ref: '#/components/schemas/ContractProductBundleUpdate' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' patch: operationId: rr_api_v1_contracts_usage_allocations_partial_update description: Partially update bundle allocations. Same behavior as PUT. summary: Partial Update Bundle Allocations parameters: - in: path name: contract_id schema: type: integer required: true - in: path name: usage_id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractProductBundleUpdate' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractProductBundle' description: '' /rr/api/v1/contracts/{id}: get: operationId: rr_api_v1_contracts_retrieve summary: Retrieve Contract parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Contract' description: '' put: operationId: rr_api_v1_contracts_update summary: Update Contract parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/Contract' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Contract' multipart/form-data: schema: $ref: '#/components/schemas/Contract' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Contract' description: '' patch: operationId: rr_api_v1_contracts_partial_update summary: Partial Update Contract parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContract' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContract' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContract' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Contract' description: '' delete: operationId: rr_api_v1_contracts_destroy summary: Delete Contract parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/contracts/{id}/duplicate: post: operationId: rr_api_v1_contracts_duplicate_create summary: Duplicate Contract parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractDuplicateResponse' description: '' /rr/api/v1/contracts/{id}/minimum-commit-preview: get: operationId: rr_api_v1_contracts_minimum_commit_preview_retrieve description: 'Projected monthly minimum commitment true-up for a contract. Read-only. Returns the shortfall the month-end batch *would* post if it ran right now. Lets the contract detail screen show a live floor preview without triggering writes from the UI.' parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/contracts/{id}/terminate: post: operationId: rr_api_v1_contracts_terminate_create description: "Terminate a contract and optionally void associated invoices.\n\n If the user has permission to terminate contracts and void invoices, both operations\n are performed atomically. If the user lacks permission for either operation, a draft\n is created instead, and the response indicates which operations were drafted.\n\n Returns 400 if any of the provided void_invoice_ids are invalid (not found, already voided,\n has payments, void date is before the invoice date, or in a closed period)." summary: Terminate Contract parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/TerminateContract' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TerminateContract' multipart/form-data: schema: $ref: '#/components/schemas/TerminateContract' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerminateContractResponse' description: '' /rr/api/v1/contracts/bulk-search: post: operationId: rr_api_v1_contracts_bulk_search_create description: Search for contracts by deal_name in a single request. summary: Bulk Search Contracts tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/BulkContractSearch' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/BulkContractSearch' multipart/form-data: schema: $ref: '#/components/schemas/BulkContractSearch' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Contract' description: '' /rr/api/v1/contracts/parse: post: operationId: parse_contract description: Parse contract details from uploaded PDF files using AI. summary: Parse Contract tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': description: No response body /rr/api/v1/customers: get: operationId: rr_api_v1_customers_list description: "\n Retrieve a list of contract customers with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Contract Customers parameters: - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedContractCustomerList' description: '' /rr/api/v1/customers/{id}: get: operationId: rr_api_v1_customers_retrieve summary: Retrieve Contract Customer parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractCustomer' description: '' put: operationId: rr_api_v1_customers_update summary: Update Contract Customer parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ContractCustomer' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ContractCustomer' multipart/form-data: schema: $ref: '#/components/schemas/ContractCustomer' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractCustomer' description: '' patch: operationId: rr_api_v1_customers_partial_update summary: Partial Update Contract Customer parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedContractCustomer' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedContractCustomer' multipart/form-data: schema: $ref: '#/components/schemas/PatchedContractCustomer' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ContractCustomer' description: '' delete: operationId: rr_api_v1_customers_destroy summary: Delete Contract Customer parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/modify-subscription-schedule: post: operationId: modify_subscription_schedule description: Generate a modified subscription schedule by comparing a new schedule against an existing subscription. Returns the delta between the original and modified schedules, with support for catch-up accounting and contract end date modifications. summary: Modify Subscription Schedule tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/GenerageSubscriptionSchedule' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/GenerageSubscriptionSchedule' multipart/form-data: schema: $ref: '#/components/schemas/GenerageSubscriptionSchedule' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/ContractSubscriptionLine' description: '' /rr/api/v1/product: get: operationId: list_products description: "\n Retrieve a list of contract products with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Contract Products parameters: - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedProductList' description: '' post: operationId: create_product description: Create a new product summary: Create Contract Product tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/Product' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Product' multipart/form-data: schema: $ref: '#/components/schemas/Product' security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/Product' description: '' /rr/api/v1/product-bundles: get: operationId: list_product_bundles description: "\n Retrieve a list of product bundles with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Product Bundles parameters: - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedProductBundleList' description: '' post: operationId: create_product_bundle description: Create a new product bundle with products and percentage allocations. Total percentage must equal 100. summary: Create Product Bundle tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductBundle' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ProductBundle' multipart/form-data: schema: $ref: '#/components/schemas/ProductBundle' required: true security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/ProductBundle' description: '' /rr/api/v1/product-bundles/{id}: get: operationId: rr_api_v1_product_bundles_retrieve summary: Retrieve Product Bundle parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductBundle' description: '' put: operationId: rr_api_v1_product_bundles_update summary: Update Product Bundle parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductBundle' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/ProductBundle' multipart/form-data: schema: $ref: '#/components/schemas/ProductBundle' required: true security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductBundle' description: '' patch: operationId: rr_api_v1_product_bundles_partial_update summary: Partial Update Product Bundle parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedProductBundle' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedProductBundle' multipart/form-data: schema: $ref: '#/components/schemas/PatchedProductBundle' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductBundle' description: '' delete: operationId: rr_api_v1_product_bundles_destroy summary: Delete Product Bundle parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/product/{id}: get: operationId: rr_api_v1_product_retrieve summary: Retrieve Product parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Product' description: '' put: operationId: rr_api_v1_product_update summary: Update Product parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/Product' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Product' multipart/form-data: schema: $ref: '#/components/schemas/Product' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Product' description: '' patch: operationId: rr_api_v1_product_partial_update summary: Partial Update Product parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedProduct' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedProduct' multipart/form-data: schema: $ref: '#/components/schemas/PatchedProduct' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Product' description: '' delete: operationId: rr_api_v1_product_destroy summary: Delete Product parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body /rr/api/v1/transactions: get: operationId: list_revenue_transactions description: "\n Retrieve a list of revenue transactions with optional filtering and sorting.\n\n Supports including soft-deleted records for audit and recovery purposes.\n When include_deleted=true, returns ONLY deleted records instead of active records.\n Deleted records contain minimal data: 'id', 'is_deleted=true', 'deleted_at' timestamp,\n and 'last_modified_at'. When 'false' or omitted, returns ONLY active records.\n This provides clean separation between active and deleted data.\n " summary: List Revenue Transactions parameters: - in: query name: include_deleted schema: type: boolean default: false description: 'When set to ''true'', returns ONLY deleted records instead of active records. Deleted records contain minimal data: ''id'', ''is_deleted=true'', ''deleted_at'' timestamp, and ''last_modified_at''. When ''false'' or omitted, returns ONLY active records. This provides clean separation between active and deleted data.' - in: query name: last_modified_at__gte schema: type: string description: 'Filter for records modified on or after this timestamp. Format: ISO 8601 (e.g., ''2024-01-01T00:00:00Z'' or ''2024-01-01''). Works with both active records and deleted records (filters by deletion time for deleted records).' - in: query name: last_modified_at__lte schema: type: string description: 'Filter for records modified on or before this timestamp. Format: ISO 8601 (e.g., ''2024-12-31T23:59:59Z'' or ''2024-12-31''). Works with both active records and deleted records (filters by deletion time for deleted records).' - name: limit required: false in: query description: Number of results to return per page. schema: type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedRevenueTransactionList' description: '' post: operationId: create_revenue_transaction description: Create a new revenue transaction summary: Create Revenue Transaction tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/RevenueTransaction' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/RevenueTransaction' multipart/form-data: schema: $ref: '#/components/schemas/RevenueTransaction' security: - knoxApiToken: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/RevenueTransaction' description: '' /rr/api/v1/transactions/{id}: get: operationId: rr_api_v1_transactions_retrieve summary: Retrieve Revenue Transaction parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/RevenueTransaction' description: '' put: operationId: rr_api_v1_transactions_update summary: Update Revenue Transaction parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/RevenueTransaction' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/RevenueTransaction' multipart/form-data: schema: $ref: '#/components/schemas/RevenueTransaction' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/RevenueTransaction' description: '' patch: operationId: rr_api_v1_transactions_partial_update summary: Partial Update Revenue Transaction parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedRevenueTransaction' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedRevenueTransaction' multipart/form-data: schema: $ref: '#/components/schemas/PatchedRevenueTransaction' security: - knoxApiToken: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/RevenueTransaction' description: '' delete: operationId: rr_api_v1_transactions_destroy summary: Delete Revenue Transaction parameters: - in: path name: id schema: type: integer required: true tags: - Revenue Recognition security: - knoxApiToken: [] responses: '204': description: No response body components: schemas: InvoiceCalculationEnum: enum: - FIXED_RATE - FIXED_QUANTITY type: string description: '* `FIXED_RATE` - Fixed Rate * `FIXED_QUANTITY` - Fixed Quantity' ContractUsage: type: object properties: id: type: integer readOnly: true contract: type: integer product: type: integer nullable: true product_bundle: type: string readOnly: true contract_product_bundle: allOf: - $ref: '#/components/schemas/ContractProductBundleRead' readOnly: true product_name: type: string readOnly: true product_bundle_name: type: string readOnly: true usage_group: type: integer nullable: true usage_group_name: type: string readOnly: true department: type: integer nullable: true tags: type: string description: type: string nullable: true start_date: type: string format: date nullable: true end_date: type: string format: date nullable: true lines: type: string readOnly: true created_at: type: string format: date-time readOnly: true nullable: true last_modified_at: type: string format: date-time readOnly: true nullable: true required: - contract - contract_product_bundle - created_at - id - last_modified_at - lines - product_bundle - product_bundle_name - product_name - usage_group_name PaginatedContractList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/Contract' ContractBundle: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true end_date: type: string format: date nullable: true description: Bundle end date. Required for standard contracts. For evergreen contracts this may be null to follow the contract timeline, or set to a billing-period end date. rebalance_journal_entries_indefinitely: type: boolean default: false description: Should only be used for Evergreen contracts. When true, linked invoice journal entries are rebalanced on each evergreen contract extension. lines: type: array items: $ref: '#/components/schemas/ContractBundleLine' bundle_name: type: string maxLength: 250 bundle_description: type: string nullable: true maxLength: 250 start_date: type: string format: date use_daily_accounting: type: boolean proration_method: $ref: '#/components/schemas/ProrationMethodEnum' use_catchup: type: boolean catchup_date: type: string format: date nullable: true created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true customer: type: integer readOnly: true contract: type: integer required: - bundle_name - contract - created_at - customer - deleted_at - id - is_deleted - last_modified_at - lines - start_date BillingFrequencyEnum: enum: - monthly - quarterly - biannual - annual - one_time - custom type: string description: '* `monthly` - Monthly * `quarterly` - Quarterly * `biannual` - Bi Annualy * `annual` - Annual * `one_time` - One Time * `custom` - Custom' SourceFc1Enum: enum: - SALESFORCE - HUBSPOT - STRIPE - MANUAL type: string description: '* `SALESFORCE` - Salesforce * `HUBSPOT` - Hubspot * `STRIPE` - Stripe * `MANUAL` - Manual' ComponentTypeEnum: enum: - SUBSCRIPTION - MILESTONE - USAGE type: string description: '* `SUBSCRIPTION` - Subscription * `MILESTONE` - Milestone * `USAGE` - Usage' TierPriceOverride: type: object properties: id: type: integer readOnly: true tier: type: integer tier_name: type: string readOnly: true contract: type: integer deal_name: type: string readOnly: true usage_group_id: type: integer readOnly: true usage_group_name: type: string readOnly: true price: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Override price per unit for this contract+tier percentage: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Override percentage for this contract+tier (percentage-based pricing) source: $ref: '#/components/schemas/TierPriceOverrideSourceEnum' integration_name: type: string nullable: true maxLength: 250 external_reference: type: string nullable: true maxLength: 250 notes: type: string nullable: true created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true required: - contract - created_at - deal_name - id - last_modified_at - tier - tier_name - usage_group_id - usage_group_name PatchedContract: type: object properties: id: type: integer readOnly: true entity_name: type: string readOnly: true client_name: type: string readOnly: true client_terms: type: string readOnly: true department_name: type: string readOnly: true parent_department_name: type: string readOnly: true parent_department: type: integer readOnly: true tags: type: string total_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_mrr: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_deferred_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true currency: type: string default: USD entity_currency: type: string default: USD attachments: type: array items: $ref: '#/components/schemas/File' readOnly: true prepaid_commits: type: array items: $ref: '#/components/schemas/NestedContractPrepaidCommit' writeOnly: true contract_end_date: type: string format: date nullable: true description: Fixed end date for standard contracts. Leave null for evergreen contracts (is_evergreen=true). is_evergreen: type: boolean default: false description: Set true for evergreen contracts (no fixed end date). Evergreen contracts cannot also be auto-renew. Auto-renew is a legacy method to extend contracts. auto_send_invoices: type: boolean default: false description: When true, generated invoices are automatically sent on their invoice date. skip_evergreen_invoice_generation: type: boolean default: false description: For Evergreen contracts only. Set at contract creation; existing contracts cannot change this setting. False means current behavior. True skips only Campfire's auto-generated evergreen invoices; revenue transactions still generate; existing invoices are not cleaned up. auto_apply_customer_stripe_config_to_invoices: type: boolean default: false description: Evergreen contracts only. When true, evergreen-generated invoices inherit stripe_connection and use_stripe_auto_bill from the contract customer. last_modified_at: type: string format: date-time readOnly: true is_deleted: type: string readOnly: true deleted_at: type: string readOnly: true usage_tiers: type: string has_invoices: type: boolean readOnly: true default: false has_journal_entries: type: boolean readOnly: true default: false has_credit_memos: type: boolean readOnly: true default: false effective_end_date: type: string format: date readOnly: true description: Rolling horizon end date for active evergreen contracts. It will be auto-generated by Campfire backend. Null for standard contracts. working_end_date: type: string format: date readOnly: true description: Canonical end date used by the system. Equals contract_end_date for standard or terminated contracts, and effective_end_date for active evergreen contracts. evergreen_locked_date: type: string format: date nullable: true readOnly: true description: Inclusive lock date for evergreen contracts based on paid invoices and close books date. Dates on or before this value are immutable. Null for non-evergreen contracts, or when no financial locking events exist. search_vector: type: string readOnly: true nullable: true search_text: type: string readOnly: true nullable: true billing_frequency: $ref: '#/components/schemas/BillingFrequencyEnum' deal_name: type: string nullable: true maxLength: 250 deal_id: type: string nullable: true maxLength: 250 consultant: type: string nullable: true maxLength: 250 closed_date: type: string format: date nullable: true total_contract_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true contract_start_date: type: string format: date nullable: true exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true crm_link: type: string nullable: true maxLength: 500 contract_link: type: string nullable: true maxLength: 500 status: $ref: '#/components/schemas/ContractStatusEnum' source: $ref: '#/components/schemas/SourceFc1Enum' source_deal_data: nullable: true created_at: type: string format: date-time readOnly: true auto_renew: type: boolean auto_renew_duration: type: integer maximum: 2147483647 minimum: -2147483648 nullable: true auto_renew_invoice: type: boolean tag_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 tag_group_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 minimum_monthly_commitment_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Minimum monthly commitment amount (allowance threshold) minimum_monthly_commitment_quantity: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Minimum monthly commitment quantity (allowance threshold in units) purchase_order_number: type: string nullable: true maxLength: 120 customer: type: integer readOnly: true entity: type: integer nullable: true client: type: integer nullable: true department: type: integer nullable: true journal_entries: type: array items: type: integer TerminateContractResponse: type: object description: Response serializer for contract termination with hints about drafted operations. properties: contract_terminated: type: boolean description: Whether the contract was terminated directly (True) or drafted (False). contract_draft_id: type: integer nullable: true description: Draft queue ID if contract termination was drafted instead of executed. voided_invoice_ids: type: array items: type: integer description: List of invoice IDs that were voided directly. drafted_invoice_ids: type: array items: type: integer description: List of invoice IDs that were drafted for voiding (user lacks void permission). required: - contract_terminated GenerageSubscriptionSchedule: type: object properties: start_date: type: string format: date description: Start date of the subscription period. end_date: type: string format: date nullable: true description: End date of the subscription period. Defaults to 1 year from start date if not provided. total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: Total contract value for the subscription period. mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: Monthly recurring revenue. If not provided, it is calculated from total_value and the subscription period. use_daily_accounting: type: boolean default: false description: Whether to use daily (vs monthly) revenue recognition. proration_method: nullable: true description: 'Proration method. When provided, takes precedence over use_daily_accounting (DAILY↔True, STANDARD/THIRTY_DAY↔False). * `standard` - Standard (actual month length) * `thirty_day` - Fixed 30-day month * `daily` - Daily' oneOf: - $ref: '#/components/schemas/ProrationMethodEnum' - $ref: '#/components/schemas/NullEnum' use_catchup: type: boolean default: false description: Enable catch-up accounting for retroactive amendments. catchup_date: type: string format: date nullable: true description: Date from which to apply catch-up adjustments. Required if use_catchup is true. modified_subscription: type: integer nullable: true description: ID of the existing contract subscription being modified. does_modify_contract_end_date: type: boolean default: false description: Whether this modification changes the contract end date. apply_prospectively: type: boolean default: false description: Apply changes prospectively from catchup_date instead of retroactively. Only valid when use_catchup is true. required: - start_date - total_value PaginatedContractPrepaidCommitList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ContractPrepaidCommit' ContractBundleLine: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true contract_bundle: type: integer writeOnly: true product_name: type: string readOnly: true amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true customer: type: integer readOnly: true product: type: integer nullable: true required: - created_at - customer - deleted_at - id - is_deleted - last_modified_at - product_name PaginatedContractCustomerList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ContractCustomer' BulkContractSearch: type: object properties: contracts: type: array items: $ref: '#/components/schemas/BulkContract' required: - contracts ContractMilestone: type: object properties: id: type: integer readOnly: true customer: type: integer readOnly: true contract: type: integer product: type: integer nullable: true product_bundle: type: string readOnly: true contract_product_bundle: allOf: - $ref: '#/components/schemas/ContractProductBundleRead' readOnly: true product_name: type: string readOnly: true product_bundle_name: type: string readOnly: true milestone_name: type: string maxLength: 250 milestone_date: type: string format: date amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true quantity: type: number format: double maximum: 10000000000000000 minimum: -10000000000000000 exclusiveMaximum: true exclusiveMinimum: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true description: type: string nullable: true department: type: integer nullable: true department_name: type: string readOnly: true tags: type: array items: type: object additionalProperties: {} readOnly: true revenue_transaction_id: type: integer readOnly: true created_at: type: string format: date-time readOnly: true last_modified_at: type: string readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true required: - amount - contract - contract_product_bundle - created_at - customer - deleted_at - department_name - id - is_deleted - last_modified_at - milestone_date - milestone_name - product_bundle - product_bundle_name - product_name - revenue_transaction_id - tags RevenueTransaction: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true entity_name: type: string readOnly: true entity_currency: type: string readOnly: true client_name: type: string readOnly: true contract_name: type: string readOnly: true contract_status: type: string readOnly: true product_name: type: string readOnly: true product_bundle_name: type: string readOnly: true product_is_taxable: type: boolean readOnly: true contract_identifier: type: string readOnly: true client_identifier: type: string readOnly: true product_identifier: type: string readOnly: true gross_amount: type: string readOnly: true invoice_number: type: string readOnly: true invoice_date: type: string readOnly: true invoice_payment_status: type: string readOnly: true invoice_voided_date: type: string format: date readOnly: true credit_memo_number: type: string readOnly: true credit_memo_date: type: string format: date readOnly: true credit_memo_voided_date: type: string format: date readOnly: true credit_memo_application_status: type: string readOnly: true revenue_type: type: string readOnly: true journal_entry_order: type: string readOnly: true contract_subscription_notes: type: string readOnly: true subscription_discount: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true nullable: true department_name: type: string readOnly: true parent_department_name: type: string readOnly: true parent_department: type: integer readOnly: true tags: type: string usage_tier_name: type: string readOnly: true last_modified_at: type: string format: date-time readOnly: true anrok_item_id: type: string readOnly: true sphere_item_id: type: string readOnly: true source: type: string nullable: true maxLength: 250 description: type: string nullable: true external_id: type: string nullable: true maxLength: 250 client_external_id: type: string nullable: true maxLength: 250 contract_external_id: type: string nullable: true maxLength: 250 contract_subscription_external_id: type: string nullable: true maxLength: 250 product_external_id: type: string nullable: true maxLength: 250 accounting_period: type: string format: date nullable: true transaction_date: type: string format: date nullable: true transaction_end_date: type: string format: date nullable: true currency: type: string maxLength: 3 exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true recognized: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true quantity: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true discount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true refunds: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true processing_fees: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true platform_fees: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true transfers: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true tax: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true balance_adjustment: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Invoice starting balance or other balance adjustments (e.g., previous balance applied to this transaction) mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true renewall: type: boolean tag_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 tag_group_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 is_migration_invoiced: type: boolean description: Marked as invoiced during migration. Does not create GL entries or AR. created_at: type: string format: date-time readOnly: true nullable: true customer: type: integer readOnly: true entity: type: integer nullable: true client: type: integer nullable: true contract: type: integer nullable: true contract_subscription: type: integer nullable: true non_contract_subscription: type: integer nullable: true contract_usage: type: integer nullable: true contract_milestone: type: integer nullable: true non_contract_usage: type: integer nullable: true prepaid_commit: type: integer nullable: true product: type: integer nullable: true product_bundle: type: integer nullable: true contract_product_bundle: type: integer nullable: true description: Reference to contract-specific editable product bundle allocation contract_bundle: type: integer nullable: true journal_entry: type: integer nullable: true invoice: type: integer nullable: true credit_memo: type: integer nullable: true department: type: integer nullable: true usage_tier: type: integer nullable: true required: - anrok_item_id - client_identifier - client_name - contract_identifier - contract_name - contract_status - contract_subscription_notes - created_at - credit_memo_application_status - credit_memo_date - credit_memo_number - credit_memo_voided_date - customer - deleted_at - department_name - entity_currency - entity_name - gross_amount - id - invoice_date - invoice_number - invoice_payment_status - invoice_voided_date - is_deleted - journal_entry_order - last_modified_at - parent_department - parent_department_name - product_bundle_name - product_identifier - product_is_taxable - product_name - revenue_type - sphere_item_id - subscription_discount - usage_tier_name PricingModelEnum: enum: - unit_based - fixed_fee - percentage_based - graduated_tiered - volume_based type: string description: '* `unit_based` - Unit based pricing * `fixed_fee` - Fixed fee pricing * `percentage_based` - Percentage based pricing * `graduated_tiered` - Graduated tiered pricing * `volume_based` - Volume based pricing' ProductUsageTierSummary: type: object properties: id: type: integer name: type: string pricing_type: type: string from_quantity: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true to_quantity: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true price: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true percentage: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true required: - from_quantity - id - name - percentage - price - pricing_type - to_quantity ContractStatusEnum: enum: - ACTIVE - PENDING - COMPLETED - DELETED type: string description: '* `ACTIVE` - Active * `PENDING` - Pending * `COMPLETED` - Completed * `DELETED` - Deleted' PaginatedContractPrepaidCommitConsumptionList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ContractPrepaidCommitConsumption' Source3b3Enum: enum: - BILL - BREX - HUBSPOT - MANUAL - PAYROLL - SALESFORCE type: string description: '* `BILL` - Bill * `BREX` - Brex * `HUBSPOT` - Hubspot * `MANUAL` - Manual * `PAYROLL` - Payroll * `SALESFORCE` - Salesforce' PatchedRevenueTransaction: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true entity_name: type: string readOnly: true entity_currency: type: string readOnly: true client_name: type: string readOnly: true contract_name: type: string readOnly: true contract_status: type: string readOnly: true product_name: type: string readOnly: true product_bundle_name: type: string readOnly: true product_is_taxable: type: boolean readOnly: true contract_identifier: type: string readOnly: true client_identifier: type: string readOnly: true product_identifier: type: string readOnly: true gross_amount: type: string readOnly: true invoice_number: type: string readOnly: true invoice_date: type: string readOnly: true invoice_payment_status: type: string readOnly: true invoice_voided_date: type: string format: date readOnly: true credit_memo_number: type: string readOnly: true credit_memo_date: type: string format: date readOnly: true credit_memo_voided_date: type: string format: date readOnly: true credit_memo_application_status: type: string readOnly: true revenue_type: type: string readOnly: true journal_entry_order: type: string readOnly: true contract_subscription_notes: type: string readOnly: true subscription_discount: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true nullable: true department_name: type: string readOnly: true parent_department_name: type: string readOnly: true parent_department: type: integer readOnly: true tags: type: string usage_tier_name: type: string readOnly: true last_modified_at: type: string format: date-time readOnly: true anrok_item_id: type: string readOnly: true sphere_item_id: type: string readOnly: true source: type: string nullable: true maxLength: 250 description: type: string nullable: true external_id: type: string nullable: true maxLength: 250 client_external_id: type: string nullable: true maxLength: 250 contract_external_id: type: string nullable: true maxLength: 250 contract_subscription_external_id: type: string nullable: true maxLength: 250 product_external_id: type: string nullable: true maxLength: 250 accounting_period: type: string format: date nullable: true transaction_date: type: string format: date nullable: true transaction_end_date: type: string format: date nullable: true currency: type: string maxLength: 3 exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true recognized: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true quantity: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true discount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true refunds: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true processing_fees: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true platform_fees: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true transfers: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true tax: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true balance_adjustment: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Invoice starting balance or other balance adjustments (e.g., previous balance applied to this transaction) mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true renewall: type: boolean tag_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 tag_group_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 is_migration_invoiced: type: boolean description: Marked as invoiced during migration. Does not create GL entries or AR. created_at: type: string format: date-time readOnly: true nullable: true customer: type: integer readOnly: true entity: type: integer nullable: true client: type: integer nullable: true contract: type: integer nullable: true contract_subscription: type: integer nullable: true non_contract_subscription: type: integer nullable: true contract_usage: type: integer nullable: true contract_milestone: type: integer nullable: true non_contract_usage: type: integer nullable: true prepaid_commit: type: integer nullable: true product: type: integer nullable: true product_bundle: type: integer nullable: true contract_product_bundle: type: integer nullable: true description: Reference to contract-specific editable product bundle allocation contract_bundle: type: integer nullable: true journal_entry: type: integer nullable: true invoice: type: integer nullable: true credit_memo: type: integer nullable: true department: type: integer nullable: true usage_tier: type: integer nullable: true BlankEnum: enum: - '' PatchedContractPrepaidCommit: type: object properties: id: type: integer readOnly: true contract: type: integer readOnly: true entity: type: integer nullable: true entity_name: type: string readOnly: true nullable: true product: type: integer nullable: true product_name: type: string readOnly: true nullable: true name: type: string maxLength: 250 description: type: string nullable: true currency: type: string maxLength: 3 exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true remaining_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true discount_percentage: type: number format: double maximum: 100.0 minimum: 0.0 description: Discount applied to gross usage (e.g. 20.00 for 20%) rate: type: number format: double maximum: 100000000000000 minimum: 0.0 exclusiveMaximum: true nullable: true description: List price per unit. Prepaid usage = rate * (1 - discount%). Overage = rate (no discount). start_date: type: string format: date expiration_date: type: string format: date nullable: true status: allOf: - $ref: '#/components/schemas/ContractPrepaidCommitStatusEnum' readOnly: true priority: type: integer maximum: 2147483647 minimum: -2147483648 description: Drawdown order when multiple commits exist (lower = higher priority) is_invoiced: type: boolean readOnly: true invoice: type: integer readOnly: true nullable: true subledger: type: integer nullable: true overage_invoice_cadence: allOf: - $ref: '#/components/schemas/OverageInvoiceCadenceEnum' description: 'How often overage/on-demand usage is invoiced * `monthly` - Monthly * `quarterly` - Quarterly * `biannual` - Bi Annualy * `annual` - Annual * `one_time` - One Time * `custom` - Custom' auto_send_overage_invoices: type: boolean description: Automatically send overage invoices when generated overage_invoice_start_month: type: string format: date nullable: true description: Anchor date for overage billing cycles. Defaults to start_date. department: type: integer nullable: true department_name: type: string readOnly: true nullable: true tags: type: string nullable: true created_at: type: string format: date-time readOnly: true nullable: true last_modified_at: type: string format: date-time readOnly: true nullable: true ProductBundleLine: type: object properties: id: type: integer readOnly: true product: type: integer product_name: type: string readOnly: true product_id_str: type: string readOnly: true percentage_allocation: type: number format: double maximum: 100.0 minimum: 0.01 component_type: nullable: true description: 'Component type for this line in a mixed-type bundle. NULL = legacy single-type bundle (type inherited from the referencing ContractSubscription/Milestone/Usage). * `SUBSCRIPTION` - Subscription * `MILESTONE` - Milestone * `USAGE` - Usage' oneOf: - $ref: '#/components/schemas/ComponentTypeEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' required: - id - percentage_allocation - product - product_id_str - product_name PaginatedContractMilestoneList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ContractMilestone' PaginatedRevenueTransactionList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/RevenueTransaction' PatchedProduct: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true department_name: type: string readOnly: true invoice_account_name: type: string nullable: true readOnly: true revenue_account_name: type: string nullable: true readOnly: true ar_account_name: type: string nullable: true readOnly: true bad_debt_account_name: type: string nullable: true readOnly: true invoice_unbilled_account_name: type: string nullable: true readOnly: true tax_account_name: type: string readOnly: true tags: type: array items: type: object additionalProperties: {} readOnly: true last_modified_at: type: string format: date-time readOnly: true product_uuid: type: string format: uuid readOnly: true display_name: type: string readOnly: true usage_group_count: type: integer readOnly: true default: 0 usage_groups: type: array items: $ref: '#/components/schemas/ProductUsageGroupSummary' readOnly: true product_id: type: string nullable: true maxLength: 250 product_name: type: string nullable: true maxLength: 250 product_description: type: string nullable: true maxLength: 250 tag_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 tag_group_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 currency: type: string nullable: true maxLength: 3 price: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true cost: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exclude_from_mrr: type: boolean is_taxable: type: boolean is_renewable: type: boolean recognize_revenue: type: boolean description: If False, contract-sync skips the revenue-recognition waterfall for this product (no ContractSubscription / RevenueTransaction rows). is_immediate_recognition: type: boolean description: When true, revenue for this product is recognized in full on the invoice finalization date instead of being amortized over the service period. Used by the Stripe accrual JE waterfall. created_at: type: string format: date-time readOnly: true stripe_product_id: type: string nullable: true maxLength: 250 avalara_item_id: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 nullable: true avalara_item_data: nullable: true avalara_tax_code: type: string nullable: true description: Avalara tax code (e.g., SW052000 for SAAS) maxLength: 50 anrok_item_id: type: string nullable: true maxLength: 250 sphere_item_id: type: string nullable: true maxLength: 250 apply_dept_tag_to_invoice_journals: type: boolean nullable: true description: Apply Department and Tag categorization to all lines on Invoice Journals customer: type: integer readOnly: true department: type: integer nullable: true invoice_account: type: integer nullable: true revenue_account: type: integer nullable: true ar_account: type: integer nullable: true bad_debt_account: type: integer nullable: true invoice_unbilled_account: type: integer nullable: true PaginatedTierPriceOverrideList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/TierPriceOverride' PatchedContractUsage: type: object properties: id: type: integer readOnly: true contract: type: integer product: type: integer nullable: true product_bundle: type: string readOnly: true contract_product_bundle: allOf: - $ref: '#/components/schemas/ContractProductBundleRead' readOnly: true product_name: type: string readOnly: true product_bundle_name: type: string readOnly: true usage_group: type: integer nullable: true usage_group_name: type: string readOnly: true department: type: integer nullable: true tags: type: string description: type: string nullable: true start_date: type: string format: date nullable: true end_date: type: string format: date nullable: true lines: type: string readOnly: true created_at: type: string format: date-time readOnly: true nullable: true last_modified_at: type: string format: date-time readOnly: true nullable: true OverageInvoiceCadenceEnum: enum: - monthly - quarterly - biannual - annual - one_time - custom type: string description: '* `monthly` - Monthly * `quarterly` - Quarterly * `biannual` - Bi Annualy * `annual` - Annual * `one_time` - One Time * `custom` - Custom' ContractProductBundleLineUpdate: type: object description: Serializer for updating individual line amounts. properties: product: type: integer description: Product ID amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: New dollar amount for this product allocation required: - amount - product ContractProductBundle: type: object description: 'Serializer for ContractProductBundle with nested lines. Used for retrieving and updating contract-specific bundle allocations. When updating, validates that line amounts sum to total_amount.' properties: id: type: integer readOnly: true source_bundle: type: integer readOnly: true nullable: true description: Original ProductBundle template this was created from source_bundle_name: type: string readOnly: true nullable: true total_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true description: Total amount to be allocated across products currency: type: string readOnly: true license_term_start_date: type: string format: date nullable: true description: Date the license/service term begins. For SF-ingested mixed bundles, drives the linked subscription start_date and milestone milestone_date. Snapshotted at ingest time for audit. lines: type: array items: $ref: '#/components/schemas/ContractProductBundleLine' created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true required: - created_at - currency - id - last_modified_at - lines - source_bundle - source_bundle_name - total_amount ContractProductBundleUpdate: type: object description: Serializer for the allocation update request body. properties: lines: type: array items: $ref: '#/components/schemas/ContractProductBundleLineUpdate' required: - lines ContractProductBundleRead: type: object description: Read-only serializer for ContractProductBundle in milestone responses. properties: id: type: integer readOnly: true source_bundle: type: integer nullable: true description: Original ProductBundle template this was created from source_bundle_name: type: string readOnly: true nullable: true total_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: Total amount to be allocated across products currency: type: string maxLength: 3 lines: type: array items: $ref: '#/components/schemas/ContractProductBundleLineRead' readOnly: true required: - id - lines - source_bundle_name - total_amount PaginatedProductBundleList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ProductBundle' TierPriceOverrideSourceEnum: enum: - manual - integration type: string description: '* `manual` - Manual entry * `integration` - Integration-driven' Contract: type: object properties: id: type: integer readOnly: true entity_name: type: string readOnly: true client_name: type: string readOnly: true client_terms: type: string readOnly: true department_name: type: string readOnly: true parent_department_name: type: string readOnly: true parent_department: type: integer readOnly: true tags: type: string total_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_mrr: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_deferred_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true currency: type: string default: USD entity_currency: type: string default: USD attachments: type: array items: $ref: '#/components/schemas/File' readOnly: true prepaid_commits: type: array items: $ref: '#/components/schemas/NestedContractPrepaidCommit' writeOnly: true contract_end_date: type: string format: date nullable: true description: Fixed end date for standard contracts. Leave null for evergreen contracts (is_evergreen=true). is_evergreen: type: boolean default: false description: Set true for evergreen contracts (no fixed end date). Evergreen contracts cannot also be auto-renew. Auto-renew is a legacy method to extend contracts. auto_send_invoices: type: boolean default: false description: When true, generated invoices are automatically sent on their invoice date. skip_evergreen_invoice_generation: type: boolean default: false description: For Evergreen contracts only. Set at contract creation; existing contracts cannot change this setting. False means current behavior. True skips only Campfire's auto-generated evergreen invoices; revenue transactions still generate; existing invoices are not cleaned up. auto_apply_customer_stripe_config_to_invoices: type: boolean default: false description: Evergreen contracts only. When true, evergreen-generated invoices inherit stripe_connection and use_stripe_auto_bill from the contract customer. last_modified_at: type: string format: date-time readOnly: true is_deleted: type: string readOnly: true deleted_at: type: string readOnly: true usage_tiers: type: string has_invoices: type: boolean readOnly: true default: false has_journal_entries: type: boolean readOnly: true default: false has_credit_memos: type: boolean readOnly: true default: false effective_end_date: type: string format: date readOnly: true description: Rolling horizon end date for active evergreen contracts. It will be auto-generated by Campfire backend. Null for standard contracts. working_end_date: type: string format: date readOnly: true description: Canonical end date used by the system. Equals contract_end_date for standard or terminated contracts, and effective_end_date for active evergreen contracts. evergreen_locked_date: type: string format: date nullable: true readOnly: true description: Inclusive lock date for evergreen contracts based on paid invoices and close books date. Dates on or before this value are immutable. Null for non-evergreen contracts, or when no financial locking events exist. search_vector: type: string readOnly: true nullable: true search_text: type: string readOnly: true nullable: true billing_frequency: $ref: '#/components/schemas/BillingFrequencyEnum' deal_name: type: string nullable: true maxLength: 250 deal_id: type: string nullable: true maxLength: 250 consultant: type: string nullable: true maxLength: 250 closed_date: type: string format: date nullable: true total_contract_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true contract_start_date: type: string format: date nullable: true exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true crm_link: type: string nullable: true maxLength: 500 contract_link: type: string nullable: true maxLength: 500 status: $ref: '#/components/schemas/ContractStatusEnum' source: $ref: '#/components/schemas/SourceFc1Enum' source_deal_data: nullable: true created_at: type: string format: date-time readOnly: true auto_renew: type: boolean auto_renew_duration: type: integer maximum: 2147483647 minimum: -2147483648 nullable: true auto_renew_invoice: type: boolean tag_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 tag_group_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 minimum_monthly_commitment_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Minimum monthly commitment amount (allowance threshold) minimum_monthly_commitment_quantity: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Minimum monthly commitment quantity (allowance threshold in units) purchase_order_number: type: string nullable: true maxLength: 120 customer: type: integer readOnly: true entity: type: integer nullable: true client: type: integer nullable: true department: type: integer nullable: true journal_entries: type: array items: type: integer required: - attachments - client_name - client_terms - created_at - customer - deleted_at - department_name - effective_end_date - entity_name - evergreen_locked_date - has_credit_memos - has_invoices - has_journal_entries - id - is_deleted - last_modified_at - parent_department - parent_department_name - search_text - search_vector - total_deferred_revenue - total_mrr - total_revenue - working_end_date PaginatedPrepaidUsageEventList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/PrepaidUsageEvent' PrepaidUsageEvent: type: object properties: id: type: integer readOnly: true prepaid_commit: type: integer readOnly: true consumption: type: integer readOnly: true nullable: true external_id: type: string nullable: true description: Source row ID maxLength: 250 event_date: type: string format: date nullable: true description: Event date (dt) period_month: type: string format: date description: First-of-month (dm) total_revenue_dollars: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true total_events: type: integer maximum: 2147483647 minimum: -2147483648 data: description: Flexible key-value pairs for customer-specific columns (team_id, product_feature, model_intent, etc.) adjustment_date: type: string format: date nullable: true description: Date the adjustment was recorded. Null for normal events. is_adjustment: type: boolean original_period_month: type: string format: date nullable: true description: The original period being corrected (only for adjustments) created_at: type: string format: date-time readOnly: true nullable: true required: - consumption - created_at - id - period_month - prepaid_commit BulkContract: type: object properties: deal_name: type: string nullable: true ContractProductBundleLineRead: type: object description: Read-only serializer for ContractProductBundleLine in milestone responses. properties: id: type: integer readOnly: true product: type: integer product_name: type: string readOnly: true amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: Dollar amount allocated to this product percentage: type: string readOnly: true original_percentage: type: number format: double maximum: 1000 minimum: -1000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Original percentage from source ProductBundle for auditing required: - amount - id - percentage - product - product_name ProductUsageGroupSummary: type: object properties: id: type: integer readOnly: true name: type: string nullable: true pricing_model: $ref: '#/components/schemas/PricingModelEnum' unit_of_measure: type: string nullable: true tier_count: type: integer readOnly: true default: 0 tiers: type: array items: $ref: '#/components/schemas/ProductUsageTierSummary' readOnly: true required: - id - tier_count - tiers ProrationMethodEnum: enum: - standard - thirty_day - daily type: string description: '* `standard` - Standard (actual month length) * `thirty_day` - Fixed 30-day month * `daily` - Daily' TermsEnum: enum: - custom - net_5 - net_7 - net_10 - net_15 - net_20 - net_30 - net_40 - net_45 - net_60 - net_90 - net_105 - net_120 - due_on_receipt type: string description: '* `custom` - Custom * `net_5` - Net 5 * `net_7` - Net 7 * `net_10` - Net 10 * `net_15` - Net 15 * `net_20` - Net 20 * `net_30` - Net 30 * `net_40` - Net 40 * `net_45` - Net 45 * `net_60` - Net 60 * `net_90` - Net 90 * `net_105` - Net 105 * `net_120` - Net 120 * `due_on_receipt` - Due on Receipt' RecordConsumptionInput: type: object properties: period_month: type: string format: date description: First day of the consumption month (e.g. 2026-01-01) gross_usage_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true total_events: type: integer default: 0 description: type: string default: '' required: - gross_usage_amount - period_month ContractDuplicateResponse: type: object properties: id: type: integer description: The new contract's ID required: - id File: type: object properties: id: type: integer readOnly: true customer: type: integer readOnly: true created_at: type: string format: date-time readOnly: true created_by: type: integer readOnly: true nullable: true created_by_name: type: string readOnly: true created_by_email: type: string readOnly: true last_modified_at: type: string format: date-time readOnly: true name: type: string url: type: string readOnly: true s3_content_type: type: string nullable: true s3_content_length: type: integer maximum: 2147483647 minimum: 0 nullable: true s3_path: type: string object_id: type: integer maximum: 2147483647 minimum: 0 nullable: true app: type: string readOnly: true model: type: string readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true required: - app - created_at - created_by - created_by_email - created_by_name - customer - deleted_at - id - is_deleted - last_modified_at - model - name - s3_path - url ProductBundle: type: object properties: id: type: integer readOnly: true bundle_name: type: string maxLength: 250 bundle_description: type: string nullable: true maxLength: 250 stripe_product_id: type: string nullable: true maxLength: 255 anrok_item_id: type: string readOnly: true nullable: true lines: type: array items: $ref: '#/components/schemas/ProductBundleLine' created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true required: - anrok_item_id - bundle_name - created_at - deleted_at - id - is_deleted - last_modified_at - lines PatchedContractMilestone: type: object properties: id: type: integer readOnly: true customer: type: integer readOnly: true contract: type: integer product: type: integer nullable: true product_bundle: type: string readOnly: true contract_product_bundle: allOf: - $ref: '#/components/schemas/ContractProductBundleRead' readOnly: true product_name: type: string readOnly: true product_bundle_name: type: string readOnly: true milestone_name: type: string maxLength: 250 milestone_date: type: string format: date amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true quantity: type: number format: double maximum: 10000000000000000 minimum: -10000000000000000 exclusiveMaximum: true exclusiveMinimum: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true description: type: string nullable: true department: type: integer nullable: true department_name: type: string readOnly: true tags: type: array items: type: object additionalProperties: {} readOnly: true revenue_transaction_id: type: integer readOnly: true created_at: type: string format: date-time readOnly: true last_modified_at: type: string readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true ContractCustomer: type: object properties: id: type: integer readOnly: true contacts: type: array items: $ref: '#/components/schemas/VendorContact' parent_name: type: string readOnly: true stripe_connection_name: type: string readOnly: true nullable: true stripe_connection_entity: type: integer readOnly: true nullable: true stripe_connection_portal_url: type: string readOnly: true nullable: true stripe_connection_portal_enabled: type: boolean readOnly: true nullable: true stripe_connection_invoicing_enabled: type: boolean readOnly: true nullable: true vendor_custom_field_1_name: type: string readOnly: true payment_term_name_display: type: string readOnly: true last_modified_at: type: string format: date-time readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true active_contracts: type: integer readOnly: true completed_contracts: type: integer readOnly: true pending_contracts: type: integer readOnly: true total_contracts: type: integer readOnly: true total_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_deferred_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_mrr: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_billed: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_unbilled: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_paid: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_outstanding: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_credit_memos: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true credit_memo_applied: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true credit_memo_available: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true currency: type: string readOnly: true search_vector: type: string readOnly: true nullable: true search_text: type: string readOnly: true nullable: true vendor_type: nullable: true default: vendor title: Payee Type oneOf: - $ref: '#/components/schemas/VendorType391Enum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' name: type: string nullable: true maxLength: 250 dba: type: string nullable: true maxLength: 250 company_name: type: string nullable: true maxLength: 250 website: type: string nullable: true maxLength: 250 first_name: type: string nullable: true maxLength: 250 last_name: type: string nullable: true maxLength: 250 email: type: string format: email nullable: true maxLength: 250 phone_number: type: string nullable: true maxLength: 250 mobile_number: type: string nullable: true maxLength: 250 address_street_1: type: string nullable: true maxLength: 250 address_street_2: type: string nullable: true maxLength: 250 city: type: string nullable: true maxLength: 250 state: type: string nullable: true maxLength: 250 zip_code: type: string nullable: true maxLength: 250 country: type: string nullable: true maxLength: 250 billing_address_street_1: type: string nullable: true maxLength: 250 billing_address_street_2: type: string nullable: true maxLength: 250 billing_city: type: string nullable: true maxLength: 250 billing_state: type: string nullable: true maxLength: 250 billing_zip_code: type: string nullable: true maxLength: 250 billing_country: type: string nullable: true maxLength: 250 shipping_addressee: type: string nullable: true maxLength: 255 billing_addressee: type: string nullable: true maxLength: 255 notes: type: string nullable: true maxLength: 250 business_id_ssn: type: string nullable: true title: Business ID/SSN maxLength: 250 is_1099: type: boolean vat_number: type: string nullable: true maxLength: 250 business_type: type: string nullable: true description: Business type classification (e.g., Korean NTS 업태) maxLength: 250 business_category: type: string nullable: true description: Business category classification (e.g., Korean NTS 종목) maxLength: 250 entity_use_code: type: string nullable: true description: Avalara entity/use code for tax exemptions (e.g., A - Federal Government, B - State/Local Govt) maxLength: 25 withholding_tax_id: type: string nullable: true description: Vendor's tax-authority ID for withholding (PAN for India, TZ for Israel). Dedicated field since these have format/checksum rules distinct from business_id_ssn. maxLength: 250 stripe_customer_id: type: string nullable: true maxLength: 250 use_stripe_auto_bill: type: boolean nullable: true bill_vendor_id: type: string nullable: true maxLength: 250 external_id: type: string nullable: true maxLength: 250 source: nullable: true oneOf: - $ref: '#/components/schemas/Source3b3Enum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' invoice_message: type: string nullable: true abbreviation: type: string nullable: true maxLength: 250 created_at: type: string format: date-time readOnly: true status: $ref: '#/components/schemas/Status372Enum' anrok_customer_id: type: string nullable: true maxLength: 250 terms: nullable: true oneOf: - $ref: '#/components/schemas/TermsEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' invoice_labels: nullable: true invoice_language: type: string nullable: true maxLength: 10 lineage_array: type: array items: type: string maxLength: 50 nullable: true description: Pre-computed lineage array from root to this vendor customer: type: integer parent: type: integer nullable: true stripe_connection: type: integer nullable: true default_expense_category: type: integer nullable: true vendor_custom_field_1: type: integer nullable: true payment_term: type: integer nullable: true description: Payment term for this vendor required: - active_contracts - completed_contracts - created_at - credit_memo_applied - credit_memo_available - currency - customer - deleted_at - id - is_deleted - last_modified_at - name - parent_name - payment_term_name_display - pending_contracts - search_text - search_vector - stripe_connection - stripe_connection_entity - stripe_connection_invoicing_enabled - stripe_connection_name - stripe_connection_portal_enabled - stripe_connection_portal_url - total_billed - total_contracts - total_credit_memos - total_deferred_revenue - total_mrr - total_outstanding - total_paid - total_revenue - total_unbilled - vendor_custom_field_1_name PaginatedProductList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/Product' PaginatedContractUsageList: type: object required: - count - results properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=400&limit=100 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?offset=200&limit=100 results: type: array items: $ref: '#/components/schemas/ContractUsage' VendorType391Enum: enum: - vendor - customer - employee type: string description: '* `vendor` - Vendor * `customer` - Customer * `employee` - Employee' VendorContact: type: object properties: id: type: integer readOnly: true name: type: string nullable: true first_name: type: string nullable: true maxLength: 250 last_name: type: string nullable: true maxLength: 250 email: type: string format: email nullable: true maxLength: 250 phone_number: type: string nullable: true maxLength: 250 mobile_number: type: string nullable: true maxLength: 250 last_modified_at: type: string format: date-time readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true required: - deleted_at - id - is_deleted - last_modified_at Status372Enum: enum: - ACTIVE - INACTIVE type: string description: '* `ACTIVE` - Active * `INACTIVE` - Inactive' NullEnum: enum: - null PatchedContractBundle: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true end_date: type: string format: date nullable: true description: Bundle end date. Required for standard contracts. For evergreen contracts this may be null to follow the contract timeline, or set to a billing-period end date. rebalance_journal_entries_indefinitely: type: boolean default: false description: Should only be used for Evergreen contracts. When true, linked invoice journal entries are rebalanced on each evergreen contract extension. lines: type: array items: $ref: '#/components/schemas/ContractBundleLine' bundle_name: type: string maxLength: 250 bundle_description: type: string nullable: true maxLength: 250 start_date: type: string format: date use_daily_accounting: type: boolean proration_method: $ref: '#/components/schemas/ProrationMethodEnum' use_catchup: type: boolean catchup_date: type: string format: date nullable: true created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true customer: type: integer readOnly: true contract: type: integer NestedContractPrepaidCommit: type: object properties: entity: type: integer nullable: true product: type: integer nullable: true name: type: string maxLength: 250 description: type: string default: '' currency: type: string nullable: true exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true discount_percentage: type: number format: double maximum: 1000 minimum: -1000 exclusiveMaximum: true exclusiveMinimum: true default: 0.0 rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true start_date: type: string format: date expiration_date: type: string format: date nullable: true priority: type: integer default: 1 subledger: type: integer nullable: true overage_invoice_cadence: $ref: '#/components/schemas/OverageInvoiceCadenceEnum' auto_send_overage_invoices: type: boolean default: false overage_invoice_start_month: type: string format: date nullable: true department: type: integer nullable: true tags: type: array items: type: integer required: - name - start_date - total_value ContractPrepaidCommitConsumption: type: object properties: id: type: integer readOnly: true prepaid_commit: type: integer readOnly: true entity: type: integer readOnly: true nullable: true period_start: type: string format: date period_end: type: string format: date readOnly: true description: type: string nullable: true currency: type: string readOnly: true gross_usage_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: Pre-discount total from source data discount_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true description: gross_usage_amount * discount_percentage / 100 net_consumption_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true description: Pool drawdown amount (gross - discount) overage_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true description: Amount beyond pool at full rate total_events: type: integer maximum: 2147483647 minimum: -2147483648 balance_before: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true description: Pool balance before this period balance_after: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true description: Pool balance after this period revenue_transaction: type: integer readOnly: true nullable: true description: Recognized revenue for included (prepaid) portion overage_revenue_transaction: type: integer readOnly: true nullable: true description: Recognized revenue for overage portion adjustments: type: array items: type: object additionalProperties: {} description: Return adjustments recorded during this period, grouped by original period with gross/discount/net/overage split. readOnly: true created_at: type: string format: date-time readOnly: true nullable: true last_modified_at: type: string format: date-time readOnly: true nullable: true required: - adjustments - balance_after - balance_before - created_at - currency - discount_amount - entity - gross_usage_amount - id - last_modified_at - net_consumption_amount - overage_amount - overage_revenue_transaction - period_end - period_start - prepaid_commit - revenue_transaction ContractPrepaidCommit: type: object properties: id: type: integer readOnly: true contract: type: integer readOnly: true entity: type: integer nullable: true entity_name: type: string readOnly: true nullable: true product: type: integer nullable: true product_name: type: string readOnly: true nullable: true name: type: string maxLength: 250 description: type: string nullable: true currency: type: string maxLength: 3 exchange_rate: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exchange_rate_book: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true remaining_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true discount_percentage: type: number format: double maximum: 100.0 minimum: 0.0 description: Discount applied to gross usage (e.g. 20.00 for 20%) rate: type: number format: double maximum: 100000000000000 minimum: 0.0 exclusiveMaximum: true nullable: true description: List price per unit. Prepaid usage = rate * (1 - discount%). Overage = rate (no discount). start_date: type: string format: date expiration_date: type: string format: date nullable: true status: allOf: - $ref: '#/components/schemas/ContractPrepaidCommitStatusEnum' readOnly: true priority: type: integer maximum: 2147483647 minimum: -2147483648 description: Drawdown order when multiple commits exist (lower = higher priority) is_invoiced: type: boolean readOnly: true invoice: type: integer readOnly: true nullable: true subledger: type: integer nullable: true overage_invoice_cadence: allOf: - $ref: '#/components/schemas/OverageInvoiceCadenceEnum' description: 'How often overage/on-demand usage is invoiced * `monthly` - Monthly * `quarterly` - Quarterly * `biannual` - Bi Annualy * `annual` - Annual * `one_time` - One Time * `custom` - Custom' auto_send_overage_invoices: type: boolean description: Automatically send overage invoices when generated overage_invoice_start_month: type: string format: date nullable: true description: Anchor date for overage billing cycles. Defaults to start_date. department: type: integer nullable: true department_name: type: string readOnly: true nullable: true tags: type: string nullable: true created_at: type: string format: date-time readOnly: true nullable: true last_modified_at: type: string format: date-time readOnly: true nullable: true required: - contract - created_at - department_name - entity_name - id - invoice - is_invoiced - last_modified_at - name - product_name - remaining_value - start_date - status - total_value ContractPrepaidCommitStatusEnum: enum: - ACTIVE - EXHAUSTED - EXPIRED type: string description: '* `ACTIVE` - Active * `EXHAUSTED` - Exhausted * `EXPIRED` - Expired' Product: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true department_name: type: string readOnly: true invoice_account_name: type: string nullable: true readOnly: true revenue_account_name: type: string nullable: true readOnly: true ar_account_name: type: string nullable: true readOnly: true bad_debt_account_name: type: string nullable: true readOnly: true invoice_unbilled_account_name: type: string nullable: true readOnly: true tax_account_name: type: string readOnly: true tags: type: array items: type: object additionalProperties: {} readOnly: true last_modified_at: type: string format: date-time readOnly: true product_uuid: type: string format: uuid readOnly: true display_name: type: string readOnly: true usage_group_count: type: integer readOnly: true default: 0 usage_groups: type: array items: $ref: '#/components/schemas/ProductUsageGroupSummary' readOnly: true product_id: type: string nullable: true maxLength: 250 product_name: type: string nullable: true maxLength: 250 product_description: type: string nullable: true maxLength: 250 tag_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 tag_group_ids: type: array items: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 currency: type: string nullable: true maxLength: 3 price: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true cost: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true exclude_from_mrr: type: boolean is_taxable: type: boolean is_renewable: type: boolean recognize_revenue: type: boolean description: If False, contract-sync skips the revenue-recognition waterfall for this product (no ContractSubscription / RevenueTransaction rows). is_immediate_recognition: type: boolean description: When true, revenue for this product is recognized in full on the invoice finalization date instead of being amortized over the service period. Used by the Stripe accrual JE waterfall. created_at: type: string format: date-time readOnly: true stripe_product_id: type: string nullable: true maxLength: 250 avalara_item_id: type: integer maximum: 9223372036854775807 minimum: -9223372036854775808 format: int64 nullable: true avalara_item_data: nullable: true avalara_tax_code: type: string nullable: true description: Avalara tax code (e.g., SW052000 for SAAS) maxLength: 50 anrok_item_id: type: string nullable: true maxLength: 250 sphere_item_id: type: string nullable: true maxLength: 250 apply_dept_tag_to_invoice_journals: type: boolean nullable: true description: Apply Department and Tag categorization to all lines on Invoice Journals customer: type: integer readOnly: true department: type: integer nullable: true invoice_account: type: integer nullable: true revenue_account: type: integer nullable: true ar_account: type: integer nullable: true bad_debt_account: type: integer nullable: true invoice_unbilled_account: type: integer nullable: true required: - ar_account_name - bad_debt_account_name - created_at - customer - deleted_at - department_name - display_name - id - invoice_account_name - invoice_unbilled_account_name - is_deleted - last_modified_at - product_uuid - revenue_account_name - tags - tax_account_name - usage_group_count - usage_groups TerminateContract: type: object properties: termination_date: type: string format: date void_invoice_ids: type: array items: type: integer description: List of invoice IDs to void atomically when terminating the contract. void_date: type: string format: date description: Date to use when voiding invoices. Required when void_invoice_ids is provided. required: - termination_date RenewalBehaviorEnum: enum: - FOLLOW_CONTRACT - FIXED_END type: string description: '* `FOLLOW_CONTRACT` - Follow Contract * `FIXED_END` - Fixed End Date' ContractSubscriptionLine: type: object properties: id: type: integer nullable: true start_date: type: string format: date end_date: type: string format: date original_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true original_mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true original_quantity: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true quantity: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true original_rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true use_daily_accounting: type: boolean default: false is_contract_amendment: type: boolean default: false required: - end_date - start_date - total_value PatchedProductBundle: type: object properties: id: type: integer readOnly: true bundle_name: type: string maxLength: 250 bundle_description: type: string nullable: true maxLength: 250 stripe_product_id: type: string nullable: true maxLength: 255 anrok_item_id: type: string readOnly: true nullable: true lines: type: array items: $ref: '#/components/schemas/ProductBundleLine' created_at: type: string format: date-time readOnly: true last_modified_at: type: string format: date-time readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true PatchedContractCustomer: type: object properties: id: type: integer readOnly: true contacts: type: array items: $ref: '#/components/schemas/VendorContact' parent_name: type: string readOnly: true stripe_connection_name: type: string readOnly: true nullable: true stripe_connection_entity: type: integer readOnly: true nullable: true stripe_connection_portal_url: type: string readOnly: true nullable: true stripe_connection_portal_enabled: type: boolean readOnly: true nullable: true stripe_connection_invoicing_enabled: type: boolean readOnly: true nullable: true vendor_custom_field_1_name: type: string readOnly: true payment_term_name_display: type: string readOnly: true last_modified_at: type: string format: date-time readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true active_contracts: type: integer readOnly: true completed_contracts: type: integer readOnly: true pending_contracts: type: integer readOnly: true total_contracts: type: integer readOnly: true total_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_deferred_revenue: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_mrr: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_billed: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_unbilled: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_paid: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_outstanding: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true total_credit_memos: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true credit_memo_applied: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true credit_memo_available: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true currency: type: string readOnly: true search_vector: type: string readOnly: true nullable: true search_text: type: string readOnly: true nullable: true vendor_type: nullable: true default: vendor title: Payee Type oneOf: - $ref: '#/components/schemas/VendorType391Enum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' name: type: string nullable: true maxLength: 250 dba: type: string nullable: true maxLength: 250 company_name: type: string nullable: true maxLength: 250 website: type: string nullable: true maxLength: 250 first_name: type: string nullable: true maxLength: 250 last_name: type: string nullable: true maxLength: 250 email: type: string format: email nullable: true maxLength: 250 phone_number: type: string nullable: true maxLength: 250 mobile_number: type: string nullable: true maxLength: 250 address_street_1: type: string nullable: true maxLength: 250 address_street_2: type: string nullable: true maxLength: 250 city: type: string nullable: true maxLength: 250 state: type: string nullable: true maxLength: 250 zip_code: type: string nullable: true maxLength: 250 country: type: string nullable: true maxLength: 250 billing_address_street_1: type: string nullable: true maxLength: 250 billing_address_street_2: type: string nullable: true maxLength: 250 billing_city: type: string nullable: true maxLength: 250 billing_state: type: string nullable: true maxLength: 250 billing_zip_code: type: string nullable: true maxLength: 250 billing_country: type: string nullable: true maxLength: 250 shipping_addressee: type: string nullable: true maxLength: 255 billing_addressee: type: string nullable: true maxLength: 255 notes: type: string nullable: true maxLength: 250 business_id_ssn: type: string nullable: true title: Business ID/SSN maxLength: 250 is_1099: type: boolean vat_number: type: string nullable: true maxLength: 250 business_type: type: string nullable: true description: Business type classification (e.g., Korean NTS 업태) maxLength: 250 business_category: type: string nullable: true description: Business category classification (e.g., Korean NTS 종목) maxLength: 250 entity_use_code: type: string nullable: true description: Avalara entity/use code for tax exemptions (e.g., A - Federal Government, B - State/Local Govt) maxLength: 25 withholding_tax_id: type: string nullable: true description: Vendor's tax-authority ID for withholding (PAN for India, TZ for Israel). Dedicated field since these have format/checksum rules distinct from business_id_ssn. maxLength: 250 stripe_customer_id: type: string nullable: true maxLength: 250 use_stripe_auto_bill: type: boolean nullable: true bill_vendor_id: type: string nullable: true maxLength: 250 external_id: type: string nullable: true maxLength: 250 source: nullable: true oneOf: - $ref: '#/components/schemas/Source3b3Enum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' invoice_message: type: string nullable: true abbreviation: type: string nullable: true maxLength: 250 created_at: type: string format: date-time readOnly: true status: $ref: '#/components/schemas/Status372Enum' anrok_customer_id: type: string nullable: true maxLength: 250 terms: nullable: true oneOf: - $ref: '#/components/schemas/TermsEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' invoice_labels: nullable: true invoice_language: type: string nullable: true maxLength: 10 lineage_array: type: array items: type: string maxLength: 50 nullable: true description: Pre-computed lineage array from root to this vendor customer: type: integer parent: type: integer nullable: true stripe_connection: type: integer nullable: true default_expense_category: type: integer nullable: true vendor_custom_field_1: type: integer nullable: true payment_term: type: integer nullable: true description: Payment term for this vendor PatchedContractSubscription: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true lines: type: string readOnly: true product_name: type: string readOnly: true product_is_renewable: type: boolean readOnly: true nullable: true product_bundle: type: string readOnly: true product_bundle_name: type: string readOnly: true contract_product_bundle: allOf: - $ref: '#/components/schemas/ContractProductBundleRead' readOnly: true total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true last_modified_at: type: string format: date-time readOnly: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true quantity: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true renewal_behavior: allOf: - $ref: '#/components/schemas/RenewalBehaviorEnum' description: 'Controls how this subscription ends. FOLLOW_CONTRACT extends with the evergreen contract''s rolling end boundary (working_end_date / effective_end_date). FIXED_END keeps an explicit subscription end_date. Default is FIXED_END. * `FOLLOW_CONTRACT` - Follow Contract * `FIXED_END` - Fixed End Date' period_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Evergreen-only input amount per billing period (for example 10000.00 for a quarterly period). Provide this to auto-generate lines for evergreen subscriptions. Ignored for non-evergreen writes. invoiced_amount_migration: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true writeOnly: true nullable: true description: 'Migration-only: total amount already invoiced in a prior system. When provided, marks revenue transactions as migration-invoiced up to this amount.' is_contract_amendment: type: boolean start_date: type: string format: date nullable: true end_date: type: string format: date nullable: true mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true discount: type: number format: double maximum: 10000000000000 minimum: 0.0 exclusiveMaximum: true nullable: true description: Per-unit discount in contract currency. Line amount is Quantity × (Rate − Discount). Null when no discount is configured. notes: type: string nullable: true use_daily_accounting: type: boolean proration_method: $ref: '#/components/schemas/ProrationMethodEnum' use_catchup: type: boolean catchup_date: type: string format: date nullable: true catchup_manually_overridden: type: boolean description: True when a user explicitly set use_catchup or catchup_date via the modal. Suppresses automatic reconciliation by integration syncs so the user's choice survives. invoice_calculation: allOf: - $ref: '#/components/schemas/InvoiceCalculationEnum' description: 'Fixed Rate: rate stays constant, quantity calculated. Fixed Quantity: quantity stays constant (e.g., seats), rate calculated. * `FIXED_RATE` - Fixed Rate * `FIXED_QUANTITY` - Fixed Quantity' created_at: type: string format: date-time readOnly: true source: $ref: '#/components/schemas/SourceFc1Enum' external_id: type: string nullable: true maxLength: 250 rates_are_net: type: boolean description: When True, this subscription's rate and waterfall amounts already reflect post-discount (net) pricing. Prevents invoice creation from double-counting discounts via a separate Discount RevenueTransaction. customer: type: integer readOnly: true contract: type: integer product: type: integer nullable: true modified_subscription: type: integer nullable: true PatchedContractProductBundleUpdate: type: object description: Serializer for the allocation update request body. properties: lines: type: array items: $ref: '#/components/schemas/ContractProductBundleLineUpdate' ContractProductBundleLine: type: object description: Serializer for individual product allocation lines within a ContractProductBundle. properties: id: type: integer readOnly: true product: type: integer readOnly: true product_name: type: string readOnly: true product_id_str: type: string readOnly: true amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true description: Dollar amount allocated to this product percentage: type: string readOnly: true description: Calculated percentage based on amount / total original_percentage: type: number format: double maximum: 1000 minimum: -1000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true nullable: true description: Original percentage from source ProductBundle for auditing component_type: readOnly: true nullable: true description: 'Snapshotted from ProductBundleLine.component_type at snapshot time. NULL = legacy single-type bundle. * `SUBSCRIPTION` - Subscription * `MILESTONE` - Milestone * `USAGE` - Usage' oneOf: - $ref: '#/components/schemas/ComponentTypeEnum' - $ref: '#/components/schemas/NullEnum' required: - amount - component_type - id - original_percentage - percentage - product - product_id_str - product_name ContractSubscription: type: object properties: id: type: integer readOnly: true is_deleted: type: boolean readOnly: true default: false deleted_at: type: string format: date-time readOnly: true nullable: true lines: type: string readOnly: true product_name: type: string readOnly: true product_is_renewable: type: boolean readOnly: true nullable: true product_bundle: type: string readOnly: true product_bundle_name: type: string readOnly: true contract_product_bundle: allOf: - $ref: '#/components/schemas/ContractProductBundleRead' readOnly: true total_value: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true readOnly: true last_modified_at: type: string format: date-time readOnly: true rate: type: number format: double maximum: 10000000000000 minimum: -10000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true quantity: type: number format: double maximum: 100000000000000 minimum: -100000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true renewal_behavior: allOf: - $ref: '#/components/schemas/RenewalBehaviorEnum' description: 'Controls how this subscription ends. FOLLOW_CONTRACT extends with the evergreen contract''s rolling end boundary (working_end_date / effective_end_date). FIXED_END keeps an explicit subscription end_date. Default is FIXED_END. * `FOLLOW_CONTRACT` - Follow Contract * `FIXED_END` - Fixed End Date' period_amount: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true description: Evergreen-only input amount per billing period (for example 10000.00 for a quarterly period). Provide this to auto-generate lines for evergreen subscriptions. Ignored for non-evergreen writes. invoiced_amount_migration: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true writeOnly: true nullable: true description: 'Migration-only: total amount already invoiced in a prior system. When provided, marks revenue transactions as migration-invoiced up to this amount.' is_contract_amendment: type: boolean start_date: type: string format: date nullable: true end_date: type: string format: date nullable: true mrr: type: number format: double maximum: 1000000000000000000 minimum: -1000000000000000000 exclusiveMaximum: true exclusiveMinimum: true nullable: true discount: type: number format: double maximum: 10000000000000 minimum: 0.0 exclusiveMaximum: true nullable: true description: Per-unit discount in contract currency. Line amount is Quantity × (Rate − Discount). Null when no discount is configured. notes: type: string nullable: true use_daily_accounting: type: boolean proration_method: $ref: '#/components/schemas/ProrationMethodEnum' use_catchup: type: boolean catchup_date: type: string format: date nullable: true catchup_manually_overridden: type: boolean description: True when a user explicitly set use_catchup or catchup_date via the modal. Suppresses automatic reconciliation by integration syncs so the user's choice survives. invoice_calculation: allOf: - $ref: '#/components/schemas/InvoiceCalculationEnum' description: 'Fixed Rate: rate stays constant, quantity calculated. Fixed Quantity: quantity stays constant (e.g., seats), rate calculated. * `FIXED_RATE` - Fixed Rate * `FIXED_QUANTITY` - Fixed Quantity' created_at: type: string format: date-time readOnly: true source: $ref: '#/components/schemas/SourceFc1Enum' external_id: type: string nullable: true maxLength: 250 rates_are_net: type: boolean description: When True, this subscription's rate and waterfall amounts already reflect post-discount (net) pricing. Prevents invoice creation from double-counting discounts via a separate Discount RevenueTransaction. customer: type: integer readOnly: true contract: type: integer product: type: integer nullable: true modified_subscription: type: integer nullable: true required: - contract - contract_product_bundle - created_at - customer - deleted_at - id - is_deleted - last_modified_at - lines - product_bundle - product_bundle_name - product_is_renewable - product_name - total_value securitySchemes: knoxApiToken: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token"