openapi: 3.0.0
info:
  title: Expenses
  description: A typical expense is incurred when money goes out of your pocket. Whether its a product you buy from your vendor to run your business, or food that you eat while on business trips, it's important to track the money you spend.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.in/erp/v3
    description: API Endpoint
tags:
  - name: expenses
    description: Expenses Module
paths:
  /expenses:
    x-mcp-group:
      - Expenses
    post:
      tags:
        - expenses
      operationId: create_expense
      summary: Create an Expense
      description: Create billable or non-billable expense.
      parameters:
        - name: receipt
          in: query
          description: 'Expense receipt file to attach. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code>, <code>pdf</code>, <code>xls</code>, <code>xlsx</code>, <code>doc</code> and <code>docx</code>.'
          required: false
          schema:
            type: string
            format: binary
          example: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-an-expense-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.CREATE
    get:
      tags:
        - expenses
      operationId: list_expenses
      summary: List Expenses
      description: List all the Expenses with pagination.
      parameters:
        - name: description
          in: query
          description: Search expenses by description. Variants <code>description_startswith</code> and <code>description_contains</code>. Max-length [100]
          required: false
          schema:
            type: string
          example: Marketing
        - name: reference_number
          in: query
          description: Search expenses by reference number. Variants <code>reference_number_startswith</code> and <code>reference_number_contains</code>. Max-length [100]
          required: false
          schema:
            type: string
          example: ''
        - name: date
          in: query
          description: Search expenses by expense date. Variants <code>date_start</code>, <code>date_end</code>, <code>date_before</code> and <code>date_after</code>. Format [yyyy-mm-dd]
          required: false
          schema:
            type: string
          example: 2013-11-18T00:00:00.000Z
        - name: status
          in: query
          description: Search expenses by expense status. Allowed Values <code>unbilled</code>, <code>invoiced</code>, <code>reimbursed</code>, <code>non-billable</code> and <code>billable</code>
          required: false
          schema:
            type: string
          example: unbilled
        - 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: account_name
          in: query
          description: Search expenses by expense account name. Variants <code>account_name_startswith</code> and <code>account_name_contains</code>. Max-length [100]
          required: false
          schema:
            type: string
          example: Rent
        - name: customer_name
          in: query
          description: 'Search expenses by customer name. Variants: <code>customer_name_startswith</code> and <code>customer_name_contains</code>. Max-length [100]'
          required: false
          schema:
            type: string
          example: Zylker Inc
        - name: vendor_name
          in: query
          description: 'Search expenses by vendor name. Variants: <code>vendor_name_startswith</code> and <code>vendor_name_contains</code>.'
          required: false
          schema:
            type: string
          example: ''
        - name: customer_id
          in: query
          description: 'ID of the expense account. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: 982000000567001
        - name: vendor_id
          in: query
          description: 'ID of the vendor the expense is made. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: ''
        - name: recurring_expense_id
          in: query
          description: 'Search expenses by recurring expense id. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: 982000000000190
        - name: paid_through_account_id
          in: query
          description: 'Search expenses by paid through account id. Note: This value is a set of numeric characters.'
          required: false
          schema:
            type: string
          example: 982000000567250
        - name: project_id
          in: query
          description: Search expenses by specific project ID. Accepts the unique identifier for a project to retrieve all expenses associated with that particular project.
          required: false
          schema:
            type: string
          example: '460000000038030'
        - name: search_text
          in: query
          description: Search expenses by account name or description or <code>customer name</code>  or <code>vendor name</code>. Max-length [100]
          required: false
          schema:
            type: string
          example: Rent
        - name: sort_column
          in: query
          description: Sort expenses. Allowed Values <code>date</code>, <code>account_name</code>, <code>total</code>, <code>bcy_total</code>, <code>reference_number</code>, <code>customer_name</code> and <code>created_time</code>
          required: false
          schema:
            type: string
          example: total
        - name: filter_by
          in: query
          description: Filter expenses by expense status. Allowed Values <code>Status.All</code>, <code>Status.Billable</code>, <code>Status.Nonbillable</code>, <code>Status.Reimbursed</code>, <code>Status.Invoiced</code>and <code>Status.Unbilled</code>
          required: false
          schema:
            type: string
          example: Status.Billable
        - 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-expenses-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.READ
    put:
      tags:
        - expenses
      operationId: update_expense_using_custom_field
      summary: Update an expense 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 a expense 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 bill expense 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 expenses, a new expense 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-expense-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.UPDATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /expenses/{expense_id}:
    x-mcp-group:
      - Expenses
    put:
      tags:
        - expenses
      operationId: update_expense
      summary: Update an Expense
      description: Update an existing Expense.
      parameters:
        - name: receipt
          in: query
          description: 'Expense receipt file to attach. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code>, <code>pdf</code>, <code>xls</code>, <code>xlsx</code>, <code>doc</code> and <code>docx</code>.'
          required: false
          schema:
            type: string
            format: binary
          example: ''
        - name: delete_receipt
          in: query
          description: Delete the existing receipt. If this parameter is set to true, the existing receipt will be deleted and the receipt provided in the request will be attached to the expense. If this parameter is not sent in the request, then the existing receipt will be retained and the new receipt provided in the request will be ignored.
          required: false
          schema:
            type: boolean
          example: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-an-expense-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.UPDATE
    get:
      tags:
        - expenses
      operationId: get_expense
      summary: Get an Expense
      description: Get the details of the Expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.READ
    delete:
      tags:
        - expenses
      operationId: delete_expense
      summary: Delete an Expense
      description: Delete an existing expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.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: 982000000030049
      - $ref: '#/components/parameters/organization_id'
  /expenses/{expense_id}/comments:
    x-mcp-group:
      - Expenses
    get:
      tags:
        - expenses
      operationId: list_expense_comments
      summary: List expense History & Comments
      description: Get history and comments of expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-expense-history-and-comments-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.READ
    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: 982000000030049
      - $ref: '#/components/parameters/organization_id'
  /expenses/{expense_id}/receipt:
    x-mcp-group:
      - Expenses
    get:
      tags:
        - expenses
      operationId: get_expense_receipt
      summary: Get an expense receipt
      description: Returns the receipt attached to the expense.
      parameters:
        - name: preview
          in: query
          description: Get the thumbnail of the receipt.
          required: false
          schema:
            type: boolean
          example: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-an-expense-receipt-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.READ
    post:
      tags:
        - expenses
      operationId: create_expense_receipt
      summary: Add receipt to an expense.
      description: Attach a receipt to an expense.
      parameters:
        - name: receipt
          in: query
          description: 'Expense receipt file to attach. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code>, <code>pdf</code>, <code>xls</code>, <code>xlsx</code>, <code>doc</code> and <code>docx</code>.'
          required: false
          schema:
            type: string
            format: binary
          example: ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-receipt-to-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.CREATE
    delete:
      tags:
        - expenses
      operationId: delete_expense_receipt
      summary: Delete a receipt
      description: Delete the receipt attached to the expense.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-receipt-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.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: 982000000030049
      - $ref: '#/components/parameters/organization_id'
  /expenses/{expense_id}/attachment:
    x-mcp-group:
      - Expenses
    post:
      tags:
        - expenses
      operationId: add_expense_attachment
      summary: Add attachment to an expense
      description: Attach one or multiple files to an expense. This endpoint allows you to attach various types of documents to support your expense records. Returns document details for the uploaded attachments.
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/add-attachment-to-an-expense-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-attachment-to-an-expense-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.expenses.CREATE
    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: 982000000030049
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    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/expense-response'
    expense-response:
      type: object
      properties:
        expense_id:
          $ref: '#/components/schemas/expense_id'
        transaction_id:
          $ref: '#/components/schemas/transaction_id'
        transaction_type:
          $ref: '#/components/schemas/transaction_type'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        destination_of_supply:
          $ref: '#/components/schemas/destination_of_supply'
        destination_of_supply_state:
          $ref: '#/components/schemas/destination_of_supply_state'
        hsn_or_sac:
          $ref: '#/components/schemas/hsn_or_sac'
        source_of_supply:
          $ref: '#/components/schemas/source_of_supply'
        paid_through_account_name:
          $ref: '#/components/schemas/paid_through_account_name'
        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'
        tax_amount:
          $ref: '#/components/schemas/tax_amount'
        is_itemized_expense:
          $ref: '#/components/schemas/is_itemized_expense'
        is_pre_gst:
          $ref: '#/components/schemas/is_pre_gst'
        trip_id:
          $ref: '#/components/schemas/trip_id'
        trip_number:
          $ref: '#/components/schemas/trip_number'
        reverse_charge_tax_total:
          $ref: '#/components/schemas/reverse_charge_tax_total'
        expense_item_id:
          $ref: '#/components/schemas/expense_item_id'
        account_id:
          $ref: '#/components/schemas/account_id'
        account_name:
          $ref: '#/components/schemas/account_name'
        date:
          $ref: '#/components/schemas/date'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        tax_name:
          $ref: '#/components/schemas/tax_name'
        tax_percentage:
          $ref: '#/components/schemas/tax_percentage'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        currency_code:
          $ref: '#/components/schemas/currency_code'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        sub_total:
          $ref: '#/components/schemas/sub_total'
        total:
          $ref: '#/components/schemas/total'
        bcy_total:
          $ref: '#/components/schemas/bcy_total'
        amount:
          $ref: '#/components/schemas/amount'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        description:
          $ref: '#/components/schemas/description'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        is_personal:
          $ref: '#/components/schemas/is_personal'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        customer_name:
          $ref: '#/components/schemas/customer_name'
        expense_receipt_name:
          $ref: '#/components/schemas/expense_receipt_name'
        expense_receipt_type:
          $ref: '#/components/schemas/expense_receipt_type'
        last_modified_time:
          $ref: '#/components/schemas/last_modified_time'
        status:
          $ref: '#/components/schemas/status'
        invoice_id:
          $ref: '#/components/schemas/invoice_id'
        invoice_number:
          $ref: '#/components/schemas/invoice_number'
        location_id:
          $ref: '#/components/schemas/location_id'
        location_name:
          $ref: '#/components/schemas/location_name'
        project_id:
          $ref: '#/components/schemas/project_id'
        project_name:
          $ref: '#/components/schemas/project_name'
        mileage_rate:
          $ref: '#/components/schemas/mileage_rate'
        mileage_type:
          $ref: '#/components/schemas/mileage_type'
        expense_type:
          $ref: '#/components/schemas/expense_type'
        start_reading:
          $ref: '#/components/schemas/start_reading'
        end_reading:
          $ref: '#/components/schemas/end_reading'
        tags:
          $ref: '#/components/schemas/tags_response'
    description:
      description: Description of the expense. Max-length [100]
      type: string
      example: Marketing
    reference_number:
      description: Reference number of the expense. Max-length [100]
      type: string
      example: null
    date:
      description: Date of the expense.
      type: string
      example: '2013-11-18'
    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, organization's home state will be taken)
      type: string
      example: TN
      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: []
    gst_no:
      description: 15 digit GST identification number of the vendor.
      type: string
      example: 22AAAAA0000A1Z5
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_id:
      description: 'ID of the reverse charge tax. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000561063
    tax_exemption_code:
      description: Enter tax exemption code.
      type: string
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    tax_exemption_id:
      description: 'Enter tax exemption ID. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000561067
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_name:
      description: Enter name of the reverse charge tax.
      type: string
      example: intra
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_percentage:
      description: Enter percentage of the reverse charge tax.
      type: number
      format: double
      example: 10
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    reverse_charge_tax_amount:
      description: Enter amount of the reverse charge tax.
      type: integer
      example: 12
      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: State to where goods/services are supplied.
      type: string
      example: TN
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    paid_through_account_name:
      description: Enter the name of the paid through account.
      type: string
      example: Petty Cash
    is_itemized_expense:
      type: boolean
      example: false
    is_pre_gst:
      description: Applicable for transactions that fall before july 1, 2017.
      type: string
      example: fasle
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    trip_id:
      description: 'Enter trip ID. Note: This value is a set of numeric characters.'
      type: string
      example: ''
    trip_number:
      description: Enter trip number.
      type: string
      example: ''
    reverse_charge_tax_total:
      description: Enter total of the reverse charge tax.
      type: number
      format: double
      example: 1.2
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    status:
      description: Expense status.
      type: string
      example: unbilled
    receipt:
      description: 'Expense receipt file to attach. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code>, <code>pdf</code>, <code>xls</code>, <code>xlsx</code>, <code>doc</code> and <code>docx</code>.'
      type: string
      format: binary
      example: ' '
    preview:
      description: Get the thumbnail of the receipt.
      type: boolean
      example: false
    account_id:
      description: 'ID of the expense account. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000561057
    account_name:
      type: string
      example: Rent
    vendor_name:
      description: 'Search expenses by vendor name. Variants: <code>vendor_name_startswith</code> and <code> vendor_name_contains</code>.'
      type: string
      example: ' '
    vendor_id:
      description: 'ID of the vendor the expense is made. Note: This value is a set of numeric characters.'
      type: string
      example: ' '
    amount:
      description: Amount of the Expense.
      type: number
      format: double
      example: 112.5
    custom_fields:
      description: Custom fields for an expense.
      type: array
      items:
        type: string
      example: []
    customer_name:
      description: Name of the Custome for which expense is raised. Max-length [100]
      type: string
      example: Zylker Inc
    customer_id:
      description: 'ID of the expense account. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567001
    recurring_expense_id:
      description: 'Search expenses by recurring expense id. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000000190
    paid_through_account_id:
      description: 'Search expenses by paid through account id. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567250
    filter_by:
      description: Filter expenses by expense status. Allowed Values <code>Status.All</code>, <code>Status.Billable</code>, <code>Status.Nonbillable</code>, <code>Status.Reimbursed</code>, <code>Status.Invoiced</code> and <code>Status.Unbilled</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>. Max-length [100]
      type: string
      example: Rent
    sort_column:
      description: Sort expenses. Allowed Values <code>date</code>, <code>account_name</code>, <code>total</code>, <code>bcy_total</code>, <code>reference_number</code>, <code>customer_name</code> and <code>created_time</code>
      type: string
      example: total
    project_id:
      description: 'ID of the project associated with the customer. Note: This value is a set of numeric characters.'
      type: string
      example: 982000000567226
    expense_id:
      type: string
      description: 'Unique identifier of the expense. Note: This value is a set of numeric characters.'
      example: 982000000030049
    currency_id:
      type: string
      description: 'Unique identifier of the currency. Note: This value is a set of numeric characters.'
      example: 982000000567001
    currency_code:
      type: string
      example: USD
    bcy_total:
      type: number
      format: double
      example: 100
    bcy_total_without_tax:
      type: number
      format: double
      example: 100
    total:
      type: number
      format: double
      example: 100
    total_without_tax:
      type: number
      format: double
      example: 100
    sub_total:
      type: number
      format: double
      example: 90
    is_billable:
      type: boolean
      description: To specify whether the expense is billable to the customer or not.
      example: true
    created_time:
      type: string
      example: 2013-11-18T00:00:00.000Z
    last_modified_time:
      type: string
      example: ' '
    expense_receipt_name:
      type: string
      example: ' '
    expense_receipt_type:
      type: string
      example: ' '
    applied_filter:
      type: string
      example: Status.All
    page:
      type: string
      example: 1
    per_page:
      type: string
      example: 10
    expense_item_id:
      type: string
      description: 'Unique identifier of the expense item. Note: This value is a set of numeric characters.'
      example: 982000000567220
    tax_id:
      type: string
      description: 'Unique identifier of the tax. Note: This value is a set of numeric characters.'
      example: 982000000566007
    tax_name:
      type: string
      example: SalesTax
    tax_percentage:
      type: number
      format: double
      example: 10.5
    tax_amount:
      type: number
      description: Tax amount for the expense.
      format: double
      example: 11.85
    is_inclusive_tax:
      type: boolean
      description: To specify whether the tax is inclusive in the amount or not.
      example: false
    exchange_rate:
      type: number
      description: Exchange rate of the currency with respect to the base currency of the organization.
      format: double
      example: 1
    invoice_id:
      type: string
      description: 'Unique identifier of the invoice to which the expense is linked. Note: This value is a set of numeric characters.'
      example: ' '
    invoice_number:
      type: string
      example: ' '
    project_name:
      type: string
      example: ' '
    mileage_type:
      type: string
      description: Type of the mileage.
      example: non_mileage
    start_reading:
      description: Start reading of odometer when creating a mileage expense where <code>mileage_type</code> is <code>odometer</code>.
      type: number
      format: double
      example: ' '
    end_reading:
      description: End reading of odometer when creating a mileage expense where <code>mileage_type</code> is <code>odometer</code>.
      type: number
      format: double
      example: ' '
    distance:
      description: Distance travelled for a particular mileage expense where <code>mileage_type</code> is <code>manual</code>
      type: string
      example: ' '
    mileage_unit:
      description: 'Unit of the distance travelled. Allowed Values: <code>km</code> and <code>mile</code>'
      type: string
      example: ' '
    mileage_rate:
      description: Mileage rate for a particular mileage expense.
      type: number
      format: double
      example: ' '
    employee_id:
      description: 'ID of the employee who has submitted this expense. Note: This value is a set of numeric characters.'
      type: string
      example: '982000000030040'
    comment_id:
      type: string
      description: 'Unique identifier of the comment. Note: This value is a set of numeric characters.'
      example: 982000000567272
    commented_by_id:
      type: string
      description: 'Unique identifier of the user who made the comment. Note: This value is a set of numeric characters.'
      example: 982000000554041
    commented_by:
      type: string
      example: John David
    date_description:
      type: string
      example: 16 hours ago
    time:
      type: string
      example: 4.22AM
    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: expense
    name:
      description: Name of the employee.
      type: string
      example: John David
    email:
      description: Email address of the employee.
      type: string
      example: johnsmith@zylker.org
    expense_type:
      type: string
      example: non-mileage
    is_personal:
      type: boolean
      example: false
    line_item_id:
      type: string
      description: 'Unique identifier of the line item. Note: This value is a set of numeric characters.'
      example: 10763000000140068
    tax_type:
      type: string
      example: tax
    item_total:
      type: string
      example: 100
    item_order:
      type: string
      description: Order of the line item in the expense.
      example: 1
    delete_receipt:
      type: boolean
      description: To specify whether the existing receipt needs to be deleted when a new receipt is being added to an expense.
      example: false
    attachment:
      description: The file to be attached. It has to be sent in multipart/formdata.
      type: string
      format: binary
    totalFiles:
      description: Total number of files being uploaded.
      type: integer
      example: 1
    document_ids:
      description: 'Array of document IDs for batch processing. Note: This value is a set of numeric characters separated by comma.'
      type: array
      items:
        type: string
      example: []
    tax:
      type: object
      properties:
        tax_name:
          $ref: '#/components/schemas/tax_name'
        tax_amount:
          $ref: '#/components/schemas/tax_amount'
    location_id:
      description: 'Location ID. Note: This value is a set of numeric characters.'
      type: string
      example: '460000000038080'
    location_name:
      description: Name of the location.
      type: string
    line_items:
      type: array
      description: Line items for the expense.
      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'
          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'
          location_id:
            $ref: '#/components/schemas/location_id'
          tags:
            $ref: '#/components/schemas/tags_response'
    create-an-expense-request:
      required:
        - date
        - account_id
        - amount
        - paid_through_account_id
      type: object
      properties:
        account_id:
          $ref: '#/components/schemas/account_id'
        date:
          $ref: '#/components/schemas/date'
        amount:
          $ref: '#/components/schemas/amount'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        source_of_supply:
          $ref: '#/components/schemas/source_of_supply'
        destination_of_supply:
          $ref: '#/components/schemas/destination_of_supply'
        hsn_or_sac:
          $ref: '#/components/schemas/hsn_or_sac'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        reverse_charge_tax_id:
          $ref: '#/components/schemas/reverse_charge_tax_id'
        location_id:
          $ref: '#/components/schemas/location_id'
        line_items:
          $ref: '#/components/schemas/line_items'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        description:
          $ref: '#/components/schemas/description'
        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'
        mileage_type:
          $ref: '#/components/schemas/mileage_type'
        start_reading:
          $ref: '#/components/schemas/start_reading'
        end_reading:
          $ref: '#/components/schemas/end_reading'
        distance:
          $ref: '#/components/schemas/distance'
        mileage_unit:
          $ref: '#/components/schemas/mileage_unit'
        mileage_rate:
          $ref: '#/components/schemas/mileage_rate'
        employee_id:
          $ref: '#/components/schemas/employee_id'
        paid_through_account_id:
          $ref: '#/components/schemas/paid_through_account_id'
        vendor_id:
          $ref: '#/components/schemas/vendor_id'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        tags:
          $ref: '#/components/schemas/tags'
    create-an-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The expense has been recorded.
          readOnly: true
        expense:
          $ref: '#/components/schemas/expense-response'
    list-expenses-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        expenses:
          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'
              description:
                $ref: '#/components/schemas/description'
              currency_id:
                $ref: '#/components/schemas/currency_id'
              currency_code:
                $ref: '#/components/schemas/currency_code'
              bcy_total:
                $ref: '#/components/schemas/bcy_total'
              bcy_total_without_tax:
                $ref: '#/components/schemas/bcy_total_without_tax'
              total:
                $ref: '#/components/schemas/total'
              total_without_tax:
                $ref: '#/components/schemas/total_without_tax'
              is_billable:
                $ref: '#/components/schemas/is_billable'
              reference_number:
                $ref: '#/components/schemas/reference_number'
              customer_id:
                $ref: '#/components/schemas/customer_id'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              status:
                $ref: '#/components/schemas/status'
              location_id:
                $ref: '#/components/schemas/location_id'
              location_name:
                $ref: '#/components/schemas/location_name'
              created_time:
                $ref: '#/components/schemas/created_time'
              last_modified_time:
                $ref: '#/components/schemas/last_modified_time'
              expense_receipt_name:
                $ref: '#/components/schemas/expense_receipt_name'
              mileage_rate:
                $ref: '#/components/schemas/mileage_rate'
              mileage_unit:
                $ref: '#/components/schemas/mileage_unit'
              expense_type:
                $ref: '#/components/schemas/expense_type'
              start_reading:
                $ref: '#/components/schemas/start_reading'
              end_reading:
                $ref: '#/components/schemas/end_reading'
        page_context:
          type: array
          items:
            type: object
            properties:
              sort_column:
                $ref: '#/components/schemas/sort_column'
              filter_by:
                $ref: '#/components/schemas/filter_by'
              search_text:
                $ref: '#/components/schemas/search_text'
              applied_filter:
                $ref: '#/components/schemas/applied_filter'
              page:
                $ref: '#/components/schemas/page'
              per_page:
                $ref: '#/components/schemas/per_page'
    update-an-expense-request:
      required:
        - date
        - account_id
        - amount
        - paid_through_account_id
      type: object
      properties:
        account_id:
          $ref: '#/components/schemas/account_id'
        date:
          $ref: '#/components/schemas/date'
        amount:
          description: Amount of the Expense.
          type: number
          format: double
          example: 120.5
        tax_id:
          $ref: '#/components/schemas/tax_id'
        source_of_supply:
          $ref: '#/components/schemas/source_of_supply'
        destination_of_supply:
          $ref: '#/components/schemas/destination_of_supply'
        hsn_or_sac:
          $ref: '#/components/schemas/hsn_or_sac'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        reverse_charge_tax_id:
          $ref: '#/components/schemas/reverse_charge_tax_id'
        line_items:
          $ref: '#/components/schemas/line_items'
        location_id:
          $ref: '#/components/schemas/location_id'
        is_inclusive_tax:
          $ref: '#/components/schemas/is_inclusive_tax'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        description:
          $ref: '#/components/schemas/description'
        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'
        mileage_type:
          $ref: '#/components/schemas/mileage_type'
        start_reading:
          $ref: '#/components/schemas/start_reading'
        end_reading:
          $ref: '#/components/schemas/end_reading'
        distance:
          $ref: '#/components/schemas/distance'
        mileage_unit:
          $ref: '#/components/schemas/mileage_unit'
        mileage_rate:
          $ref: '#/components/schemas/mileage_rate'
        employee_id:
          $ref: '#/components/schemas/employee_id'
        paid_through_account_id:
          $ref: '#/components/schemas/paid_through_account_id'
        vendor_id:
          $ref: '#/components/schemas/vendor_id'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        tags:
          $ref: '#/components/schemas/tags'
    update-an-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Expense information has been updated.
          readOnly: true
        expense:
          type: object
          properties:
            expense_id:
              $ref: '#/components/schemas/expense_id'
            transaction_id:
              $ref: '#/components/schemas/transaction_id'
            transaction_type:
              $ref: '#/components/schemas/transaction_type'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            destination_of_supply:
              $ref: '#/components/schemas/destination_of_supply'
            destination_of_supply_state:
              $ref: '#/components/schemas/destination_of_supply_state'
            hsn_or_sac:
              $ref: '#/components/schemas/hsn_or_sac'
            source_of_supply:
              $ref: '#/components/schemas/source_of_supply'
            paid_through_account_name:
              $ref: '#/components/schemas/paid_through_account_name'
            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'
            tax_amount:
              $ref: '#/components/schemas/tax_amount'
            is_itemized_expense:
              $ref: '#/components/schemas/is_itemized_expense'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            trip_id:
              $ref: '#/components/schemas/trip_id'
            trip_number:
              $ref: '#/components/schemas/trip_number'
            reverse_charge_tax_total:
              $ref: '#/components/schemas/reverse_charge_tax_total'
            expense_item_id:
              $ref: '#/components/schemas/expense_item_id'
            account_id:
              $ref: '#/components/schemas/account_id'
            account_name:
              $ref: '#/components/schemas/account_name'
            date:
              $ref: '#/components/schemas/date'
            tax_id:
              $ref: '#/components/schemas/tax_id'
            tax_name:
              $ref: '#/components/schemas/tax_name'
            tax_percentage:
              $ref: '#/components/schemas/tax_percentage'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            total:
              $ref: '#/components/schemas/total'
            bcy_total:
              $ref: '#/components/schemas/bcy_total'
            amount:
              description: Amount of the Expense.
              type: number
              format: double
              example: 120.5
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            description:
              $ref: '#/components/schemas/description'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            is_personal:
              $ref: '#/components/schemas/is_personal'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            expense_receipt_name:
              $ref: '#/components/schemas/expense_receipt_name'
            expense_receipt_type:
              $ref: '#/components/schemas/expense_receipt_type'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            status:
              $ref: '#/components/schemas/status'
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            invoice_number:
              $ref: '#/components/schemas/invoice_number'
            location_id:
              $ref: '#/components/schemas/location_id'
            location_name:
              $ref: '#/components/schemas/location_name'
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            mileage_rate:
              $ref: '#/components/schemas/mileage_rate'
            mileage_type:
              $ref: '#/components/schemas/mileage_type'
            expense_type:
              $ref: '#/components/schemas/expense_type'
            start_reading:
              $ref: '#/components/schemas/start_reading'
            end_reading:
              $ref: '#/components/schemas/end_reading'
            tags:
              $ref: '#/components/schemas/tags_response'
    get-an-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        expense:
          type: object
          properties:
            expense_id:
              $ref: '#/components/schemas/expense_id'
            transaction_id:
              $ref: '#/components/schemas/transaction_id'
            transaction_type:
              $ref: '#/components/schemas/transaction_type'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            destination_of_supply:
              $ref: '#/components/schemas/destination_of_supply'
            destination_of_supply_state:
              $ref: '#/components/schemas/destination_of_supply_state'
            hsn_or_sac:
              $ref: '#/components/schemas/hsn_or_sac'
            source_of_supply:
              $ref: '#/components/schemas/source_of_supply'
            paid_through_account_name:
              $ref: '#/components/schemas/paid_through_account_name'
            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'
            tax_amount:
              $ref: '#/components/schemas/tax_amount'
            is_itemized_expense:
              $ref: '#/components/schemas/is_itemized_expense'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            trip_id:
              $ref: '#/components/schemas/trip_id'
            trip_number:
              $ref: '#/components/schemas/trip_number'
            reverse_charge_tax_total:
              $ref: '#/components/schemas/reverse_charge_tax_total'
            expense_item_id:
              $ref: '#/components/schemas/expense_item_id'
            account_id:
              $ref: '#/components/schemas/account_id'
            account_name:
              $ref: '#/components/schemas/account_name'
            date:
              $ref: '#/components/schemas/date'
            tax_id:
              $ref: '#/components/schemas/tax_id'
            tax_name:
              $ref: '#/components/schemas/tax_name'
            tax_percentage:
              $ref: '#/components/schemas/tax_percentage'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            exchange_rate:
              $ref: '#/components/schemas/exchange_rate'
            sub_total:
              $ref: '#/components/schemas/sub_total'
            total:
              $ref: '#/components/schemas/total'
            bcy_total:
              $ref: '#/components/schemas/bcy_total'
            amount:
              $ref: '#/components/schemas/amount'
            is_inclusive_tax:
              $ref: '#/components/schemas/is_inclusive_tax'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            description:
              $ref: '#/components/schemas/description'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            is_personal:
              $ref: '#/components/schemas/is_personal'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            expense_receipt_name:
              $ref: '#/components/schemas/expense_receipt_name'
            expense_receipt_type:
              $ref: '#/components/schemas/expense_receipt_type'
            last_modified_time:
              $ref: '#/components/schemas/last_modified_time'
            status:
              $ref: '#/components/schemas/status'
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            invoice_number:
              $ref: '#/components/schemas/invoice_number'
            location_id:
              $ref: '#/components/schemas/location_id'
            location_name:
              $ref: '#/components/schemas/location_name'
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            mileage_rate:
              $ref: '#/components/schemas/mileage_rate'
            mileage_type:
              $ref: '#/components/schemas/mileage_type'
            expense_type:
              $ref: '#/components/schemas/expense_type'
            start_reading:
              $ref: '#/components/schemas/start_reading'
            end_reading:
              $ref: '#/components/schemas/end_reading'
            tags:
              $ref: '#/components/schemas/tags_response'
            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'
                amount:
                  $ref: '#/components/schemas/amount'
                hsn_or_sac:
                  $ref: '#/components/schemas/hsn_or_sac'
                location_id:
                  $ref: '#/components/schemas/location_id'
                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'
                tags:
                  $ref: '#/components/schemas/tags_response'
    delete-an-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The expense has been deleted.
          readOnly: true
    list-expense-history-and-comments-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'
              expense_id:
                $ref: '#/components/schemas/expense_id'
              description:
                $ref: '#/components/schemas/description'
              commented_by_id:
                $ref: '#/components/schemas/commented_by_id'
              commented_by:
                $ref: '#/components/schemas/commented_by'
              date_description:
                $ref: '#/components/schemas/date_description'
              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'
    list-employees-request:
      type: object
      properties:
        sort_column:
          $ref: '#/components/schemas/sort_column'
        filter_by:
          $ref: '#/components/schemas/filter_by'
    list-employees-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        employees:
          type: array
          items:
            type: object
            properties:
              employee_id:
                $ref: '#/components/schemas/employee_id'
              name:
                $ref: '#/components/schemas/name'
              email:
                $ref: '#/components/schemas/email'
        page_context:
          type: array
          items:
            type: object
            properties:
              sort_column:
                $ref: '#/components/schemas/sort_column'
              filter_by:
                $ref: '#/components/schemas/filter_by'
              search_text:
                $ref: '#/components/schemas/search_text'
              applied_filter:
                $ref: '#/components/schemas/applied_filter'
              page:
                $ref: '#/components/schemas/page'
              per_page:
                $ref: '#/components/schemas/per_page'
    create-an-employee-request:
      required:
        - name
        - email
      type: object
      properties:
        name:
          $ref: '#/components/schemas/name'
        email:
          $ref: '#/components/schemas/email'
    create-an-employee-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        employee:
          type: object
          properties:
            employee_id:
              $ref: '#/components/schemas/employee_id'
            name:
              $ref: '#/components/schemas/name'
            email:
              $ref: '#/components/schemas/email'
    get-an-employee-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        employee:
          type: object
          properties:
            employee_id:
              $ref: '#/components/schemas/employee_id'
            name:
              $ref: '#/components/schemas/name'
            email:
              $ref: '#/components/schemas/email'
    delete-an-employee-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Employee has been deleted.
          readOnly: true
    get-an-expense-receipt-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
    add-receipt-to-an-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The expense receipt has been attached.
          readOnly: true
    delete-a-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
    add-attachment-to-an-expense-request:
      type: object
      required:
        - attachment
      properties:
        attachment:
          type: string
          format: binary
          description: 'Expense attachment file to attach. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code>, <code>pdf</code>, <code>xls</code>, <code>xlsx</code>, <code>doc</code>, <code>docx</code>, <code>txt</code> and <code>csv</code>'
          example: '@/attachment.pdf'
        totalFiles:
          type: integer
          description: Total number of files being uploaded.
          example: 1
        document_ids:
          type: array
          items:
            type: string
          description: 'Array of document IDs for batch processing. Note: This value is a set of numeric characters separated by comma.'
          example: []
    add-attachment-to-an-expense-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The expense attachment has been attached.
          readOnly: true
        documents:
          type: array
          description: Details of the uploaded attachments.
          items:
            type: object
            properties:
              document_id:
                type: string
                example: '982000000567123'
                description: 'ID of the uploaded document. Note: This value is a set of numeric characters.'
              file_name:
                type: string
                example: attachment.pdf
                description: Name of the uploaded file.
              file_size:
                type: integer
                example: 1024
                description: Size of the uploaded file in bytes.
              document_type:
                type: string
                example: attachment
                description: Type of the document.
    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.expenses.CREATE: Create Expenses
            ERP.expenses.UPDATE: Update Expenses
            ERP.expenses.READ: Read Expenses
            ERP.expenses.DELETE: Delete Expenses
