> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Estimate Template

> Create a new estimate template



## OpenAPI

````yaml /api-reference/invoices/openapi.json post /invoices/estimate/template
openapi: 3.0.0
info:
  title: Invoice API
  description: Documentation for invoice API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Invoice
    description: Documentation for invoice API
  - name: Template
    description: Documentation for invoice API
  - name: Schedule
    description: Documentation for invoice API
  - name: Text2Pay
    description: Documentation for invoice API
  - name: Estimate
    description: Documentation for invoice API
paths:
  /invoices/estimate/template:
    post:
      tags:
        - Estimate
      summary: Create Estimate Template
      description: Create a new estimate template
      operationId: create-estimate-template
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EstimateTemplatesDto'
      responses:
        '201':
          description: Successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateTemplateResponseDTO'
        '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:
  schemas:
    EstimateTemplatesDto:
      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 Template
        businessDetails:
          $ref: '#/components/schemas/BusinessDetailsDto'
        currency:
          type: string
          description: Currency code
          example: USD
        items:
          description: An array of items for the estimate.
          items:
            type: array
          type: array
        liveMode:
          type: boolean
          description: livemode for estimate
          example: true
          default: true
        discount:
          $ref: '#/components/schemas/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
        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:
          $ref: '#/components/schemas/SendEstimateDto'
        estimateNumberPrefix:
          type: string
          description: Prefix for the estimate number
          example: EST-
          default: EST-
        attachments:
          description: attachments for the invoice
          type: array
          items:
            $ref: '#/components/schemas/AttachmentsDto'
        miscellaneousCharges:
          $ref: '#/components/schemas/ProcessingFeeDto'
      required:
        - altId
        - altType
        - name
        - businessDetails
        - currency
        - items
        - discount
    EstimateTemplateResponseDTO:
      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:
          $ref: '#/components/schemas/BusinessDetails'
          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
        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:
          $ref: '#/components/schemas/DiscountDto'
          example:
            type: percentage
            value: 0
        title:
          type: string
          description: Title
          example: ESTIMATE
        estimateNumberPrefix:
          type: string
          description: Estimate number prefix
          example: EST-
        attachments:
          description: Attachments
          type: array
          items:
            $ref: '#/components/schemas/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>
      required:
        - altId
        - altType
        - _id
        - liveMode
        - deleted
        - name
        - currency
        - businessDetails
        - items
        - discount
        - total
        - createdAt
        - updatedAt
        - __v
        - automaticTaxesEnabled
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    BusinessDetailsDto:
      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:
          $ref: '#/components/schemas/AddressDto'
          example: 9931 Beechwood, TX
        website:
          type: string
          description: Business Website Link
          example: wwww.example.com
        customValues:
          description: Custom Values
          type: array
          items:
            type: string
    DiscountDto:
      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
    SendEstimateDto:
      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:
          $ref: '#/components/schemas/InvoiceSettingsSenderConfigurationDto'
        estimateName:
          type: string
          description: estimate name
          example: Estimate
      required:
        - altId
        - altType
        - action
        - liveMode
        - userId
    AttachmentsDto:
      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
    ProcessingFeeDto:
      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:
            $ref: '#/components/schemas/ProcessingFeePaidChargeDto'
      required:
        - charges
    BusinessDetails:
      type: object
      properties: {}
    AddressDto:
      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
    InvoiceSettingsSenderConfigurationDto:
      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
    ProcessingFeePaidChargeDto:
      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

````