openapi: 3.0.0
info:
  title: Invoices
  description: Invoice is a document sent to your client that indicates the products/services sold by you with the payment information that the client has to make.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.in/erp/v3
    description: API Endpoint
tags:
  - name: invoices
    description: Invoices Module
paths:
  /invoices:
    post:
      tags:
        - invoices
      operationId: create_invoice
      summary: Create an invoice
      description: Create an invoice for your customer.
      parameters:
        - name: send
          in: query
          description: Send the invoice to the contact person(s) associated with the invoice. Allowed values <code>true</code> and <code>false</code>.
          required: false
          schema:
            type: boolean
        - name: ignore_auto_number_generation
          in: query
          description: Ignore auto invoice number generation for this invoice. This mandates the invoice number. Allowed values <code>true</code> and <code>false</code>
          required: false
          schema:
            type: boolean
        - name: is_quick_create
          in: query
          description: Enable quick create mode for simplified invoice creation. When true, the invoice creation process is streamlined with minimal required fields. Allowed values <code>true</code> and <code>false</code>
          required: false
          schema:
            type: boolean
        - name: batch_payments
          in: query
          description: 'Enable batch payment processing for the invoice. When true, the invoice can be included in batch payment operations. Allowed values <code>true</code> and <code>false</code> <br/> Note :  <code>is_quick_create</code> needs to be true for batch payments to be processed and batch_payments vales need to pass in request body.'
          required: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-an-invoice-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    get:
      tags:
        - invoices
      operationId: list_invoices
      summary: List invoices
      description: Get a list of invoices with helpful pagination, filtering, search, and sorting features. Perfect for viewing your invoice data in organized ways, whether you need to find specific invoices or browse through your records.
      parameters:
        - name: invoice_number
          in: query
          description: Search invoices by invoice number. Filters invoices based on their unique identifier. Supports <code>invoice_number_startswith</code> and <code>invoice_number_contains</code> variants. Maximum length is 100 characters. Useful for finding specific invoices or invoices with similar numbering patterns.
          required: false
          schema:
            type: string
          example: INV-00003
        - name: item_name
          in: query
          description: Search invoices by item name. Filters invoices based on product or service names in invoice line items. Supports <code>item_name_startswith</code> and <code>item_name_contains</code> variants. Maximum length is 100 characters. Useful for finding invoices with specific products or services.
          required: false
          schema:
            type: string
          example: Desktop Units
        - name: item_id
          in: query
          description: 'Search invoices by item ID. Filters invoices based on the unique identifier of specific products or services in line items. Use the GET `/items` API to find available item IDs. Useful for finding all invoices containing a specific product or service. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: 982000000030049
        - name: item_description
          in: query
          description: Search invoices by item description. Filters invoices based on detailed descriptions of products or services in line items. Supports <code>item_description_startswith</code> and <code>item_description_contains</code> variants. Maximum length is 100 characters. Useful for finding invoices with specific item descriptions or technical specifications.
          required: false
          schema:
            type: string
          example: ''
        - name: reference_number
          in: query
          description: Search invoices by reference number. Filters invoices based on external reference identifiers like purchase order numbers, contract numbers, or project codes. Useful for finding invoices associated with specific projects or business transactions.
          required: false
          schema:
            type: string
          example: ''
        - name: customer_name
          in: query
          description: Search invoices by customer name. Filters invoices based on the business or individual name associated with the invoice. Maximum length is 100 characters. Useful for finding all invoices for a specific customer or generating customer reports.
          required: false
          schema:
            type: string
          example: Zylker Inc
        - name: recurring_invoice_id
          in: query
          description: 'ID of the recurring invoice from which the invoice is created. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: ''
        - name: email
          in: query
          description: Search invoices by customer email address. Filters invoices based on the email address of the customer or contact person. Maximum length is 100 characters. Useful for finding invoices for specific customers or generating customer segment reports.
          required: false
          schema:
            type: string
          example: ''
        - name: total
          in: query
          description: Search invoices by total amount. Filters invoices based on the final invoice amount including taxes, discounts, and adjustments. Useful for finding invoices within specific price ranges or identifying high-value transactions.
          required: false
          schema:
            type: string
          example: 40.6
        - name: balance
          in: query
          description: Search invoices by outstanding balance. Filters invoices based on the remaining unpaid amount owed by the customer. Useful for finding overdue invoices, tracking receivables, or generating aging reports.
          required: false
          schema:
            type: string
          example: 40.6
        - name: custom_field
          in: query
          description: 'Search invoices by custom fields. Variants: <code>custom_field_startswith</code> and <code>custom_field_contains</code>'
          required: false
          schema:
            type: string
          example: ''
        - name: date
          in: query
          description: Filter invoices for an exact invoice date. Returns invoices created on the specified date. Use yyyy-mm-dd format.
          required: false
          schema:
            type: string
            format: date
          example: '2013-11-17'
        - name: date_start
          in: query
          description: Filter invoices with an invoice date on or after the specified date. Useful for defining the start of a date range. Use yyyy-mm-dd format.
          required: false
          schema:
            type: string
            format: date
          example: '2013-11-01'
        - name: date_end
          in: query
          description: Filter invoices with an invoice date on or before the specified date. Useful for defining the end of a date range. Use yyyy-mm-dd format.
          required: false
          schema:
            type: string
            format: date
          example: '2013-11-30'
        - name: date_before
          in: query
          description: Filter invoices with an invoice date strictly before the specified date (exclusive). Use yyyy-mm-dd format.
          required: false
          schema:
            type: string
            format: date
          example: '2013-11-17'
        - name: date_after
          in: query
          description: Filter invoices with an invoice date strictly after the specified date (exclusive). Use yyyy-mm-dd format.
          required: false
          schema:
            type: string
            format: date
          example: '2013-11-17'
        - name: due_date
          in: query
          description: 'Search invoices by due date. Filters invoices based on the payment due date. Use yyyy-mm-dd format. Supports variants: <code>due_date_start</code>, <code>due_date_end</code>, <code>due_date_before</code> and <code>due_date_after</code>. Useful for finding overdue invoices or invoices due within specific periods.'
          required: false
          schema:
            type: string
          example: '2013-12-03'
        - name: created_date
          in: query
          description: 'Search invoices by creation date. Filters invoices based on the date they were created. Use yyyy-mm-dd format. Supports variants: <code>created_date_start</code>, <code>created_date_end</code>, <code>created_date_before</code> and <code>created_date_after</code>. Useful for finding invoices created within specific time periods or date ranges.'
          required: false
          schema:
            type: string
          example: '2013-11-17'
        - name: last_modified_time
          in: query
          required: false
          description: 'Search invoices modified after a specific time. Filters invoices based on their last modification timestamp. Use YYYY-MM-DDTHH:MM:SS-UTC format. Useful for finding recently updated invoices or syncing data changes. Example : 2023-11-18T02:02:51-0800, 2025-19-19T02:02:51%2B0800.'
          schema:
            type: string
          example: 2013-11-18T02:02:51-0800
        - name: status
          in: query
          description: 'Search invoices by status. Filters invoices based on their current state in the billing workflow. Allowed values: <code>sent</code>, <code>draft</code>, <code>overdue</code>, <code>paid</code>, <code>void</code>, <code>unpaid</code>, <code>partially_paid</code> and <code>viewed</code>. Useful for finding invoices in specific stages of the billing process.'
          required: false
          schema:
            type: string
          example: draft
        - name: customer_id
          in: query
          description: 'Search invoices by customer ID. Filters invoices based on the unique identifier of the customer for whom the invoice was created. Use the customer ID returned by the Contacts API to find all invoices for a specific customer. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: 982000000567001
        - name: filter_by
          in: query
          description: Filter invoices by status or payment expected date. Use <code>Status.*</code> for status-based filtering (e.g., Status.Sent, Status.Paid) or <code>Date.PaymentExpectedDate</code> for date-based filtering. Provides advanced filtering options beyond basic search parameters.
          required: false
          schema:
            type: string
          example: ''
        - name: search_text
          in: query
          description: Search invoices by invoice number, purchase order, or customer name. This parameter performs a general search across multiple invoice fields. Maximum length is 100 characters. Useful for quick searches when you know part of the invoice information but are unsure which specific field to search.
          required: false
          schema:
            type: string
          example: ''
        - name: sort_column
          in: query
          description: 'Sort invoices by specific column. Allowed values: <code>customer_name</code>, <code>invoice_number</code>, <code>date</code>, <code>due_date</code>, <code>total</code>, <code>balance</code> and <code>created_time</code>. Use this parameter to organize invoice results in a specific order for better data analysis and reporting.'
          required: false
          schema:
            type: string
          example: created_time
        - name: zcrm_potential_id
          in: query
          description: 'Search invoices by CRM potential ID. This parameter allows you to find invoices associated with a specific deal or opportunity in your Zoho CRM system. Use the potential ID from your CRM to link invoices to sales opportunities and track revenue from specific deals. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: 460000000026049
        - name: response_option
          in: query
          description: 'To get desired response format. There are 5 formats of responses: 0 (Includes all invoices), 1 (Includes all invoices, the number of invoices, and the sum of their total and balance amounts), 2 (Includes only the number of invoices), 3 (Includes the number of invoices and the sum of their total and balance amounts), and 4 (Includes all invoices and the sum of their total and balance amounts).'
          required: false
          schema:
            type: integer
          example: 2
        - name: page
          in: query
          description: Page number to be fetched from the paginated results. Default value is 1. Use this parameter along with per_page to navigate through large sets of invoice data. Useful for implementing pagination in your application.
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: Number of records to be fetched per page. Default value is 200.
          required: false
          schema:
            type: integer
            default: 200
          example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-invoices-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    put:
      tags:
        - invoices
      operationId: update_invoice_using_custom_field
      summary: Update an invoice using a custom field's unique value
      description: A custom field will have unique values if it's configured to not accept duplicate values. Now, you can use that custom field's value to update an invoice by providing its API name in the X-Unique-Identifier-Key header and its value in the X-Unique-Identifier-Value header. Based on this value, the corresponding invoice will be retrieved and updated. Additionally, there is an optional X-Upsert header. If the X-Upsert header is true and the custom field's unique value is not found in any of the existing invoices, a new invoice will be created if the necessary payload details are available.
      parameters:
        - name: X-Unique-Identifier-Key
          in: header
          description: Unique CustomField Api Name.
          required: true
          schema:
            type: string
            example: cf_unique_cf
        - name: X-Unique-Identifier-Value
          in: header
          description: Unique CustomField Value.
          required: true
          schema:
            type: string
            example: unique Value
        - name: X-Upsert
          in: header
          description: If there is no record is found unique custom field value , will create new invoice.
          required: false
          schema:
            type: boolean
            example: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-an-invoice-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}:
    parameters:
      - $ref: '#/components/parameters/invoice_id'
      - $ref: '#/components/parameters/organization_id'
    put:
      tags:
        - invoices
      operationId: update_invoice
      summary: Update an invoice
      description: Update an existing invoice. To delete a line item just remove it from the line_items list.
      parameters:
        - name: ignore_auto_number_generation
          in: query
          description: Ignore auto invoice number generation for this invoice. This mandates the invoice number. Allowed values <code>true</code> and <code>false</code>
          required: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-an-invoice-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    get:
      tags:
        - invoices
      operationId: get_invoice
      summary: Get an invoice
      description: Get the details of an invoice.
      parameters:
        - name: print
          in: query
          description: Print the exported pdf.
          required: false
          schema:
            type: boolean
        - name: accept
          in: query
          description: Get the details of a particular invoice in formats such as json/ pdf/ html. Default format is json. Allowed values <code>json</code> <code>pdf</code> and <code>html</code>
          required: false
          schema:
            type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    delete:
      tags:
        - invoices
      operationId: delete_invoice
      summary: Delete an invoice
      description: Delete an existing invoice. Invoices which have payment or credits note applied cannot be deleted.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
  /invoices/{invoice_id}/status/sent:
    post:
      tags:
        - invoices
      operationId: mark_invoice_sent
      summary: Mark an invoice as sent
      description: Mark a draft invoice as sent.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mark-an-invoice-as-sent-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        schema:
          type: string
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/status/void:
    post:
      tags:
        - invoices
      operationId: mark_invoice_void
      summary: Void an invoice
      description: Mark an invoice status as void. Upon voiding, the payments and credits associated with the invoices will be unassociated and will be under customer credits.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/void-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        schema:
          type: string
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/status/draft:
    post:
      tags:
        - invoices
      operationId: mark_invoice_draft
      summary: Mark as draft
      description: Mark a voided invoice as draft.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mark-as-draft-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        schema:
          type: string
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/email:
    post:
      tags:
        - invoices
      operationId: email_invoices
      summary: Email multiple invoices
      description: Send invoices to your customers by email. Maximum of 10 invoices can be sent at once.
      parameters:
        - name: invoice_ids
          in: query
          description: 'Comma separated invoice ids which are to be emailed. Note: This value is a set of numeric characters separated by comma.'
          required: true
          schema:
            type: string
          example: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/email-invoices-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email-invoices-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /invoices/fromsalesorder:
    post:
      tags:
        - invoices
      operationId: create_invoice_from_salesorder
      summary: Create an instant invoice
      description: ' Create an instant invoice for all the confirmed sales orders you have selected.'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-an-instant-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: salesorder_id
        in: query
        required: true
        description: 'Unique identifier of the sales order from which the invoice has to be created. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 2000000014088
      - $ref: '#/components/parameters/organization_id'
  /invoices/mapwithorder:
    post:
      tags:
        - invoices
      operationId: map_invoice_with_salesorder
      summary: Associate invoices with sales order
      description: Associate one or more existing invoices with a sales orders.
      parameters:
        - name: invoice_ids
          in: query
          description: 'Array of invoice IDs to be associated with a sales order. Note: This value is a set of numeric characters separated by comma.'
          required: true
          schema:
            type: string
          example: 982000000567114,982000000567115,982000000567116
        - $ref: '#/components/parameters/organization_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/map-invoice-with-salesorder-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
  /invoices/{invoice_id}/submit:
    post:
      tags:
        - invoices
      operationId: submit_invoice
      summary: Submit an invoice for approval
      description: Submit an invoice for approval.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/submit-an-invoice-for-approval-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        schema:
          type: string
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/approve:
    post:
      tags:
        - invoices
      operationId: approve_invoice
      summary: Approve an invoice.
      description: Approve an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/approve-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        schema:
          type: string
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/email:
    get:
      tags:
        - invoices
      operationId: get_invoice_email
      summary: Get invoice email content
      description: Get the email content of an invoice.
      parameters:
        - name: email_template_id
          in: query
          description: 'Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-invoice-email-content-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    post:
      tags:
        - invoices
      operationId: email_invoice
      summary: Email an invoice
      description: Email an invoice to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.
      parameters:
        - name: send_customer_statement
          in: query
          description: Send customer statement pdf a with email.
          required: false
          schema:
            type: boolean
          example: ' '
        - name: send_attachment
          in: query
          description: Send the invoice attachment a with the email.
          required: false
          schema:
            type: boolean
          example: ' '
        - name: attachments
          in: query
          description: Files to be attached to the email.
          required: false
          schema:
            type: string
            format: binary
          example: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/email-an-invoice-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        schema:
          type: string
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/paymentreminder:
    post:
      tags:
        - invoices
      operationId: remind_customer_for_invoice_payment
      summary: Remind Customer
      description: Remind your customer about an unpaid invoice by email. Reminder will be sent, only for the invoices which are in open or overdue status.
      parameters:
        - name: send_customer_statement
          in: query
          description: Send customer statement pdf a with email.
          required: false
          schema:
            type: boolean
          example: ' '
        - name: attachments
          in: query
          description: Files to be attached to the email.
          required: false
          schema:
            type: string
            format: binary
          example: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/remind-customer-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remind-customer-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    get:
      tags:
        - invoices
      operationId: get_payment_reminder_mail_content_for_invoice
      summary: Get payment reminder mail content
      description: Get the mail content of the payment reminder.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-payment-reminder-mail-content-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/paymentreminder:
    post:
      tags:
        - invoices
      operationId: bulk_invoice_reminder
      summary: Bulk invoice reminder
      description: Remind your customer about an unpaid invoices by email. Reminder mail will be send, only for the invoices is in open or overdue status. Maximum 10 invoices can be reminded at once.
      parameters:
        - name: invoice_ids
          in: query
          description: 'Array of invoice ids for which the reminder has to be sent. Note: This value is a set of numeric characters separated by comma.'
          required: true
          schema:
            type: string
          example: ''
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulk-invoice-reminder-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /invoices/pdf:
    get:
      tags:
        - invoices
      operationId: bulk_export_invoices_as_pdf
      summary: Bulk export Invoices
      description: Maximum of 25 invoices can be exported in a single pdf.
      parameters:
        - name: invoice_ids
          in: query
          description: 'Comma separated invoice ids which are to be export as pdf. Note: This value is a set of numeric characters separated by comma.'
          required: true
          schema:
            type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulk-export-invoices-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /invoices/print:
    get:
      tags:
        - invoices
      operationId: bulk_print_invoices
      summary: Bulk print invoices
      description: Export invoices as pdf and print them. Maximum of 25 invoices can be printed.
      parameters:
        - name: invoice_ids
          in: query
          description: 'Export invoices as pdf and print them. Maximum of 25 invoices can be printed. Note: This value is a set of numeric characters separated by comma.'
          required: true
          schema:
            type: string
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulk-print-invoices-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/paymentreminder/disable:
    post:
      tags:
        - invoices
      operationId: disable_invoice_payment_reminder
      summary: Disable payment reminder
      description: Disable automated payment reminders for an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/disable-payment-reminder-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: Unique identifier of the invoice.
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/paymentreminder/enable:
    post:
      tags:
        - invoices
      operationId: enable_invoice_payment_reminder
      summary: Enable payment reminder
      description: Enable automated payment reminders for an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enable-payment-reminder-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/writeoff:
    post:
      tags:
        - invoices
      operationId: write_off_invoice
      summary: Write off invoice
      description: Write off the invoice balance amount of an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/write-off-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/writeoff/cancel:
    post:
      tags:
        - invoices
      operationId: cancel_write_off_invoice
      summary: Cancel write off
      description: Cancel the write off amount of an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cancel-write-off-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/address/billing:
    put:
      tags:
        - invoices
      operationId: update_invoice_billing_address
      summary: Update billing address
      description: Updates the billing address for this invoice alone.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-billing-address-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-billing-address-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/address/shipping:
    put:
      tags:
        - invoices
      operationId: update_invoice_shipping_address
      summary: Update shipping address
      description: Updates the shipping address for this invoice alone.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-shipping-address-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-shipping-address-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/templates:
    get:
      tags:
        - invoices
      operationId: list_invoice_templates
      summary: List invoice templates
      description: Get all invoice pdf templates.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-invoice-templates-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/templates/{template_id}:
    put:
      tags:
        - invoices
      operationId: update_invoice_template
      summary: Update invoice template
      description: Update the pdf template associated with the invoice.
      parameters:
        - name: template_id
          in: path
          required: true
          description: 'Unique identifier of the invoice template. Note: This value is a set of numeric characters.'
          schema:
            type: string
          example: 982000000000143
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-invoice-template-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/payments:
    get:
      tags:
        - invoices
      operationId: list_invoice_payments
      summary: List invoice payments
      description: Get the list of payments made for an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-invoice-payments-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/creditsapplied:
    get:
      tags:
        - invoices
      operationId: list_invoice_credits_applied
      summary: List credits applied
      description: Get the list of credits applied for an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-credits-applied-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/credits:
    post:
      tags:
        - invoices
      operationId: apply_credits_to_invoice
      summary: Apply credits
      description: Apply the customer credits either from credit notes or excess customer payments to an invoice. Multiple credits can be applied at once.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apply-credits-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apply-credits-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/payments/{invoice_payment_id}:
    delete:
      tags:
        - invoices
      operationId: delete_invoice_payment
      summary: Delete a payment
      description: Delete a payment made to an invoice.
      parameters:
        - name: invoice_payment_id
          in: path
          required: true
          description: 'Unique identifier of the invoice payment. Note: This value is a set of numeric characters.'
          schema:
            type: string
          example: 982000000567192
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-payment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/creditsapplied/{creditnotes_invoice_id}:
    delete:
      tags:
        - invoices
      operationId: delete_invoice_applied_credit
      summary: Delete applied credit
      description: Delete a particular credit applied to an invoice.
      parameters:
        - name: creditnotes_invoice_id
          in: path
          required: true
          description: 'Unique identifier of the credit note invoice. Note: This value is a set of numeric characters.'
          schema:
            type: string
          example: '982000000567172'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-applied-credit-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/attachment:
    get:
      tags:
        - invoices
      operationId: get_invoice_attachment
      summary: Get last attached attachment
      description: Returns the file attached to the invoice.
      parameters:
        - name: preview
          in: query
          description: Get the thumbnail of the attachment.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-an-invoice-attachment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    post:
      tags:
        - invoices
      operationId: add_invoice_attachment
      summary: Add attachment to an invoice
      description: Attach a file to an invoice.
      parameters:
        - name: can_send_in_mail
          in: query
          description: True to send the attachment with the invoice when emailed.
          required: false
          schema:
            type: boolean
          example: true
        - name: attachment
          in: query
          description: 'The file to be attached. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code> and <code>pdf</code>'
          required: false
          schema:
            type: string
            format: binary
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-attachment-to-an-invoice-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    put:
      tags:
        - invoices
      operationId: update_invoice_attachment_preference
      summary: Update attachment preference
      description: Set whether you want to send the attached file while emailing the invoice.
      parameters:
        - name: can_send_in_mail
          in: query
          description: Indicates whether to send the attachment with the invoice when emailed.
          required: true
          schema:
            type: boolean
          example: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-attachment-preference-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    delete:
      tags:
        - invoices
      operationId: delete_invoice_attachment
      summary: Delete last attached attachment
      description: Delete the file attached to the invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-an-attachment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/documents/{document_id}:
    get:
      tags:
        - invoices
      operationId: get_invoice_document_details
      summary: Retrieve Invoice Document
      description: Retrieve a specific document attached to an invoice with advanced retrieval options.
      parameters:
        - name: invoice_id
          in: path
          required: true
          description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
          schema:
            type: string
        - name: document_id
          in: path
          required: true
          description: 'Unique identifier of the document. Note: This value is a set of numeric characters.'
          schema:
            type: string
        - name: responseformat
          in: query
          description: Specify the response format (e.g., json, pdf, html)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-invoice-document-response'
            application/pdf:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
            image/png:
              schema:
                type: string
                format: binary
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    delete:
      tags:
        - invoices
      operationId: delete_invoice_document
      summary: Delete Invoice attachment
      description: Delete a specific document attached to an invoice. This operation permanently removes the document from the invoice and cannot be undone. Only documents that are not system-generated can be deleted.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-invoice-document-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - name: document_id
        in: path
        required: true
        description: 'Unique identifier of the document. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567200
      - $ref: '#/components/parameters/organization_id'
  /invoices/expenses/{expense_id}/receipt:
    delete:
      tags:
        - invoices
      operationId: delete_invoice_expense_receipt
      summary: Delete the expense receipt
      description: Delete the expense receipts attached to an invoice which is raised from an expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-the-expense-receipt-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
    parameters:
      - name: expense_id
        in: path
        required: true
        description: 'Unique identifier of the expense. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: '460000000028080'
      - $ref: '#/components/parameters/organization_id'
  /invoice/{invoice_id}/customfields:
    put:
      tags:
        - invoices
      operationId: update_custom_fields_in_invoice
      summary: Update custom field in existing invoices
      description: Update the value of the custom field in existing invoices.
      parameters:
        - $ref: '#/components/parameters/invoice_id'
        - $ref: '#/components/parameters/organization_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/custom_fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-an-invoice-customfield-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
  /invoices/{invoice_id}/comments:
    get:
      tags:
        - invoices
      operationId: list_invoice_comments
      summary: List invoice comments & history
      description: Get the complete history and comments of an invoice.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-invoice-comments-and-history-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.READ
    post:
      tags:
        - invoices
      operationId: add_invoice_comment
      summary: Add comment
      description: Add a comment for an invoice.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-comment-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.CREATE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /invoices/{invoice_id}/comments/{comment_id}:
    put:
      tags:
        - invoices
      operationId: update_invoice_comment
      summary: Update comment
      description: Update an existing comment of an invoice.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-a-comment-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.UPDATE
    delete:
      tags:
        - invoices
      operationId: delete_invoice_comment
      summary: Delete a comment
      description: Delete an invoice comment.
      parameters:
        - name: comment_id
          in: path
          required: true
          description: 'Unique identifier of the comment. Note: This value is a set of numeric characters.'
          schema:
            type: string
          example: 982000000567019
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.invoices.DELETE
    parameters:
      - name: invoice_id
        in: path
        required: true
        description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567114
      - name: comment_id
        in: path
        required: true
        description: 'Unique identifier of the comment. Note: This value is a set of numeric characters.'
        schema:
          type: string
        example: 982000000567019
      - $ref: '#/components/parameters/organization_id'
  /share/paymentlink:
    get:
      tags:
        - invoices
      operationId: generate_invoice_payment_link
      summary: Generate payment link
      description: This API generates a payment link for the invoice with an expiry date.
      parameters:
        - $ref: '#/components/parameters/transaction_id'
        - $ref: '#/components/parameters/transaction_type'
        - $ref: '#/components/parameters/link_type'
        - $ref: '#/components/parameters/expiry_time'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment-link-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.ALL
    parameters:
      - $ref: '#/components/parameters/transaction_id'
      - $ref: '#/components/parameters/transaction_type'
      - $ref: '#/components/parameters/link_type'
      - $ref: '#/components/parameters/expiry_time'
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    transaction_id:
      name: transaction_id
      in: query
      description: 'The ID of the transaction (Invoice ID). Note: This value is a set of numeric characters.'
      required: true
      schema:
        type: string
      example: '982000000567114'
    transaction_type:
      name: transaction_type
      in: query
      description: The type of the transaction (Invoice).
      required: true
      schema:
        type: string
      example: invoice
    link_type:
      name: link_type
      in: query
      description: The type of the link (Private or Public).
      required: true
      schema:
        type: string
      example: public
    invoice_id:
      name: invoice_id
      in: path
      description: 'Unique identifier of the invoice. Note: This value is a set of numeric characters.'
      schema:
        type: string
      example: 982000000567114
      required: true
    expiry_time:
      name: expiry_time
      in: query
      description: 'The expiry time of the payment link. Supported format : <code>yyyy-MM-dd</code>'
      required: true
      schema:
        type: string
      example: '2024-06-27'
    organization_id:
      name: organization_id
      description: 'ID of the organization. Note: This value is a set of numeric characters.'
      in: query
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/invoice-response'
    invoice-response:
      type: object
      properties:
        invoice_id:
          $ref: '#/components/schemas/invoice_id'
        ach_payment_initiated:
          $ref: '#/components/schemas/ach_payment_initiated'
        invoice_number:
          $ref: '#/components/schemas/invoice_number'
        is_pre_gst:
          $ref: '#/components/schemas/is_pre_gst'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        reference_invoice_id:
          description: 'Associate the reference invoice. Note: This value is a set of numeric characters.'
          type: string
          example: '132738000000126013'
        date:
          $ref: '#/components/schemas/date'
        status:
          $ref: '#/components/schemas/status'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
        due_date:
          $ref: '#/components/schemas/due_date'
        payment_expected_date:
          $ref: '#/components/schemas/payment_expected_date'
        last_payment_date:
          $ref: '#/components/schemas/last_payment_date'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        customer_name:
          $ref: '#/components/schemas/customer_name'
        contact_persons_associated:
          $ref: '#/components/schemas/contact_persons_associated'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        currency_code:
          $ref: '#/components/schemas/currency_code'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        discount:
          $ref: '#/components/schemas/discount'
        is_discount_before_tax:
          $ref: '#/components/schemas/is_discount_before_tax'
        discount_type:
          $ref: '#/components/schemas/discount_type'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        recurring_invoice_id:
          $ref: '#/components/schemas/recurring_invoice_id'
        is_viewed_by_client:
          $ref: '#/components/schemas/is_viewed_by_client'
        has_attachment:
          $ref: '#/components/schemas/has_attachment'
        client_viewed_time:
          $ref: '#/components/schemas/client_viewed_time'
        line_items:
          type: array
          description: List of line items in the invoice.
          items:
            type: object
            properties:
              line_item_id:
                $ref: '#/components/schemas/line_item_id'
              item_id:
                $ref: '#/components/schemas/item_id'
              project_id:
                $ref: '#/components/schemas/project_id'
              project_name:
                $ref: '#/components/schemas/project_name'
              time_entry_ids:
                $ref: '#/components/schemas/time_entry_ids'
              location_id:
                $ref: '#/components/schemas/location_id'
              location_name:
                $ref: '#/components/schemas/location_name'
              item_type:
                $ref: '#/components/schemas/item_type'
              product_type:
                $ref: '#/components/schemas/product_type'
              expense_id:
                $ref: '#/components/schemas/expense_id'
              expense_receipt_name:
                $ref: '#/components/schemas/expense_receipt_name'
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              item_order:
                $ref: '#/components/schemas/item_order'
              bcy_rate:
                $ref: '#/components/schemas/bcy_rate'
              rate:
                $ref: '#/components/schemas/rate'
              quantity:
                $ref: '#/components/schemas/quantity'
              unit:
                $ref: '#/components/schemas/unit'
              discount_amount:
                $ref: '#/components/schemas/discount_amount'
              discount:
                $ref: '#/components/schemas/discount'
              tags:
                $ref: '#/components/schemas/tags_response'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              tds_tax_id:
                $ref: '#/components/schemas/tds_tax_id'
              tax_name:
                $ref: '#/components/schemas/tax_name'
              tax_type:
                $ref: '#/components/schemas/tax_type'
              tax_percentage:
                $ref: '#/components/schemas/tax_percentage'
              item_total:
                $ref: '#/components/schemas/item_total'
              header_name:
                $ref: '#/components/schemas/header_name'
              header_id:
                $ref: '#/components/schemas/header_id'
        shipping_charge:
          $ref: '#/components/schemas/shipping_charge'
        location_id:
          $ref: '#/components/schemas/location_id'
        location_name:
          $ref: '#/components/schemas/location_name'
        adjustment:
          $ref: '#/components/schemas/adjustment'
        adjustment_description:
          $ref: '#/components/schemas/adjustment_description'
        sub_total:
          $ref: '#/components/schemas/sub_total'
        tax_total:
          $ref: '#/components/schemas/tax_total'
        total:
          $ref: '#/components/schemas/total'
        taxes:
          $ref: '#/components/schemas/taxes'
        payment_reminder_enabled:
          $ref: '#/components/schemas/payment_reminder_enabled'
        payment_made:
          $ref: '#/components/schemas/payment_made'
        credits_applied:
          $ref: '#/components/schemas/credits_applied'
        tax_amount_withheld:
          $ref: '#/components/schemas/tax_amount_withheld'
        balance:
          $ref: '#/components/schemas/balance'
        write_off_amount:
          $ref: '#/components/schemas/write_off_amount'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        price_precision:
          $ref: '#/components/schemas/price_precision'
        payment_options:
          $ref: '#/components/schemas/payment_options'
        is_emailed:
          $ref: '#/components/schemas/is_emailed'
        reminders_sent:
          $ref: '#/components/schemas/reminders_sent'
        last_reminder_sent_date:
          $ref: '#/components/schemas/last_reminder_sent_date'
        billing_address:
          $ref: '#/components/schemas/billing_address'
        shipping_address:
          $ref: '#/components/schemas/update-shipping-address-request'
        notes:
          $ref: '#/components/schemas/notes'
        terms:
          $ref: '#/components/schemas/terms'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        template_id:
          $ref: '#/components/schemas/template_id'
        template_name:
          $ref: '#/components/schemas/template_name'
        created_time:
          $ref: '#/components/schemas/created_time'
        last_modified_time:
          $ref: '#/components/schemas/last_modified_time'
        attachment_name:
          $ref: '#/components/schemas/attachment_name'
        can_send_in_mail:
          $ref: '#/components/schemas/can_send_in_mail'
        salesperson_id:
          $ref: '#/components/schemas/salesperson_id'
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
        invoice_url:
          $ref: '#/components/schemas/invoice_url'
        tags:
          $ref: '#/components/schemas/tags_response'
    show_comment_to_clients:
      description: Indicates whether the comment is to be shown to the clients.
      type: boolean
      example: true
    ignore_auto_number_generation:
      description: Ignore auto invoice number generation for this invoice. This mandates the invoice number. Allowed values <code>true</code> and <code>false</code>
      type: boolean
    send:
      description: Send the invoice to the contact person(s) associated with the invoice. Allowed values <code>true</code> and <code>false</code>.
      type: boolean
    organization_contact_id:
      type: string
      description: 'Unique identifier of the contact in the organization. Note: This value is a set of numeric characters.'
      example: '2000000002266'
    place_of_supply:
      description: 'Place of supply for GST (Indian state/UT code where the supply is treated as made). If omitted, the contact''s place of contact may apply. Example: <code>TN</code> (Tamil Nadu).'
      type: string
      example: TN
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    gst_treatment:
      description: Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are <code> business_gst </code> , <code> business_none </code> , <code> overseas </code> , <code> consumer </code>.
      type: string
      example: business_gst
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    gst_no:
      description: 15 digit GST identification number of the customer.
      type: string
      example: 22AAAAA0000A1Z5
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reference_invoice_id:
      description: 'Associate the reference invoice. Note: This value is a set of numeric characters.'
      type: string
      example: '132738000000126013'
    product_type:
      description: 'Type of line item for GST. Allowed values: <code>goods</code> or <code>services</code>.'
      type: string
      example: goods
    hsn_or_sac:
      description: Add HSN/SAC code for your goods/services.
      type: string
      example: 80540
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    location_id:
      description: 'Unique identifier of the business location associated with the invoice. Use the `location_id` returned by the Locations API for the same organization. This links the invoice to a specific business location, which may affect tax calculations, reporting, and business operations. Required if your organization has multiple locations configured. Note: This value is a set of numeric characters.'
      type: string
      example: '460000000038080'
    location_name:
      description: Name of the location.
      type: string
      example: Chennai
    item_type:
      description: Enter goods/services.
      type: string
      example: goods
    is_pre_gst:
      description: Applicable for transactions that fall before july 1, 2017.
      type: boolean
      example: true
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    is_org_email_id:
      type: boolean
      example: true
    comments:
      description: The details of the comments.
      type: array
      items:
        type: string
    commented_by_id:
      type: string
      description: 'Unique identifier of the user who commented. Note: This value is a set of numeric characters.'
      example: 982000000554041
    comment_type:
      type: string
      example: system
    commented_by:
      type: string
      example: John David
    date_description:
      type: string
      example: yesterday
    time:
      type: string
      example: 2:02 AM
    operation_type:
      type: string
      example: Added
    transaction_id:
      type: string
      description: 'Unique identifier of the transaction. Note: This value is a set of numeric characters.'
      example: ' '
    transaction_type:
      type: string
      example: invoice
    online_transaction_id:
      type: string
      description: 'Unique identifier of the online transaction. Note: This value is a set of numeric characters.'
      example: ''
    comment_id:
      description: 'ID of the comment. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567019
    preview:
      description: Get the thumbnail of the attachment.
      type: boolean
    credits:
      description: The list of credits.
      type: array
      items:
        type: string
    creditnote_id:
      description: 'ID of the creditnote. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567134
    creditnotes_invoice_id:
      description: 'The creditnotes invoice id. Note: This value is a set of numeric characters.'
      type: string
      example: '982000000567172'
    creditnotes_number:
      description: The creditnotes Number.
      type: string
      example: CN-00001
    credited_date:
      description: The date of credit.
      type: string
      example: '2013-11-18'
    amount_applied:
      description: The applied amount to the creditnote.
      type: number
      format: float
      example: 12.2
    payments:
      description: The list of payments.
      type: array
      items:
        type: string
    payment_id:
      description: 'ID of the payment. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567190
    payment_number:
      description: The payment Number.
      type: integer
      example: 7
    invoice_payment_id:
      description: 'The invoice payment id. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567192
    payment_mode:
      description: The mode of payment for the invoice.
      type: string
      example: cash
    amount:
      description: The amount in the payment.
      type: number
      format: float
      example: 10.57
    is_single_invoice_payment:
      description: boolean check.
      type: boolean
      example: true
    to_mails_str:
      type: string
      example: ''
    cc_mails_str:
      type: string
      example: ''
    from_email:
      type: string
      example: ''
    from_address:
      type: string
      example: ''
    emailtemplate_documents:
      type: array
      items:
        type: string
    file_name_without_extension:
      type: string
      example: INV-000004
    print:
      description: Print the exported pdf.
      type: boolean
    accept:
      description: Get the details of a particular invoice in formats such as json/ pdf/ html. Default format is json. Allowed values <code>json</code> <code>pdf</code> and <code>html</code>
      type: string
    templates:
      type: array
      items:
        type: string
    template_type:
      description: The type of template type.
      type: string
      example: classic
    error_list:
      type: array
      items:
        type: string
      example: []
    file_name:
      type: string
      example: INV-00001.pdf
    to_contacts:
      type: array
      items:
        type: string
    contact_person_name:
      description: Name of the Contact Person.
      type: string
      example: David
    first_name:
      description: First Name of the Contact Person.
      type: string
      example: David
    contact_person_email:
      description: Email ID of the Contact Person.
      type: string
      example: willsmith@zylker.org
    phone:
      description: Phone Number of the Contact Person.
      type: string
      example: +91-44-4000-0000
    last_name:
      description: Last Name of the Contact Person.
      type: string
      example: John
    salutation:
      description: Salutation of the Contact Person.
      type: string
      example: Mr
    contact_person_id:
      description: 'Unique ID of the Contact Person. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567003
    mobile:
      description: Mobile Number of the Contact Person.
      type: string
      example: +91-9876543210
    is_email_enabled:
      description: Used to check if Email communication preference is enabled for the contact person at transaction level.
      type: boolean
      example: true
    is_sms_enabled:
      description: Used to check if SMS communication preference is enabled for the contact person at transaction level.
      type: boolean
      example: true
    is_whatsapp_enabled:
      description: Used to check if WhatsApp communication preference is enabled for the contact person at transaction level.
      type: boolean
      example: true
    communication_preference:
      description: Preferred modes of communication for the contact person at transaction level.
      type: object
      properties:
        is_email_enabled:
          $ref: '#/components/schemas/is_email_enabled'
        is_sms_enabled:
          $ref: '#/components/schemas/is_sms_enabled'
        is_whatsapp_enabled:
          $ref: '#/components/schemas/is_whatsapp_enabled'
    contact_persons_associated:
      description: Contact Persons associated with the transaction.
      type: array
      items:
        type: object
        properties:
          contact_person_id:
            $ref: '#/components/schemas/contact_person_id'
          contact_person_name:
            $ref: '#/components/schemas/contact_person_name'
          first_name:
            $ref: '#/components/schemas/first_name'
          last_name:
            $ref: '#/components/schemas/last_name'
          contact_person_email:
            $ref: '#/components/schemas/contact_person_email'
          phone:
            $ref: '#/components/schemas/phone'
          mobile:
            $ref: '#/components/schemas/mobile'
          communication_preference:
            $ref: '#/components/schemas/communication_preference'
    contact_persons_associated_payload:
      description: Contact Persons associated with the transaction.
      type: array
      items:
        type: object
        properties:
          contact_person_id:
            $ref: '#/components/schemas/contact_person_id'
          communication_preference:
            $ref: '#/components/schemas/communication_preference'
    from_emails:
      type: array
      items:
        type: string
    user_name:
      type: string
      example: John Smith
    emailtemplates:
      type: array
      items:
        type: string
    gateways_configured:
      type: boolean
      example: true
    deprecated_placeholders_used:
      type: array
      items:
        type: string
      example: []
    email_template_id:
      description: 'Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used. Note: This value is a set of numeric characters.'
      type: string
    invoice_ids:
      description: 'Comma separated invoice ids which are to be emailed. Note: This value is a set of numeric characters separated by comma.'
      type: string
    contacts:
      description: Contacts for whom email or snail mail has to be sent.
      type: array
      items:
        type: object
        properties:
          contact_id:
            description: 'ID of the Customer and mail will be sent to invoice associated contact persons. Note: This value is a set of numeric characters.'
            type: string
            example: 460000000026049
          email:
            description: the boolean check for Email.
            type: boolean
            example: true
          snail_mail:
            description: the boolean check for snail mail.
            type: boolean
            example: false
    attachment:
      description: The file to be attached.
      type: string
      format: binary
    send_customer_statement:
      description: Send customer statement pdf a with email.
      type: boolean
      example: ' '
    send_attachment:
      description: Send the invoice attachment a with the email.
      type: boolean
      example: ' '
    cc_mail_ids:
      description: Array of email address of the recipients to be cced.
      type: array
      items:
        type: string
      example:
        - peterparker@zylker.org
    to_mail_ids:
      description: Array of email address of the recipients.
      type: array
      items:
        type: string
      example:
        - willsmith@zylker.org
    subject:
      description: The subject of the mail.
      type: string
      example: 'Invoice from Zylker Inc (Invoice#: INV-00001)'
    body:
      description: The body of the mail.
      type: string
      example: 'Dear Customer,         <br/><br/><br/><br/>Thanks for your business.         <br/><br/><br/><br/>The invoice INV-00001 is attached with this email. You can choose the easy way out and <a href= https://erp.zoho.in/SecurePayment?CInvoiceID=b9800228e011ae86abe71227bdacb3c68e1af685f647dcaed747812e0b9314635e55ac6223925675b371fcbd2d5ae3dc  >pay online for this invoice.</a>         <br/><br/>Here''s an overview of the invoice for your reference.         <br/><br/><br/><br/>Invoice Overview:         <br/><br/>Invoice  : INV-00001         <br/><br/>Date : 05 Aug 2013         <br/><br/>Amount : ₹45,000.00         <br/><br/><br/><br/>It was great working with you. Looking forward to working with you again.<br/><br/><br/>\nRegards<br/>\nZylker Inc<br/>\n",'
    send_from_org_email_id:
      description: Indicates whether to trigger the email from the organization's email address.
      type: boolean
      example: false
    from_address_id:
      description: 'From email address id. Note: This value is a set of numeric characters.'
      type: string
      example: 2000000011993
    attachments:
      description: Files to be attached to the email.
      type: string
      format: binary
    reason:
      type: string
      description: The reason for generating the invoice.
      example: ' '
    custom_subject:
      type: string
      description: The custom subject of the email.
      example: ' '
    custom_body:
      type: string
      description: The custom body of the email.
      example: ' '
    invoiced_estimate_id:
      description: 'Unique identifier of the estimate that was converted to create this invoice. Use this field when creating an invoice from an existing estimate. The `invoiced_estimate_id` links this invoice back to its source estimate, enabling tracking of the conversion process and maintaining the relationship between estimates and invoices. Note: This value is a set of numeric characters.'
      type: string
      example: ' '
    can_send_in_mail:
      type: boolean
      description: Boolean to check if the invoice can be sent in mail.
      example: true
    salesorder_id:
      type: string
      description: 'Unique identifier of the sales order associated with the invoice. Note: This value is a set of numeric characters.'
      example: 2000000021993
    salesorder_number:
      type: string
      example: SO-00001
    crm_custom_reference_id:
      type: string
      description: 'Custom reference ID to link the invoice with a record in your CRM system. Note: This value is a set of numeric characters.'
      example: ''
    salesorder_order_status:
      type: string
      example: closed
    total_formatted:
      type: string
      example: ₹10,000.00
    sub_total_formatted:
      type: string
      example: ₹10,000.00
    shipment_date:
      type: string
      example: ''
    invoice_url:
      type: string
      description: The URL to view the invoice online.
      example: https://erp.zoho.in/SecurePayment?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea
    attachment_name:
      type: string
      description: Name of the attachment.
      example: ' '
    last_modified_time:
      type: string
      description: The time of last modification of the invoice.
      example: 2013-11-18T02:02:51-0800
    salesperson_id:
      type: string
      description: 'Unique identifier of the salesperson associated with the invoice. Note: This value is a set of numeric characters.'
      example: ' '
    salesperson_name:
      description: Name of the salesperson. Max-length [200]
      type: string
      example: ' '
    created_time:
      description: The time of creation of the invoices.
      type: string
      example: 2013-11-18T02:17:40-0800
    template_id:
      description: 'Unique identifier of the PDF template linked to the invoice. Obtain this value from the `template_id` field in the response of the GET `/invoices/templates` API for your organization. Determines which template is used for the invoice PDF. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000000143
    template_name:
      type: string
      description: Name of the PDF template linked to the invoice.
      example: Service - Classic
    bcc_mails:
      type: array
      items:
        type: string
    gateways_associated:
      type: boolean
      example: true
    bcc_mails_str:
      type: string
      example: ''
    attach_pdf:
      type: boolean
      example: true
    entity_id:
      type: string
      description: 'Unique identifier of the entity associated with the invoice. Note: This value is a set of numeric characters.'
      example: '2000000007037'
    customfield_id:
      type: string
      description: 'Unique identifier of the Custom Field. Note: This value is a set of numeric characters.'
      example: '46000000012845'
    value:
      description: Value of the Custom Field.
      type: string
      example: Normal
    custom_fields:
      description: Custom fields for an invoice.
      type: array
      items:
        type: object
        properties:
          customfield_id:
            $ref: '#/components/schemas/customfield_id'
          value:
            $ref: '#/components/schemas/value'
    index:
      description: The index of the custom field.
      type: integer
      example: 1
    show_on_pdf:
      description: Indicates whether the custom field is to be displayed on the PDF.
      type: boolean
      example: false
    label:
      description: The label of the custom field.
      type: string
      example: Delivery Date
    address:
      description: Billing address for the invoice.
      type: string
      example: 4900 Hopyard Rd, Suite 310
    city:
      description: City of the customer's billing address.
      type: string
      example: Pleasanton
    state:
      description: State of the customer's billing address.
      type: string
      example: CA
    zip:
      description: Zip code of the customer's billing address.
      type: string
      example: 94588
    country:
      description: Country of the customer's billing address.
      type: string
      example: U.S.A
    fax:
      description: Customer's fax number.
      type: string
      example: +1-925-924-9600
    notes:
      description: Additional information or comments to be displayed on the invoice document. This field is typically used for thank you messages, special instructions, or any other information you want to communicate to the customer. The notes appear on the invoice PDF and are visible to customers.
      type: string
      example: Looking forward for your business.
    terms:
      description: Terms and conditions text to be displayed on the invoice document. This field is used to specify payment terms, delivery conditions, return policies, or any other legal or business terms that apply to this transaction. The terms appear on the invoice PDF and are legally binding.
      type: string
      example: Terms & Conditions apply
    is_emailed:
      description: Indicates whether the mail has been sent.
      type: boolean
      example: false
    reminders_sent:
      description: The no of reminders sent.
      type: integer
      example: 1
    last_reminder_sent_date:
      description: The date the last email was sent.
      type: string
      example: ' '
    shipping_charge:
      description: Additional shipping or delivery charges applied to the invoice. Must be specified as a fixed amount (e.g., "25.00"). This amount is added to the invoice total and is subject to tax calculation.
      type: string
      example: 0
    adjustment:
      description: Additional charge or credit amount applied to the invoice total. This can be used for rounding adjustments, handling fees, or any other one-time charges/credits. Positive values add to the total, negative values reduce the total. This amount is applied after tax calculation and affects the final invoice total.
      type: number
      format: double
      example: 0
    adjustment_description:
      description: Text description explaining the reason for the adjustment amount. This description appears on the invoice document to explain why the adjustment was applied. Common examples include "Rounding adjustment", "Handling fee", "Early payment discount", or "Late payment fee". This helps customers understand the purpose of the adjustment.
      type: string
      example: ' '
    sub_total:
      description: The sub total of the all items.
      type: number
      format: float
      example: 10000
    tax_total:
      description: The total amount of the tax levied.
      type: number
      format: double
      example: 22.6
    price_precision:
      description: The precision value on the price.
      type: integer
      example: 2
    taxes:
      description: List of the taxes levied.
      type: array
      items:
        type: object
        properties:
          tax_name:
            $ref: '#/components/schemas/tax_name'
          tax_amount:
            $ref: '#/components/schemas/tax_amount'
    payment_reminder_enabled:
      description: Indicates whether reminders have been enabled.
      type: boolean
      example: true
    payment_made:
      description: The amount paid.
      type: number
      format: float
      example: 26.91
    credits_applied:
      description: The credits applied.
      type: number
      format: float
      example: 22.43
    tax_amount_withheld:
      description: The tax amount which has been withheld.
      type: number
      format: float
      example: 0
    write_off_amount:
      description: The write off amount.
      type: number
      format: float
      example: 0
    account_id:
      description: 'Account ID that has to be associated to the line item. Note: This value is a set of numeric characters.'
      type: string
      example: ' '
    allow_partial_payments:
      description: Boolean flag that determines whether customers can make partial payments against this invoice. When <code>true</code>, customers can pay less than the full invoice amount, and the invoice will remain open with a remaining balance. When <code>false</code>, customers must pay the full amount to complete the invoice. This setting affects payment processing and invoice status tracking.
      type: boolean
      example: true
    configured:
      description: Indicates whether a payment gateway has been configured.
      type: boolean
      example: true
    payment_terms:
      description: Number of days allowed for payment (e.g., 15, 30, 60). This value determines the invoice due date by adding the specified number of days to the invoice date. For example, if invoice date is 2023-11-17 and payment_terms is 15, the due_date will be 2023-12-02. Maximum value is 100 days.
      type: integer
      example: 15
    payment_terms_label:
      description: Custom label for payment terms that appears on the invoice document. Used to override the default system-generated label. For example, instead of the default "Net 15 Days", you can set this to "Net 15", "Due in 15 days", or any custom text. This label is displayed to customers on the invoice. Maximum length is 100 characters.
      type: string
      example: Net 15
    email:
      description: Search contacts by email id. Max-length [100]
    is_primary_contact:
      description: To mark contact person as primary for contact.
    contact_persons:
      description: Array of contact person IDs associated with the specified customer. Provide the IDs of contact persons (from the Contacts/Contact Persons API) who should receive invoice communications (e.g., emails) for this invoice. Each ID must belong to the same customer and organization as the invoice. If omitted, the customer's primary contact may be used.
      type: array
      items:
        type: string
      example:
        - '982000000870911'
        - '982000000870915'
    tax_id:
      description: 'Unique identifier of the tax to be applied to this line item. Use the `tax_id` returned by the Taxes API for the same organization. This determines which tax rate and rules are applied to the line item, affecting the final tax calculation and compliance reporting. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000557028
    tds_tax_id:
      description: 'TDS (Tax Deducted at Source) tax or tax group ID for this line item, as returned by the Taxes API. Note: This value is a set of numeric characters.'
      type: string
      example: '982000000557012'
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    tax_exemption_id:
      description: 'ID of the tax exemption. Note: This value is a set of numeric characters.'
      type: string
      example: 11149000000061054
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    billing_address_id:
      description: 'Unique identifier of the billing address to be used for this invoice. Use the `billing_address_id` returned by the Addresses API for the same customer and organization. This address appears on the invoice document and is used for billing purposes. If omitted, the customer''s default billing address will be used. Note: This value is a set of numeric characters.'
      type: string
      example: '218500000000142012'
    shipping_address_id:
      description: 'Unique identifier of the shipping address to be used for this invoice. Use the `shipping_address_id` returned by the Addresses API for the same customer and organization. This address appears on the invoice document and is used for delivery purposes. If omitted, the customer''s default shipping address will be used. Note: This value is a set of numeric characters.'
      type: string
      example: '218500000000142014'
    exchange_rate:
      description: Exchange rate used to convert amounts from the invoice currency to the organization's base currency. Required when the invoice currency differs from the organization's base currency. For example, if the organization base currency is INR and the invoice currency is USD, set the USD to INR exchange rate (e.g., 83.5). Default value is 1.0 when invoice currency matches base currency.
      type: number
      format: float
      example: 1
    discount:
      description: Discount applied to the invoice, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
      type: number
      format: float
      example: 0
    is_discount_before_tax:
      description: Boolean flag that determines when the discount is applied in relation to tax calculation. When <code>true</code>, discount is applied before tax calculation (discount reduces the taxable amount). When <code>false</code>, discount is applied after tax calculation (discount reduces the final total including tax). This affects the final invoice total and tax amounts.
      type: boolean
      example: true
    discount_type:
      description: Specifies the scope of discount application. <code>entity_level</code> applies the discount to the entire invoice total. <code>item_level</code> applies the discount to individual line items. This determines how the discount amount is distributed across the invoice items.
      type: string
      example: item_level
    is_inclusive_tax:
      description: Boolean flag that indicates whether line item rates include tax. When <code>true</code>, the specified rates are inclusive of tax (tax is already included in the rate). When <code>false</code>, the rates are exclusive of tax (tax will be added to the rate). This affects how tax calculations are performed on line items.
      type: boolean
      example: false
    project_id:
      description: 'Unique identifier of the project associated with this line item. Use the `project_id` returned by the Projects API for the same organization. This links the line item to a specific project for project-based billing, time tracking, and cost allocation. Optional field that enables project-specific invoicing and reporting. Note: This value is a set of numeric characters.'
      type: string
      example: 90300000087378
    project_name:
      description: Name of the project.
      type: string
      example: Sample Project
    time_entry_ids:
      description: 'Array of time entry IDs to be billed on this line item. This allows you to bill specific time entries against this line item, enabling detailed time-based invoicing and project cost tracking. Note: This value is a set of numeric characters separated by comma.'
      type: array
      items:
        type: string
      example: []
    expense_id:
      type: string
      description: 'Unique identifier of the billable expense to be converted to an invoice line item. This converts a previously recorded expense into a billable line item on the invoice, enabling expense-to-invoice conversion. Note: This value is a set of numeric characters.'
      example: '460000000028080'
    bill_id:
      type: string
      description: 'Unique identifier of the specific bill line item to be converted to an invoice line item. This allows you to convert individual line items from a bill rather than the entire bill, providing granular control over bill-to-invoice conversion. Note: This value is a set of numeric characters.'
      example: ' '
    bill_item_id:
      type: string
      description: 'Unique identifier of the specific bill line item to be converted to an invoice line item. This allows you to convert individual line items from a bill rather than the entire bill, providing granular control over bill-to-invoice conversion. Note: This value is a set of numeric characters.'
      example: ' '
    expense_receipt_name:
      type: string
      description: Name of the receipt image attached to the expense. This is used when converting a billable expense with an attached receipt into an invoice line item.
      example: Sample Receipt
    line_item_id:
      description: 'The line item id. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567021
    name:
      description: Name or title of the line item as it appears on the invoice. Maximum length is 100 characters. Can be customized to override the default item name from the item catalog.
      type: string
      example: Hard Drive
    description:
      description: Detailed description of the line item providing additional information about the product or service. This description appears on the invoice document and helps customers understand what they are being charged for. Maximum length is 2000 characters.
      type: string
      example: 500GB, USB 2.0 interface 1400 rpm, protective hard case.
    item_order:
      description: Sequential order number for this line item on the invoice. Determines the display order of line items on the invoice document. Lower numbers appear first. Used for organizing line items in a specific sequence.
      type: integer
      example: 1
    bcy_rate:
      description: Base currency rate for the line item. This is the rate in the organization's base currency before any currency conversion. Used for multi-currency scenarios where the invoice currency differs from the base currency.
      type: number
      format: float
      example: 120
    rate:
      description: Unit rate or price for the line item in the invoice currency. This is the amount charged per unit of the item. The rate is used to calculate the line item total (rate x quantity) and affects the final invoice amount.
      type: number
      format: double
      example: 120
    quantity:
      description: Number of units of the item being invoiced. This value is multiplied by the rate to calculate the line item total. Must be a positive number greater than zero.
      type: number
      format: float
      example: 1
    unit:
      description: Unit of measurement for the line item quantity. Examples include "Nos" (Numbers), "kgs" (Kilograms), "hrs" (Hours), "pcs" (Pieces), etc. This helps clarify what the quantity represents. Maximum length is 100 characters.
      type: string
      example: ' '
    discount_amount:
      description: Fixed discount amount applied to this specific line item. This is a monetary value that reduces the line item total. The discount is applied after the rate x quantity calculation but before tax calculation. Can be used for line-item specific discounts or promotions.
      type: number
      format: float
      example: 0
    tax_name:
      description: The name of the tax.
      type: string
      example: GST
    tax_amount:
      description: The amount of the tax levied.
      type: number
      format: float
      example: 19.13
    tax_type:
      description: The type of the tax.
      type: string
      example: tax
    tax_percentage:
      description: The  percentage of tax levied.
      type: number
      format: float
      example: 12.5
    item_total:
      description: The total amount of the line items.
      type: number
      format: float
      example: 120
    item_name:
      description: 'Search invoices by item name. Variants: <code>item_name_startswith</code> and <code>item_name_contains</code>. Max-length [100]'
      type: string
      example: Desktop Units
    salesorder_item_id:
      description: 'Unique identifier of the sales order line item that is being converted to this invoice line item. Use this field when creating an invoice from an existing sales order. The `salesorder_item_id` links this invoice line item back to its source sales order line item, enabling tracking of the conversion process and maintaining the relationship between sales orders and invoices. Note: This value is a set of numeric characters.'
      type: string
      example: ' '
    item_id:
      description: 'Unique identifier of the item (product or service) to be included in the invoice line item. Use the `item_id` returned by the Items API for the same organization. This field is required for each line item and determines the item details, pricing, and tax settings that will be applied to this line item. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000030049
    item_description:
      description: 'Search invoices by item description. Variants: <code>item_description_startswith</code> and <code>item_description_contains</code>. Max-length [100]'
      type: string
      example: ' '
    recurring_invoice_id:
      description: 'Unique identifier of the recurring invoice template that generated this invoice. Use this field when creating an invoice from a recurring invoice template. The `recurring_invoice_id` links this invoice back to its source recurring invoice, enabling tracking of which template generated it and maintaining the recurring invoice relationship. Note: This value is a set of numeric characters.'
      type: string
      example: ' '
    page_context:
      description: The context of a particular page.
      type: array
      items:
        type: string
    applied_filter:
      description: The filer applied for sorting.
      type: string
      example: Status.All
    page:
      description: Number of pages.
      type: integer
      example: 1
    per_page:
      description: Per page values.
      type: integer
      example: 10
    report_name:
      description: The report name.
      type: string
      example: Invoices
    has_more_page:
      description: Indicates if has more pages.
      type: boolean
      example: false
    sort_order:
      description: The order for sorting.
      type: string
      example: D
    sort_column:
      description: 'Sort invoices. Allowed Values: <code>customer_name</code>, <code>invoice_number</code>, <code>date</code>, <code> due_date</code>, <code>total</code>, <code>balance</code> and  <code>created_time</code>'
      type: string
      example: created_time
    response_option:
      description: Transaction total count.
      type: integer
      example: 2
    invoices:
      description: The invoices created by the user.
      type: array
      items:
        type: string
    invoice_number:
      description: 'Unique identifier or reference number for the invoice. When creating an invoice, this can be a custom number (requires `ignore_auto_number_generation=true` query parameter) or left empty for auto-generation. When searching invoices, supports variants: <code>invoice_number_startswith</code> and <code>invoice_number_contains</code>. Maximum length is 100 characters. Must be unique within the organization.'
      type: string
      example: INV-00003
    invoice_id:
      description: 'ID of the invoice. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567114
    customer_name:
      description: The name of the customer. Max-length [100]
      type: string
      example: Zylker Inc
    customer_id:
      description: 'Unique identifier of the customer in the current organization for whom this invoice is created. Required when creating an invoice. Use the `customer_id` returned by the get Customers API. Must belong to the organization specified by the `organization_id` parameter. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567001
    status:
      description: 'Search invoices by invoice status. Allowed Values: <code>sent</code>, <code>draft</code>, <code>overdue</code>, <code>paid</code>, <code>void</code>, <code>unpaid</code>, <code>partially_paid</code> and <code>viewed</code>'
      type: string
      example: draft
    reference_number:
      description: External reference number or identifier for the invoice, such as a purchase order number, contract number, or any other business reference. When converting from an estimate or sales order, this field can be used to reference the original document number.
      type: string
      example: ' '
    date:
      description: 'The date on which the invoice is created. Use the format yyyy-mm-dd (e.g., 2013-11-17). This date appears on the invoice document and is used for accounting purposes. When searching invoices, supports variants: <code>date_start</code>, <code>date_end</code>, <code>date_before</code> and <code>date_after</code>.'
      type: string
      example: '2013-11-17'
    due_date:
      description: 'The date by which payment is due for the invoice. Use the format yyyy-mm-dd (e.g., 2013-12-03). This date is typically calculated as invoice date + payment_terms days, but can be overridden with a custom date. When searching invoices, supports variants: <code>due_date_start</code>, <code>due_date_end</code>, <code>due_date_before</code> and <code>due_date_after</code>.'
      type: string
      example: '2013-12-03'
    due_days:
      description: Specifies the number of day in which the invoice would become overdue.
      type: string
      example: Due in 14 day(s)
    currency_id:
      description: 'Unique identifier of the currency in which the invoice will be created for the customer. Use the `currency_id` returned by the Currencies API for the same organization. This sets the currency for all monetary amounts on the invoice; if it differs from the organization''s base currency, an appropriate `exchange_rate` may be required. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000000190
    currency_code:
      description: The currency code in which the invoice is created.
      type: string
      example: INR
    total:
      description: The total amount to be paid.
      type: string
      example: 10000
    custom_field:
      description: 'Search invoices by custom fields. Variants: <code>custom_field_startswith</code> and <code>custom_field_contains</code>'
      type: string
      example: ' '
    filter_by:
      description: 'Filter invoices by any status or payment expected date. Allowed Values: <code> Status.All</code>, <code>Status.Sent</code>, <code> Status.Draft</code>, <code>Status.OverDue</code>, <code>Status.Paid</code>, <code>Status.Void</code>, <code>Status.Unpaid</code>, <code>Status.PartiallyPaid</code>,<code> Status.Viewed</code> and <code>Date.PaymentExpectedDate</code>'
      type: string
      example: ' '
    search_text:
      description: Search invoices by invoice number or purchase order or customer name. Max-length [100]
      type: string
      example: ' '
    balance:
      description: The unpaid amount.
      type: string
      example: 40.6
    payment_expected_date:
      description: The expected date of payment.
      type: string
      example: ' '
    last_payment_date:
      description: The last payment date of the invoice.
      type: string
      example: ' '
    selected:
      type: boolean
      example: true
    ach_payment_initiated:
      type: boolean
      description: Boolean value to check if ACH payment has been initiated for the invoice.
      example: false
    schedule_time:
      type: string
      description: The scheduled time for the invoice to be sent to the customer.
      example: ''
    is_viewed_by_client:
      type: boolean
      description: Boolean value to check if the invoice has been viewed by the client.
      example: false
    has_attachment:
      type: boolean
      description: Boolean value to check if the invoice has any attachments.
      example: false
    client_viewed_time:
      type: string
      description: The time at which the invoice was viewed by the client.
      example: ''
    documents:
      type: string
      description: Documents associated with the invoice.
      example: ''
    invoice_payments:
      description: List of payments to be applied to the invoice.
      type: array
      items:
        type: object
        properties:
          payment_id:
            $ref: '#/components/schemas/payment_id'
          amount_applied:
            $ref: '#/components/schemas/amount_applied'
    apply_creditnotes:
      description: List of credit notes to be applied to the invoice.
      type: array
      items:
        type: object
        properties:
          creditnote_id:
            $ref: '#/components/schemas/creditnote_id'
          amount_applied:
            $ref: '#/components/schemas/amount_applied'
    street2:
      type: string
      description: Additional address information such as suite number, apartment number, or floor.
      example: McMillan Avenue
    billing_address:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/address'
        street2:
          $ref: '#/components/schemas/street2'
        city:
          $ref: '#/components/schemas/city'
        state:
          $ref: '#/components/schemas/state'
        zip:
          $ref: '#/components/schemas/zip'
        country:
          $ref: '#/components/schemas/country'
        fax:
          $ref: '#/components/schemas/fax'
    shipping_address:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/address'
        street2:
          $ref: '#/components/schemas/street2'
        city:
          $ref: '#/components/schemas/city'
        state:
          $ref: '#/components/schemas/state'
        zip:
          $ref: '#/components/schemas/zip'
        country:
          $ref: '#/components/schemas/country'
        fax:
          $ref: '#/components/schemas/fax'
    gateway_name:
      description: 'Name of the payment gateway associated with the invoice. Allowed Values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code> and <code>icici_eazypay</code>.'
      type: string
      example: stripe
    payment_gateways:
      description: Online payment gateways through which payment can be made.
      type: array
      items:
        type: object
        properties:
          configured:
            $ref: '#/components/schemas/configured'
          gateway_name:
            $ref: '#/components/schemas/gateway_name'
    payment_options:
      description: Payment options for the invoice, online payment gateways and bank accounts. Will be displayed in the pdf.
      type: object
      properties:
        payment_gateways:
          $ref: '#/components/schemas/payment_gateways'
    header_name:
      description: Name of the item header or category that groups related line items together. This is used for organizational purposes to categorize and group similar items on the invoice. For example, "Electronic devices", "Office supplies", or "Professional services". This helps in organizing and presenting line items in a structured manner on the invoice document.
      type: string
      example: Electronic devices
    header_id:
      description: 'ID of the item header. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000000670
    line_items:
      type: array
      description: List of line items in the invoice.
      items:
        type: object
        properties:
          line_item_id:
            $ref: '#/components/schemas/line_item_id'
          item_id:
            $ref: '#/components/schemas/item_id'
          project_id:
            $ref: '#/components/schemas/project_id'
          project_name:
            $ref: '#/components/schemas/project_name'
          time_entry_ids:
            $ref: '#/components/schemas/time_entry_ids'
          expense_id:
            $ref: '#/components/schemas/expense_id'
          expense_receipt_name:
            $ref: '#/components/schemas/expense_receipt_name'
          name:
            $ref: '#/components/schemas/name'
          description:
            $ref: '#/components/schemas/description'
          item_order:
            $ref: '#/components/schemas/item_order'
          location_id:
            $ref: '#/components/schemas/location_id'
          location_name:
            $ref: '#/components/schemas/location_name'
          bcy_rate:
            $ref: '#/components/schemas/bcy_rate'
          rate:
            $ref: '#/components/schemas/rate'
          quantity:
            $ref: '#/components/schemas/quantity'
          unit:
            $ref: '#/components/schemas/unit'
          discount_amount:
            $ref: '#/components/schemas/discount_amount'
          discount:
            $ref: '#/components/schemas/discount'
          tax_id:
            $ref: '#/components/schemas/tax_id'
          tax_name:
            $ref: '#/components/schemas/tax_name'
          tax_type:
            $ref: '#/components/schemas/tax_type'
          tax_percentage:
            $ref: '#/components/schemas/tax_percentage'
          item_total:
            $ref: '#/components/schemas/item_total'
          header_name:
            $ref: '#/components/schemas/header_name'
          header_id:
            $ref: '#/components/schemas/header_id'
          tags:
            $ref: '#/components/schemas/tags'
    create-an-invoice-request:
      required:
        - customer_id
        - line_items
      type: object
      properties:
        customer_id:
          $ref: '#/components/schemas/customer_id'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        contact_persons:
          $ref: '#/components/schemas/contact_persons'
        contact_persons_associated:
          $ref: '#/components/schemas/contact_persons_associated_payload'
        invoice_number:
          $ref: '#/components/schemas/invoice_number'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        template_id:
          $ref: '#/components/schemas/template_id'
        date:
          $ref: '#/components/schemas/date'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
        due_date:
          $ref: '#/components/schemas/due_date'
        discount:
          $ref: '#/components/schemas/discount'
        is_discount_before_tax:
          $ref: '#/components/schemas/is_discount_before_tax'
        discount_type:
          $ref: '#/components/schemas/discount_type'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        location_id:
          $ref: '#/components/schemas/location_id'
        recurring_invoice_id:
          $ref: '#/components/schemas/recurring_invoice_id'
        invoiced_estimate_id:
          $ref: '#/components/schemas/invoiced_estimate_id'
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        tags:
          $ref: '#/components/schemas/tags'
        send:
          $ref: '#/components/schemas/send'
        line_items:
          type: array
          description: List of line items in the invoice.
          items:
            type: object
            required:
              - item_id
            properties:
              item_id:
                $ref: '#/components/schemas/item_id'
              project_id:
                $ref: '#/components/schemas/project_id'
              time_entry_ids:
                $ref: '#/components/schemas/time_entry_ids'
              product_type:
                $ref: '#/components/schemas/product_type'
              hsn_or_sac:
                $ref: '#/components/schemas/hsn_or_sac'
              location_id:
                $ref: '#/components/schemas/location_id'
              expense_id:
                $ref: '#/components/schemas/expense_id'
              bill_id:
                $ref: '#/components/schemas/bill_id'
              bill_item_id:
                $ref: '#/components/schemas/bill_item_id'
              expense_receipt_name:
                $ref: '#/components/schemas/expense_receipt_name'
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              item_order:
                $ref: '#/components/schemas/item_order'
              bcy_rate:
                $ref: '#/components/schemas/bcy_rate'
              rate:
                $ref: '#/components/schemas/rate'
              quantity:
                $ref: '#/components/schemas/quantity'
              unit:
                $ref: '#/components/schemas/unit'
              discount_amount:
                $ref: '#/components/schemas/discount_amount'
              discount:
                $ref: '#/components/schemas/discount'
              tags:
                $ref: '#/components/schemas/tags'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              tds_tax_id:
                $ref: '#/components/schemas/tds_tax_id'
              tax_name:
                $ref: '#/components/schemas/tax_name'
              tax_type:
                $ref: '#/components/schemas/tax_type'
              tax_percentage:
                $ref: '#/components/schemas/tax_percentage'
              header_name:
                $ref: '#/components/schemas/header_name'
              salesorder_item_id:
                $ref: '#/components/schemas/salesorder_item_id'
        payment_options:
          $ref: '#/components/schemas/payment_options'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        custom_body:
          $ref: '#/components/schemas/custom_body'
        custom_subject:
          $ref: '#/components/schemas/custom_subject'
        notes:
          $ref: '#/components/schemas/notes'
        terms:
          $ref: '#/components/schemas/terms'
        shipping_charge:
          $ref: '#/components/schemas/shipping_charge'
        adjustment:
          $ref: '#/components/schemas/adjustment'
        adjustment_description:
          $ref: '#/components/schemas/adjustment_description'
        reason:
          $ref: '#/components/schemas/reason'
        tax_exemption_id:
          $ref: '#/components/schemas/tax_exemption_id'
        billing_address_id:
          $ref: '#/components/schemas/billing_address_id'
        shipping_address_id:
          $ref: '#/components/schemas/shipping_address_id'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        expense_id:
          $ref: '#/components/schemas/expense_id'
        salesorder_item_id:
          $ref: '#/components/schemas/salesorder_item_id'
        time_entry_ids:
          $ref: '#/components/schemas/time_entry_ids'
        batch_payments:
          description: Array of batch payment details to be processed with the invoice. Each payment includes payment mode, amount, and account information for automated payment processing.
          type: array
          items:
            type: object
            properties:
              payment_mode:
                description: Mode of payment for this batch payment entry.
                type: string
                example: Cash
              amount:
                description: Payment amount for this batch payment entry.
                type: string
                example: '100.00'
              account_id:
                description: 'Account ID where the payment will be recorded. Note: This value is a set of numeric characters.'
                type: string
                example: '1000000095342'
          example:
            - payment_mode: Cash
              amount: '100.00'
              account_id: '1000000095342'
    payment-link-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          type: object
          properties:
            share_link:
              type: string
              example: 'https://zohosecurepay.in/erp/Payment/secure?CInvoiceID=2-52411db153ee1f4a9ac8ab0dec95f4711f1edb75edc7d550dd3fcb6e100852aa25a28b345d8b67fc967d69ebdba5fc240fd51fd9007c6339e4015cb6e3eadfffa489615aa926242e '
              readOnly: true
    create-an-instant-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The invoice has been created.
          readOnly: true
        invoice:
          type: object
          properties:
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            ach_payment_initiated:
              $ref: '#/components/schemas/ach_payment_initiated'
            invoice_number:
              $ref: '#/components/schemas/invoice_number'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            place_of_supply:
              $ref: '#/components/schemas/place_of_supply'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            reference_invoice_id:
              description: 'Associate the reference invoice. Note: This value is a set of numeric characters.'
              type: string
              example: '132738000000126013'
            date:
              $ref: '#/components/schemas/date'
            status:
              $ref: '#/components/schemas/status'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            due_date:
              $ref: '#/components/schemas/due_date'
            payment_expected_date:
              $ref: '#/components/schemas/payment_expected_date'
            last_payment_date:
              $ref: '#/components/schemas/last_payment_date'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            discount:
              $ref: '#/components/schemas/discount'
            is_discount_before_tax:
              $ref: '#/components/schemas/is_discount_before_tax'
            discount_type:
              $ref: '#/components/schemas/discount_type'
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            recurring_invoice_id:
              $ref: '#/components/schemas/recurring_invoice_id'
            is_viewed_by_client:
              $ref: '#/components/schemas/is_viewed_by_client'
            has_attachment:
              $ref: '#/components/schemas/has_attachment'
            client_viewed_time:
              $ref: '#/components/schemas/client_viewed_time'
            line_items:
              type: array
              description: List of line items in the invoice.
              items:
                type: object
                properties:
                  line_item_id:
                    $ref: '#/components/schemas/line_item_id'
                  item_id:
                    $ref: '#/components/schemas/item_id'
                  project_id:
                    $ref: '#/components/schemas/project_id'
                  project_name:
                    $ref: '#/components/schemas/project_name'
                  time_entry_ids:
                    $ref: '#/components/schemas/time_entry_ids'
                  location_id:
                    $ref: '#/components/schemas/location_id'
                  location_name:
                    $ref: '#/components/schemas/location_name'
                  item_type:
                    $ref: '#/components/schemas/item_type'
                  product_type:
                    $ref: '#/components/schemas/product_type'
                  expense_id:
                    $ref: '#/components/schemas/expense_id'
                  expense_receipt_name:
                    $ref: '#/components/schemas/expense_receipt_name'
                  name:
                    $ref: '#/components/schemas/name'
                  description:
                    $ref: '#/components/schemas/description'
                  item_order:
                    $ref: '#/components/schemas/item_order'
                  bcy_rate:
                    $ref: '#/components/schemas/bcy_rate'
                  rate:
                    $ref: '#/components/schemas/rate'
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  unit:
                    $ref: '#/components/schemas/unit'
                  discount_amount:
                    $ref: '#/components/schemas/discount_amount'
                  discount:
                    $ref: '#/components/schemas/discount'
                  tags:
                    $ref: '#/components/schemas/tags_response'
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tds_tax_id:
                    $ref: '#/components/schemas/tds_tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_type:
                    $ref: '#/components/schemas/tax_type'
                  tax_percentage:
                    $ref: '#/components/schemas/tax_percentage'
                  item_total:
                    $ref: '#/components/schemas/item_total'
                  header_name:
                    $ref: '#/components/schemas/header_name'
                  header_id:
                    $ref: '#/components/schemas/header_id'
            shipping_charge:
              $ref: '#/components/schemas/shipping_charge'
            adjustment:
              $ref: '#/components/schemas/adjustment'
            adjustment_description:
              $ref: '#/components/schemas/adjustment_description'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            tax_total:
              $ref: '#/components/schemas/tax_total'
            total:
              $ref: '#/components/schemas/total'
            taxes:
              $ref: '#/components/schemas/taxes'
            payment_reminder_enabled:
              $ref: '#/components/schemas/payment_reminder_enabled'
            payment_made:
              $ref: '#/components/schemas/payment_made'
            credits_applied:
              $ref: '#/components/schemas/credits_applied'
            tax_amount_withheld:
              $ref: '#/components/schemas/tax_amount_withheld'
            balance:
              $ref: '#/components/schemas/balance'
            write_off_amount:
              $ref: '#/components/schemas/write_off_amount'
            allow_partial_payments:
              $ref: '#/components/schemas/allow_partial_payments'
            price_precision:
              $ref: '#/components/schemas/price_precision'
            payment_options:
              $ref: '#/components/schemas/payment_options'
            is_emailed:
              $ref: '#/components/schemas/is_emailed'
            location_id:
              $ref: '#/components/schemas/location_id'
            location_name:
              $ref: '#/components/schemas/location_name'
            reminders_sent:
              $ref: '#/components/schemas/reminders_sent'
            last_reminder_sent_date:
              $ref: '#/components/schemas/last_reminder_sent_date'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/update-shipping-address-request'
            notes:
              $ref: '#/components/schemas/notes'
            terms:
              $ref: '#/components/schemas/terms'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            tags:
              $ref: '#/components/schemas/tags_response'
            template_id:
              $ref: '#/components/schemas/template_id'
            template_name:
              $ref: '#/components/schemas/template_name'
            created_time:
              $ref: '#/components/schemas/created_time'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            attachment_name:
              $ref: '#/components/schemas/attachment_name'
            can_send_in_mail:
              $ref: '#/components/schemas/can_send_in_mail'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            salesorder_id:
              $ref: '#/components/schemas/salesorder_id'
            salesorder_number:
              $ref: '#/components/schemas/salesorder_number'
            salesorders:
              type: object
              properties:
                salesorder_id:
                  $ref: '#/components/schemas/salesorder_id'
                salesorder_number:
                  $ref: '#/components/schemas/salesorder_number'
                reference_number:
                  $ref: '#/components/schemas/reference_number'
                crm_custom_reference_id:
                  $ref: '#/components/schemas/crm_custom_reference_id'
                salesorder_order_status:
                  $ref: '#/components/schemas/salesorder_order_status'
                total:
                  $ref: '#/components/schemas/total'
                total_formatted:
                  $ref: '#/components/schemas/total_formatted'
                sub_total:
                  $ref: '#/components/schemas/sub_total'
                sub_total_formatted:
                  $ref: '#/components/schemas/sub_total_formatted'
                date:
                  $ref: '#/components/schemas/date'
                shipment_date:
                  $ref: '#/components/schemas/shipment_date'
            invoice_url:
              $ref: '#/components/schemas/invoice_url'
    create-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The invoice has been created.
          readOnly: true
        invoice:
          $ref: '#/components/schemas/invoice-response'
    map-invoice-with-salesorder-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The invoices selected have been associated with their sales orders.
          readOnly: true
        errors:
          description: List of validation errors encountered during the mapping process. Each error contains details about which invoices failed and why.
          type: array
          items:
            type: object
            properties:
              code:
                description: Error code indicating the type of validation failure.
                type: integer
                example: 4001
              message:
                description: Human-readable error message explaining the validation failure.
                type: string
                example: Customer mismatch between invoice and sales order
              ids:
                description: Array of invoice IDs that encountered this specific error.
                type: array
                items:
                  type: string
                example:
                  - '982000000567114'
                  - '982000000567115'
          example:
            - code: 4001
              message: Customer mismatch between invoice and sales order
              ids:
                - '982000000567114'
            - code: 4002
              message: Invoice is already linked to another sales order
              ids:
                - '982000000567115'
            - code: 4003
              message: Sales order is in void status and cannot be linked
              ids:
                - '982000000567116'
    list-invoices-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        invoices:
          description: The invoices created by the user.
          type: array
          items:
            type: object
            properties:
              invoice_id:
                $ref: '#/components/schemas/invoice_id'
              ach_payment_initiated:
                $ref: '#/components/schemas/ach_payment_initiated'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              customer_id:
                $ref: '#/components/schemas/customer_id'
              status:
                $ref: '#/components/schemas/status'
              invoice_number:
                $ref: '#/components/schemas/invoice_number'
              reference_number:
                $ref: '#/components/schemas/reference_number'
              date:
                $ref: '#/components/schemas/date'
              due_date:
                $ref: '#/components/schemas/due_date'
              due_days:
                $ref: '#/components/schemas/due_days'
              currency_id:
                $ref: '#/components/schemas/currency_id'
              schedule_time:
                $ref: '#/components/schemas/schedule_time'
              currency_code:
                $ref: '#/components/schemas/currency_code'
              is_viewed_by_client:
                $ref: '#/components/schemas/is_viewed_by_client'
              has_attachment:
                $ref: '#/components/schemas/has_attachment'
              client_viewed_time:
                $ref: '#/components/schemas/client_viewed_time'
              total:
                $ref: '#/components/schemas/total'
              balance:
                $ref: '#/components/schemas/balance'
              created_time:
                $ref: '#/components/schemas/created_time'
              last_modified_time:
                $ref: '#/components/schemas/last_modified_time'
              is_emailed:
                $ref: '#/components/schemas/is_emailed'
              reminders_sent:
                $ref: '#/components/schemas/reminders_sent'
              last_reminder_sent_date:
                $ref: '#/components/schemas/last_reminder_sent_date'
              payment_expected_date:
                $ref: '#/components/schemas/payment_expected_date'
              last_payment_date:
                $ref: '#/components/schemas/last_payment_date'
              custom_fields:
                $ref: '#/components/schemas/custom_fields'
              documents:
                $ref: '#/components/schemas/documents'
              location_id:
                $ref: '#/components/schemas/location_id'
              location_name:
                $ref: '#/components/schemas/location_name'
              salesperson_id:
                $ref: '#/components/schemas/salesperson_id'
              salesperson_name:
                $ref: '#/components/schemas/salesperson_name'
              shipping_charge:
                $ref: '#/components/schemas/shipping_charge'
              adjustment:
                $ref: '#/components/schemas/adjustment'
              write_off_amount:
                $ref: '#/components/schemas/write_off_amount'
              exchange_rate:
                $ref: '#/components/schemas/exchange_rate'
              tags:
                $ref: '#/components/schemas/tags_response'
        page_context:
          description: The context of a particular page.
          type: array
          items:
            type: object
            properties:
              page:
                $ref: '#/components/schemas/page'
              per_page:
                $ref: '#/components/schemas/per_page'
              has_more_page:
                $ref: '#/components/schemas/has_more_page'
              report_name:
                $ref: '#/components/schemas/report_name'
              applied_filter:
                $ref: '#/components/schemas/applied_filter'
              sort_column:
                $ref: '#/components/schemas/sort_column'
              sort_order:
                $ref: '#/components/schemas/sort_order'
              response_option:
                $ref: '#/components/schemas/response_option'
    update-an-invoice-request:
      required:
        - customer_id
        - line_items
      type: object
      properties:
        customer_id:
          $ref: '#/components/schemas/customer_id'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        contact_persons_associated:
          $ref: '#/components/schemas/contact_persons_associated_payload'
        invoice_number:
          $ref: '#/components/schemas/invoice_number'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        reference_invoice_id:
          $ref: '#/components/schemas/reference_invoice_id'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        template_id:
          $ref: '#/components/schemas/template_id'
        date:
          $ref: '#/components/schemas/date'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
        due_date:
          $ref: '#/components/schemas/due_date'
        discount:
          $ref: '#/components/schemas/discount'
        is_discount_before_tax:
          $ref: '#/components/schemas/is_discount_before_tax'
        discount_type:
          $ref: '#/components/schemas/discount_type'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        recurring_invoice_id:
          $ref: '#/components/schemas/recurring_invoice_id'
        invoiced_estimate_id:
          $ref: '#/components/schemas/invoiced_estimate_id'
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        tags:
          $ref: '#/components/schemas/tags'
        location_id:
          $ref: '#/components/schemas/location_id'
        line_items:
          type: array
          description: List of line items in the invoice.
          items:
            type: object
            required:
              - item_id
            properties:
              item_id:
                $ref: '#/components/schemas/item_id'
              project_id:
                $ref: '#/components/schemas/project_id'
              time_entry_ids:
                $ref: '#/components/schemas/time_entry_ids'
              product_type:
                $ref: '#/components/schemas/product_type'
              hsn_or_sac:
                $ref: '#/components/schemas/hsn_or_sac'
              location_id:
                $ref: '#/components/schemas/location_id'
              expense_id:
                $ref: '#/components/schemas/expense_id'
              expense_receipt_name:
                $ref: '#/components/schemas/expense_receipt_name'
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              item_order:
                $ref: '#/components/schemas/item_order'
              bcy_rate:
                $ref: '#/components/schemas/bcy_rate'
              rate:
                $ref: '#/components/schemas/rate'
              quantity:
                $ref: '#/components/schemas/quantity'
              unit:
                $ref: '#/components/schemas/unit'
              discount_amount:
                $ref: '#/components/schemas/discount_amount'
              tags:
                $ref: '#/components/schemas/tags'
              discount:
                $ref: '#/components/schemas/discount'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              tds_tax_id:
                $ref: '#/components/schemas/tds_tax_id'
              tax_name:
                $ref: '#/components/schemas/tax_name'
              tax_type:
                $ref: '#/components/schemas/tax_type'
              tax_percentage:
                $ref: '#/components/schemas/tax_percentage'
              header_name:
                $ref: '#/components/schemas/header_name'
              header_id:
                $ref: '#/components/schemas/header_id'
        payment_options:
          $ref: '#/components/schemas/payment_options'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        custom_body:
          $ref: '#/components/schemas/custom_body'
        custom_subject:
          $ref: '#/components/schemas/custom_subject'
        notes:
          $ref: '#/components/schemas/notes'
        terms:
          $ref: '#/components/schemas/terms'
        shipping_charge:
          $ref: '#/components/schemas/shipping_charge'
        adjustment:
          $ref: '#/components/schemas/adjustment'
        adjustment_description:
          $ref: '#/components/schemas/adjustment_description'
        reason:
          $ref: '#/components/schemas/reason'
        tax_exemption_id:
          $ref: '#/components/schemas/tax_exemption_id'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        expense_id:
          $ref: '#/components/schemas/expense_id'
        salesorder_item_id:
          $ref: '#/components/schemas/salesorder_item_id'
        line_item_id:
          $ref: '#/components/schemas/line_item_id'
    update-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Invoice information has been updated.
          readOnly: true
        invoice:
          type: object
          properties:
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            ach_payment_initiated:
              $ref: '#/components/schemas/ach_payment_initiated'
            invoice_number:
              $ref: '#/components/schemas/invoice_number'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            place_of_supply:
              $ref: '#/components/schemas/place_of_supply'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            reference_invoice_id:
              $ref: '#/components/schemas/reference_invoice_id'
            date:
              $ref: '#/components/schemas/date'
            status:
              $ref: '#/components/schemas/status'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            due_date:
              $ref: '#/components/schemas/due_date'
            payment_expected_date:
              $ref: '#/components/schemas/payment_expected_date'
            last_payment_date:
              $ref: '#/components/schemas/last_payment_date'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            discount:
              $ref: '#/components/schemas/discount'
            is_discount_before_tax:
              $ref: '#/components/schemas/is_discount_before_tax'
            discount_type:
              $ref: '#/components/schemas/discount_type'
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            recurring_invoice_id:
              $ref: '#/components/schemas/recurring_invoice_id'
            is_viewed_by_client:
              $ref: '#/components/schemas/is_viewed_by_client'
            has_attachment:
              $ref: '#/components/schemas/has_attachment'
            client_viewed_time:
              $ref: '#/components/schemas/client_viewed_time'
            location_id:
              $ref: '#/components/schemas/location_id'
            location_name:
              $ref: '#/components/schemas/location_name'
            tags:
              $ref: '#/components/schemas/tags_response'
            line_items:
              type: array
              description: List of line items in the invoice.
              items:
                type: object
                properties:
                  line_item_id:
                    $ref: '#/components/schemas/line_item_id'
                  item_id:
                    $ref: '#/components/schemas/item_id'
                  project_id:
                    $ref: '#/components/schemas/project_id'
                  project_name:
                    $ref: '#/components/schemas/project_name'
                  time_entry_ids:
                    $ref: '#/components/schemas/time_entry_ids'
                  location_id:
                    $ref: '#/components/schemas/location_id'
                  location_name:
                    $ref: '#/components/schemas/location_name'
                  item_type:
                    $ref: '#/components/schemas/item_type'
                  product_type:
                    $ref: '#/components/schemas/product_type'
                  expense_id:
                    $ref: '#/components/schemas/expense_id'
                  expense_receipt_name:
                    $ref: '#/components/schemas/expense_receipt_name'
                  name:
                    $ref: '#/components/schemas/name'
                  description:
                    $ref: '#/components/schemas/description'
                  item_order:
                    $ref: '#/components/schemas/item_order'
                  bcy_rate:
                    $ref: '#/components/schemas/bcy_rate'
                  rate:
                    $ref: '#/components/schemas/rate'
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  unit:
                    $ref: '#/components/schemas/unit'
                  discount_amount:
                    $ref: '#/components/schemas/discount_amount'
                  discount:
                    $ref: '#/components/schemas/discount'
                  tags:
                    $ref: '#/components/schemas/tags_response'
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tds_tax_id:
                    $ref: '#/components/schemas/tds_tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_type:
                    $ref: '#/components/schemas/tax_type'
                  tax_percentage:
                    $ref: '#/components/schemas/tax_percentage'
                  item_total:
                    $ref: '#/components/schemas/item_total'
                  header_name:
                    $ref: '#/components/schemas/header_name'
                  header_id:
                    $ref: '#/components/schemas/header_id'
            shipping_charge:
              $ref: '#/components/schemas/shipping_charge'
            adjustment:
              $ref: '#/components/schemas/adjustment'
            adjustment_description:
              $ref: '#/components/schemas/adjustment_description'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            tax_total:
              $ref: '#/components/schemas/tax_total'
            total:
              $ref: '#/components/schemas/total'
            taxes:
              $ref: '#/components/schemas/taxes'
            payment_reminder_enabled:
              $ref: '#/components/schemas/payment_reminder_enabled'
            payment_made:
              $ref: '#/components/schemas/payment_made'
            credits_applied:
              $ref: '#/components/schemas/credits_applied'
            tax_amount_withheld:
              $ref: '#/components/schemas/tax_amount_withheld'
            balance:
              $ref: '#/components/schemas/balance'
            write_off_amount:
              $ref: '#/components/schemas/write_off_amount'
            allow_partial_payments:
              $ref: '#/components/schemas/allow_partial_payments'
            price_precision:
              $ref: '#/components/schemas/price_precision'
            payment_options:
              $ref: '#/components/schemas/payment_options'
            is_emailed:
              $ref: '#/components/schemas/is_emailed'
            reminders_sent:
              $ref: '#/components/schemas/reminders_sent'
            last_reminder_sent_date:
              $ref: '#/components/schemas/last_reminder_sent_date'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            notes:
              $ref: '#/components/schemas/notes'
            terms:
              $ref: '#/components/schemas/terms'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            template_id:
              $ref: '#/components/schemas/template_id'
            template_name:
              $ref: '#/components/schemas/template_name'
            created_time:
              $ref: '#/components/schemas/created_time'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            attachment_name:
              $ref: '#/components/schemas/attachment_name'
            can_send_in_mail:
              $ref: '#/components/schemas/can_send_in_mail'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            invoice_url:
              $ref: '#/components/schemas/invoice_url'
    update-an-invoice-customfield-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Custom Fields Updated Successfully
          readOnly: true
    get-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        invoice:
          type: object
          properties:
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            ach_payment_initiated:
              $ref: '#/components/schemas/ach_payment_initiated'
            invoice_number:
              $ref: '#/components/schemas/invoice_number'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            place_of_supply:
              $ref: '#/components/schemas/place_of_supply'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            date:
              $ref: '#/components/schemas/date'
            status:
              $ref: '#/components/schemas/status'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            due_date:
              $ref: '#/components/schemas/due_date'
            payment_expected_date:
              $ref: '#/components/schemas/payment_expected_date'
            last_payment_date:
              $ref: '#/components/schemas/last_payment_date'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            discount:
              $ref: '#/components/schemas/discount'
            is_discount_before_tax:
              $ref: '#/components/schemas/is_discount_before_tax'
            discount_type:
              $ref: '#/components/schemas/discount_type'
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            recurring_invoice_id:
              $ref: '#/components/schemas/recurring_invoice_id'
            is_viewed_by_client:
              $ref: '#/components/schemas/is_viewed_by_client'
            has_attachment:
              $ref: '#/components/schemas/has_attachment'
            client_viewed_time:
              $ref: '#/components/schemas/client_viewed_time'
            location_id:
              $ref: '#/components/schemas/location_id'
            location_name:
              $ref: '#/components/schemas/location_name'
            tags:
              $ref: '#/components/schemas/tags_response'
            line_items:
              type: array
              description: List of line items in the invoice.
              items:
                type: object
                properties:
                  line_item_id:
                    $ref: '#/components/schemas/line_item_id'
                  item_id:
                    $ref: '#/components/schemas/item_id'
                  project_id:
                    $ref: '#/components/schemas/project_id'
                  project_name:
                    $ref: '#/components/schemas/project_name'
                  time_entry_ids:
                    $ref: '#/components/schemas/time_entry_ids'
                  location_id:
                    $ref: '#/components/schemas/location_id'
                  location_name:
                    $ref: '#/components/schemas/location_name'
                  item_type:
                    $ref: '#/components/schemas/item_type'
                  product_type:
                    $ref: '#/components/schemas/product_type'
                  expense_id:
                    $ref: '#/components/schemas/expense_id'
                  expense_receipt_name:
                    $ref: '#/components/schemas/expense_receipt_name'
                  name:
                    $ref: '#/components/schemas/name'
                  description:
                    $ref: '#/components/schemas/description'
                  item_order:
                    $ref: '#/components/schemas/item_order'
                  bcy_rate:
                    $ref: '#/components/schemas/bcy_rate'
                  rate:
                    $ref: '#/components/schemas/rate'
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  unit:
                    $ref: '#/components/schemas/unit'
                  discount_amount:
                    $ref: '#/components/schemas/discount_amount'
                  discount:
                    $ref: '#/components/schemas/discount'
                  tags:
                    $ref: '#/components/schemas/tags_response'
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_type:
                    $ref: '#/components/schemas/tax_type'
                  tax_percentage:
                    $ref: '#/components/schemas/tax_percentage'
                  item_total:
                    $ref: '#/components/schemas/item_total'
                  header_name:
                    $ref: '#/components/schemas/header_name'
                  header_id:
                    $ref: '#/components/schemas/header_id'
            shipping_charge:
              $ref: '#/components/schemas/shipping_charge'
            adjustment:
              $ref: '#/components/schemas/adjustment'
            adjustment_description:
              $ref: '#/components/schemas/adjustment_description'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            tax_total:
              $ref: '#/components/schemas/tax_total'
            total:
              $ref: '#/components/schemas/total'
            taxes:
              $ref: '#/components/schemas/taxes'
            payment_reminder_enabled:
              $ref: '#/components/schemas/payment_reminder_enabled'
            payment_made:
              $ref: '#/components/schemas/payment_made'
            credits_applied:
              $ref: '#/components/schemas/credits_applied'
            tax_amount_withheld:
              $ref: '#/components/schemas/tax_amount_withheld'
            balance:
              $ref: '#/components/schemas/balance'
            write_off_amount:
              $ref: '#/components/schemas/write_off_amount'
            allow_partial_payments:
              $ref: '#/components/schemas/allow_partial_payments'
            price_precision:
              $ref: '#/components/schemas/price_precision'
            payment_options:
              $ref: '#/components/schemas/payment_options'
            is_emailed:
              $ref: '#/components/schemas/is_emailed'
            reminders_sent:
              $ref: '#/components/schemas/reminders_sent'
            last_reminder_sent_date:
              $ref: '#/components/schemas/last_reminder_sent_date'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            notes:
              $ref: '#/components/schemas/notes'
            terms:
              $ref: '#/components/schemas/terms'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            template_id:
              $ref: '#/components/schemas/template_id'
            template_name:
              $ref: '#/components/schemas/template_name'
            created_time:
              $ref: '#/components/schemas/created_time'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            attachment_name:
              $ref: '#/components/schemas/attachment_name'
            can_send_in_mail:
              $ref: '#/components/schemas/can_send_in_mail'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            invoice_url:
              $ref: '#/components/schemas/invoice_url'
    delete-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The invoice has been deleted.
          readOnly: true
    mark-an-invoice-as-sent-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Invoice status has been changed to Sent.
          readOnly: true
    void-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Invoice status has been changed to Void.
          readOnly: true
    mark-as-draft-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Status of invoice changed from void to draft
          readOnly: true
    email-an-invoice-request:
      required:
        - to_mail_ids
      type: object
      properties:
        send_from_org_email_id:
          $ref: '#/components/schemas/send_from_org_email_id'
        from_address_id:
          $ref: '#/components/schemas/from_address_id'
        to_mail_ids:
          $ref: '#/components/schemas/to_mail_ids'
        cc_mail_ids:
          $ref: '#/components/schemas/cc_mail_ids'
        subject:
          $ref: '#/components/schemas/subject'
        body:
          $ref: '#/components/schemas/body'
    email-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Your invoice has been sent.
          readOnly: true
    email-invoices-request:
      type: object
      properties:
        contacts:
          $ref: '#/components/schemas/contacts'
    email-invoices-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Your mails are scheduled to be sent in a few minutes. We will notify you once it is done.
          readOnly: true
    submit-an-invoice-for-approval-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The invoice has been submitted for approval successfully.
          readOnly: true
    approve-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: You have approved the invoice.
          readOnly: true
    get-invoice-email-content-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          type: object
          properties:
            bcc_mails:
              $ref: '#/components/schemas/bcc_mails'
            gateways_configured:
              $ref: '#/components/schemas/gateways_configured'
            gateways_associated:
              $ref: '#/components/schemas/gateways_associated'
            bcc_mails_str:
              $ref: '#/components/schemas/bcc_mails_str'
            body:
              $ref: '#/components/schemas/body'
            documents:
              $ref: '#/components/schemas/documents'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            attach_pdf:
              $ref: '#/components/schemas/attach_pdf'
            entity_id:
              $ref: '#/components/schemas/entity_id'
            cc_mails_list:
              type: array
              items:
                type: object
                properties:
                  user_name:
                    $ref: '#/components/schemas/user_name'
                  email:
                    $ref: '#/components/schemas/email'
            file_name_without_extension:
              $ref: '#/components/schemas/file_name_without_extension'
            to_mails_str:
              $ref: '#/components/schemas/to_mails_str'
            cc_mails_str:
              $ref: '#/components/schemas/cc_mails_str'
            from_email:
              $ref: '#/components/schemas/from_email'
            from_address:
              $ref: '#/components/schemas/from_address'
            deprecated_placeholders_used:
              $ref: '#/components/schemas/deprecated_placeholders_used'
            error_list:
              $ref: '#/components/schemas/error_list'
            subject:
              $ref: '#/components/schemas/subject'
            emailtemplates:
              type: array
              items:
                type: object
                properties:
                  selected:
                    type: boolean
                    example: true
                  name:
                    description: The name of the line item. Max-length [100]
                    type: string
                    example: Default
                  email_template_id:
                    description: 'Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used. Note: This value is a set of numeric characters.'
                    type: string
                    example: '982000000000067'
            emailtemplate_documents:
              $ref: '#/components/schemas/emailtemplate_documents'
            to_contacts:
              type: array
              items:
                type: object
                properties:
                  first_name:
                    $ref: '#/components/schemas/first_name'
                  selected:
                    $ref: '#/components/schemas/selected'
                  phone:
                    $ref: '#/components/schemas/phone'
                  email:
                    $ref: '#/components/schemas/email'
                  last_name:
                    $ref: '#/components/schemas/last_name'
                  salutation:
                    $ref: '#/components/schemas/salutation'
                  contact_person_id:
                    $ref: '#/components/schemas/contact_person_id'
                  mobile:
                    $ref: '#/components/schemas/mobile'
            attachment_name:
              $ref: '#/components/schemas/attachment_name'
            file_name:
              $ref: '#/components/schemas/file_name'
            from_emails:
              type: array
              items:
                type: object
                properties:
                  user_name:
                    $ref: '#/components/schemas/user_name'
                  selected:
                    $ref: '#/components/schemas/selected'
                  email:
                    $ref: '#/components/schemas/email'
                  organization_contact_id:
                    $ref: '#/components/schemas/organization_contact_id'
                  is_org_email_id:
                    $ref: '#/components/schemas/is_org_email_id'
            customer_id:
              $ref: '#/components/schemas/customer_id'
    remind-customer-request:
      required:
        - cc_mail_ids
      type: object
      properties:
        to_mail_ids:
          $ref: '#/components/schemas/to_mail_ids'
        cc_mail_ids:
          $ref: '#/components/schemas/cc_mail_ids'
        subject:
          $ref: '#/components/schemas/subject'
        body:
          description: The body of the mail.
          type: string
          example: '<br/>Dear Mr. Smith,&nbsp;<br/><br/>You might have missed the payment date and the invoice is now overdue by&nbsp;1&nbsp;days.<br/><br/>----------------------------------------------------------------------------------------<br/><h2>Invoice# : INV-000004 </h2>Dated : 23 Dec 2016<br/>----------------------------------------------------------------------------------------<br/><b>&nbsp;Due Date &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp;&nbsp;23 Dec 2016</b><br/><b>&nbsp;Amount &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp;&nbsp;₹12,000.00</b><br/>----------------------------------------------------------------------------------------<br/><br/><span>Not to worry at all !&nbsp;</span>View your invoice and take the easy way out by making an&nbsp;<a href="https://erp.zoho.in/portal/zylker/index#/invoices/invoice/2000000007037 ">online payment</a>.<br/><br/>If you have already paid, please accept our apologies and kindly ignore this payment reminder.<br/><br/><br/>Regards,<br/><br/>David John<br/>Zylker Inc<br/><br/><br/>'
        send_from_org_email_id:
          $ref: '#/components/schemas/send_from_org_email_id'
    remind-customer-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Your payment reminder has been sent.
          readOnly: true
    get-payment-reminder-mail-content-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        data:
          type: object
          properties:
            bcc_mails:
              $ref: '#/components/schemas/bcc_mails'
            gateways_configured:
              $ref: '#/components/schemas/gateways_configured'
            gateways_associated:
              $ref: '#/components/schemas/gateways_associated'
            bcc_mails_str:
              $ref: '#/components/schemas/bcc_mails_str'
            body:
              description: The body of the mail.
              type: string
              example: '<br/>Dear Mr. Smith,&nbsp;<br/><br/>You might have missed the payment date and the invoice is now overdue by&nbsp;1&nbsp;days.<br/><br/>----------------------------------------------------------------------------------------<br/><h2>Invoice# : INV-000004 </h2>Dated : 23 Dec 2016<br/>----------------------------------------------------------------------------------------<br/><b>&nbsp;Due Date &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp;&nbsp;23 Dec 2016</b><br/><b>&nbsp;Amount &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : &nbsp;&nbsp;₹12,000.00</b><br/>----------------------------------------------------------------------------------------<br/><br/><span>Not to worry at all !&nbsp;</span>View your invoice and take the easy way out by making an&nbsp;<a href="https://erp.zoho.in/portal/zylker/index#/invoices/invoice/2000000007037 ">online payment</a>.<br/><br/>If you have already paid, please accept our apologies and kindly ignore this payment reminder.<br/><br/><br/>Regards,<br/><br/>David John<br/>Zylker Inc<br/><br/><br/>'
            documents:
              $ref: '#/components/schemas/documents'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            attach_pdf:
              $ref: '#/components/schemas/attach_pdf'
            entity_id:
              $ref: '#/components/schemas/entity_id'
            cc_mails_list:
              type: array
              items:
                type: object
                properties:
                  user_name:
                    $ref: '#/components/schemas/user_name'
                  email:
                    $ref: '#/components/schemas/email'
            file_name_without_extension:
              $ref: '#/components/schemas/file_name_without_extension'
            to_mails_str:
              $ref: '#/components/schemas/to_mails_str'
            cc_mails_str:
              $ref: '#/components/schemas/cc_mails_str'
            from_email:
              $ref: '#/components/schemas/from_email'
            from_address:
              $ref: '#/components/schemas/from_address'
            deprecated_placeholders_used:
              $ref: '#/components/schemas/deprecated_placeholders_used'
            error_list:
              $ref: '#/components/schemas/error_list'
            subject:
              $ref: '#/components/schemas/subject'
            emailtemplates:
              type: array
              items:
                type: object
                properties:
                  selected:
                    type: boolean
                    example: true
                  name:
                    description: The name of the line item. Max-length [100]
                    type: string
                    example: Default
                  email_template_id:
                    description: 'Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used. Note: This value is a set of numeric characters.'
                    type: string
                    example: '982000000000067'
            emailtemplate_documents:
              $ref: '#/components/schemas/emailtemplate_documents'
            to_contacts:
              type: array
              items:
                type: object
                properties:
                  first_name:
                    $ref: '#/components/schemas/first_name'
                  selected:
                    $ref: '#/components/schemas/selected'
                  phone:
                    $ref: '#/components/schemas/phone'
                  email:
                    $ref: '#/components/schemas/email'
                  last_name:
                    $ref: '#/components/schemas/last_name'
                  salutation:
                    $ref: '#/components/schemas/salutation'
                  contact_person_id:
                    $ref: '#/components/schemas/contact_person_id'
                  mobile:
                    $ref: '#/components/schemas/mobile'
            attachment_name:
              $ref: '#/components/schemas/attachment_name'
            file_name:
              $ref: '#/components/schemas/file_name'
            from_emails:
              type: array
              items:
                type: object
                properties:
                  user_name:
                    $ref: '#/components/schemas/user_name'
                  selected:
                    $ref: '#/components/schemas/selected'
                  email:
                    $ref: '#/components/schemas/email'
                  organization_contact_id:
                    $ref: '#/components/schemas/organization_contact_id'
                  is_org_email_id:
                    $ref: '#/components/schemas/is_org_email_id'
            customer_id:
              $ref: '#/components/schemas/customer_id'
    bulk-invoice-reminder-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        info:
          type: object
          properties:
            email_success_info:
              type: object
              properties:
                message:
                  type: string
                  example: The reminders were successfully sent
                sent_count:
                  type: integer
                  example: 2
            email_errors_info:
              type: array
              items:
                type: object
                properties:
                  message:
                    type: string
                    example: The reminders were successfully sent
                  ids:
                    type: array
                    items:
                      type: string
                    example: '2000000007037'
            code:
              type: integer
              example: 4083
    bulk-export-invoices-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
    bulk-print-invoices-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
    disable-payment-reminder-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Reminders stopped.
          readOnly: true
    enable-payment-reminder-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Reminders enabled.
          readOnly: true
    write-off-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Invoice has been written off
          readOnly: true
    cancel-write-off-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The write off done for this invoice has been cancelled.
          readOnly: true
    update-billing-address-request:
      type: object
      properties:
        address:
          description: Billing address for the invoice.
          type: string
          example: |-
            B-1104, 11F, 
            Horizon International Tower, 
            No. 6, ZhiChun Road, HaiDian District
        city:
          description: City of the customer's billing address.
          type: string
          example: Beijing
        state:
          description: State of the customer's billing address.
          type: string
          example: Beijing
        zip:
          description: Zip code of the customer's billing address.
          type: string
          example: 1000881
        country:
          description: Country of the customer's billing address.
          type: string
        fax:
          description: Customer's fax number.
          type: string
          example: +86-10-82637827
    update-billing-address-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Billing address updated
          readOnly: true
    update-shipping-address-request:
      type: object
      properties:
        address:
          description: Shipping address for the invoice.
          type: string
          example: 4900 Hopyard Rd, Suit 310
        street2:
          $ref: '#/components/schemas/street2'
        city:
          description: City of the customer's Shipping address.
          type: string
          example: Pleasanton
        state:
          description: State of the customer's Shipping address.
          type: string
          example: CA
        zip:
          description: Zip code of the customer's Shipping address.
          type: string
          example: 945881
        country:
          description: Country of the customer's Shipping address.
          type: string
          example: USA
        fax:
          description: Customer's fax number.
          type: string
          example: +91-44-4567-8901
    update-shipping-address-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Shipping address updated
          readOnly: true
    list-invoice-templates-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        templates:
          type: array
          items:
            type: object
            properties:
              template_name:
                $ref: '#/components/schemas/template_name'
              template_id:
                $ref: '#/components/schemas/template_id'
              template_type:
                $ref: '#/components/schemas/template_type'
    update-invoice-template-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Invoice information has been updated.
          readOnly: true
    list-invoice-payments-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        payments:
          description: The list of payments.
          type: array
          items:
            type: object
            properties:
              payment_id:
                description: 'ID of the payment. Note: This value is a set of numeric characters.'
                type: string
                example: '982000000567190'
              payment_number:
                description: The payment Number.
                type: integer
                example: 7
              invoice_id:
                description: 'ID of the invoice. Note: This value is a set of numeric characters.'
                type: string
                example: 982000000567036
              invoice_payment_id:
                description: 'The invoice payment id. Note: This value is a set of numeric characters.'
                type: string
                example: 982000000567192
              payment_mode:
                description: The mode of payment for the invoice.
                type: string
                example: cash
              description:
                description: Detailed description of the line item providing additional information about the product or service. This description appears on the invoice document and helps customers understand what they are being charged for. Maximum length is 2000 characters.
                type: string
                example: ' '
              date:
                description: 'Search invoices by invoice date. Default date format is yyyy-mm-dd.<code> Variants: due_date_start, due_date_end, due_date_before and due_date_after</code>.'
                type: string
                example: '2013-11-18'
              reference_number:
                description: External reference number or identifier for the invoice, such as a purchase order number, contract number, or any other business reference. When converting from an estimate or sales order, this field can be used to reference the original document number.
                type: string
                example: 99782374
              exchange_rate:
                description: Exchange rate of the currency.
                type: number
                format: float
                example: 1
              amount:
                description: The amount in the payment.
                type: number
                format: float
                example: 10.57
              tax_amount_withheld:
                description: The tax amount which has been withheld.
                type: number
                format: float
                example: 0
              online_transaction_id:
                $ref: '#/components/schemas/online_transaction_id'
              is_single_invoice_payment:
                description: boolean check.
                type: boolean
                example: true
    list-credits-applied-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        credits:
          description: The list of credits.
          type: array
          items:
            type: object
            properties:
              creditnote_id:
                $ref: '#/components/schemas/creditnote_id'
              creditnotes_invoice_id:
                $ref: '#/components/schemas/creditnotes_invoice_id'
              creditnotes_number:
                $ref: '#/components/schemas/creditnotes_number'
              credited_date:
                $ref: '#/components/schemas/credited_date'
              amount_applied:
                $ref: '#/components/schemas/amount_applied'
    apply-credits-request:
      required:
        - invoice_payments
        - apply_creditnotes
      type: object
      properties:
        invoice_payments:
          $ref: '#/components/schemas/invoice_payments'
        apply_creditnotes:
          $ref: '#/components/schemas/apply_creditnotes'
    apply-credits-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Credits have been applied to the invoice(s).
          readOnly: true
    delete-a-payment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The payment has been deleted.
          readOnly: true
    delete-applied-credit-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Credits applied to an invoice have been deleted.
          readOnly: true
    get-an-invoice-attachment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
    add-attachment-to-an-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Your file has been successfully attached to the invoice.
          readOnly: true
    update-attachment-preference-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Invoice information has been updated.
          readOnly: true
    delete-an-attachment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Your file is no longer attached to the invoice.
          readOnly: true
    delete-the-expense-receipt-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The attached expense receipt has been deleted.
          readOnly: true
    list-invoice-comments-and-history-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        comments:
          description: The details of the comments.
          type: array
          items:
            type: object
            properties:
              comment_id:
                description: 'ID of the comment. Note: This value is a set of numeric characters.'
                type: string
                example: 982000000567019
              invoice_id:
                $ref: '#/components/schemas/invoice_id'
              description:
                $ref: '#/components/schemas/description'
              commented_by_id:
                type: string
                example: 982000000554041
              commented_by:
                type: string
                example: John David
              comment_type:
                type: string
                example: system
              operation_type:
                type: string
                example: Added
              date:
                description: 'Search invoices by invoice date. Default date format is yyyy-mm-dd.<code> Variants: due_date_start, due_date_end, due_date_before and due_date_after</code>.'
                type: string
                example: '2013-11-18'
              date_description:
                type: string
                example: yesterday
              time:
                type: string
                example: 2:38 AM
              transaction_id:
                type: string
                description: 'The transaction ID associated with the comment. Note: This value is a set of numeric characters.'
                example: '982000000567204'
              transaction_type:
                type: string
                example: invoice
    create-a-comment-request:
      type: object
      properties:
        description:
          description: The description of the comment.
          type: string
          example: This is a comment.
        payment_expected_date:
          $ref: '#/components/schemas/payment_expected_date'
        show_comment_to_clients:
          $ref: '#/components/schemas/show_comment_to_clients'
    add-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Comments added.
          readOnly: true
    update-a-comment-request:
      type: object
      properties:
        description:
          description: The description of the comment.
          type: string
          example: This is a comment.
        show_comment_to_clients:
          $ref: '#/components/schemas/show_comment_to_clients'
    update-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        comment:
          type: object
          properties:
            comment_id:
              $ref: '#/components/schemas/comment_id'
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            description:
              $ref: '#/components/schemas/description'
            commented_by_id:
              $ref: '#/components/schemas/commented_by_id'
            commented_by:
              $ref: '#/components/schemas/commented_by'
            date:
              $ref: '#/components/schemas/date'
            date_description:
              $ref: '#/components/schemas/date_description'
            time:
              $ref: '#/components/schemas/time'
            comment_type:
              $ref: '#/components/schemas/comment_type'
    delete-a-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The comment has been deleted.
          readOnly: true
    get-invoice-document-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        document:
          type: object
          properties:
            document_id:
              description: 'Unique identifier for the document. Note: This value is a set of numeric characters.'
              type: string
              example: '982000000567200'
            document_name:
              description: Name of the document file.
              type: string
              example: invoice_attachment.pdf
            file_name:
              description: Original filename of the document.
              type: string
              example: contract_document.pdf
            file_size:
              description: Size of the document file in bytes.
              type: integer
              example: 245760
            file_type:
              description: Type of the document.
              type: string
              example: application/pdf
            document_url:
              description: URL to access the document.
              type: string
              example: https://erp.zoho.in/api/v3/invoices/982000000567114/documents/982000000567200
            created_time:
              description: Timestamp when the document was uploaded.
              type: string
              example: 2023-11-18T10:30:45+0530
            last_modified_time:
              description: Timestamp when the document was last modified.
              type: string
              example: 2023-11-18T10:30:45+0530
    delete-invoice-document-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The document has been deleted successfully.
          readOnly: true
    tag_id:
      description: 'Tag''s ID. Note: This value is a set of numeric characters.'
      type: string
      example: '460000000000567'
    tag_name:
      description: Name of the tag.
      type: string
      example: Business Unit
    tag_option_id:
      description: 'Tag Option''s ID. Note: This value is a set of numeric characters.'
      type: string
      example: '460000000014044'
    tag_option_name:
      description: Name of the tag option.
      type: string
      example: Sales
    is_tag_mandatory:
      description: Used to check if the tag is mandatory.
      type: boolean
      example: false
    tags:
      description: Reporting tags help organize and filter data across reports and enable detailed business intelligence analysis.
      type: array
      items:
        type: object
        properties:
          tag_id:
            $ref: '#/components/schemas/tag_id'
          tag_option_id:
            $ref: '#/components/schemas/tag_option_id'
    tags_response:
      description: Reporting tags help organize and filter data across reports and enable detailed business intelligence analysis.
      type: array
      items:
        type: object
        properties:
          tag_id:
            $ref: '#/components/schemas/tag_id'
          tag_name:
            $ref: '#/components/schemas/tag_name'
          tag_option_id:
            $ref: '#/components/schemas/tag_option_id'
          tag_option_name:
            $ref: '#/components/schemas/tag_option_name'
          is_tag_mandatory:
            $ref: '#/components/schemas/is_tag_mandatory'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.in/oauth/v2/auth
          scopes:
            ERP.invoices.CREATE: Create Invoices
            ERP.invoices.UPDATE: Update Invoices
            ERP.invoices.READ: Read Invoices
            ERP.invoices.DELETE: Delete Invoices
