{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/ordway/main/json-schema/customer.json", "title": "Customer", "description": "An Ordway billing customer account", "type": "object", "required": ["company_id", "customer_id"], "properties": { "company_id": { "type": "string", "description": "Identifier for the Ordway company account" }, "customer_id": { "type": "string", "description": "Unique identifier for the customer" }, "name": { "type": ["string", "null"], "description": "Display name of the customer" }, "description": { "type": ["string", "null"], "description": "Description or notes about the customer" }, "parent_customer": { "type": ["string", "null"], "description": "ID of the parent customer for hierarchical billing" }, "website": { "type": ["string", "null"], "description": "Customer website URL" }, "payment_terms": { "type": ["string", "null"], "description": "Default payment terms (e.g., Net 30)" }, "billing_cycle_day": { "type": ["string", "null"], "description": "Day of month for billing cycle alignment" }, "billing_contact_id": { "type": ["string", "null"], "description": "ID of the billing contact" }, "shipping_contact_id": { "type": ["string", "null"], "description": "ID of the shipping contact" }, "status": { "type": ["string", "null"], "enum": ["active", "inactive", null], "description": "Customer account status" }, "tax_exempt": { "type": ["boolean", "null"], "description": "Whether the customer is exempt from taxes" }, "balance": { "type": ["number", "null"], "description": "Current outstanding balance" }, "auto_pay": { "type": ["boolean", "null"], "description": "Whether to automatically collect payments" }, "currency": { "type": ["string", "null"], "description": "Default billing currency (ISO 4217 code)" }, "cmrr": { "type": ["number", "null"], "description": "Contracted Monthly Recurring Revenue" }, "discounted_cmrr": { "type": ["number", "null"], "description": "Contracted Monthly Recurring Revenue after discounts" }, "carr": { "type": ["number", "null"], "description": "Contracted Annual Recurring Revenue" }, "discounted_carr": { "type": ["number", "null"], "description": "Contracted Annual Recurring Revenue after discounts" }, "delivery_preferences": { "type": ["object", "null"], "description": "Invoice delivery preferences", "properties": { "print": { "type": "boolean", "description": "Whether to deliver invoices by print/mail" }, "email": { "type": "boolean", "description": "Whether to deliver invoices by email" } } }, "billing_contact_email": { "type": ["string", "null"], "format": "email", "description": "Email address of the billing contact" }, "shipping_contact_email": { "type": ["string", "null"], "format": "email", "description": "Email address of the shipping contact" }, "portal_status": { "type": ["string", "null"], "description": "Status of the customer self-service portal access" }, "integration_status": { "type": ["string", "null"], "description": "Status of external system integration (e.g., Salesforce, NetSuite)" }, "custom_fields": { "type": ["object", "null"], "additionalProperties": true, "description": "User-defined custom fields" }, "created_by": { "type": ["string", "null"], "description": "User who created the record" }, "updated_by": { "type": ["string", "null"], "description": "User who last updated the record" }, "created_date": { "type": ["string", "null"], "format": "date-time", "description": "Timestamp when the record was created" }, "updated_date": { "type": ["string", "null"], "format": "date-time", "description": "Timestamp when the record was last updated" } }, "additionalProperties": false }