# Update Estimate

PUT https://services.leadconnectorhq.com/invoices/estimate/{estimateId}

Update an existing estimate with new details

## Authentication

Send `Authorization: Bearer <token>` using any one of:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `invoices/estimate.write`
- **Agency token: OAuth access token or Private Integration Token.** Scopes: `invoices/estimate.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `estimateId` | string | Yes | Estimate Id |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/invoices/estimate/{estimateId}": {
      "put": {
        "summary": "Update Estimate",
        "operationId": "updateEstimate",
        "description": "Update an existing estimate with new details",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "estimateId",
            "required": true,
            "in": "path",
            "description": "Estimate Id",
            "schema": {
              "example": "5f9d6d8b1b2d2c001f2d9e4b",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEstimateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "invoices/estimate.write"
            ]
          },
          {
            "Agency-Access": [
              "invoices/estimate.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "UpdateEstimateDto": {
        "type": "object",
        "properties": {
          "altId": {
            "type": "string",
            "description": "Location Id or Agency Id",
            "example": "6578278e879ad2646715ba9c"
          },
          "altType": {
            "type": "string",
            "enum": [
              "location"
            ]
          },
          "name": {
            "type": "string",
            "description": "Estimate Name",
            "example": "Home Service Estimate"
          },
          "businessDetails": {
            "type": "object",
            "properties": {
              "logoUrl": {
                "type": "string",
                "description": "Business Logo URL",
                "example": "https://example.com/logo.png"
              },
              "name": {
                "type": "string",
                "description": "Business Name",
                "example": "ABC Corp."
              },
              "phoneNo": {
                "type": "string",
                "description": "Business Phone Number",
                "example": "+1-214-559-6993"
              },
              "address": {
                "description": "Business Address",
                "example": "9931 Beechwood, TX",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "addressLine1": {
                        "type": "string",
                        "description": "Address Line 1",
                        "example": "9931 Beechwood"
                      },
                      "addressLine2": {
                        "type": "string",
                        "description": "Address Line 2",
                        "example": "Beechwood"
                      },
                      "city": {
                        "type": "string",
                        "description": "City",
                        "example": "St. Houston"
                      },
                      "state": {
                        "type": "string",
                        "description": "State",
                        "example": "TX"
                      },
                      "countryCode": {
                        "type": "string",
                        "description": "Country Code",
                        "example": "US"
                      },
                      "postalCode": {
                        "type": "string",
                        "description": "Postal Code",
                        "example": "559-6993"
                      }
                    },
                    "title": "AddressDto"
                  }
                ]
              },
              "website": {
                "type": "string",
                "description": "Business Website Link",
                "example": "wwww.example.com"
              },
              "customValues": {
                "description": "Custom Values",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "title": "BusinessDetailsDto"
          },
          "currency": {
            "type": "string",
            "description": "Currency code",
            "example": "USD"
          },
          "items": {
            "description": "An array of items for the estimate.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Invoice Item Name",
                  "example": "ABC Product"
                },
                "description": {
                  "type": "string",
                  "description": "Invoice descriptions",
                  "example": "ABC Corp."
                },
                "productId": {
                  "type": "string",
                  "description": "Product Id",
                  "example": "6578278e879ad2646715ba9c"
                },
                "priceId": {
                  "type": "string",
                  "description": "Price Id",
                  "example": "6578278e879ad2646715ba9c"
                },
                "currency": {
                  "type": "string",
                  "description": "Currency",
                  "example": "USD"
                },
                "amount": {
                  "type": "number",
                  "description": "Product amount",
                  "example": 999
                },
                "qty": {
                  "type": "number",
                  "description": "Product Quantity",
                  "example": 1
                },
                "taxes": {
                  "description": "Tax",
                  "type": "array",
                  "items": {
                    "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"
                    ],
                    "title": "ItemTaxDto"
                  }
                },
                "automaticTaxCategoryId": {
                  "type": "string",
                  "description": "Tax category id for calculating automatic tax",
                  "example": "6578278e879ad2646715ba9c"
                },
                "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",
                  "example": "one_time",
                  "enum": [
                    "one_time",
                    "recurring"
                  ]
                },
                "taxInclusive": {
                  "type": "boolean",
                  "description": "true if item amount is tax inclusive",
                  "example": true,
                  "default": false
                },
                "attachments": {
                  "description": "Attachments for the line item",
                  "example": [
                    "https://example.com/file1.jpg",
                    "https://example.com/file2.png"
                  ],
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "name",
                "currency",
                "amount",
                "qty"
              ],
              "title": "EstimateLineItemDto"
            }
          },
          "liveMode": {
            "type": "boolean",
            "description": "livemode for estimate",
            "example": true,
            "default": true
          },
          "discount": {
            "type": "object",
            "properties": {
              "value": {
                "type": "number",
                "description": "Discount Value",
                "example": 10,
                "default": 0
              },
              "type": {
                "type": "string",
                "description": "Discount type",
                "enum": [
                  "percentage",
                  "fixed"
                ],
                "example": "percentage",
                "default": "percentage"
              },
              "validOnProductIds": {
                "description": "Product Ids on which discount is applicable",
                "example": "[ '6579751d56f60276e5bd4154' ]",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "type"
            ],
            "title": "DiscountDto"
          },
          "termsNotes": {
            "type": "string",
            "description": "Terms notes, Also supports HTML markups",
            "example": "<p>This is a default terms.</p>"
          },
          "title": {
            "type": "string",
            "description": "Title for the estimate",
            "example": "ESTIMATE"
          },
          "contactDetails": {
            "description": "Contact information to send the estimate to",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Contact ID",
                    "example": "6578278e879ad2646715ba9c"
                  },
                  "name": {
                    "type": "string",
                    "description": "Contact Name",
                    "example": "Alex"
                  },
                  "phoneNo": {
                    "type": "string",
                    "description": "Contact Phone Number",
                    "example": "+1234567890"
                  },
                  "email": {
                    "type": "string",
                    "description": "Contact Email",
                    "example": "alex@example.com"
                  },
                  "additionalEmails": {
                    "description": "Secondary email addresses for the contact to be saved",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "example": "alex@example.com"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "title": "AdditionalEmailsDto"
                    }
                  },
                  "companyName": {
                    "type": "string",
                    "description": "Contact Company Name",
                    "example": "ABC Corp."
                  },
                  "address": {
                    "type": "object",
                    "properties": {
                      "addressLine1": {
                        "type": "string",
                        "description": "Address Line 1",
                        "example": "9931 Beechwood"
                      },
                      "addressLine2": {
                        "type": "string",
                        "description": "Address Line 2",
                        "example": "Beechwood"
                      },
                      "city": {
                        "type": "string",
                        "description": "City",
                        "example": "St. Houston"
                      },
                      "state": {
                        "type": "string",
                        "description": "State",
                        "example": "TX"
                      },
                      "countryCode": {
                        "type": "string",
                        "description": "Country Code",
                        "example": "US"
                      },
                      "postalCode": {
                        "type": "string",
                        "description": "Postal Code",
                        "example": "559-6993"
                      }
                    },
                    "title": "AddressDto"
                  },
                  "customFields": {
                    "description": "Custom Values",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "name",
                  "phoneNo",
                  "email"
                ],
                "title": "ContactDetailsDto"
              }
            ]
          },
          "estimateNumber": {
            "type": "number",
            "description": "Estimate Number, if not specified will take in the next valid estimate number",
            "example": 1001
          },
          "issueDate": {
            "type": "string",
            "description": "issue date estimate",
            "example": "2024-08-07"
          },
          "expiryDate": {
            "type": "string",
            "description": "expiry date estimate",
            "example": "2024-08-10"
          },
          "sentTo": {
            "description": "Email and sent to details for the estimate",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "Email Address",
                    "example": [
                      "alex@example.com"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "emailCc": {
                    "description": "cc to be kept in any sent out emails",
                    "example": [
                      "alex@example.com"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "emailBcc": {
                    "description": "bcc to be kept in any sent out emails",
                    "example": [
                      "alex@example.com"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "phoneNo": {
                    "description": "Contact Phone Number",
                    "example": [
                      "+1-214-559-6993"
                    ],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "email"
                ],
                "title": "SentToDto"
              }
            ]
          },
          "automaticTaxesEnabled": {
            "type": "boolean",
            "description": "Automatic taxes enabled for the Estimate",
            "example": true,
            "default": false
          },
          "meta": {
            "type": "object",
            "description": "Meta data for the estimate",
            "example": {
              "key": "value"
            }
          },
          "sendEstimateDetails": {
            "description": "When sending estimate directly while saving",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "altId": {
                    "type": "string",
                    "description": "Location Id or Agency Id",
                    "example": "6578278e879ad2646715ba9c"
                  },
                  "altType": {
                    "type": "string",
                    "enum": [
                      "location"
                    ]
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "sms_and_email",
                      "send_manually",
                      "email",
                      "sms"
                    ]
                  },
                  "liveMode": {
                    "type": "boolean",
                    "description": "livemode for estimate",
                    "example": true
                  },
                  "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.",
                    "example": "6578278e879ad2646715ba9c"
                  },
                  "sentFrom": {
                    "description": "sender details for invoice, valid only if invoice is not sent manually",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "fromName": {
                            "type": "string",
                            "description": "Sender name to be used while sending email notification",
                            "example": "Alex"
                          },
                          "fromEmail": {
                            "type": "string",
                            "description": "Email id to be used while sending email notification",
                            "example": "alex@example.com"
                          }
                        },
                        "title": "InvoiceSettingsSenderConfigurationDto"
                      }
                    ]
                  },
                  "estimateName": {
                    "type": "string",
                    "description": "estimate name",
                    "example": "Estimate"
                  }
                },
                "required": [
                  "altId",
                  "altType",
                  "action",
                  "liveMode",
                  "userId"
                ],
                "title": "SendEstimateDto"
              }
            ]
          },
          "frequencySettings": {
            "description": "frequency settings for the estimate",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "enabled for the frequency settings",
                    "example": true
                  },
                  "schedule": {
                    "description": "schedule setting for the estimate",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "executeAt": {
                            "type": "string"
                          },
                          "rrule": {
                            "type": "object",
                            "properties": {
                              "intervalType": {
                                "type": "string",
                                "enum": [
                                  "yearly",
                                  "monthly",
                                  "weekly",
                                  "daily",
                                  "hourly",
                                  "minutely",
                                  "secondly"
                                ],
                                "example": "monthly"
                              },
                              "interval": {
                                "type": "number",
                                "example": 2
                              },
                              "startDate": {
                                "type": "string",
                                "description": "Start date in YYYY-MM-DD format",
                                "example": "2023-01-01"
                              },
                              "startTime": {
                                "type": "string",
                                "description": "Start time in HH:mm:ss format",
                                "example": "20:45:00"
                              },
                              "endDate": {
                                "type": "string",
                                "description": "End date in YYYY-MM-DD format",
                                "example": "2029-11-01"
                              },
                              "endTime": {
                                "type": "string",
                                "description": "End time in HH:mm:ss format",
                                "example": "18:45:00"
                              },
                              "dayOfMonth": {
                                "type": "number",
                                "description": "-1, 1, 2, 3, ..., 27, 28",
                                "example": 15
                              },
                              "dayOfWeek": {
                                "type": "string",
                                "enum": [
                                  "mo",
                                  "tu",
                                  "we",
                                  "th",
                                  "fr",
                                  "sa",
                                  "su"
                                ],
                                "example": "mo"
                              },
                              "numOfWeek": {
                                "type": "number",
                                "description": "-1, 1, 2, 3, 4",
                                "example": -1
                              },
                              "monthOfYear": {
                                "type": "string",
                                "enum": [
                                  "jan",
                                  "feb",
                                  "mar",
                                  "apr",
                                  "may",
                                  "jun",
                                  "jul",
                                  "aug",
                                  "sep",
                                  "oct",
                                  "nov",
                                  "dec"
                                ],
                                "example": "jan"
                              },
                              "count": {
                                "type": "number",
                                "description": "Max number of task executions",
                                "example": 10
                              },
                              "daysBefore": {
                                "type": "number",
                                "description": "Execute task number of days before",
                                "example": 5
                              },
                              "useStartAsPrimaryUserAccepted": {
                                "type": "boolean",
                                "description": "Start as primary user accepted date",
                                "example": true
                              },
                              "endType": {
                                "type": "string",
                                "description": "End type like after, by, count",
                                "example": "by"
                              }
                            },
                            "required": [
                              "intervalType",
                              "interval",
                              "startDate"
                            ],
                            "title": "CustomRRuleOptionsDto"
                          }
                        },
                        "title": "ScheduleOptionsDto"
                      }
                    ]
                  }
                },
                "required": [
                  "enabled",
                  "schedule"
                ],
                "title": "FrequencySettingsDto"
              }
            ]
          },
          "estimateNumberPrefix": {
            "type": "string",
            "description": "Prefix for the estimate number",
            "example": "EST-",
            "default": "EST-"
          },
          "userId": {
            "type": "string",
            "description": "User Id",
            "example": "6578278e879ad2646715ba9c"
          },
          "attachments": {
            "description": "attachments for the invoice",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Id of the file selected",
                  "example": "6241712be68f7a98102ba272"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the file ",
                  "example": "Electronics.pdf"
                },
                "url": {
                  "type": "string",
                  "description": "URL of the file",
                  "example": "https://example.com/digital-delivery"
                },
                "type": {
                  "type": "string",
                  "description": "Type of the file"
                },
                "size": {
                  "type": "number",
                  "description": "Size of the file",
                  "example": 10000
                }
              },
              "required": [
                "id",
                "name",
                "url",
                "type",
                "size"
              ],
              "title": "AttachmentsDto"
            }
          },
          "autoInvoice": {
            "description": "Auto invoice for the estimate",
            "example": {
              "enabled": true,
              "directPayments": true
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Enable Auto Invoice",
                    "example": true
                  },
                  "directPayments": {
                    "type": "boolean",
                    "description": "Direct Payments",
                    "example": true
                  }
                },
                "required": [
                  "enabled"
                ],
                "title": "AutoInvoicingDto"
              }
            ]
          },
          "miscellaneousCharges": {
            "description": "miscellaneous charges for the estimate",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "charges": {
                    "description": "charges for the processing fee",
                    "items": {
                      "type": "array"
                    },
                    "type": "array"
                  },
                  "collectedMiscellaneousCharges": {
                    "type": "number",
                    "description": "collected miscellaneous charges",
                    "example": 10
                  },
                  "paidCharges": {
                    "description": "paid miscellaneous charges",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "name of the processing fee",
                          "example": "Processing Fee"
                        },
                        "charge": {
                          "type": "number",
                          "description": "charge for the processing fee",
                          "example": 10
                        },
                        "amount": {
                          "type": "number",
                          "description": "amount of the processing fee",
                          "example": 10
                        },
                        "_id": {
                          "type": "string",
                          "description": "id of the processing fee",
                          "example": "673d01d7d547648a8dab6211"
                        }
                      },
                      "required": [
                        "name",
                        "charge",
                        "amount",
                        "_id"
                      ],
                      "title": "ProcessingFeePaidChargeDto"
                    }
                  }
                },
                "required": [
                  "charges"
                ],
                "title": "ProcessingFeeDto"
              }
            ]
          },
          "paymentScheduleConfig": {
            "description": "Payment Schedule Config for the estimate",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Payment Schedule Type",
                    "example": "fixed",
                    "enum": [
                      "fixed",
                      "percentage"
                    ]
                  },
                  "dateConfig": {
                    "description": "Due date type configuration",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "depositDateType": {
                            "type": "string",
                            "description": "Deposit date type",
                            "example": "estimate_accepted",
                            "enum": [
                              "estimate_accepted",
                              "custom"
                            ]
                          },
                          "scheduleDateType": {
                            "type": "string",
                            "description": "Payment Schedule Date Type",
                            "example": "regular_interval",
                            "enum": [
                              "regular_interval",
                              "custom"
                            ]
                          }
                        },
                        "required": [
                          "depositDateType",
                          "scheduleDateType"
                        ],
                        "title": "PaymentScheduleDateConfigDto"
                      }
                    ]
                  },
                  "schedules": {
                    "description": "Payment Schedule Items",
                    "items": {
                      "type": "array"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "type",
                  "dateConfig",
                  "schedules"
                ],
                "title": "PaymentScheduleConfigDto"
              }
            ]
          },
          "estimateStatus": {
            "type": "string",
            "description": "Estimate Status",
            "example": "sent",
            "enum": [
              "all",
              "draft",
              "sent",
              "accepted",
              "declined",
              "invoiced",
              "viewed"
            ]
          }
        },
        "required": [
          "altId",
          "altType",
          "name",
          "businessDetails",
          "currency",
          "items",
          "discount",
          "contactDetails",
          "frequencySettings"
        ],
        "title": "UpdateEstimateDto"
      },
      "EstimateResponseDto": {
        "type": "object",
        "properties": {
          "altId": {
            "type": "string",
            "description": "Location Id or Agency Id",
            "example": "6578278e879ad2646715ba9c"
          },
          "altType": {
            "type": "string",
            "enum": [
              "location"
            ]
          },
          "_id": {
            "type": "string",
            "description": "Unique identifier",
            "example": "67ac9a51106ee8311e911XXXX"
          },
          "liveMode": {
            "type": "boolean",
            "description": "Indicates if it is in live mode",
            "example": true
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates if deleted",
            "example": false
          },
          "name": {
            "type": "string",
            "description": "Name",
            "example": "Estimate Name"
          },
          "currency": {
            "type": "string",
            "description": "Currency code",
            "example": "USD"
          },
          "businessDetails": {
            "description": "Business details associated with the estimate",
            "example": {
              "logoUrl": "your_image-url",
              "name": "Business name",
              "address": {
                "addressLine1": "address line 1",
                "city": "Test City",
                "state": "State Name",
                "countryCode": "US",
                "postalCode": "12345"
              },
              "phoneNo": "+1 1234567890",
              "website": "www.example.com",
              "customValues": [
                {
                  "name": "Test",
                  "fieldKey": "{{custom_values.test}}",
                  "id": "5DYTWoiQvWiIJZXX44XXX",
                  "value": "Test's Custom Value"
                }
              ]
            },
            "allOf": [
              {
                "type": "object",
                "properties": {},
                "title": "BusinessDetails"
              }
            ]
          },
          "items": {
            "description": "An array of items",
            "example": [
              {
                "taxes": [],
                "taxInclusive": false,
                "_id": "67ac9a51106ee8311e911XXXX",
                "description": "<p>Futuristic anti-gravity racing</p>",
                "currency": "USD",
                "productId": "67ac9a51106ee8311e911XXXX",
                "priceId": "67ac9a51106ee8311e911XXXX",
                "amount": 9.99,
                "qty": 1,
                "name": "TEST",
                "type": "one_time"
              },
              {
                "taxes": [
                  {
                    "_id": "67ac9a51106ee8311e911XXXX",
                    "name": "TaxTwo",
                    "rate": 8.5,
                    "calculation": "exclusive"
                  }
                ],
                "taxInclusive": true,
                "_id": "67ac9a51106ee8311e911XXXX",
                "productId": "67ac9a51106ee8311e911XXXX",
                "priceId": "67ac9a51106ee8311e911XXXX",
                "currency": "USD",
                "name": "TEST2",
                "qty": 1,
                "amount": 500,
                "description": "",
                "type": "recurring"
              }
            ],
            "type": "array",
            "items": {
              "type": "array"
            }
          },
          "discount": {
            "description": "Discount details for the estimate template",
            "example": {
              "type": "percentage",
              "value": 0
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number",
                    "description": "Discount Value",
                    "example": 10,
                    "default": 0
                  },
                  "type": {
                    "type": "string",
                    "description": "Discount type",
                    "enum": [
                      "percentage",
                      "fixed"
                    ],
                    "example": "percentage",
                    "default": "percentage"
                  },
                  "validOnProductIds": {
                    "description": "Product Ids on which discount is applicable",
                    "example": "[ '6579751d56f60276e5bd4154' ]",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "type"
                ],
                "title": "DiscountDto"
              }
            ]
          },
          "title": {
            "type": "string",
            "description": "Title",
            "example": "ESTIMATE"
          },
          "estimateNumberPrefix": {
            "type": "string",
            "description": "Estimate number prefix",
            "example": "EST-"
          },
          "attachments": {
            "description": "Attachments",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Id of the file selected",
                  "example": "6241712be68f7a98102ba272"
                },
                "name": {
                  "type": "string",
                  "description": "Name of the file ",
                  "example": "Electronics.pdf"
                },
                "url": {
                  "type": "string",
                  "description": "URL of the file",
                  "example": "https://example.com/digital-delivery"
                },
                "type": {
                  "type": "string",
                  "description": "Type of the file"
                },
                "size": {
                  "type": "number",
                  "description": "Size of the file",
                  "example": 10000
                }
              },
              "required": [
                "id",
                "name",
                "url",
                "type",
                "size"
              ],
              "title": "AttachmentsDto"
            }
          },
          "updatedBy": {
            "type": "string",
            "description": "User Id of who last updated",
            "example": "3HIpOF9NIc5ltriQXXXX"
          },
          "total": {
            "type": "number",
            "description": "Total amount",
            "example": 1222.03
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when created",
            "example": "2025-02-12T13:17:47.416Z"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when last updated",
            "example": "2025-02-12T13:17:47.416Z"
          },
          "__v": {
            "type": "number",
            "description": "Version number",
            "example": 0
          },
          "automaticTaxesEnabled": {
            "type": "boolean",
            "description": "Indicates if automatic taxes are enabled for this estimate",
            "example": false
          },
          "termsNotes": {
            "type": "string",
            "description": "Terms and conditions for the estimate, supports HTML markup",
            "example": "<p>All services are subject to availability.</p>"
          },
          "companyId": {
            "type": "string",
            "description": "Company identifier associated with the estimate",
            "example": "COMP12345"
          },
          "contactDetails": {
            "description": "Contact details for the estimate",
            "example": {
              "id": "jvzfKTNdE7OYXXXXXX",
              "name": "Contact Name",
              "phoneNo": "+911111111114",
              "email": "email@test.com",
              "address": {
                "countryCode": "US"
              }
            },
            "allOf": [
              {
                "type": "object",
                "properties": {},
                "title": "ContactDetails"
              }
            ]
          },
          "issueDate": {
            "format": "date-time",
            "type": "string",
            "description": "Date when the estimate was issued",
            "example": "2023-06-15T00:00:00.000Z"
          },
          "expiryDate": {
            "format": "date-time",
            "type": "string",
            "description": "Date when the estimate expires",
            "example": "2023-07-15T00:00:00.000Z"
          },
          "sentBy": {
            "type": "string",
            "description": "User who sent the estimate",
            "example": "user@example.com"
          },
          "automaticTaxesCalculated": {
            "type": "boolean",
            "description": "Indicates if automatic taxes were calculated",
            "example": true
          },
          "meta": {
            "type": "object",
            "description": "Additional metadata associated with the estimate",
            "example": {
              "key": "value"
            }
          },
          "estimateActionHistory": {
            "description": "History of actions taken on the estimate",
            "example": [
              {
                "action": "Created",
                "timestamp": "2023-06-15T10:00:00.000Z"
              }
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sentTo": {
            "description": "Recipient details for the estimate",
            "example": {
              "email": [
                "test@example.com"
              ],
              "phoneNo": [
                "+1 99444444444"
              ]
            },
            "allOf": [
              {
                "type": "object",
                "properties": {},
                "title": "SentTo"
              }
            ]
          },
          "frequencySettings": {
            "description": "Frequency settings for recurring estimates",
            "examples": [
              {
                "enabled": false
              },
              {
                "enabled": true,
                "schedule": {
                  "rrule": {
                    "intervalType": "monthly",
                    "numOfWeek": 0,
                    "dayOfMonth": 1,
                    "interval": 1,
                    "startDate": "2025-02-12",
                    "endType": "after",
                    "count": "5"
                  }
                }
              },
              {
                "enabled": true,
                "schedule": {
                  "rrule": {
                    "intervalType": "monthly",
                    "numOfWeek": 0,
                    "dayOfMonth": 1,
                    "interval": 1,
                    "startDate": "2025-02-12",
                    "endType": "by",
                    "endDate": "2025-02-24"
                  }
                }
              },
              {
                "enabled": true,
                "schedule": {
                  "rrule": {
                    "intervalType": "monthly",
                    "numOfWeek": 0,
                    "dayOfMonth": 1,
                    "interval": 1,
                    "startDate": "2025-02-12",
                    "endType": "never"
                  }
                }
              }
            ],
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "enabled for the frequency settings",
                    "example": true
                  },
                  "schedule": {
                    "description": "schedule setting for the estimate",
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "executeAt": {
                            "type": "string"
                          },
                          "rrule": {
                            "type": "object",
                            "properties": {
                              "intervalType": {
                                "type": "string",
                                "enum": [
                                  "yearly",
                                  "monthly",
                                  "weekly",
                                  "daily",
                                  "hourly",
                                  "minutely",
                                  "secondly"
                                ],
                                "example": "monthly"
                              },
                              "interval": {
                                "type": "number",
                                "example": 2
                              },
                              "startDate": {
                                "type": "string",
                                "description": "Start date in YYYY-MM-DD format",
                                "example": "2023-01-01"
                              },
                              "startTime": {
                                "type": "string",
                                "description": "Start time in HH:mm:ss format",
                                "example": "20:45:00"
                              },
                              "endDate": {
                                "type": "string",
                                "description": "End date in YYYY-MM-DD format",
                                "example": "2029-11-01"
                              },
                              "endTime": {
                                "type": "string",
                                "description": "End time in HH:mm:ss format",
                                "example": "18:45:00"
                              },
                              "dayOfMonth": {
                                "type": "number",
                                "description": "-1, 1, 2, 3, ..., 27, 28",
                                "example": 15
                              },
                              "dayOfWeek": {
                                "type": "string",
                                "enum": [
                                  "mo",
                                  "tu",
                                  "we",
                                  "th",
                                  "fr",
                                  "sa",
                                  "su"
                                ],
                                "example": "mo"
                              },
                              "numOfWeek": {
                                "type": "number",
                                "description": "-1, 1, 2, 3, 4",
                                "example": -1
                              },
                              "monthOfYear": {
                                "type": "string",
                                "enum": [
                                  "jan",
                                  "feb",
                                  "mar",
                                  "apr",
                                  "may",
                                  "jun",
                                  "jul",
                                  "aug",
                                  "sep",
                                  "oct",
                                  "nov",
                                  "dec"
                                ],
                                "example": "jan"
                              },
                              "count": {
                                "type": "number",
                                "description": "Max number of task executions",
                                "example": 10
                              },
                              "daysBefore": {
                                "type": "number",
                                "description": "Execute task number of days before",
                                "example": 5
                              },
                              "useStartAsPrimaryUserAccepted": {
                                "type": "boolean",
                                "description": "Start as primary user accepted date",
                                "example": true
                              },
                              "endType": {
                                "type": "string",
                                "description": "End type like after, by, count",
                                "example": "by"
                              }
                            },
                            "required": [
                              "intervalType",
                              "interval",
                              "startDate"
                            ],
                            "title": "CustomRRuleOptionsDto"
                          }
                        },
                        "title": "ScheduleOptionsDto"
                      }
                    ]
                  }
                },
                "required": [
                  "enabled",
                  "schedule"
                ],
                "title": "FrequencySettingsDto"
              }
            ]
          },
          "lastVisitedAt": {
            "format": "date-time",
            "type": "string",
            "description": "Timestamp when the estimate was last visited",
            "example": "2023-06-20T08:30:00.000Z"
          },
          "totalamountInUSD": {
            "type": "number",
            "description": "Total amount in USD",
            "example": 1500.75
          },
          "autoInvoice": {
            "description": "Auto-invoice settings for the estimate",
            "example": {
              "enabled": true,
              "directPayments": false
            },
            "allOf": [
              {
                "type": "object",
                "properties": {},
                "title": "AutoInvoice"
              }
            ]
          },
          "traceId": {
            "type": "string",
            "description": "Trace ID for logging and debugging",
            "example": "010c7a01-857f-4619-970d-xyxyxyxy"
          }
        },
        "required": [
          "altId",
          "altType",
          "_id",
          "liveMode",
          "deleted",
          "name",
          "currency",
          "businessDetails",
          "items",
          "discount",
          "total",
          "createdAt",
          "updatedAt",
          "__v",
          "automaticTaxesEnabled",
          "companyId",
          "contactDetails",
          "issueDate",
          "expiryDate",
          "automaticTaxesCalculated",
          "meta",
          "estimateActionHistory",
          "sentTo",
          "frequencySettings",
          "lastVisitedAt",
          "totalamountInUSD",
          "traceId"
        ],
        "title": "EstimateResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X PUT 'https://services.leadconnectorhq.com/invoices/estimate/<estimateId>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "altId": "6578278e879ad2646715ba9c",
  "name": "Home Service Estimate",
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": []
  },
  "currency": "USD",
  "items": [
    {
      "name": "ABC Product",
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "taxes": [],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "type": "one_time",
      "taxInclusive": true,
      "attachments": [
        "https://example.com/file1.jpg",
        "https://example.com/file2.png"
      ]
    }
  ],
  "liveMode": true,
  "discount": {
    "value": 10,
    "type": "percentage",
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "<p>This is a default terms.</p>",
  "title": "ESTIMATE",
  "contactDetails": {
    "id": "6578278e879ad2646715ba9c",
    "name": "Alex",
    "phoneNo": "+1234567890",
    "email": "alex@example.com",
    "additionalEmails": [
      {
        "email": "alex@example.com"
      }
    ],
    "companyName": "ABC Corp.",
    "address": {
      "addressLine1": "9931 Beechwood",
      "addressLine2": "Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "US",
      "postalCode": "559-6993"
    },
    "customFields": []
  },
  "estimateNumber": 1001,
  "issueDate": "2024-08-07",
  "expiryDate": "2024-08-10",
  "sentTo": {
    "email": [
      "alex@example.com"
    ],
    "emailCc": [
      "alex@example.com"
    ],
    "emailBcc": [
      "alex@example.com"
    ],
    "phoneNo": [
      "+1-214-559-6993"
    ]
  },
  "automaticTaxesEnabled": true,
  "meta": {
    "key": "value"
  },
  "sendEstimateDetails": {
    "altId": "6578278e879ad2646715ba9c",
    "liveMode": true,
    "userId": "6578278e879ad2646715ba9c",
    "sentFrom": {
      "fromName": "Alex",
      "fromEmail": "alex@example.com"
    },
    "estimateName": "Estimate"
  },
  "frequencySettings": {
    "enabled": true,
    "schedule": {
      "rrule": {
        "intervalType": "monthly",
        "interval": 2,
        "startDate": "2023-01-01",
        "startTime": "20:45:00",
        "endDate": "2029-11-01",
        "endTime": "18:45:00",
        "dayOfMonth": 15,
        "dayOfWeek": "mo",
        "numOfWeek": -1,
        "monthOfYear": "jan",
        "count": 10,
        "daysBefore": 5,
        "useStartAsPrimaryUserAccepted": true,
        "endType": "by"
      }
    }
  },
  "estimateNumberPrefix": "EST-",
  "userId": "6578278e879ad2646715ba9c",
  "attachments": [
    {
      "id": "6241712be68f7a98102ba272",
      "name": "Electronics.pdf",
      "url": "https://example.com/digital-delivery",
      "size": 10000
    }
  ],
  "autoInvoice": {
    "enabled": true,
    "directPayments": true
  },
  "miscellaneousCharges": {
    "charges": [
      []
    ],
    "collectedMiscellaneousCharges": 10,
    "paidCharges": [
      {
        "name": "Processing Fee",
        "charge": 10,
        "amount": 10,
        "_id": "673d01d7d547648a8dab6211"
      }
    ]
  },
  "paymentScheduleConfig": {
    "type": "fixed",
    "dateConfig": {
      "depositDateType": "estimate_accepted",
      "scheduleDateType": "regular_interval"
    },
    "schedules": [
      []
    ]
  },
  "estimateStatus": "sent"
}'
```

**Node.js**

```javascript
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "altId": "6578278e879ad2646715ba9c",
      "name": "Home Service Estimate",
      "businessDetails": {
        "logoUrl": "https://example.com/logo.png",
        "name": "ABC Corp.",
        "phoneNo": "+1-214-559-6993",
        "address": "9931 Beechwood, TX",
        "website": "wwww.example.com",
        "customValues": []
      },
      "currency": "USD",
      "items": [
        {
          "name": "ABC Product",
          "description": "ABC Corp.",
          "productId": "6578278e879ad2646715ba9c",
          "priceId": "6578278e879ad2646715ba9c",
          "currency": "USD",
          "amount": 999,
          "qty": 1,
          "taxes": [],
          "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
          "type": "one_time",
          "taxInclusive": true,
          "attachments": [
            "https://example.com/file1.jpg",
            "https://example.com/file2.png"
          ]
        }
      ],
      "liveMode": true,
      "discount": {
        "value": 10,
        "type": "percentage",
        "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
      },
      "termsNotes": "<p>This is a default terms.</p>",
      "title": "ESTIMATE",
      "contactDetails": {
        "id": "6578278e879ad2646715ba9c",
        "name": "Alex",
        "phoneNo": "+1234567890",
        "email": "alex@example.com",
        "additionalEmails": [
          {
            "email": "alex@example.com"
          }
        ],
        "companyName": "ABC Corp.",
        "address": {
          "addressLine1": "9931 Beechwood",
          "addressLine2": "Beechwood",
          "city": "St. Houston",
          "state": "TX",
          "countryCode": "US",
          "postalCode": "559-6993"
        },
        "customFields": []
      },
      "estimateNumber": 1001,
      "issueDate": "2024-08-07",
      "expiryDate": "2024-08-10",
      "sentTo": {
        "email": [
          "alex@example.com"
        ],
        "emailCc": [
          "alex@example.com"
        ],
        "emailBcc": [
          "alex@example.com"
        ],
        "phoneNo": [
          "+1-214-559-6993"
        ]
      },
      "automaticTaxesEnabled": true,
      "meta": {
        "key": "value"
      },
      "sendEstimateDetails": {
        "altId": "6578278e879ad2646715ba9c",
        "liveMode": true,
        "userId": "6578278e879ad2646715ba9c",
        "sentFrom": {
          "fromName": "Alex",
          "fromEmail": "alex@example.com"
        },
        "estimateName": "Estimate"
      },
      "frequencySettings": {
        "enabled": true,
        "schedule": {
          "rrule": {
            "intervalType": "monthly",
            "interval": 2,
            "startDate": "2023-01-01",
            "startTime": "20:45:00",
            "endDate": "2029-11-01",
            "endTime": "18:45:00",
            "dayOfMonth": 15,
            "dayOfWeek": "mo",
            "numOfWeek": -1,
            "monthOfYear": "jan",
            "count": 10,
            "daysBefore": 5,
            "useStartAsPrimaryUserAccepted": true,
            "endType": "by"
          }
        }
      },
      "estimateNumberPrefix": "EST-",
      "userId": "6578278e879ad2646715ba9c",
      "attachments": [
        {
          "id": "6241712be68f7a98102ba272",
          "name": "Electronics.pdf",
          "url": "https://example.com/digital-delivery",
          "size": 10000
        }
      ],
      "autoInvoice": {
        "enabled": true,
        "directPayments": true
      },
      "miscellaneousCharges": {
        "charges": [
          []
        ],
        "collectedMiscellaneousCharges": 10,
        "paidCharges": [
          {
            "name": "Processing Fee",
            "charge": 10,
            "amount": 10,
            "_id": "673d01d7d547648a8dab6211"
          }
        ]
      },
      "paymentScheduleConfig": {
        "type": "fixed",
        "dateConfig": {
          "depositDateType": "estimate_accepted",
          "scheduleDateType": "regular_interval"
        },
        "schedules": [
          []
        ]
      },
      "estimateStatus": "sent"
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/<estimateId>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/invoices/estimate/{estimateId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "altId": "6578278e879ad2646715ba9c",
    "name": "Home Service Estimate",
    "businessDetails": {
        "logoUrl": "https://example.com/logo.png",
        "name": "ABC Corp.",
        "phoneNo": "+1-214-559-6993",
        "address": "9931 Beechwood, TX",
        "website": "wwww.example.com",
        "customValues": []
    },
    "currency": "USD",
    "items": [
        {
            "name": "ABC Product",
            "description": "ABC Corp.",
            "productId": "6578278e879ad2646715ba9c",
            "priceId": "6578278e879ad2646715ba9c",
            "currency": "USD",
            "amount": 999,
            "qty": 1,
            "taxes": [],
            "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
            "type": "one_time",
            "taxInclusive": true,
            "attachments": [
                "https://example.com/file1.jpg",
                "https://example.com/file2.png"
            ]
        }
    ],
    "liveMode": true,
    "discount": {
        "value": 10,
        "type": "percentage",
        "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
    },
    "termsNotes": "<p>This is a default terms.</p>",
    "title": "ESTIMATE",
    "contactDetails": {
        "id": "6578278e879ad2646715ba9c",
        "name": "Alex",
        "phoneNo": "+1234567890",
        "email": "alex@example.com",
        "additionalEmails": [
            {
                "email": "alex@example.com"
            }
        ],
        "companyName": "ABC Corp.",
        "address": {
            "addressLine1": "9931 Beechwood",
            "addressLine2": "Beechwood",
            "city": "St. Houston",
            "state": "TX",
            "countryCode": "US",
            "postalCode": "559-6993"
        },
        "customFields": []
    },
    "estimateNumber": 1001,
    "issueDate": "2024-08-07",
    "expiryDate": "2024-08-10",
    "sentTo": {
        "email": [
            "alex@example.com"
        ],
        "emailCc": [
            "alex@example.com"
        ],
        "emailBcc": [
            "alex@example.com"
        ],
        "phoneNo": [
            "+1-214-559-6993"
        ]
    },
    "automaticTaxesEnabled": true,
    "meta": {
        "key": "value"
    },
    "sendEstimateDetails": {
        "altId": "6578278e879ad2646715ba9c",
        "liveMode": true,
        "userId": "6578278e879ad2646715ba9c",
        "sentFrom": {
            "fromName": "Alex",
            "fromEmail": "alex@example.com"
        },
        "estimateName": "Estimate"
    },
    "frequencySettings": {
        "enabled": true,
        "schedule": {
            "rrule": {
                "intervalType": "monthly",
                "interval": 2,
                "startDate": "2023-01-01",
                "startTime": "20:45:00",
                "endDate": "2029-11-01",
                "endTime": "18:45:00",
                "dayOfMonth": 15,
                "dayOfWeek": "mo",
                "numOfWeek": -1,
                "monthOfYear": "jan",
                "count": 10,
                "daysBefore": 5,
                "useStartAsPrimaryUserAccepted": true,
                "endType": "by"
            }
        }
    },
    "estimateNumberPrefix": "EST-",
    "userId": "6578278e879ad2646715ba9c",
    "attachments": [
        {
            "id": "6241712be68f7a98102ba272",
            "name": "Electronics.pdf",
            "url": "https://example.com/digital-delivery",
            "size": 10000
        }
    ],
    "autoInvoice": {
        "enabled": true,
        "directPayments": true
    },
    "miscellaneousCharges": {
        "charges": [
            []
        ],
        "collectedMiscellaneousCharges": 10,
        "paidCharges": [
            {
                "name": "Processing Fee",
                "charge": 10,
                "amount": 10,
                "_id": "673d01d7d547648a8dab6211"
            }
        ]
    },
    "paymentScheduleConfig": {
        "type": "fixed",
        "dateConfig": {
            "depositDateType": "estimate_accepted",
            "scheduleDateType": "regular_interval"
        },
        "schedules": [
            []
        ]
    },
    "estimateStatus": "sent"
}

response = requests.put(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/invoices/estimate/<estimateId>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "altId": "6578278e879ad2646715ba9c",
  "name": "Home Service Estimate",
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": []
  },
  "currency": "USD",
  "items": [
    {
      "name": "ABC Product",
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "taxes": [],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "type": "one_time",
      "taxInclusive": true,
      "attachments": [
        "https://example.com/file1.jpg",
        "https://example.com/file2.png"
      ]
    }
  ],
  "liveMode": true,
  "discount": {
    "value": 10,
    "type": "percentage",
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "<p>This is a default terms.</p>",
  "title": "ESTIMATE",
  "contactDetails": {
    "id": "6578278e879ad2646715ba9c",
    "name": "Alex",
    "phoneNo": "+1234567890",
    "email": "alex@example.com",
    "additionalEmails": [
      {
        "email": "alex@example.com"
      }
    ],
    "companyName": "ABC Corp.",
    "address": {
      "addressLine1": "9931 Beechwood",
      "addressLine2": "Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "US",
      "postalCode": "559-6993"
    },
    "customFields": []
  },
  "estimateNumber": 1001,
  "issueDate": "2024-08-07",
  "expiryDate": "2024-08-10",
  "sentTo": {
    "email": [
      "alex@example.com"
    ],
    "emailCc": [
      "alex@example.com"
    ],
    "emailBcc": [
      "alex@example.com"
    ],
    "phoneNo": [
      "+1-214-559-6993"
    ]
  },
  "automaticTaxesEnabled": true,
  "meta": {
    "key": "value"
  },
  "sendEstimateDetails": {
    "altId": "6578278e879ad2646715ba9c",
    "liveMode": true,
    "userId": "6578278e879ad2646715ba9c",
    "sentFrom": {
      "fromName": "Alex",
      "fromEmail": "alex@example.com"
    },
    "estimateName": "Estimate"
  },
  "frequencySettings": {
    "enabled": true,
    "schedule": {
      "rrule": {
        "intervalType": "monthly",
        "interval": 2,
        "startDate": "2023-01-01",
        "startTime": "20:45:00",
        "endDate": "2029-11-01",
        "endTime": "18:45:00",
        "dayOfMonth": 15,
        "dayOfWeek": "mo",
        "numOfWeek": -1,
        "monthOfYear": "jan",
        "count": 10,
        "daysBefore": 5,
        "useStartAsPrimaryUserAccepted": true,
        "endType": "by"
      }
    }
  },
  "estimateNumberPrefix": "EST-",
  "userId": "6578278e879ad2646715ba9c",
  "attachments": [
    {
      "id": "6241712be68f7a98102ba272",
      "name": "Electronics.pdf",
      "url": "https://example.com/digital-delivery",
      "size": 10000
    }
  ],
  "autoInvoice": {
    "enabled": true,
    "directPayments": true
  },
  "miscellaneousCharges": {
    "charges": [
      []
    ],
    "collectedMiscellaneousCharges": 10,
    "paidCharges": [
      {
        "name": "Processing Fee",
        "charge": 10,
        "amount": 10,
        "_id": "673d01d7d547648a8dab6211"
      }
    ]
  },
  "paymentScheduleConfig": {
    "type": "fixed",
    "dateConfig": {
      "depositDateType": "estimate_accepted",
      "scheduleDateType": "regular_interval"
    },
    "schedules": [
      []
    ]
  },
  "estimateStatus": "sent"
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .put("https://services.leadconnectorhq.com/invoices/estimate/<estimateId>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"altId\":\"6578278e879ad2646715ba9c\",\"name\":\"Home Service Estimate\",\"businessDetails\":{\"logoUrl\":\"https://example.com/logo.png\",\"name\":\"ABC Corp.\",\"phoneNo\":\"+1-214-559-6993\",\"address\":\"9931 Beechwood, TX\",\"website\":\"wwww.example.com\",\"customValues\":[]},\"currency\":\"USD\",\"items\":[{\"name\":\"ABC Product\",\"description\":\"ABC Corp.\",\"productId\":\"6578278e879ad2646715ba9c\",\"priceId\":\"6578278e879ad2646715ba9c\",\"currency\":\"USD\",\"amount\":999,\"qty\":1,\"taxes\":[],\"automaticTaxCategoryId\":\"6578278e879ad2646715ba9c\",\"type\":\"one_time\",\"taxInclusive\":true,\"attachments\":[\"https://example.com/file1.jpg\",\"https://example.com/file2.png\"]}],\"liveMode\":true,\"discount\":{\"value\":10,\"type\":\"percentage\",\"validOnProductIds\":\"[ '6579751d56f60276e5bd4154' ]\"},\"termsNotes\":\"<p>This is a default terms.</p>\",\"title\":\"ESTIMATE\",\"contactDetails\":{\"id\":\"6578278e879ad2646715ba9c\",\"name\":\"Alex\",\"phoneNo\":\"+1234567890\",\"email\":\"alex@example.com\",\"additionalEmails\":[{\"email\":\"alex@example.com\"}],\"companyName\":\"ABC Corp.\",\"address\":{\"addressLine1\":\"9931 Beechwood\",\"addressLine2\":\"Beechwood\",\"city\":\"St. Houston\",\"state\":\"TX\",\"countryCode\":\"US\",\"postalCode\":\"559-6993\"},\"customFields\":[]},\"estimateNumber\":1001,\"issueDate\":\"2024-08-07\",\"expiryDate\":\"2024-08-10\",\"sentTo\":{\"email\":[\"alex@example.com\"],\"emailCc\":[\"alex@example.com\"],\"emailBcc\":[\"alex@example.com\"],\"phoneNo\":[\"+1-214-559-6993\"]},\"automaticTaxesEnabled\":true,\"meta\":{\"key\":\"value\"},\"sendEstimateDetails\":{\"altId\":\"6578278e879ad2646715ba9c\",\"liveMode\":true,\"userId\":\"6578278e879ad2646715ba9c\",\"sentFrom\":{\"fromName\":\"Alex\",\"fromEmail\":\"alex@example.com\"},\"estimateName\":\"Estimate\"},\"frequencySettings\":{\"enabled\":true,\"schedule\":{\"rrule\":{\"intervalType\":\"monthly\",\"interval\":2,\"startDate\":\"2023-01-01\",\"startTime\":\"20:45:00\",\"endDate\":\"2029-11-01\",\"endTime\":\"18:45:00\",\"dayOfMonth\":15,\"dayOfWeek\":\"mo\",\"numOfWeek\":-1,\"monthOfYear\":\"jan\",\"count\":10,\"daysBefore\":5,\"useStartAsPrimaryUserAccepted\":true,\"endType\":\"by\"}}},\"estimateNumberPrefix\":\"EST-\",\"userId\":\"6578278e879ad2646715ba9c\",\"attachments\":[{\"id\":\"6241712be68f7a98102ba272\",\"name\":\"Electronics.pdf\",\"url\":\"https://example.com/digital-delivery\",\"size\":10000}],\"autoInvoice\":{\"enabled\":true,\"directPayments\":true},\"miscellaneousCharges\":{\"charges\":[[]],\"collectedMiscellaneousCharges\":10,\"paidCharges\":[{\"name\":\"Processing Fee\",\"charge\":10,\"amount\":10,\"_id\":\"673d01d7d547648a8dab6211\"}]},\"paymentScheduleConfig\":{\"type\":\"fixed\",\"dateConfig\":{\"depositDateType\":\"estimate_accepted\",\"scheduleDateType\":\"regular_interval\"},\"schedules\":[[]]},\"estimateStatus\":\"sent\"}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/invoices/estimate/<estimateId>"
  payload := strings.NewReader(`{
  "altId": "6578278e879ad2646715ba9c",
  "name": "Home Service Estimate",
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": []
  },
  "currency": "USD",
  "items": [
    {
      "name": "ABC Product",
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "taxes": [],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "type": "one_time",
      "taxInclusive": true,
      "attachments": [
        "https://example.com/file1.jpg",
        "https://example.com/file2.png"
      ]
    }
  ],
  "liveMode": true,
  "discount": {
    "value": 10,
    "type": "percentage",
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "<p>This is a default terms.</p>",
  "title": "ESTIMATE",
  "contactDetails": {
    "id": "6578278e879ad2646715ba9c",
    "name": "Alex",
    "phoneNo": "+1234567890",
    "email": "alex@example.com",
    "additionalEmails": [
      {
        "email": "alex@example.com"
      }
    ],
    "companyName": "ABC Corp.",
    "address": {
      "addressLine1": "9931 Beechwood",
      "addressLine2": "Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "US",
      "postalCode": "559-6993"
    },
    "customFields": []
  },
  "estimateNumber": 1001,
  "issueDate": "2024-08-07",
  "expiryDate": "2024-08-10",
  "sentTo": {
    "email": [
      "alex@example.com"
    ],
    "emailCc": [
      "alex@example.com"
    ],
    "emailBcc": [
      "alex@example.com"
    ],
    "phoneNo": [
      "+1-214-559-6993"
    ]
  },
  "automaticTaxesEnabled": true,
  "meta": {
    "key": "value"
  },
  "sendEstimateDetails": {
    "altId": "6578278e879ad2646715ba9c",
    "liveMode": true,
    "userId": "6578278e879ad2646715ba9c",
    "sentFrom": {
      "fromName": "Alex",
      "fromEmail": "alex@example.com"
    },
    "estimateName": "Estimate"
  },
  "frequencySettings": {
    "enabled": true,
    "schedule": {
      "rrule": {
        "intervalType": "monthly",
        "interval": 2,
        "startDate": "2023-01-01",
        "startTime": "20:45:00",
        "endDate": "2029-11-01",
        "endTime": "18:45:00",
        "dayOfMonth": 15,
        "dayOfWeek": "mo",
        "numOfWeek": -1,
        "monthOfYear": "jan",
        "count": 10,
        "daysBefore": 5,
        "useStartAsPrimaryUserAccepted": true,
        "endType": "by"
      }
    }
  },
  "estimateNumberPrefix": "EST-",
  "userId": "6578278e879ad2646715ba9c",
  "attachments": [
    {
      "id": "6241712be68f7a98102ba272",
      "name": "Electronics.pdf",
      "url": "https://example.com/digital-delivery",
      "size": 10000
    }
  ],
  "autoInvoice": {
    "enabled": true,
    "directPayments": true
  },
  "miscellaneousCharges": {
    "charges": [
      []
    ],
    "collectedMiscellaneousCharges": 10,
    "paidCharges": [
      {
        "name": "Processing Fee",
        "charge": 10,
        "amount": 10,
        "_id": "673d01d7d547648a8dab6211"
      }
    ]
  },
  "paymentScheduleConfig": {
    "type": "fixed",
    "dateConfig": {
      "depositDateType": "estimate_accepted",
      "scheduleDateType": "regular_interval"
    },
    "schedules": [
      []
    ]
  },
  "estimateStatus": "sent"
}`)
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/invoices/estimate/<estimateId>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "altId": "6578278e879ad2646715ba9c",
  "name": "Home Service Estimate",
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": []
  },
  "currency": "USD",
  "items": [
    {
      "name": "ABC Product",
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "taxes": [],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "type": "one_time",
      "taxInclusive": true,
      "attachments": [
        "https://example.com/file1.jpg",
        "https://example.com/file2.png"
      ]
    }
  ],
  "liveMode": true,
  "discount": {
    "value": 10,
    "type": "percentage",
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "<p>This is a default terms.</p>",
  "title": "ESTIMATE",
  "contactDetails": {
    "id": "6578278e879ad2646715ba9c",
    "name": "Alex",
    "phoneNo": "+1234567890",
    "email": "alex@example.com",
    "additionalEmails": [
      {
        "email": "alex@example.com"
      }
    ],
    "companyName": "ABC Corp.",
    "address": {
      "addressLine1": "9931 Beechwood",
      "addressLine2": "Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "US",
      "postalCode": "559-6993"
    },
    "customFields": []
  },
  "estimateNumber": 1001,
  "issueDate": "2024-08-07",
  "expiryDate": "2024-08-10",
  "sentTo": {
    "email": [
      "alex@example.com"
    ],
    "emailCc": [
      "alex@example.com"
    ],
    "emailBcc": [
      "alex@example.com"
    ],
    "phoneNo": [
      "+1-214-559-6993"
    ]
  },
  "automaticTaxesEnabled": true,
  "meta": {
    "key": "value"
  },
  "sendEstimateDetails": {
    "altId": "6578278e879ad2646715ba9c",
    "liveMode": true,
    "userId": "6578278e879ad2646715ba9c",
    "sentFrom": {
      "fromName": "Alex",
      "fromEmail": "alex@example.com"
    },
    "estimateName": "Estimate"
  },
  "frequencySettings": {
    "enabled": true,
    "schedule": {
      "rrule": {
        "intervalType": "monthly",
        "interval": 2,
        "startDate": "2023-01-01",
        "startTime": "20:45:00",
        "endDate": "2029-11-01",
        "endTime": "18:45:00",
        "dayOfMonth": 15,
        "dayOfWeek": "mo",
        "numOfWeek": -1,
        "monthOfYear": "jan",
        "count": 10,
        "daysBefore": 5,
        "useStartAsPrimaryUserAccepted": true,
        "endType": "by"
      }
    }
  },
  "estimateNumberPrefix": "EST-",
  "userId": "6578278e879ad2646715ba9c",
  "attachments": [
    {
      "id": "6241712be68f7a98102ba272",
      "name": "Electronics.pdf",
      "url": "https://example.com/digital-delivery",
      "size": 10000
    }
  ],
  "autoInvoice": {
    "enabled": true,
    "directPayments": true
  },
  "miscellaneousCharges": {
    "charges": [
      []
    ],
    "collectedMiscellaneousCharges": 10,
    "paidCharges": [
      {
        "name": "Processing Fee",
        "charge": 10,
        "amount": 10,
        "_id": "673d01d7d547648a8dab6211"
      }
    ]
  },
  "paymentScheduleConfig": {
    "type": "fixed",
    "dateConfig": {
      "depositDateType": "estimate_accepted",
      "scheduleDateType": "regular_interval"
    },
    "schedules": [
      []
    ]
  },
  "estimateStatus": "sent"
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "altId": "6578278e879ad2646715ba9c",
  "name": "Home Service Estimate",
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": []
  },
  "currency": "USD",
  "items": [
    {
      "name": "ABC Product",
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "taxes": [],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "type": "one_time",
      "taxInclusive": true,
      "attachments": [
        "https://example.com/file1.jpg",
        "https://example.com/file2.png"
      ]
    }
  ],
  "liveMode": true,
  "discount": {
    "value": 10,
    "type": "percentage",
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "<p>This is a default terms.</p>",
  "title": "ESTIMATE",
  "contactDetails": {
    "id": "6578278e879ad2646715ba9c",
    "name": "Alex",
    "phoneNo": "+1234567890",
    "email": "alex@example.com",
    "additionalEmails": [
      {
        "email": "alex@example.com"
      }
    ],
    "companyName": "ABC Corp.",
    "address": {
      "addressLine1": "9931 Beechwood",
      "addressLine2": "Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "US",
      "postalCode": "559-6993"
    },
    "customFields": []
  },
  "estimateNumber": 1001,
  "issueDate": "2024-08-07",
  "expiryDate": "2024-08-10",
  "sentTo": {
    "email": [
      "alex@example.com"
    ],
    "emailCc": [
      "alex@example.com"
    ],
    "emailBcc": [
      "alex@example.com"
    ],
    "phoneNo": [
      "+1-214-559-6993"
    ]
  },
  "automaticTaxesEnabled": true,
  "meta": {
    "key": "value"
  },
  "sendEstimateDetails": {
    "altId": "6578278e879ad2646715ba9c",
    "liveMode": true,
    "userId": "6578278e879ad2646715ba9c",
    "sentFrom": {
      "fromName": "Alex",
      "fromEmail": "alex@example.com"
    },
    "estimateName": "Estimate"
  },
  "frequencySettings": {
    "enabled": true,
    "schedule": {
      "rrule": {
        "intervalType": "monthly",
        "interval": 2,
        "startDate": "2023-01-01",
        "startTime": "20:45:00",
        "endDate": "2029-11-01",
        "endTime": "18:45:00",
        "dayOfMonth": 15,
        "dayOfWeek": "mo",
        "numOfWeek": -1,
        "monthOfYear": "jan",
        "count": 10,
        "daysBefore": 5,
        "useStartAsPrimaryUserAccepted": true,
        "endType": "by"
      }
    }
  },
  "estimateNumberPrefix": "EST-",
  "userId": "6578278e879ad2646715ba9c",
  "attachments": [
    {
      "id": "6241712be68f7a98102ba272",
      "name": "Electronics.pdf",
      "url": "https://example.com/digital-delivery",
      "size": 10000
    }
  ],
  "autoInvoice": {
    "enabled": true,
    "directPayments": true
  },
  "miscellaneousCharges": {
    "charges": [
      []
    ],
    "collectedMiscellaneousCharges": 10,
    "paidCharges": [
      {
        "name": "Processing Fee",
        "charge": 10,
        "amount": 10,
        "_id": "673d01d7d547648a8dab6211"
      }
    ]
  },
  "paymentScheduleConfig": {
    "type": "fixed",
    "dateConfig": {
      "depositDateType": "estimate_accepted",
      "scheduleDateType": "regular_interval"
    },
    "schedules": [
      []
    ]
  },
  "estimateStatus": "sent"
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/invoices/estimate/<estimateId>' -Method 'PUT' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
