/** * Generated by orval v8.5.3 🍺 * Do not edit manually. * Space Invoices API * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking. * OpenAPI spec version: 1.0.0 */ import type { CreateDocumentCustomer } from './createDocumentCustomer'; import type { CreateFinaInvoiceData } from './createFinaInvoiceData'; import type { DocumentEntity } from './documentEntity'; import type { PartialCreditNotePreviewCalculationMode } from './partialCreditNotePreviewCalculationMode'; import type { PartialCreditNotePreviewItemsItem } from './partialCreditNotePreviewItemsItem'; import type { PartialCreditNotePreviewMetadata } from './partialCreditNotePreviewMetadata'; import type { PtDocumentInput } from './ptDocumentInput'; export interface PartialCreditNotePreview { /** Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize. */ is_draft?: boolean; /** * Document date in YYYY-MM-DD format * @pattern ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$ */ date?: string; issuer?: DocumentEntity; /** * Referenced Customer ID. Required if customer is not provided. * @nullable */ customer_id?: string | null; customer?: CreateDocumentCustomer; /** * Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note. * @nullable */ note?: string | null; /** * Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms. * @nullable */ payment_terms?: string | null; /** * Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause. * @nullable */ tax_clause?: string | null; /** * @maxLength 500 * @nullable */ footer?: string | null; /** * Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature. * @nullable */ signature?: string | null; /** * Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`. * @nullable */ calculation_mode?: PartialCreditNotePreviewCalculationMode; /** @maxLength 3 */ currency_code?: string; /** * Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data. * @nullable */ metadata?: PartialCreditNotePreviewMetadata; /** * Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one. * @nullable */ reference?: string | null; pt?: PtDocumentInput | null; /** * Service date in YYYY-MM-DD format. For invoices and credit notes. * @nullable * @pattern ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$ */ date_service?: string | null; /** * Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges. * @nullable * @pattern ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$ */ date_service_to?: string | null; /** * Document due date in YYYY-MM-DD format * @nullable * @pattern ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$ */ date_due?: string | null; /** @minItems 1 */ items: PartialCreditNotePreviewItemsItem[]; /** * Link this credit note to invoices. Accepts invoice IDs (inv_xxx). Creates 'credit_for' document relations. If no payment is specified and linked invoices have remaining balance, automatically applies the credit note to the invoices. * @nullable */ linked_documents?: string[] | null; fina?: CreateFinaInvoiceData | null; /** * Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is ±1.00. Useful when importing invoices from external systems with different rounding rules. * @exclusiveMinimum 0 * @nullable */ expected_total_with_tax?: number | null; } //# sourceMappingURL=partialCreditNotePreview.d.ts.map