{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/highlevel/main/json-schema/highlevel-create-estimates-dto-schema.json", "title": "CreateEstimatesDto", "x-generated": "2026-09-22", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/_original/highlevel-invoices-openapi.json#/components/schemas/CreateEstimatesDto", "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Estimate Name" }, "businessDetails": { "$ref": "#/$defs/BusinessDetailsDto" }, "currency": { "type": "string", "description": "Currency code" }, "items": { "description": "An array of items for the estimate.", "type": "array", "items": { "$ref": "#/$defs/EstimateLineItemDto" } }, "liveMode": { "type": "boolean", "description": "livemode for estimate", "default": true }, "discount": { "$ref": "#/$defs/DiscountDto" }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups" }, "title": { "type": "string", "description": "Title for the estimate" }, "contactDetails": { "description": "Contact information to send the estimate to", "allOf": [ { "$ref": "#/$defs/ContactDetailsDto" } ] }, "estimateNumber": { "type": "number", "description": "Estimate Number, if not specified will take in the next valid estimate number" }, "issueDate": { "type": "string", "description": "issue date estimate" }, "expiryDate": { "type": "string", "description": "expiry date estimate" }, "sentTo": { "description": "Email and sent to details for the estimate", "allOf": [ { "$ref": "#/$defs/SentToDto" } ] }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Estimate", "default": false }, "meta": { "type": "object", "description": "Meta data for the estimate" }, "sendEstimateDetails": { "description": "When sending estimate directly while saving", "allOf": [ { "$ref": "#/$defs/SendEstimateDto" } ] }, "frequencySettings": { "description": "frequency settings for the estimate", "allOf": [ { "$ref": "#/$defs/FrequencySettingsDto" } ] }, "estimateNumberPrefix": { "type": "string", "description": "Prefix for the estimate number", "default": "EST-" }, "userId": { "type": "string", "description": "User Id" }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/$defs/AttachmentsDto" } }, "autoInvoice": { "description": "Auto invoice for the estimate", "allOf": [ { "$ref": "#/$defs/AutoInvoicingDto" } ] }, "miscellaneousCharges": { "description": "miscellaneous charges for the estimate", "allOf": [ { "$ref": "#/$defs/ProcessingFeeDto" } ] }, "paymentScheduleConfig": { "description": "Payment Schedule Config for the estimate", "allOf": [ { "$ref": "#/$defs/PaymentScheduleConfigDto" } ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items", "discount", "contactDetails", "frequencySettings" ], "$defs": { "AdditionalEmailsDto": { "type": "object", "properties": { "email": { "type": "string" } }, "required": [ "email" ] }, "AddressDto": { "type": "object", "properties": { "addressLine1": { "type": "string", "description": "Address Line 1" }, "addressLine2": { "type": "string", "description": "Address Line 2" }, "city": { "type": "string", "description": "City" }, "state": { "type": "string", "description": "State" }, "countryCode": { "type": "string", "description": "Country Code" }, "postalCode": { "type": "string", "description": "Postal Code" } } }, "AttachmentsDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Id of the file selected" }, "name": { "type": "string", "description": "Name of the file " }, "url": { "type": "string", "description": "URL of the file" }, "type": { "type": "string", "description": "Type of the file" }, "size": { "type": "number", "description": "Size of the file" } }, "required": [ "id", "name", "url", "type", "size" ] }, "AutoInvoicingDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Enable Auto Invoice" }, "directPayments": { "type": "boolean", "description": "Direct Payments" } }, "required": [ "enabled" ] }, "BusinessDetailsDto": { "type": "object", "properties": { "logoUrl": { "type": "string", "description": "Business Logo URL" }, "name": { "type": "string", "description": "Business Name" }, "phoneNo": { "type": "string", "description": "Business Phone Number" }, "address": { "description": "Business Address", "allOf": [ { "$ref": "#/$defs/AddressDto" } ] }, "website": { "type": "string", "description": "Business Website Link" }, "customValues": { "description": "Custom Values", "type": "array", "items": { "type": "string" } } } }, "ContactDetailsDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Contact ID" }, "name": { "type": "string", "description": "Contact Name" }, "phoneNo": { "type": "string", "description": "Contact Phone Number" }, "email": { "type": "string", "description": "Contact Email" }, "additionalEmails": { "description": "Secondary email addresses for the contact to be saved", "type": "array", "items": { "$ref": "#/$defs/AdditionalEmailsDto" } }, "companyName": { "type": "string", "description": "Contact Company Name" }, "address": { "$ref": "#/$defs/AddressDto" }, "customFields": { "description": "Custom Values", "type": "array", "items": { "type": "string" } } }, "required": [ "id", "name", "phoneNo", "email" ] }, "CustomRRuleOptionsDto": { "type": "object", "properties": { "intervalType": { "type": "string", "enum": [ "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly" ] }, "interval": { "type": "number" }, "startDate": { "type": "string", "description": "Start date in YYYY-MM-DD format" }, "startTime": { "type": "string", "description": "Start time in HH:mm:ss format" }, "endDate": { "type": "string", "description": "End date in YYYY-MM-DD format" }, "endTime": { "type": "string", "description": "End time in HH:mm:ss format" }, "dayOfMonth": { "type": "number", "description": "-1, 1, 2, 3, ..., 27, 28" }, "dayOfWeek": { "type": "string", "enum": [ "mo", "tu", "we", "th", "fr", "sa", "su" ] }, "numOfWeek": { "type": "number", "description": "-1, 1, 2, 3, 4" }, "monthOfYear": { "type": "string", "enum": [ "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" ] }, "count": { "type": "number", "description": "Max number of task executions" }, "daysBefore": { "type": "number", "description": "Execute task number of days before" }, "useStartAsPrimaryUserAccepted": { "type": "boolean", "description": "Start as primary user accepted date" }, "endType": { "type": "string", "description": "End type like after, by, count" } }, "required": [ "intervalType", "interval", "startDate" ] }, "DiscountDto": { "type": "object", "properties": { "value": { "type": "number", "description": "Discount Value", "default": 0 }, "type": { "type": "string", "description": "Discount type", "enum": [ "percentage", "fixed" ], "default": "percentage" }, "validOnProductIds": { "description": "Product Ids on which discount is applicable", "type": "array", "items": { "type": "string" } } }, "required": [ "type" ] }, "EstimateLineItemDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Invoice Item Name" }, "description": { "type": "string", "description": "Invoice descriptions" }, "productId": { "type": "string", "description": "Product Id" }, "priceId": { "type": "string", "description": "Price Id" }, "currency": { "type": "string", "description": "Currency" }, "amount": { "type": "number", "description": "Product amount" }, "qty": { "type": "number", "description": "Product Quantity" }, "taxes": { "description": "Tax", "type": "array", "items": { "$ref": "#/$defs/ItemTaxDto" } }, "automaticTaxCategoryId": { "type": "string", "description": "Tax category id for calculating automatic tax" }, "isSetupFeeItem": { "type": "boolean", "description": "Setupfee item, only created when 1st invoice of recurring schedule is generated" }, "type": { "type": "string", "description": "Price type of the item", "enum": [ "one_time", "recurring" ] }, "taxInclusive": { "type": "boolean", "description": "true if item amount is tax inclusive", "default": false }, "attachments": { "description": "Attachments for the line item", "type": "array", "items": { "type": "string" } } }, "required": [ "name", "currency", "amount", "qty" ] }, "FrequencySettingsDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "enabled for the frequency settings" }, "schedule": { "description": "schedule setting for the estimate", "allOf": [ { "$ref": "#/$defs/ScheduleOptionsDto" } ] } }, "required": [ "enabled", "schedule" ] }, "InvoiceSettingsSenderConfigurationDto": { "type": "object", "properties": { "fromName": { "type": "string", "description": "Sender name to be used while sending email notification" }, "fromEmail": { "type": "string", "description": "Email id to be used while sending email notification" } } }, "ItemTaxDto": { "type": "object", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "rate": { "type": "number" }, "calculation": { "type": "string", "enum": [ "exclusive" ] }, "description": { "type": "string" }, "taxId": { "type": "string" } }, "required": [ "_id", "name", "rate" ] }, "PaymentScheduleConfigDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Payment Schedule Type", "enum": [ "fixed", "percentage" ] }, "dateConfig": { "description": "Due date type configuration", "allOf": [ { "$ref": "#/$defs/PaymentScheduleDateConfigDto" } ] }, "schedules": { "description": "Payment Schedule Items", "items": { "type": "array" }, "type": "array" } }, "required": [ "type", "dateConfig", "schedules" ] }, "PaymentScheduleDateConfigDto": { "type": "object", "properties": { "depositDateType": { "type": "string", "description": "Deposit date type", "enum": [ "estimate_accepted", "custom" ] }, "scheduleDateType": { "type": "string", "description": "Payment Schedule Date Type", "enum": [ "regular_interval", "custom" ] } }, "required": [ "depositDateType", "scheduleDateType" ] }, "ProcessingFeeDto": { "type": "object", "properties": { "charges": { "description": "charges for the processing fee", "items": { "type": "array" }, "type": "array" }, "collectedMiscellaneousCharges": { "type": "number", "description": "collected miscellaneous charges" }, "paidCharges": { "description": "paid miscellaneous charges", "type": "array", "items": { "$ref": "#/$defs/ProcessingFeePaidChargeDto" } } }, "required": [ "charges" ] }, "ProcessingFeePaidChargeDto": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the processing fee" }, "charge": { "type": "number", "description": "charge for the processing fee" }, "amount": { "type": "number", "description": "amount of the processing fee" }, "_id": { "type": "string", "description": "id of the processing fee" } }, "required": [ "name", "charge", "amount", "_id" ] }, "ScheduleOptionsDto": { "type": "object", "properties": { "executeAt": { "type": "string" }, "rrule": { "$ref": "#/$defs/CustomRRuleOptionsDto" } } }, "SendEstimateDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id" }, "altType": { "type": "string", "enum": [ "location" ] }, "action": { "type": "string", "enum": [ "sms_and_email", "send_manually", "email", "sms" ] }, "liveMode": { "type": "boolean", "description": "livemode for estimate" }, "userId": { "type": "string", "description": "Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this location. This account will serve as the primary channel for all future communications and updates." }, "sentFrom": { "description": "sender details for invoice, valid only if invoice is not sent manually", "allOf": [ { "$ref": "#/$defs/InvoiceSettingsSenderConfigurationDto" } ] }, "estimateName": { "type": "string", "description": "estimate name" } }, "required": [ "altId", "altType", "action", "liveMode", "userId" ] }, "SentToDto": { "type": "object", "properties": { "email": { "description": "Email Address", "type": "array", "items": { "type": "string" } }, "emailCc": { "description": "cc to be kept in any sent out emails", "type": "array", "items": { "type": "string" } }, "emailBcc": { "description": "bcc to be kept in any sent out emails", "type": "array", "items": { "type": "string" } }, "phoneNo": { "description": "Contact Phone Number", "type": "array", "items": { "type": "string" } } }, "required": [ "email" ] } } }