openapi: 3.0.0
info:
  title: Recurring Expenses
  description: 'Recurring expenses are those expenses that repeat itself after a fixed interval of time.<br><br><b>Possible error codes: </b><br><table><thead><tr><th>Error Code</th><th>Message</th></tr></thead><tbody><tr><td><span style="color:#FF0000;"> 4027</span></td><td>Please select a valid date range</td></tr><tr><td><span style="color:#FF0000;"> 5012</span></td><td>Recurrence Name already exists</td></tr><tr><td><span style="color:#FF0000;"> 5015</span></td><td>Enter a valid expense amount</td></tr></tbody></table>'
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.com/invoice/v3
    description: API Endpoint
tags:
  - name: recurring-expenses
    description: Recurring-Expenses Module
paths:
  /recurringexpenses:
    post:
      tags:
        - recurring-expenses
      operationId: create_recurring_expense
      summary: Create a recurring expense
      description: Create a new recurring expense.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-recurring-expense-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-a-recurring-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.CREATE
    get:
      tags:
        - recurring-expenses
      operationId: list_recurring_expenses
      summary: List recurring expenses
      description: List all the Expenses with pagination.
      parameters:
        - name: recurrence_name
          in: query
          description: 'Search recurring expenses by recurring expense name. Variants: <code>recurrence_name_startswith</code> and <code>recurrence_name_contains</code>. <code>Maximum length [100]</code>'
          required: false
          schema:
            type: string
          example: Monthly Rental
        - name: last_created_date
          in: query
          description: 'Search recurring expenses by date on when last expense was generated. Variants: <code>last_created_date_start</code>, <code>last_created_date_end</code>, <code>last_created_date_before</code> and <code>last_created_date_after</code> . <code>Format [yyyy-mm-dd]</code>'
          required: false
          schema:
            type: string
          example: 2013-11-18T00:00:00.000Z
        - name: next_expense_date
          in: query
          description: 'Search recurring expenses by date on which next expense will be generated. Variants: <code>next_expense_date_start</code>, <code>next_expense_date_end</code>, <code>next_expense_date_before</code> and <code>next_expense_date_after</code> . <code>Format [yyyy-mm-dd]</code>'
          required: false
          schema:
            type: string
          example: 2013-12-18T00:00:00.000Z
        - name: status
          in: query
          description: Search expenses by expense status. Allowed Values <code>active</code>, <code>stopped</code> and <code>expired</code>
          required: false
          schema:
            type: string
          example: active
        - name: account_id
          in: query
          description: Unique ID of an account
          required: false
          schema:
            type: string
          example: 982000000561057
        - name: account_name
          in: query
          description: Search expenses by expense account name. Variants <code>account_name_startswith</code> and <code>account_name_contains</code> . <code>Maximum length [100]</code>
          required: false
          schema:
            type: string
          example: Rent
        - name: amount
          in: query
          description: 'Search expenses by amount. Variants: <code>amount_less_than</code>, <code>amount_less_equals</code>, <code>amount_greater_than</code> and <code>amount_greater_than</code>'
          required: false
          schema:
            type: number
            format: double
          example: 112.5
        - name: customer_name
          in: query
          description: 'Search expenses by customer name. Variants: <code>customer_name_startswith</code> and <code>customer_name_contains</code> . <code>Maximum length [100]</code>'
          required: false
          schema:
            type: string
          example: Bowman & Co
        - name: customer_id
          in: query
          description: Search expenses by customer id.
          required: false
          schema:
            type: string
          example: 982000000567001
        - name: paid_through_account_id
          in: query
          description: Search expenses by paid through account id.
          required: false
          schema:
            type: string
          example: 982000000567250
        - name: filter_by
          in: query
          description: Filter expenses by expense status. Allowed Values <code>Status.All</code>, <code>Status.Active</code>, <code>Status.Expired</code> and <code>Status.Stopped</code>
          required: false
          schema:
            type: string
          example: Status.Billable
        - name: search_text
          in: query
          description: Search expenses by account name or description or <code>customer name</code>  or <code>vendor name</code>. <code>Maximum length [100]</code> .
          required: false
          schema:
            type: string
          example: Rent
        - name: sort_column
          in: query
          description: Sort expenses.Allowed Values <code>next_expense_date</code>, <code>account_name</code>, <code>total</code>, <code>last_created_date</code>, <code>recurrence_name</code>, <code>customer_name</code> and <code>created_time</code>
          required: false
          schema:
            type: string
          example: account_name
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          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-recurring-expenses-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.READ
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /recurringexpenses/{recurring_expense_id}:
    post:
      tags:
        - recurring-expenses
      operationId: update_recurring_expense
      summary: Update a recurring expense
      description: Update an existing recurring expense.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-a-recurring-expense-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-a-recurring-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.UPDATE
    get:
      tags:
        - recurring-expenses
      operationId: get_recurring_expense
      summary: Get a recurring expense
      description: Get the details of the recurring expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-a-recurring-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.READ
    delete:
      tags:
        - recurring-expenses
      operationId: delete_recurring_expense
      summary: Delete a recurring expense
      description: Deleting an existing recurring expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-recurring-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.DELETE
    parameters:
      - name: recurring_expense_id
        in: path
        required: true
        description: Unique identifier of the recurring expense.
        schema:
          type: string
        example: 982000000567240
      - $ref: '#/components/parameters/organization_id'
  /recurringexpenses/{recurring_expense_id}/status/stop:
    post:
      tags:
        - recurring-expenses
      operationId: stop_recurring_expense
      summary: Stop a recurring expense
      description: Stop an active recurring expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stop-a-recurring-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.CREATE
    parameters:
      - name: recurring_expense_id
        in: path
        required: true
        description: Unique identifier of the recurring expense.
        schema:
          type: string
        example: 982000000567240
      - $ref: '#/components/parameters/organization_id'
  /recurringexpenses/{recurring_expense_id}/status/resume:
    post:
      tags:
        - recurring-expenses
      operationId: resume_recurring_expense
      summary: Resume a recurring Expense
      description: Resume a stopped recurring expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resume-a-recurring-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.CREATE
    parameters:
      - name: recurring_expense_id
        in: path
        required: true
        description: Unique identifier of the recurring expense.
        schema:
          type: string
        example: 982000000567240
      - $ref: '#/components/parameters/organization_id'
  /recurringexpenses/{recurring_expense_id}/expenses:
    get:
      tags:
        - recurring-expenses
      operationId: list_child_expenses_created
      summary: List child expenses created
      description: List child expenses created from recurring expense.
      parameters:
        - name: sort_column
          in: query
          description: Sort expenses.Allowed Values <code>next_expense_date</code>, <code>account_name</code>, <code>total</code>, <code>last_created_date</code>, <code>recurrence_name</code>, <code>customer_name</code> and <code>created_time</code>
          required: false
          schema:
            type: string
          example: account_name
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          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-child-expenses-created-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.READ
    parameters:
      - name: recurring_expense_id
        in: path
        required: true
        description: Unique identifier of the recurring expense.
        schema:
          type: string
        example: 982000000567240
      - $ref: '#/components/parameters/organization_id'
  /recurringexpenses/{recurring_expense_id}/comments:
    get:
      tags:
        - recurring-expenses
      operationId: list_recurring_expense_comments
      summary: List recurring expense history
      description: Get history and comments of a recurring expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-recurring-expense-history-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoInvoice.expenses.READ
    parameters:
      - name: recurring_expense_id
        in: path
        required: true
        description: Unique identifier of the recurring expense.
        schema:
          type: string
        example: 982000000567240
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: X-com-zoho-invoice-organizationid
      description: ID of the organization
      in: header
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/recurring_expense-response'
    recurring_expense-response:
      type: object
      properties:
        account_id:
          $ref: '#/components/schemas/account_id'
        recurrence_name:
          $ref: '#/components/schemas/recurrence_name'
        start_date:
          $ref: '#/components/schemas/start_date'
        end_date:
          $ref: '#/components/schemas/end_date'
        is_pre_gst:
          $ref: '#/components/schemas/is_pre_gst'
        source_of_supply:
          $ref: '#/components/schemas/source_of_supply'
        destination_of_supply:
          $ref: '#/components/schemas/destination_of_supply'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        destination_of_supply_state:
          $ref: '#/components/schemas/destination_of_supply_state'
        hsn_or_sac:
          $ref: '#/components/schemas/hsn_or_sac'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        reverse_charge_tax_id:
          $ref: '#/components/schemas/reverse_charge_tax_id'
        reverse_charge_tax_name:
          $ref: '#/components/schemas/reverse_charge_tax_name'
        reverse_charge_tax_percentage:
          $ref: '#/components/schemas/reverse_charge_tax_percentage'
        reverse_charge_tax_amount:
          $ref: '#/components/schemas/reverse_charge_tax_amount'
        is_reverse_charge_applied:
          $ref: '#/components/schemas/is_reverse_charge_applied'
        acquisition_vat_total:
          $ref: '#/components/schemas/acquisition_vat_total'
        reverse_charge_vat_total:
          $ref: '#/components/schemas/reverse_charge_vat_total'
        acquisition_vat_summary:
          $ref: '#/components/schemas/acquisition_vat_summary'
        reverse_charge_vat_summary:
          $ref: '#/components/schemas/reverse_charge_vat_summary'
        recurrence_frequency:
          $ref: '#/components/schemas/recurrence_frequency'
        repeat_every:
          $ref: '#/components/schemas/repeat_every'
        amount:
          $ref: '#/components/schemas/amount'
        total:
          $ref: '#/components/schemas/total'
        sub_total:
          $ref: '#/components/schemas/sub_total'
        bcy_total:
          $ref: '#/components/schemas/bcy_total'
        product_type:
          $ref: '#/components/schemas/product_type'
        acquisition_vat_id:
          $ref: '#/components/schemas/acquisition_vat_id'
        reverse_charge_vat_id:
          $ref: '#/components/schemas/reverse_charge_vat_id'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        tax_name:
          $ref: '#/components/schemas/tax_name'
        tax_percentage:
          $ref: '#/components/schemas/tax_percentage'
        created_time:
          $ref: '#/components/schemas/created_time'
        last_modified_time:
          $ref: '#/components/schemas/last_modified_time'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        project_id:
          $ref: '#/components/schemas/project_id'
        project_name:
          $ref: '#/components/schemas/project_name'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        line_item:
          type: object
          properties:
            line_item_id:
              $ref: '#/components/schemas/line_item_id'
            account_id:
              $ref: '#/components/schemas/account_id'
            account_name:
              $ref: '#/components/schemas/account_name'
            description:
              $ref: '#/components/schemas/description'
            tax_amount:
              $ref: '#/components/schemas/tax_amount'
            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'
            item_order:
              $ref: '#/components/schemas/item_order'
            hsn_or_sac:
              $ref: '#/components/schemas/hsn_or_sac'
            reverse_charge_tax_id:
              $ref: '#/components/schemas/reverse_charge_tax_id'
            reverse_charge_tax_name:
              $ref: '#/components/schemas/reverse_charge_tax_name'
            reverse_charge_tax_percentage:
              $ref: '#/components/schemas/reverse_charge_tax_percentage'
            reverse_charge_tax_amount:
              $ref: '#/components/schemas/reverse_charge_tax_amount'
    recurring_expense_id:
      description: ID of the recurring expense
      type: string
      example: 982000000567240
    recurrence_name:
      description: Name of the Recurring Expense. <code>Maximum length [100]</code>
      type: string
      example: Monthly Rental
    last_created_date:
      description: 'Search recurring expenses by date on when last expense was generated. Variants: <code>last_created_date_start</code>, <code>last_created_date_end</code>, <code>last_created_date_before</code> and <code>last_created_date_after</code> . <code>Format [yyyy-mm-dd]</code>'
      type: string
      example: 2013-11-18T00:00:00.000Z
    next_expense_date:
      description: 'Search recurring expenses by date on which next expense will be generated. Variants: <code>next_expense_date_start</code>, <code>next_expense_date_end</code>, <code>next_expense_date_before</code> and <code>next_expense_date_after</code> . <code>Format [yyyy-mm-dd]</code>'
      type: string
      example: 2013-12-18T00:00:00.000Z
    status:
      description: Status of the recurring expense
      type: string
      example: active
    gst_no:
      description: 15 digit GST identification number of the vendor.
      type: string
      example: 22AAAAA0000A1Z5
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    source_of_supply:
      description: Place from where the goods/services are supplied. (If not given, <code>place of contact</code> given for the contact will be taken)
      type: string
      example: AP
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    destination_of_supply:
      description: Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)
      type: string
      example: TN
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_id:
      description: Enter reverse charge tax ID
      type: string
      example: 982000000567254
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    tax_exemption_code:
      description: Enter the code for tax exemption
      type: string
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    tax_exemption_id:
      description: Enter ID of the tax exemption
      type: string
      example: 982000000567267
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    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: []
    reverse_charge_tax_name:
      description: Enter reverse charge tax name
      type: string
      example: inter
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_percentage:
      description: Tax percentage of the reverse charge
      type: number
      format: double
      example: 10
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_amount:
      description: Tax amount of the reverse charge
      type: number
      format: double
      example: 10
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    is_pre_gst:
      description: Applicable for transactions that fall before july 1, 2017
      type: boolean
      example: false
      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: []
    destination_of_supply_state:
      description: Place to where the goods/services are supplied
      type: string
      example: AP
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    is_reverse_charge_applied:
      description: Applicable for transactions where you pay reverse charge
      type: boolean
      example: false
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    acquisition_vat_total:
      description: Enter the total acquisition vat.
      type: number
      format: double
      example: 0
    reverse_charge_vat_total:
      description: Enter the total of the reverse charge vat.
      type: number
      format: double
      example: 10
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    account_id:
      description: Unique ID of an account
      type: string
      example: 982000000561057
    account_name:
      description: For which Account the Expense is raised. <code>Maximum length [100]</code>
      type: string
      example: Rent
    amount:
      description: Recurring Expense amount.
      type: number
      format: double
      example: 112.5
    customer_name:
      description: Name of the Custome for which expense is raised. <code>Maximum length [100]</code>
      type: string
      example: Bowman & Co
    customer_id:
      description: Search expenses by customer id.
      type: string
      example: 982000000567001
    paid_through_account_id:
      description: Search expenses by paid through account id.
      type: string
      example: 982000000567250
    filter_by:
      description: Filter expenses by expense status. Allowed Values <code>Status.All</code>, <code>Status.Active</code>, <code>Status.Expired</code> and <code>Status.Stopped</code>
      type: string
      example: Status.Billable
    search_text:
      description: Search expenses by account name or description or <code>customer name</code>  or <code>vendor name</code>. <code>Maximum length [100]</code> .
      type: string
      example: Rent
    sort_column:
      description: Sort expenses.Allowed Values <code>next_expense_date</code>, <code>account_name</code>, <code>total</code>, <code>last_created_date</code>, <code>recurrence_name</code>, <code>customer_name</code> and <code>created_time</code>
      type: string
      example: account_name
    currency_id:
      description: Unique ID of the currency used
      type: string
      example: 982000000567001
    currency_code:
      description: Code to denote th ecurrency used
      type: string
      example: USD
    is_billable:
      description: To check if the expense is billable
      type: boolean
      example: true
    created_time:
      description: Time expense was created
      type: string
      example: 2013-11-18T02:17:40-0800
    last_modified_time:
      description: Time the expense was last modified
      type: string
      example: 2013-12-18T02:17:40-0800
    description:
      description: Search recurring expenses by description. <code>Maximum length [100]</code>
      type: string
      example: ' '
    recurrence_frequency:
      description: Frequency of the recurrance
      type: string
      example: months
    repeat_every:
      description: The cycle of recurrance
      type: string
      example: 1
    total:
      description: Total expense
      type: number
      format: double
      example: 128.25
    tax_id:
      description: Unique ID for the tax
      type: string
      example: 982000000566007
    tax_name:
      description: Name of the tax
      type: string
      example: SalesTax
    tax_percentage:
      description: Percentage of tax levied
      type: number
      format: double
      example: 10.5
    tax_amount:
      description: Total value of tax applied
      type: number
      format: double
      example: 11.85
    project_id:
      description: Unique ID of the tax applied
      type: string
      example: ' '
    project_name:
      description: Name of the project being billed
      type: string
      example: ' '
    customfield_id:
      type: string
      description: Unique identifier of the custom field
      example: '46000000012845'
    value:
      description: Value of the Custom Field
      type: string
      example: Normal
    custom_fields:
      description: Custom fields for a recurring-expense.
      type: array
      items:
        type: object
        properties:
          customfield_id:
            $ref: '#/components/schemas/customfield_id'
          value:
            $ref: '#/components/schemas/value'
    sub_total:
      description: Sub total of the expenses
      type: number
      format: double
      example: 90
    bcy_total:
      description: Total in base currency
      type: number
      format: double
      example: 100
    is_inclusive_tax:
      description: To check if the total is inclusive of tax
      type: boolean
      example: false
    exchange_rate:
      description: Foreign exchange rate
      type: number
      format: double
      example: 1
    start_date:
      description: Start date of the recurring expense. Expenses will not be generated for dates prior to the current date. <code>Format [yyyy-mm-dd]</code>.
      type: string
      example: 2016-11-19T00:00:00.000Z
    end_date:
      description: Date on which recurring expense has to expire. Can be left as empty to run forever. <code>Format [yyyy-mm-dd]</code>.
      type: string
      example: ' '
    vat_treatment:
      description: VAT treatment for the expense. VAT treatment denotes the location of the vendor, if the vendor resides in UK then the VAT treatment is <code>uk</code>.If the vendor is in an EU country & VAT registered, you are resides in Northen Ireland and purchasing Goods then his VAT treatment is <code>eu_vat_registered</code> and if he resides outside the EU then his VAT treatment is <code>overseas</code>(For Pre Brexit, this can be split as <code>eu_vat_registered</code>, <code>eu_vat_not_registered</code> and <code>non_eu</code>).
      type: string
      example: eu_vat_not_registered
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    product_type:
      description: 'Type of the expense. This denotes whether the expense is to be treated as a goods or service purchase. Allowed Values: <code>goods</code> and <code>service</code>.'
      type: string
      example: goods
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    acquisition_vat_id:
      description: This is the ID of the tax applied in case this is an EU - goods expense and acquisition VAT needs to be reported.
      type: string
      example: ' '
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    reverse_charge_vat_id:
      description: This is the ID of the tax applied in case this is a non UK - service expense and reverse charge VAT needs to be reported.
      type: string
      example: ' '
      x-node_available_in:
        - in
        - uk
      x-node_unavailable_in: []
    expense_id:
      description: Unoque ID of the expense
      type: string
      example: 982000000567250
    date:
      description: Date of expense creation
      type: string
      example: '2013-11-18'
    comment_id:
      description: Unique ID of the comment
      type: string
      example: 982000000567272
    commented_by_id:
      description: Filter to view comment by ID
      type: string
      example: 982000000554041
    commented_by:
      description: Person who added the comment
      type: string
      example: John David
    operation_type:
      description: Operation on the expense created
      type: string
      example: Added
    transaction_id:
      description: Unique ID of the transaction
      type: string
      example: ' '
    transaction_type:
      description: Type of transaction
      type: string
      example: expense
    time:
      description: Time of transaction
      type: string
      example: 2.41 AM
    expense_type:
      description: Type of expense made
      type: string
      example: non-mileage
    is_personal:
      description: Check if expense is for personal purpose
      type: boolean
      example: false
    line_item_id:
      description: Unique ID of Item listed
      type: string
      example: 10763000000140068
    tax_type:
      description: Type of tax applied
      type: string
      example: tax
    item_total:
      description: Total value of items
      type: string
      example: 100
    item_order:
      description: Order of items
      type: string
      example: 1
    vendor_name:
      description: Name of the seller
      type: string
      example: ' '
    paid_through_account_name:
      description: Account from which payment was made
      type: string
      example: Undeposited Funds
    acquisition_vat_summary:
      description: Summary of the VAT Acquistion
      type: array
      items:
        type: object
        properties:
          tax_name:
            $ref: '#/components/schemas/tax_name'
          tax_amount:
            $ref: '#/components/schemas/tax_amount'
    reverse_charge_vat_summary:
      description: Summary of the Reverse Charge
      type: array
      items:
        type: object
        properties:
          tax_name:
            $ref: '#/components/schemas/tax_name'
          tax_amount:
            $ref: '#/components/schemas/tax_amount'
    line_items:
      type: array
      items:
        type: object
        properties:
          line_item_id:
            $ref: '#/components/schemas/line_item_id'
          account_id:
            $ref: '#/components/schemas/account_id'
          description:
            $ref: '#/components/schemas/description'
          amount:
            $ref: '#/components/schemas/amount'
          tax_id:
            $ref: '#/components/schemas/tax_id'
          item_order:
            $ref: '#/components/schemas/item_order'
          product_type:
            $ref: '#/components/schemas/product_type'
          acquisition_vat_id:
            $ref: '#/components/schemas/acquisition_vat_id'
          reverse_charge_vat_id:
            $ref: '#/components/schemas/reverse_charge_vat_id'
          reverse_charge_tax_id:
            $ref: '#/components/schemas/reverse_charge_tax_id'
          tax_exemption_code:
            $ref: '#/components/schemas/tax_exemption_code'
          tax_exemption_id:
            $ref: '#/components/schemas/tax_exemption_id'
    create-a-recurring-expense-request:
      required:
        - account_id
        - recurrence_name
        - start_date
        - recurrence_frequency
        - repeat_every
        - amount
      type: object
      properties:
        account_id:
          $ref: '#/components/schemas/account_id'
        recurrence_name:
          $ref: '#/components/schemas/recurrence_name'
        start_date:
          $ref: '#/components/schemas/start_date'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        source_of_supply:
          $ref: '#/components/schemas/source_of_supply'
        destination_of_supply:
          $ref: '#/components/schemas/destination_of_supply'
        reverse_charge_tax_id:
          $ref: '#/components/schemas/reverse_charge_tax_id'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        line_items:
          $ref: '#/components/schemas/line_items'
        end_date:
          $ref: '#/components/schemas/end_date'
        recurrence_frequency:
          $ref: '#/components/schemas/recurrence_frequency'
        repeat_every:
          $ref: '#/components/schemas/repeat_every'
        amount:
          $ref: '#/components/schemas/amount'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        product_type:
          $ref: '#/components/schemas/product_type'
        acquisition_vat_id:
          $ref: '#/components/schemas/acquisition_vat_id'
        reverse_charge_vat_id:
          $ref: '#/components/schemas/reverse_charge_vat_id'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        project_id:
          $ref: '#/components/schemas/project_id'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
    create-a-recurring-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The recurring expense has been created
          readOnly: true
        recurring_expense:
          $ref: '#/components/schemas/recurring_expense-response'
    list-recurring-expenses-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        recurring_expenses:
          type: array
          items:
            type: object
            properties:
              recurring_expense_id:
                $ref: '#/components/schemas/recurring_expense_id'
              recurrence_name:
                $ref: '#/components/schemas/recurrence_name'
              recurrence_frequency:
                $ref: '#/components/schemas/recurrence_frequency'
              repeat_every:
                $ref: '#/components/schemas/repeat_every'
              last_created_date:
                $ref: '#/components/schemas/last_created_date'
              next_expense_date:
                $ref: '#/components/schemas/next_expense_date'
              account_name:
                $ref: '#/components/schemas/account_name'
              description:
                $ref: '#/components/schemas/description'
              currency_id:
                $ref: '#/components/schemas/currency_id'
              currency_code:
                $ref: '#/components/schemas/currency_code'
              total:
                $ref: '#/components/schemas/total'
              is_billable:
                $ref: '#/components/schemas/is_billable'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              status:
                $ref: '#/components/schemas/status'
              custom_fields:
                $ref: '#/components/schemas/custom_fields'
              created_time:
                $ref: '#/components/schemas/created_time'
              last_modified_time:
                $ref: '#/components/schemas/last_modified_time'
    update-a-recurring-expense-request:
      required:
        - account_id
        - recurrence_name
        - start_date
        - recurrence_frequency
        - repeat_every
        - amount
      type: object
      properties:
        account_id:
          $ref: '#/components/schemas/account_id'
        recurrence_name:
          $ref: '#/components/schemas/recurrence_name'
        start_date:
          $ref: '#/components/schemas/start_date'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        source_of_supply:
          $ref: '#/components/schemas/source_of_supply'
        destination_of_supply:
          $ref: '#/components/schemas/destination_of_supply'
        reverse_charge_tax_id:
          $ref: '#/components/schemas/reverse_charge_tax_id'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        line_items:
          $ref: '#/components/schemas/line_items'
        end_date:
          $ref: '#/components/schemas/end_date'
        recurrence_frequency:
          $ref: '#/components/schemas/recurrence_frequency'
        repeat_every:
          $ref: '#/components/schemas/repeat_every'
        amount:
          $ref: '#/components/schemas/amount'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        product_type:
          $ref: '#/components/schemas/product_type'
        acquisition_vat_id:
          $ref: '#/components/schemas/acquisition_vat_id'
        reverse_charge_vat_id:
          $ref: '#/components/schemas/reverse_charge_vat_id'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        project_id:
          $ref: '#/components/schemas/project_id'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
    update-a-recurring-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Recurring expense information has been updated
          readOnly: true
        recurring_expense:
          type: object
          properties:
            account_id:
              $ref: '#/components/schemas/account_id'
            recurrence_name:
              $ref: '#/components/schemas/recurrence_name'
            start_date:
              $ref: '#/components/schemas/start_date'
            end_date:
              $ref: '#/components/schemas/end_date'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            source_of_supply:
              $ref: '#/components/schemas/source_of_supply'
            destination_of_supply:
              $ref: '#/components/schemas/destination_of_supply'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            destination_of_supply_state:
              $ref: '#/components/schemas/destination_of_supply_state'
            hsn_or_sac:
              $ref: '#/components/schemas/hsn_or_sac'
            vat_treatment:
              $ref: '#/components/schemas/vat_treatment'
            reverse_charge_tax_id:
              $ref: '#/components/schemas/reverse_charge_tax_id'
            reverse_charge_tax_name:
              $ref: '#/components/schemas/reverse_charge_tax_name'
            reverse_charge_tax_percentage:
              $ref: '#/components/schemas/reverse_charge_tax_percentage'
            reverse_charge_tax_amount:
              $ref: '#/components/schemas/reverse_charge_tax_amount'
            is_reverse_charge_applied:
              $ref: '#/components/schemas/is_reverse_charge_applied'
            acquisition_vat_total:
              $ref: '#/components/schemas/acquisition_vat_total'
            reverse_charge_vat_total:
              $ref: '#/components/schemas/reverse_charge_vat_total'
            acquisition_vat_summary:
              $ref: '#/components/schemas/acquisition_vat_summary'
            reverse_charge_vat_summary:
              $ref: '#/components/schemas/reverse_charge_vat_summary'
            recurrence_frequency:
              $ref: '#/components/schemas/recurrence_frequency'
            repeat_every:
              $ref: '#/components/schemas/repeat_every'
            amount:
              description: Recurring Expense amount.
              type: string
              example: 120.5
            total:
              $ref: '#/components/schemas/total'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            bcy_total:
              $ref: '#/components/schemas/bcy_total'
            product_type:
              $ref: '#/components/schemas/product_type'
            acquisition_vat_id:
              $ref: '#/components/schemas/acquisition_vat_id'
            reverse_charge_vat_id:
              $ref: '#/components/schemas/reverse_charge_vat_id'
            tax_id:
              $ref: '#/components/schemas/tax_id'
            tax_name:
              $ref: '#/components/schemas/tax_name'
            tax_percentage:
              $ref: '#/components/schemas/tax_percentage'
            created_time:
              $ref: '#/components/schemas/created_time'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            line_item:
              type: object
              properties:
                line_item_id:
                  $ref: '#/components/schemas/line_item_id'
                account_id:
                  $ref: '#/components/schemas/account_id'
                account_name:
                  $ref: '#/components/schemas/account_name'
                description:
                  $ref: '#/components/schemas/description'
                tax_amount:
                  $ref: '#/components/schemas/tax_amount'
                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'
                item_order:
                  $ref: '#/components/schemas/item_order'
                hsn_or_sac:
                  $ref: '#/components/schemas/hsn_or_sac'
                reverse_charge_tax_id:
                  $ref: '#/components/schemas/reverse_charge_tax_id'
                reverse_charge_tax_name:
                  $ref: '#/components/schemas/reverse_charge_tax_name'
                reverse_charge_tax_percentage:
                  $ref: '#/components/schemas/reverse_charge_tax_percentage'
                reverse_charge_tax_amount:
                  $ref: '#/components/schemas/reverse_charge_tax_amount'
    get-a-recurring-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        recurring_expense:
          type: object
          properties:
            recurring_expense_id:
              $ref: '#/components/schemas/recurring_expense_id'
            recurrence_name:
              $ref: '#/components/schemas/recurrence_name'
            start_date:
              $ref: '#/components/schemas/start_date'
            end_date:
              $ref: '#/components/schemas/end_date'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            source_of_supply:
              $ref: '#/components/schemas/source_of_supply'
            destination_of_supply:
              $ref: '#/components/schemas/destination_of_supply'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            destination_of_supply_state:
              $ref: '#/components/schemas/destination_of_supply_state'
            hsn_or_sac:
              $ref: '#/components/schemas/hsn_or_sac'
            vat_treatment:
              $ref: '#/components/schemas/vat_treatment'
            reverse_charge_tax_id:
              $ref: '#/components/schemas/reverse_charge_tax_id'
            reverse_charge_tax_name:
              $ref: '#/components/schemas/reverse_charge_tax_name'
            reverse_charge_tax_percentage:
              $ref: '#/components/schemas/reverse_charge_tax_percentage'
            reverse_charge_tax_amount:
              $ref: '#/components/schemas/reverse_charge_tax_amount'
            is_reverse_charge_applied:
              $ref: '#/components/schemas/is_reverse_charge_applied'
            acquisition_vat_total:
              $ref: '#/components/schemas/acquisition_vat_total'
            reverse_charge_vat_total:
              $ref: '#/components/schemas/reverse_charge_vat_total'
            acquisition_vat_summary:
              $ref: '#/components/schemas/acquisition_vat_summary'
            reverse_charge_vat_summary:
              $ref: '#/components/schemas/reverse_charge_vat_summary'
            recurrence_frequency:
              $ref: '#/components/schemas/recurrence_frequency'
            repeat_every:
              $ref: '#/components/schemas/repeat_every'
            last_created_date:
              $ref: '#/components/schemas/last_created_date'
            next_expense_date:
              $ref: '#/components/schemas/next_expense_date'
            account_id:
              $ref: '#/components/schemas/account_id'
            account_name:
              $ref: '#/components/schemas/account_name'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            tax_id:
              $ref: '#/components/schemas/tax_id'
            tax_name:
              $ref: '#/components/schemas/tax_name'
            tax_percentage:
              $ref: '#/components/schemas/tax_percentage'
            tax_amount:
              $ref: '#/components/schemas/tax_amount'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            total:
              $ref: '#/components/schemas/total'
            bcy_total:
              $ref: '#/components/schemas/bcy_total'
            amount:
              $ref: '#/components/schemas/amount'
            description:
              $ref: '#/components/schemas/description'
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            status:
              $ref: '#/components/schemas/status'
            created_time:
              $ref: '#/components/schemas/created_time'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            line_item:
              type: object
              properties:
                line_item_id:
                  $ref: '#/components/schemas/line_item_id'
                account_id:
                  $ref: '#/components/schemas/account_id'
                account_name:
                  $ref: '#/components/schemas/account_name'
                description:
                  $ref: '#/components/schemas/description'
                tax_amount:
                  $ref: '#/components/schemas/tax_amount'
                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'
                item_order:
                  $ref: '#/components/schemas/item_order'
                hsn_or_sac:
                  $ref: '#/components/schemas/hsn_or_sac'
                reverse_charge_tax_id:
                  $ref: '#/components/schemas/reverse_charge_tax_id'
                reverse_charge_tax_name:
                  $ref: '#/components/schemas/reverse_charge_tax_name'
                reverse_charge_tax_percentage:
                  $ref: '#/components/schemas/reverse_charge_tax_percentage'
                reverse_charge_tax_amount:
                  $ref: '#/components/schemas/reverse_charge_tax_amount'
    delete-a-recurring-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The recurring expense has been deleted.
          readOnly: true
    stop-a-recurring-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The recurring expense has been stopped.
          readOnly: true
    resume-a-recurring-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The recurring expense has been activated.
          readOnly: true
    list-child-expenses-created-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        expensehistory:
          type: array
          items:
            type: object
            properties:
              expense_id:
                $ref: '#/components/schemas/expense_id'
              date:
                $ref: '#/components/schemas/date'
              account_name:
                $ref: '#/components/schemas/account_name'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              total:
                $ref: '#/components/schemas/total'
              status:
                $ref: '#/components/schemas/status'
              vendor_name:
                $ref: '#/components/schemas/vendor_name'
              paid_through_account_name:
                $ref: '#/components/schemas/paid_through_account_name'
    list-recurring-expense-history-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        comments:
          type: array
          items:
            type: object
            properties:
              comment_id:
                $ref: '#/components/schemas/comment_id'
              recurring_expense_id:
                $ref: '#/components/schemas/recurring_expense_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'
              time:
                $ref: '#/components/schemas/time'
              operation_type:
                $ref: '#/components/schemas/operation_type'
              transaction_id:
                $ref: '#/components/schemas/transaction_id'
              transaction_type:
                $ref: '#/components/schemas/transaction_type'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
          scopes:
            ZohoInvoice.expenses.CREATE: Create Expenses
            ZohoInvoice.expenses.UPDATE: Update Expenses
            ZohoInvoice.expenses.READ: Read Expenses
            ZohoInvoice.expenses.DELETE: Delete Expenses
