openapi: 3.0.0
info:
  title: Journals
  description: 'Journals are used by accountants to work directly with the general ledger to create both debit and credit entries for unique financial transactions.'
  contact: {}
  version: 1.0.0
servers:
  -
    url: 'https://www.zohoapis.com/books/v3'
    description: 'API Endpoint'
tags:
  -
    name: journals
    description: 'Journals Module'
paths:
  /journals:
    post:
      tags:
        - journals
      summary: 'Create a journal'
      description: 'Create a journal.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-journal-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-a-journal-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.CREATE
    get:
      tags:
        - journals
      summary: 'Get journal list'
      description: 'Get journal list.'
      parameters:
        -
          name: entry_number
          in: query
          description: 'Search journals by journal entry number. Variants: <code>entry_number_startswith</code> and <code>entry_number_contains</code>'
          required: false
          schema:
            type: string
          example: '1'
        -
          name: reference_number
          in: query
          description: 'Search journals by journal reference number. Variants: <code>reference_number_startswith</code> and <code>reference_number_contains</code>'
          required: false
          schema:
            type: string
          example: '7355'
        -
          name: date
          in: query
          description: 'Search journals by journal date. Variants: <code>date_start</code>, <code>date_end</code>, <code>date_before and</code> <code>date_after</code>'
          required: false
          schema:
            type: string
          example: ""
        -
          name: notes
          in: query
          description: 'Search journals by journal notes. Variants: <code>notes_startswith</code> and <code>notes_contains</code>'
          required: false
          schema:
            type: string
          example: 'Loan repayment'
        -
          name: last_modified_time
          in: query
          description: 'Search the journals using Last Modified Time'
          required: false
          schema:
            type: string
          example: '2013-09-05T17:13:31+0530'
        -
          name: total
          in: query
          description: 'Search journals by journal total. Variants: <code>total_less_than</code>, <code>total_less_equals</code>, <code>total_greater_than</code> and <code>total_greater_equals</code>'
          required: false
          schema:
            type: number
            format: double
          example: 5000
        -
          name: customer_id
          in: query
          description: 'Search Journals using Customer ID'
          required: false
          schema:
            type: integer
            format: int64
          example: ""
        -
          name: vendor_id
          in: query
          description: 'Search the journals using Vendor ID'
          required: false
          schema:
            type: integer
            format: int64
          example: ""
        -
          name: filter_by
          in: query
          description: 'Filter journals by journal date. Allowed Values: <code>JournalDate.All</code>, <code>JournalDate.Today</code>, <code>JournalDate.ThisWeek</code>, <code>JournalDate.ThisMonth</code>, <code>JournalDate.ThisQuarter</code> and <code>JournalDate.ThisYear</code>'
          required: false
          schema:
            type: string
          example: ""
        -
          name: sort_column
          in: query
          description: 'Sort journal list. Allowed Values: <code>journal_date</code>, <code>entry_number</code>, <code>reference_number</code> and <code>total</code>'
          required: false
          schema:
            type: string
          example: journal_date
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-journal-list-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.READ
    parameters:
      -
        $ref: '#/components/parameters/organization_id'
  '/journals/{journal_id}':
    put:
      tags:
        - journals
      summary: 'Update a journal'
      description: 'Updates the journal with given information.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-a-journal-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-a-journal-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.UPDATE
    get:
      tags:
        - journals
      summary: 'Get journal'
      description: 'Get the details of the journal.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-journal-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.READ
    delete:
      tags:
        - journals
      summary: 'Delete a journal'
      description: 'Deletes the given journal.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-journal-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.DELETE
    parameters:
      -
        name: journal_id
        in: path
        required: true
        schema:
          type: string
        example: '460000000038001'
      -
        $ref: '#/components/parameters/organization_id'
  '/journals/{journal_id}/status/publish':
    post:
      tags:
        - journals
      summary: 'Mark a journal as published'
      description: 'Mark a draft journal as published.'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mark-a-journal-as-published-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.CREATE
    parameters:
      -
        name: journal_id
        in: path
        required: true
        schema:
          type: string
        example: '460000000038001'
      -
        $ref: '#/components/parameters/organization_id'
  '/journals/{journal_id}/attachment':
    post:
      tags:
        - journals
      summary: 'Add attachment to a journal'
      description: 'Attach a file to a journal.'
      parameters:
        -
          name: attachment
          in: query
          description: 'The file that is to be added as an Attachment in the Journal'
          required: false
          schema:
            type: string
            format: binary
          example: ""
        -
          name: doc
          in: query
          description: 'Document that is to be attached'
          required: false
          schema:
            type: string
            format: binary
          example: ""
        -
          name: totalFiles
          in: query
          description: 'Total number of files.'
          required: false
          schema:
            type: integer
          example: 0
        -
          name: document_ids
          in: query
          description: 'ID''s of the document'
          required: false
          schema:
            type: string
          example: ""
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-attachment-to-a-journal-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.CREATE
    parameters:
      -
        name: journal_id
        in: path
        required: true
        schema:
          type: string
        example: '460000000038001'
      -
        $ref: '#/components/parameters/organization_id'
  '/journals/{jounral_id}/comments':
    post:
      tags:
        - journals
      summary: 'Add comment'
      description: 'Add a comment for a journal.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-comment-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-comment-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.CREATE
    parameters:
      -
        name: jounral_id
        in: path
        required: true
        schema:
          type: string
        example: ""
      -
        $ref: '#/components/parameters/organization_id'
  '/journals/{jounral_id}/comments/{comment_id}':
    delete:
      tags:
        - journals
      summary: 'Delete a comment'
      description: 'Delete a jounral comment.'
      parameters:
        -
          name: comment_id
          in: path
          required: true
          schema:
            type: string
          example: '460000000048023'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-comment-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoBooks.accountants.DELETE
    parameters:
      -
        name: jounral_id
        in: path
        required: true
        schema:
          type: string
        example: ""
      -
        $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: organization_id
      description: 'ID of the organization'
      in: query
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/journal'
    journal_date:
      description: 'Date on which the journal to be recorded.'
      type: string
      example: '2013-09-04'
    reference_number:
      description: 'Reference number for the journal.'
      type: string
      example: '7355'
    notes:
      description: 'Notes for the journal.'
      type: string
      example: 'Loan repayment'
    account_id:
      description: 'ID of account for which journals to be recorded.'
      type: string
      example: '460000000000361'
    description:
      description: 'Description that can be given at the line item level.'
      type: string
    product_type:
      description: 'Type of the journal. This denotes whether the journal is to be treated as goods or service. Allowed Values: <code> digital_service</code>, <code>goods</code> and <code>service</code>.'
      type: string
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    tax_id:
      description: 'ID of the tax.'
      type: string
    amount:
      description: 'Amount to be recorded for the journal.'
      type: number
      format: double
      example: 5000
    tax_account:
      description: 'Account for recording Tax'
      type: boolean
    debit_or_credit:
      description: 'Whether the accounts needs to be debited or credited. Allowed Values: <code>debit</code> and <code>credit</code>.'
      type: string
      example: credit
    acquisition_vat_id:
      description: '(Optional) This is the ID of the tax applied in case this is an EU - goods journal and acquisition VAT needs to be reported.'
      type: string
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    reverse_charge_vat_id:
      description: '(Optional) This is the ID of the tax applied in case this is a non UK - service journal and reverse charge VAT needs to be reported.'
      type: string
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    journal_id:
      description: 'ID of the Journal'
      type: string
      example: '460000000038001'
    entry_number:
      description: 'Entry Number of the Journal'
      type: string
      example: '1'
    currency_id:
      description: 'ID of the Currency Associated with the Journal'
      type: string
      example: '460000000000097'
    currency_code:
      description: 'Code of the Currency Associated with the Journal'
      type: string
      example: USD
    currency_symbol:
      description: 'Symbol of the Currency Associated with the Journal'
      type: string
      example: $
    line_item_total:
      description: 'Total of the Line Item'
      type: number
      format: double
      example: 5000
    total:
      description: 'Total of the Journal'
      type: number
      format: double
      example: 5000
    price_precision:
      description: 'Price Precision for the Values'
      type: integer
      example: 2
    taxes:
      type: array
      items:
        type: object
        properties:
          tax_name:
            $ref: '#/components/schemas/tax_name'
          tax_amount:
            $ref: '#/components/schemas/tax_amount'
          debit_or_credit:
            $ref: '#/components/schemas/debit_or_credit'
          tax_account:
            $ref: '#/components/schemas/tax_account'
    created_time:
      description: 'Created Time of the Journal'
      type: string
      example: '2013-09-04T09:40:07+0530'
    last_modified_time:
      description: 'Last Modified Time of the Journal'
      type: string
      example: '2013-09-05T17:13:31+0530'
    line_id:
      description: 'ID of the Line'
      type: string
      example: '460000000038005'
    account_name:
      description: 'Name of the Account'
      type: string
      example: 'Petty Cash'
    tax_name:
      description: 'Name of the Tax'
      type: string
    tax_amount:
      description: 'Amount of Tax'
      type: number
      format: double
    tax_type:
      description: 'Type of the Tax'
      type: string
      example: tax
    tax_percentage:
      description: 'Percentage of the Tax'
      type: string
    journal_type:
      description: 'Type of the Journal. Allowed values: <code> Cash </code> and  <code> Both </code>.'
      type: string
      example: both
    customer_id:
      description: 'ID of the Customer/Vendor'
      type: string
    customer_name:
      description: 'Name of the Customer/Vendor'
      type: string
    acquisition_vat_name:
      description: 'Name of the VAT Acquistion'
      type: string
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    acquisition_vat_percentage:
      description: 'Percentage of the VAT Acquistion'
      type: string
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    acquisition_vat_amount:
      description: 'Amount of the VAT Acquistion'
      type: string
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    reverse_charge_vat_name:
      description: 'Name of the Reverse Charge'
      type: string
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    reverse_charge_vat_percentage:
      description: 'Percentage of the Reverse Charge'
      type: string
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    reverse_charge_vat_amount:
      description: 'Percentage of the Reverse Charge'
      type: string
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    tax_exemption_id:
      description: 'ID of the Tax Exemption'
      type: string
      x-node_available_in:
        - in
        - us
        - au
        - ca
        - mx
      x-node_unavailable_in: []
    tax_exemption_type:
      description: 'Type of the Tax Exemption. Allowed Values : <code>customer</code> and <code>item</code>'
      type: string
      x-node_available_in:
        - in
        - us
        - au
        - ca
        - mx
      x-node_unavailable_in: []
    tax_exemption_code:
      description: 'Code of the Tax Exemption'
      type: string
      x-node_available_in:
        - in
        - us
        - au
        - ca
      x-node_unavailable_in: []
    tax_authority_id:
      description: 'ID of the Tax Authority'
      type: string
      x-node_available_in:
        - us
        - au
        - ca
        - mx
      x-node_unavailable_in: []
    tax_authority_name:
      description: 'Name of the Tax Authority'
      type: string
      x-node_available_in:
        - us
        - au
        - ca
      x-node_unavailable_in: []
    vat_treatment:
      description: '(Optional) VAT treatment for the journals. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is <code>uk</code>. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is <code>eu_vat_registered</code>, if he resides outside of the UK 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
      x-node_available_in:
        - uk
        - eu
      x-node_unavailable_in: []
    include_in_vat_return:
      description: 'Check if Journal should be included in VAT Return'
      type: boolean
      x-node_available_in:
        - eu
        - uk
      x-node_unavailable_in: []
    is_bas_adjustment:
      description: 'Check if Journal is created for BAS Adjustment'
      type: boolean
      x-node_available_in:
        - au
      x-node_unavailable_in: []
    bcy_amount:
      description: 'Amount in Base Currency'
      type: number
      format: double
      example: 100
    tag_id:
      description: 'ID of the Tag'
      type: integer
      format: int64
      example: '460000000094001'
    tag_option_id:
      description: 'ID of the Tag Option'
      type: integer
      format: int64
      example: '460000000048001'
    tags:
      type: array
      items:
        type: object
        properties:
          is_tag_mandatory:
            $ref: '#/components/schemas/is_tag_mandatory'
          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:
      description: 'Boolean to check if the tag is mandatory'
      type: boolean
      example: false
    tag_name:
      description: 'Name of the reporting tag'
      type: string
      example: Location
    tag_option_name:
      description: 'Name of the reporting tag''s option'
      type: string
      example: USA
    status:
      description: 'Search Journal by journal status. Allowed Values: <code>draft</code> and  <code>published</code>.'
      type: string
      example: draft
    document_ids:
      description: 'ID''s of the document'
      type: string
    attachment:
      description: 'The file that is to be added as an Attachment in the Journal'
      type: string
      format: binary
    totalFiles:
      description: 'Total number of files.'
      type: integer
      example: 0
    doc:
      description: 'Document that is to be attached'
      type: string
      format: binary
    comment_id:
      type: string
      example: '460000000048023'
    commented_by_id:
      description: 'The ID of customer who caused the commented.'
      type: string
      example: '460000000017003'
    commented_by:
      description: 'The name of User who caused the comment.'
      type: string
      example: John
    comment_type:
      description: 'Type of the Comment'
      type: string
      example: system
    operation_type:
      description: 'Type of Operation that caused the comment'
      type: string
      example: Added
    comment:
      type: array
      items:
        type: object
        properties:
          comment_id:
            $ref: '#/components/schemas/comment_id'
          description:
            $ref: '#/components/schemas/description'
          commented_by_id:
            $ref: '#/components/schemas/commented_by_id'
          commented_by:
            $ref: '#/components/schemas/commented_by'
          comment_type:
            $ref: '#/components/schemas/comment_type'
          date:
            $ref: '#/components/schemas/date'
          operation_type:
            $ref: '#/components/schemas/operation_type'
    comments:
      type: array
      items:
        type: object
        properties:
          comment:
            $ref: '#/components/schemas/comment'
    exchange_rate:
      description: 'Exchange Rate between the Currencies'
      type: number
      format: double
      example: 1
    bcy_total:
      description: 'Total in Base Currency'
      type: number
      format: double
      example: 100
    index:
      description: 'Index of the Custom Field'
      type: integer
      example: 1
    value:
      description: 'Value of the Custom Field'
      type: string
      example: Normal
    label:
      description: 'Label of the Custom Field'
      type: string
    customfield_id:
      description: 'ID of the Custom Field'
      type: string
      example: '460000000098001'
    custom_fields:
      type: array
      items:
        type: object
        properties:
          customfield_id:
            $ref: '#/components/schemas/customfield_id'
          value:
            $ref: '#/components/schemas/value'
    project_id:
      description: 'ID of the Project'
      type: string
      example: '460000000898001'
    project_name:
      description: 'Name of the Project'
      type: string
      example: 'Network Distribution'
    entity_type:
      description: 'Name of the Entity'
      type: string
      example: journal
    page:
      type: integer
      example: 1
    per_page:
      type: integer
      example: 25
    has_more_page:
      type: boolean
      example: false
    report_name:
      type: string
      example: 'Manual Journals'
    applied_filter:
      type: string
      example: JournalDate.All
    sort_column:
      description: 'Sort journal list. Allowed Values: <code>journal_date</code>, <code>entry_number</code>, <code>reference_number</code> and <code>total</code>'
      type: string
      example: journal_date
    sort_order:
      type: string
      example: D
    filter_by:
      description: 'Filter journals by journal date. Allowed Values: <code>JournalDate.All</code>, <code>JournalDate.Today</code>, <code>JournalDate.ThisWeek</code>, <code>JournalDate.ThisMonth</code>, <code>JournalDate.ThisQuarter</code> and <code>JournalDate.ThisYear</code>'
      type: string
    vendor_id:
      description: 'Search the journals using Vendor ID'
      type: integer
      format: int64
    location_id:
      description: 'Location ID'
      type: string
      example: '460000000038080'
    location_name:
      description: 'Name of the location.'
      type: string
    line_items:
      type: array
      items:
        type: object
        properties:
          line_id:
            $ref: '#/components/schemas/line_id'
          account_id:
            $ref: '#/components/schemas/account_id'
          customer_id:
            $ref: '#/components/schemas/customer_id'
          customer_name:
            $ref: '#/components/schemas/customer_name'
          account_name:
            $ref: '#/components/schemas/account_name'
          description:
            $ref: '#/components/schemas/description'
          debit_or_credit:
            $ref: '#/components/schemas/debit_or_credit'
          tax_exemption_id:
            $ref: '#/components/schemas/tax_exemption_id'
          tax_exemption_type:
            $ref: '#/components/schemas/tax_exemption_type'
          tax_exemption_code:
            $ref: '#/components/schemas/tax_exemption_code'
          tax_authority_id:
            $ref: '#/components/schemas/tax_authority_id'
          tax_authority_name:
            $ref: '#/components/schemas/tax_authority_name'
          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'
          amount:
            $ref: '#/components/schemas/amount'
          bcy_amount:
            $ref: '#/components/schemas/bcy_amount'
          acquisition_vat_id:
            $ref: '#/components/schemas/acquisition_vat_id'
          acquisition_vat_name:
            $ref: '#/components/schemas/acquisition_vat_name'
          acquisition_vat_percentage:
            $ref: '#/components/schemas/acquisition_vat_percentage'
          acquisition_vat_amount:
            $ref: '#/components/schemas/acquisition_vat_amount'
          reverse_charge_vat_id:
            $ref: '#/components/schemas/reverse_charge_vat_id'
          reverse_charge_vat_name:
            $ref: '#/components/schemas/reverse_charge_vat_name'
          reverse_charge_vat_percentage:
            $ref: '#/components/schemas/reverse_charge_vat_percentage'
          reverse_charge_vat_amount:
            $ref: '#/components/schemas/reverse_charge_vat_amount'
          tags:
            $ref: '#/components/schemas/tags'
          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'
    journal:
      type: object
      properties:
        journal_id:
          $ref: '#/components/schemas/journal_id'
        entry_number:
          $ref: '#/components/schemas/entry_number'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        notes:
          $ref: '#/components/schemas/notes'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        currency_code:
          $ref: '#/components/schemas/currency_code'
        currency_symbol:
          $ref: '#/components/schemas/currency_symbol'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        journal_date:
          $ref: '#/components/schemas/journal_date'
        journal_type:
          $ref: '#/components/schemas/journal_type'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        product_type:
          $ref: '#/components/schemas/product_type'
        include_in_vat_return:
          $ref: '#/components/schemas/include_in_vat_return'
        is_bas_adjustment:
          $ref: '#/components/schemas/is_bas_adjustment'
        line_items:
          $ref: '#/components/schemas/line_items'
        location_id:
          $ref: '#/components/schemas/location_id'
        location_name:
          $ref: '#/components/schemas/location_name'
        line_item_total:
          $ref: '#/components/schemas/line_item_total'
        total:
          $ref: '#/components/schemas/total'
        bcy_total:
          $ref: '#/components/schemas/bcy_total'
        price_precision:
          $ref: '#/components/schemas/price_precision'
        taxes:
          $ref: '#/components/schemas/taxes'
        created_time:
          $ref: '#/components/schemas/created_time'
        last_modified_time:
          $ref: '#/components/schemas/last_modified_time'
        status:
          $ref: '#/components/schemas/status'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
    page_context:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/page'
        per_page:
          $ref: '#/components/schemas/per_page'
        has_more_page:
          $ref: '#/components/schemas/has_more_page'
        report_name:
          $ref: '#/components/schemas/report_name'
        applied_filter:
          $ref: '#/components/schemas/applied_filter'
        sort_column:
          $ref: '#/components/schemas/sort_column'
        sort_order:
          $ref: '#/components/schemas/sort_order'
    custom_field:
      description: 'Search journals using customfields. Variants : <code>custom_field_startswith</code> and <code>sutom_field_contains</code>'
      type: string
    date:
      description: 'Search journals by journal date. Variants: <code>date_start</code>, <code>date_end</code>, <code>date_before and</code> <code>date_after</code>'
      type: string
    create-a-journal-request:
      required:
        - journal_date
      type: object
      properties:
        journal_date:
          $ref: '#/components/schemas/journal_date'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        notes:
          $ref: '#/components/schemas/notes'
        journal_type:
          $ref: '#/components/schemas/journal_type'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        include_in_vat_return:
          $ref: '#/components/schemas/include_in_vat_return'
        product_type:
          $ref: '#/components/schemas/product_type'
        is_bas_adjustment:
          $ref: '#/components/schemas/is_bas_adjustment'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        location_id:
          $ref: '#/components/schemas/location_id'
        line_items:
          type: array
          items:
            type: object
            required:
              - amount
              - debit_or_credit
            properties:
              account_id:
                $ref: '#/components/schemas/account_id'
              customer_id:
                $ref: '#/components/schemas/customer_id'
              line_id:
                $ref: '#/components/schemas/line_id'
              description:
                $ref: '#/components/schemas/description'
              tax_exemption_id:
                $ref: '#/components/schemas/tax_exemption_id'
              tax_authority_id:
                $ref: '#/components/schemas/tax_authority_id'
              tax_exemption_type:
                $ref: '#/components/schemas/tax_exemption_type'
              tax_exemption_code:
                $ref: '#/components/schemas/tax_exemption_code'
              tax_authority_name:
                $ref: '#/components/schemas/tax_authority_name'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              amount:
                $ref: '#/components/schemas/amount'
              debit_or_credit:
                $ref: '#/components/schemas/debit_or_credit'
              acquisition_vat_id:
                $ref: '#/components/schemas/acquisition_vat_id'
              reverse_charge_vat_id:
                $ref: '#/components/schemas/reverse_charge_vat_id'
              location_id:
                $ref: '#/components/schemas/location_id'
              tags:
                type: array
                items:
                  type: object
                  properties:
                    tag_id:
                      $ref: '#/components/schemas/tag_id'
                    tag_option_id:
                      $ref: '#/components/schemas/tag_option_id'
              project_id:
                $ref: '#/components/schemas/project_id'
        tax_exemption_code:
          $ref: '#/components/schemas/tax_exemption_code'
        tax_exemption_type:
          $ref: '#/components/schemas/tax_exemption_type'
        status:
          $ref: '#/components/schemas/status'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
    create-a-journal-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The journal entry has been created.'
          readOnly: true
        journal:
          $ref: '#/components/schemas/journal'
    get-journal-list-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        journals:
          type: array
          items:
            type: object
            properties:
              journal_id:
                $ref: '#/components/schemas/journal_id'
              journal_date:
                $ref: '#/components/schemas/journal_date'
              entry_number:
                $ref: '#/components/schemas/entry_number'
              reference_number:
                $ref: '#/components/schemas/reference_number'
              currency_id:
                $ref: '#/components/schemas/currency_id'
              notes:
                $ref: '#/components/schemas/notes'
              journal_type:
                $ref: '#/components/schemas/journal_type'
              entity_type:
                $ref: '#/components/schemas/entity_type'
              total:
                $ref: '#/components/schemas/total'
              bcy_total:
                $ref: '#/components/schemas/bcy_total'
              custom_field:
                $ref: '#/components/schemas/custom_field'
    update-a-journal-request:
      required:
        - journal_date
      type: object
      properties:
        journal_date:
          $ref: '#/components/schemas/journal_date'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        notes:
          $ref: '#/components/schemas/notes'
        journal_type:
          $ref: '#/components/schemas/journal_type'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        include_in_vat_return:
          $ref: '#/components/schemas/include_in_vat_return'
        product_type:
          $ref: '#/components/schemas/product_type'
        is_bas_adjustment:
          $ref: '#/components/schemas/is_bas_adjustment'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        location_id:
          $ref: '#/components/schemas/location_id'
        line_items:
          type: array
          items:
            type: object
            required:
              - amount
              - debit_or_credit
            properties:
              account_id:
                $ref: '#/components/schemas/account_id'
              customer_id:
                $ref: '#/components/schemas/customer_id'
              line_id:
                $ref: '#/components/schemas/line_id'
              description:
                $ref: '#/components/schemas/description'
              tax_exemption_id:
                $ref: '#/components/schemas/tax_exemption_id'
              tax_authority_id:
                $ref: '#/components/schemas/tax_authority_id'
              tax_exemption_type:
                $ref: '#/components/schemas/tax_exemption_type'
              tax_exemption_code:
                $ref: '#/components/schemas/tax_exemption_code'
              tax_authority_name:
                $ref: '#/components/schemas/tax_authority_name'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              amount:
                $ref: '#/components/schemas/amount'
              debit_or_credit:
                $ref: '#/components/schemas/debit_or_credit'
              acquisition_vat_id:
                $ref: '#/components/schemas/acquisition_vat_id'
              reverse_charge_vat_id:
                $ref: '#/components/schemas/reverse_charge_vat_id'
              tags:
                type: array
                items:
                  type: object
                  properties:
                    tag_id:
                      $ref: '#/components/schemas/tag_id'
                    tag_option_id:
                      $ref: '#/components/schemas/tag_option_id'
              location_id:
                $ref: '#/components/schemas/location_id'
              project_id:
                $ref: '#/components/schemas/project_id'
        tax_exemption_code:
          $ref: '#/components/schemas/tax_exemption_code'
        tax_exemption_type:
          $ref: '#/components/schemas/tax_exemption_type'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
    update-a-journal-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The journal entry has been updated.'
          readOnly: true
        journal:
          $ref: '#/components/schemas/journal'
    get-journal-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        journal:
          $ref: '#/components/schemas/journal'
    delete-a-journal-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The selected journal entry has been deleted.'
          readOnly: true
    mark-a-journal-as-published-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'Journal has been published.'
          readOnly: true
    add-attachment-to-a-journal-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'Your file has been successfully attached to the journal.'
          readOnly: true
    add-comment-request:
      type: object
      properties:
        description:
          description: 'Description of a comment'
          type: string
          example: 'Journal Created'
    add-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'Journal comment has been added successfully.'
          readOnly: true
        comment:
          $ref: '#/components/schemas/comment'
    delete-a-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The selected journal comment entries have been deleted.'
          readOnly: true
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: 'https://accounts.zoho.com/oauth/v2/auth'
          scopes:
            ZohoBooks.accountants.CREATE: 'Create Accountants'
            ZohoBooks.accountants.UPDATE: 'Update Accountants'
            ZohoBooks.accountants.READ: 'Read Accountants'
            ZohoBooks.accountants.DELETE: 'Delete Accountants'
