openapi: 3.0.0
info:
  title: 'Recurring Invoices'
  description: 'Recurring Invoices are created in order to send invoice in a predefined time interval.<br><br><b>Possible error codes: </b><br><table><thead><tr><th>Error Code</th><th>Message</th></tr></thead><tbody><tr><td><span style="color:#FF0000;"> 1002</span></td><td>Recurring Invoice does not exist</td></tr><tr><td><span style="color:#FF0000;"> 4031</span></td><td>Please enter a name for this Recurring Invoice</td></tr></tbody></table>'
  contact: {}
  version: 1.0.0
servers:
  -
    url: 'https://www.zohoapis.com/invoice/v3'
    description: 'API Endpoint'
tags:
  -
    name: recurring-invoices
    description: 'Recurring-Invoices Module'
paths:
  /recurringinvoices:
    post:
      tags:
        - recurring-invoices
      operationId: 'create_recurring_invoice'
      summary: 'Create a Recurring Invoice'
      description: 'Creating a new recurring invoice.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-recurring-invoice-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-a-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.CREATE
    get:
      tags:
        - recurring-invoices
      operationId: 'list_recurring_invoices'
      summary: 'List Recurring Invoice'
      description: 'List the details of all recurring invoice.'
      parameters:
        -
          name: filter_by
          in: query
          description: 'Filter  Recurring invoices by any status or payment expected date.Allowed Values: <code> Status.All</code>, <code>Status.Active</code>, <code> Status.Stopped</code>, <code>Status.Expired</code>'
          required: false
          schema:
            type: string
          example: ""
        -
          name: search_text
          in: query
          description: 'Search invoices by invoice number or purchase order or customer name.<code>Maximum length [100]</code>'
          required: false
          schema:
            type: string
          example: ""
        -
          name: sort_column
          in: query
          description: 'Sort based on column value'
          required: false
          schema:
            type: string
          example: created_time
        - name: page
          in: query
          description: 'Page number to be fetched. Default value is 1.'
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: 'Number of records to be fetched per page. Default value is 200.'
          required: false
          schema:
            type: integer
            default: 200
          example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.READ
    parameters:
      -
        $ref: '#/components/parameters/organization_id'
  '/recurringinvoices/{recurring_invoice_id}':
    put:
      tags:
        - recurring-invoices
      operationId: 'update_recurring_invoice'
      summary: 'Update Recurring Invoice'
      description: 'Update the recurring invoice.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-recurring-invoice-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.UPDATE
    get:
      tags:
        - recurring-invoices
      operationId: 'get_recurring_invoice'
      summary: 'Get a Recurring Invoice'
      description: 'Get the details of a recurring invoice.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-a-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.READ
    delete:
      tags:
        - recurring-invoices
      operationId: 'delete_recurring_invoice'
      summary: 'Delete a Recurring Invoice'
      description: 'Delete an existing recurring invoice.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.DELETE
    parameters:
      -
        name: recurring_invoice_id
        in: path
        required: true
        description: 'Unique identifier of the recurring invoice.'
        schema:
          type: string
        example: '90300000072369'
      -
        $ref: '#/components/parameters/organization_id'
  '/recurringinvoices/{recurring_invoice_id}/status/stop':
    post:
      tags:
        - recurring-invoices
      operationId: 'stop_recurring_invoice'
      summary: 'Stop a Recurring Invoice'
      description: 'Stop an active recurring invoice.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/stop-a-recurring-invoice-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stop-a-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.CREATE
    parameters:
      -
        name: recurring_invoice_id
        in: path
        required: true
        description: 'Unique identifier of the recurring invoice.'
        schema:
          type: string
        example: '90300000072369'
      -
        $ref: '#/components/parameters/organization_id'
  '/recurringinvoices/{recurring_invoice_id}/status/resume':
    post:
      tags:
        - recurring-invoices
      operationId: 'resume_recurring_invoice'
      summary: 'Resume a Recurring Invoice'
      description: 'Resume a stopped recurring invoice.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/resume-a-recurring-invoice-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resume-a-recurring-invoice-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.CREATE
    parameters:
      -
        name: recurring_invoice_id
        in: path
        required: true
        description: 'Unique identifier of the recurring invoice.'
        schema:
          type: string
        example: '90300000072369'
      -
        $ref: '#/components/parameters/organization_id'
  '/recurringinvoices/{recurring_invoice_id}/templates/{template_id}':
    put:
      tags:
        - recurring-invoices
      operationId: 'update_recurring_invoice_template'
      summary: 'Update Recurring Invoice template'
      description: 'Update the pdf template associated with the recurring invoice.'
      parameters:
        -
          name: template_id
          in: path
          required: true
          description: 'Unique identifier of the recurring invoice template.'
          schema:
            type: string
          example: '90300000001336'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-recurring-invoice-template-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-recurring-invoice-template-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.UPDATE
    parameters:
      -
        name: recurring_invoice_id
        in: path
        required: true
        description: 'Unique identifier of the recurring invoice.'
        schema:
          type: string
        example: '90300000072369'
      -
        $ref: '#/components/parameters/organization_id'
  '/recurringinvoices/{recurring_invoice_id}/comments':
    get:
      tags:
        - recurring-invoices
      operationId: 'list_recurring_invoice_comments'
      summary: 'List Recurring Invoice History'
      description: 'Get the complete history and comments of a recurring invoice.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-recurring-invoice-history-response'
      deprecated: false
      security:
        -
          Zoho_Auth:
            - ZohoInvoice.invoices.READ
    parameters:
      -
        name: recurring_invoice_id
        in: path
        required: true
        description: 'Unique identifier of the recurring invoice.'
        schema:
          type: string
        example: '90300000072369'
      -
        $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: X-com-zoho-invoice-organizationid
      description: 'ID of the organization'
      in: header
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/recurring_invoice-response'
    recurring_invoice-response:
      type: object
      properties:
        recurring_invoice_id:
          $ref: '#/components/schemas/recurring_invoice_id'
        recurrence_name:
          $ref: '#/components/schemas/recurrence_name'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        is_pre_gst:
          $ref: '#/components/schemas/is_pre_gst'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        tax_treatment:
          $ref: '#/components/schemas/tax_treatment'
        cfdi_usage:
          $ref: '#/components/schemas/cfdi_usage'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        customer_name:
          $ref: '#/components/schemas/customer_name'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        currency_id:
          $ref: '#/components/schemas/currency_id'
        currency_code:
          $ref: '#/components/schemas/currency_code'
        start_date:
          $ref: '#/components/schemas/start_date'
        end_date:
          $ref: '#/components/schemas/end_date'
        last_sent_date:
          $ref: '#/components/schemas/last_sent_date'
        next_invoice_date:
          $ref: '#/components/schemas/next_invoice_date'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        line_items:
          description: 'Line items of an invoice.'
          type: array
          items:
            type: object
            properties:
              line_item_id:
                $ref: '#/components/schemas/line_item_id'
              quantity:
                $ref: '#/components/schemas/quantity'
              name:
                $ref: '#/components/schemas/name'
              item_total:
                $ref: '#/components/schemas/item_total'
              sku:
                $ref: '#/components/schemas/sku'
              product_type:
                $ref: '#/components/schemas/product_type'
              project_id:
                $ref: '#/components/schemas/project_id'
              project_name:
                $ref: '#/components/schemas/project_name'
        billing_address:
          $ref: '#/components/schemas/billing_address'
        shipping_address:
          $ref: '#/components/schemas/shipping_address'
        payment_gateways:
          type: array
          description: 'List of payment gateways'
          items:
            type: object
            properties:
              configured:
                $ref: '#/components/schemas/configured'
              additional_field1:
                $ref: '#/components/schemas/additional_field1'
              gateway_name:
                $ref: '#/components/schemas/gateway_name'
        payment_options:
          description: 'Boolean check to see if a payment gateway ahs been configured'
          type: object
          properties:
            configured:
              $ref: '#/components/schemas/configured'
            additional_field1:
              $ref: '#/components/schemas/additional_field1'
            gateway_name:
              $ref: '#/components/schemas/gateway_name'
          example: true
        avatax_exempt_no:
          $ref: '#/components/schemas/avatax_exempt_no'
        avatax_use_code:
          $ref: '#/components/schemas/avatax_use_code'
    recurring_invoice_id:
      description: 'Unique ID of the recurring invoice generated by the server.'
      type: string
      example: '90300000072369'
    reference_number:
      description: 'The Order number of the Recurring Invoice.'
      type: string
      example: '12314'
    recurrence_name:
      description: 'Unique name for the recurring profile given by the user. <code>Maximum length [100]</code>'
      type: string
      example: MonthlyInvoice
    customer_name:
      description: 'Name of the customer to whom the recurring invoice is raised.'
      type: string
      example: 'David Sujin'
    customer_id:
      description: 'Customer ID of the customer for whom the recurring invoice is raised.'
      type: string
      example: '903000000000099'
    place_of_supply:
      description: 'Place where the goods/services are supplied to. (If not given, <code>place of contact</code> given for the contact will be taken)'
      type: string
      example: TN
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    gst_treatment:
      description: 'Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are <code> business_gst </code> , <code> business_none </code> , <code> overseas </code> , <code> consumer </code>.'
      type: string
      example: business_gst
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    gst_no:
      description: '15 digit GST identification number of the customer.'
      type: string
      example: 22AAAAA0000A1Z5
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    cfdi_usage:
      description: 'Choose CFDI Usage. Allowed values:</br><code>acquisition_of_merchandise</code>, <code>return_discount_bonus</code>, <code>general_expense</code>, <code>buildings</code>, <code>furniture_office_equipment</code>, <code>transport_equipment</code>, <code>computer_equipmentdye_molds_tools</code>, <code>telephone_communication</code>, <code>satellite_communication</code>, <code>other_machinery_equipment</code>, <code>hospital_expense</code>, <code>medical_expense_disability</code>, <code>funeral_expense</code>, <code>donation</code>, <code>interest_mortage_loans</code>, <code>contribution_sar</code>, <code>medical_expense_insurance_pormium</code>, <code>school_transportation_expense</code>, <code>deposit_saving_account</code>, <code>payment_educational_service</code>, <code>no_tax_effect</code>, <code>payment</code>, <code>payroll</code>.'
      type: string
      example: acquisition_of_merchandise
      x-node_available_in:
        - mx
      x-node_unavailable_in: []
    allow_partial_payments:
      description: 'Choose <code>false</code> for PPU-Single Payments and <code>true</code> for PPD-Installment Payments'
      type: boolean
      example: true
      x-node_available_in:
        - mx
      x-node_unavailable_in: []
    product_type:
      description: 'Enter goods/services'
      type: string
      example: goods
    project_id:
      description: 'ID of the project'
      type: string
      example: 90300000087378
    project_name:
      description: 'Name of the project.'
      type: string
      example: 'Sample Project'
    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: []
    sat_item_key_code:
      description: 'Add SAT Item Key Code for your goods/services. Download the <a href= http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI_V_4_07122022.xls  >CFDI Catalogs.</a>'
      type: string
      example: 71121206
      x-node_available_in:
        - mx
      x-node_unavailable_in: []
    unitkey_code:
      description: 'Add SAT Unit Key Code for your goods/services. Download the <a href= http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI_V_4_07122022.xls  >CFDI Catalogs.</a>'
      type: string
      example: E48
      x-node_available_in:
        - mx
      x-node_unavailable_in: []
    warehouse_id:
      description: 'Enter ID of the warehouse'
      type: string
      example: ""
    warehouse_name:
      description: 'Name of the warehouse'
      type: string
    warehouse_stock_on_hand:
      description: 'Available stock in your warehouse.'
      type: string
      example: ""
    sku:
      description: 'Enter item''s SKU information'
      type: string
      example: LEV-JN-SL-36-GN
    is_pre_gst:
      description: 'Applicable for transactions that fall before july 1, 2017'
      type: string
      example: false
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    street2:
      type: string
      example: 'McMillan Avenue'
    company_name:
      description: 'Name of the company with which the customer is associated.'
      type: string
      example: 'ABC Studios'
    customer_email:
      description: 'Email address of the customer to whom the recurring invoice is raised.'
      type: string
      example: test@zylker.org
    customer_mobile_phone:
      description: 'Mobile phone number of the customer to whom the recurring invoice is raised.'
      type: string
      example: 1234
    customer_phone:
      description: 'Phone number of the customer to whom the recurring invoice is raised.'
      type: string
      example: 1234
    paid_invoices_total:
      description: 'Total of the all child invoices that have been paid.'
      type: number
      format: double
      example: 100
    unpaid_invoices_balance:
      description: 'Balance of the all child invoices that have been raised.'
      type: number
      format: double
      example: 100
    photo_url:
      description: 'Gravatar photo url for the customer.'
      type: string
      example: 'https://secure.gravatar.com/avatar/xxxxxxxxxx?&d=mm'
    date:
      description: 'The date on which recurring invoice is raised.'
      type: string
      example: '2016-06-05'
    start_date:
      description: 'The date on which the recurring invoice starts.'
      type: string
      example: '2016-06-12'
    end_date:
      description: 'The date on which the recurring invoice expires.'
      type: string
      example: '2017-10-12'
    last_sent_date:
      description: 'The date at which the last invoice was sent.'
      type: string
      example: '2016-07-12'
    next_invoice_date:
      description: 'The date at which next invoice is to be sent.'
      type: string
      example: '2016-08-17'
    recurrence_frequency:
      description: 'The frequency of time interval at which the invoice is to be generated.'
      type: string
      enum:
        - weeks
      example: weeks
    repeat_every:
      description: 'The period between every recurrency frequency.'
      type: integer
      example: 2
    status:
      description: 'Status of the recurring invoice. This can be <code>active</code>, <code>stopped</code> or <code>expired</code>.'
      type: string
      example: active
    line_item_id:
      description: 'The line item id'
      type: string
      example: '982000000567021'
    name:
      description: 'The name of the line item. <code>Maximum length [100]</code>'
      type: string
      example: 'Hard Drive'
    currency_id:
      description: 'The currenct id of the currency'
      type: string
      example: '982000000000190'
    currency_code:
      description: 'The currency code in which the invoice is created.'
      type: string
      example: USD
    transaction_id:
      description: 'The transaction ID associated with the involved recurring invoices.'
      type: string
      example: '903000002072369'
    email:
      description: 'Email address of the customer.'
      type: string
      example: test@zylker.org
    item_id:
      description: 'Unique string generated for the item for which invoice is to be sent.'
      type: string
      example: '90300000081501'
    description:
      description: 'A small description about the item. <code>Maximum length [2000]</code>'
      type: string
      example: '10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases'
    type:
      description: 'Type of the recurring invoice line item.'
      type: integer
      example: 1
    account_id:
      description: 'Unique ID to denote the account.'
      type: string
      example: '903000000000388'
    account_name:
      description: 'Name of the account.'
      type: string
      example: Sales
    discount:
      description: 'The discount given for an item.'
      type: string
      example: 10
    tax_id:
      description: 'Unique to denote the tax associate to the recurring invoice.'
      type: string
      example: '903000000000356'
    tds_tax_id:
      description: 'ID of the TDS tax.'
      type: string
      example: '982000000557012'
      x-node_available_in:
        - mx
      x-node_unavailable_in: []
    is_inclusive_tax:
      description: 'Used to specify whether the line item rates are inclusive or exclusive of tax.'
      type: boolean
      example: false
      x-node_available_in: []
      x-node_unavailable_in:
        - us
    quantity:
      description: 'Quantity of the item included.'
      type: integer
      format: int32
      example: 1
    price:
      description: 'The price of the item included.'
      type: number
      format: double
      example: 100
    item_total:
      description: 'Total rate raised by this item. This would be the multiplicative product of item price and quantity.'
      type: number
      format: double
      example: 100
    template_id:
      description: 'Unique ID of the recurring invoice template.'
      type: string
      example: '90300000001336'
    template_name:
      description: 'Name of the default template of the recurring invoice.'
      type: string
      example: 'Standard Template'
    comments:
      description: 'The details of the comments'
      type: array
      items:
        type: string
    comment_description:
      description: 'The description for comment.'
      type: string
      example: 'Recurring Invoice created'
    commented_by_id:
      description: 'Sorting comments by ID'
      type: string
      example: '982000000554041'
    comment_type:
      description: 'Type of comment added'
      type: string
      example: system
    commented_by:
      description: 'Name of individual who added comment'
      type: string
      example: 'David Sujin'
    date_description:
      description: 'Number of days since the comment was added'
      type: string
      example: yesterday
    time:
      description: 'Time of the comment'
      type: string
      example: '2:02 AM'
    operation_type:
      description: 'Type of operation performed on the invoice'
      type: string
      example: Added
    transaction_type:
      description: 'Type of transaction'
      type: string
      example: estimate
    comment_id:
      description: 'The ID of the comment'
      type: string
      example: '982000000567019'
    index:
      description: 'Index of the custom field. It can hold any value from 1 to 10.'
      type: integer
      example: 1
    label:
      description: 'Label of the custom field.'
      type: string
      example: label
    value:
      description: 'Value of the custom field.'
      type: string
      example: '129890'
    created_time:
      description: 'Time at which the recurring invoice was created.'
      type: string
      example: '2016-06-05T02:30:08-0700'
    updated_time:
      description: 'Time at which the recurring invoice details were last updated.'
      type: string
      example: '2016-06-09T02:30:08-0700'
    invoice_id:
      description: 'Invoice ID of the required invoice.'
      type: string
      example: '90300000079426'
    invoice_number:
      description: 'Invoice number of the required invoice.'
      type: string
      example: INV-384
    amount:
      description: 'Amount paid for the invoice.'
      type: number
      format: double
      example: 450
    contact_persons:
      description: 'Contact Persons associated with the recurring invoice.'
      type: array
      items:
        type: string
      example:
        - '903000006532'
    applied_filter:
      type: string
      example: Status.All
    page:
      description: 'Current Page'
      type: integer
      example: 1
    per_page:
      description: 'Values per page'
      type: integer
      example: 200
    report_name:
      description: 'Name of the report generated'
      type: string
      example: 'Recurring Invoices'
    has_more_page:
      description: 'To check for more pages'
      type: boolean
      example: false
    sort_order:
      description: 'Order of sorting the invoices'
      type: string
      example: D
    sort_column:
      description: 'Sort based on column value'
      type: string
      example: created_time
    rate:
      description: 'The amount of the item'
      type: number
      format: double
      example: 100
    exchange_rate:
      description: 'Exchange rate for the currency associated with the customer.'
      type: string
      example: '5.5'
    notes:
      description: 'A short note for the recurring invoice.'
      type: string
      example: 'Offer for the referral'
    terms:
      description: 'Terms & condition to be displayed in the recurring invoice.'
      type: string
      example: ""
    data_type:
      description: 'Data type of the custom field.'
      type: string
      example: text
    vat_treatment:
      description: '(Optional) VAT treatment for the invoices. 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
      example: overseas
      x-node_available_in:
        - uk
      x-node_unavailable_in: []
    tax_treatment:
      description: 'VAT treatment for the Estimate.Allowed Values:</br><code>home_country_mexico</code>,<code>border_region_mexico</code>,<code>non_mexico</code> supported only for <b>MX</b>.'
      type: string
      example: vat_registered
      x-node_available_in:
        - mx
      x-node_unavailable_in: []
    avatax_tax_code:
      description: 'A tax code is a unique label used to group Items (products, services, or charges) together. <code>Maximum length [25]</code>'
      type: string
      x-node_available_in:
        - 'Avalara Integration'
      x-node_unavailable_in: []
    avatax_use_code:
      description: 'Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule. Select from Avalara [standard codes][1] or enter a custom code. <code>Maximum length [25]</code>'
      type: string
      x-node_available_in:
        - 'Avalara Integration'
      x-node_unavailable_in: []
    avatax_exempt_no:
      description: 'Exemption certificate number of the customer. <code>Maximum length [25]</code>'
      type: string
      x-node_available_in:
        - 'Avalara Integration'
      x-node_unavailable_in: []
    tax_authority_id:
      description: 'Unique ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority.'
      type: string
      example: '903000006345'
      x-node_available_in:
        - us
        - ca
      x-node_unavailable_in: []
    tax_exemption_id:
      description: 'Unique ID of the tax exemption.'
      type: string
      example: '903000006345'
      x-node_available_in:
        - in
        - us
        - ca
      x-node_unavailable_in: []
    tax_exemption_code:
      description: 'Unique code of the tax exemption.'
      type: string
      example: 'GST FREE'
      x-node_available_in:
        - in
        - us
        - ca
      x-node_unavailable_in: []
    tax_name:
      description: 'Unique name for tax.'
      type: string
      example: 'Basic Tax'
    tax_percentage:
      description: 'Percentage of tax'
      type: string
      example: 10%
    tax_amount:
      description: 'Tax amount applied to the subscription.'
      type: string
      example: '2.50'
    recurring_invoice_items:
      description: 'Items which are charged on a recurring basis'
      type: array
      items:
        type: object
        properties:
          item_id:
            $ref: '#/components/schemas/item_id'
          description:
            $ref: '#/components/schemas/description'
          quantity:
            $ref: '#/components/schemas/quantity'
          price:
            $ref: '#/components/schemas/price'
          item_total:
            $ref: '#/components/schemas/item_total'
    invoices:
      type: array
      items:
        type: object
        properties:
          invoice_id:
            $ref: '#/components/schemas/invoice_id'
          invoice_number:
            $ref: '#/components/schemas/invoice_number'
          amount:
            $ref: '#/components/schemas/amount'
    custom_fields:
      type: array
      items:
        type: object
        properties:
          value:
            $ref: '#/components/schemas/value'
          label:
            $ref: '#/components/schemas/label'
          data_type:
            $ref: '#/components/schemas/data_type'
    address:
      description: 'Billing address for the invoice'
      type: string
      example: '4900 Hopyard Rd, Suite 310'
    city:
      description: 'City of the customer’s billing address.'
      type: string
      example: Pleasanton
    state:
      description: 'State of the customer’s billing address.'
      type: string
      example: CA
    zip:
      description: 'Zip code of the customer’s billing address.'
      type: string
      example: '94588'
    country:
      description: 'Country of the customer’s billing address.'
      type: string
      example: U.S.A
    fax:
      description: 'Customer''s fax number.'
      type: string
      example: +1-925-924-9600
    configured:
      description: 'Boolean check to see if a payment gateway ahs been configured'
      type: boolean
      example: true
    additional_field1:
      description: 'Paypal payment method. Allowed Values: <code>standard</code> and <code>adaptive</code>'
      type: string
      example: standard
    gateway_name:
      description: 'Name of the payment gateway associated with the invoice. E.g. paypal, stripe.Allowed Values: <code>paypal</code>, <code>authorize_net</code>, <code>payflow_pro</code>, <code>stripe</code>, <code>2checkout</code> and <code>braintree</code>'
      type: string
      example: paypal
    billing_address:
      description: 'The address to which the Item has to be billed.'
      type: object
      properties:
        address:
          $ref: '#/components/schemas/address'
        street2:
          $ref: '#/components/schemas/street2'
        city:
          $ref: '#/components/schemas/city'
        state:
          $ref: '#/components/schemas/state'
        zip:
          $ref: '#/components/schemas/zip'
        country:
          $ref: '#/components/schemas/country'
        fax:
          $ref: '#/components/schemas/fax'
    shipping_address:
      description: 'The address to which the Item has to be shipped.'
      type: object
      properties:
        address:
          description: 'Shipping address for the invoice'
          type: string
          example: '4900 Hopyard Rd, Suite 310'
        city:
          description: 'City of the customer’s shipping address.'
          type: string
          example: Pleasanton
        state:
          description: 'State of the customer’s shipping address.'
          type: string
          example: CA
        zip:
          description: 'Zip code of the customer’s shipping address.'
          type: string
          example: '94588'
        country:
          description: 'Country of the customer’s shipping address.'
          type: string
          example: U.S.A
        fax:
          description: 'Customer''s fax number.'
          type: string
          example: +1-925-924-9600
    payment_gateways:
      type: array
      items:
        type: object
        properties:
          configured:
            $ref: '#/components/schemas/configured'
          additional_field1:
            $ref: '#/components/schemas/additional_field1'
          gateway_name:
            $ref: '#/components/schemas/gateway_name'
    payment_options:
      type: object
      properties:
        payment_gateways:
          $ref: '#/components/schemas/payment_gateways'
    filter_by:
      description: 'Filter  Recurring invoices by any status or payment expected date.Allowed Values: <code> Status.All</code>, <code>Status.Active</code>, <code> Status.Stopped</code>, <code>Status.Expired</code>'
      type: string
      example: ' '
    search_text:
      description: 'Search invoices by invoice number or purchase order or customer name.<code>Maximum length [100]</code>'
      type: string
      example: ' '
    line_items:
      description: 'Line items of an invoice.'
      type: array
      items:
        type: object
        properties:
          item_id:
            $ref: '#/components/schemas/item_id'
          name:
            $ref: '#/components/schemas/name'
          description:
            $ref: '#/components/schemas/description'
          rate:
            $ref: '#/components/schemas/rate'
          quantity:
            $ref: '#/components/schemas/quantity'
          discount:
            $ref: '#/components/schemas/discount'
          tax_id:
            $ref: '#/components/schemas/tax_id'
          tds_tax_id:
            $ref: '#/components/schemas/tds_tax_id'
          item_total:
            $ref: '#/components/schemas/item_total'
          project_id:
            $ref: '#/components/schemas/project_id'
          sat_item_key_code:
            $ref: '#/components/schemas/sat_item_key_code'
          unitkey_code:
            $ref: '#/components/schemas/unitkey_code'
    warehouses:
      type: array
      items:
        type: object
        properties:
          warehouse_id:
            $ref: '#/components/schemas/warehouse_id'
          warehouse_name:
            $ref: '#/components/schemas/warehouse_name'
          warehouse_stock_on_hand:
            $ref: '#/components/schemas/warehouse_stock_on_hand'
    create-a-recurring-invoice-request:
      required:
        - recurrence_name
        - customer_id
        - recurrence_frequency
      type: object
      properties:
        recurrence_name:
          $ref: '#/components/schemas/recurrence_name'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        contact_persons:
          $ref: '#/components/schemas/contact_persons'
        start_date:
          $ref: '#/components/schemas/start_date'
        end_date:
          $ref: '#/components/schemas/end_date'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        tax_treatment:
          $ref: '#/components/schemas/tax_treatment'
        cfdi_usage:
          $ref: '#/components/schemas/cfdi_usage'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        recurrence_frequency:
          $ref: '#/components/schemas/recurrence_frequency'
        repeat_every:
          $ref: '#/components/schemas/repeat_every'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        line_items:
          description: 'Line items of an invoice.'
          type: array
          items:
            type: object
            properties:
              item_id:
                $ref: '#/components/schemas/item_id'
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              rate:
                $ref: '#/components/schemas/rate'
              quantity:
                $ref: '#/components/schemas/quantity'
              discount:
                $ref: '#/components/schemas/discount'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              tds_tax_id:
                $ref: '#/components/schemas/tds_tax_id'
              tax_exemption_id:
                $ref: '#/components/schemas/tax_exemption_id'
              avatax_tax_code:
                $ref: '#/components/schemas/avatax_tax_code'
              avatax_use_code:
                $ref: '#/components/schemas/avatax_use_code'
              item_total:
                $ref: '#/components/schemas/item_total'
              product_type:
                $ref: '#/components/schemas/product_type'
              hsn_or_sac:
                $ref: '#/components/schemas/hsn_or_sac'
              project_id:
                $ref: '#/components/schemas/project_id'
              sat_item_key_code:
                $ref: '#/components/schemas/sat_item_key_code'
              unitkey_code:
                $ref: '#/components/schemas/unitkey_code'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        email:
          $ref: '#/components/schemas/email'
        payment_gateways:
          type: array
          items:
            type: object
            properties:
              configured:
                $ref: '#/components/schemas/configured'
              additional_field1:
                $ref: '#/components/schemas/additional_field1'
              gateway_name:
                $ref: '#/components/schemas/gateway_name'
        tax_authority_id:
          $ref: '#/components/schemas/tax_authority_id'
        tax_exemption_id:
          $ref: '#/components/schemas/tax_exemption_id'
        avatax_use_code:
          $ref: '#/components/schemas/avatax_use_code'
        avatax_exempt_no:
          $ref: '#/components/schemas/avatax_exempt_no'
    create-a-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The recurring invoice has been created.'
          readOnly: true
        recurring_invoice:
          $ref: '#/components/schemas/recurring_invoice-response'
    list-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'Details of a recurring invoice is displayed successfully.'
          readOnly: true
        recurring_invoices:
          type: array
          items:
            type: object
            properties:
              recurring_invoice_id:
                $ref: '#/components/schemas/recurring_invoice_id'
              recurrence_name:
                $ref: '#/components/schemas/recurrence_name'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              customer_id:
                $ref: '#/components/schemas/customer_id'
              currency_id:
                $ref: '#/components/schemas/currency_id'
              currency_code:
                $ref: '#/components/schemas/currency_code'
              start_date:
                $ref: '#/components/schemas/start_date'
              end_date:
                $ref: '#/components/schemas/end_date'
              last_sent_date:
                $ref: '#/components/schemas/last_sent_date'
              next_invoice_date:
                $ref: '#/components/schemas/next_invoice_date'
              custom_fields:
                $ref: '#/components/schemas/custom_fields'
              line_items:
                description: 'Line items of an invoice.'
                type: array
                items:
                  type: object
                  properties:
                    line_item_id:
                      $ref: '#/components/schemas/line_item_id'
                    quantity:
                      $ref: '#/components/schemas/quantity'
                    name:
                      $ref: '#/components/schemas/name'
                    item_total:
                      $ref: '#/components/schemas/item_total'
                    project_id:
                      $ref: '#/components/schemas/project_id'
              billing_address:
                $ref: '#/components/schemas/billing_address'
              shipping_address:
                $ref: '#/components/schemas/shipping_address'
              payment_gateways:
                $ref: '#/components/schemas/payment_gateways'
              payment_options:
                description: 'Boolean check to see if a payment gateway ahs been configured'
                type: object
                properties:
                  configured:
                    $ref: '#/components/schemas/configured'
                  additional_field1:
                    $ref: '#/components/schemas/additional_field1'
                  gateway_name:
                    $ref: '#/components/schemas/gateway_name'
                example: true
    update-recurring-invoice-request:
      required:
        - recurrence_name
        - customer_id
        - recurrence_frequency
      type: object
      properties:
        recurrence_name:
          $ref: '#/components/schemas/recurrence_name'
        reference_number:
          $ref: '#/components/schemas/reference_number'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        contact_persons:
          $ref: '#/components/schemas/contact_persons'
        start_date:
          $ref: '#/components/schemas/start_date'
        end_date:
          $ref: '#/components/schemas/end_date'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        vat_treatment:
          $ref: '#/components/schemas/vat_treatment'
        gst_treatment:
          $ref: '#/components/schemas/gst_treatment'
        tax_treatment:
          $ref: '#/components/schemas/tax_treatment'
        cfdi_usage:
          $ref: '#/components/schemas/cfdi_usage'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        gst_no:
          $ref: '#/components/schemas/gst_no'
        recurrence_frequency:
          $ref: '#/components/schemas/recurrence_frequency'
        repeat_every:
          $ref: '#/components/schemas/repeat_every'
        custom_fields:
          $ref: '#/components/schemas/custom_fields'
        line_items:
          description: 'Line items of an invoice.'
          type: array
          items:
            type: object
            properties:
              item_id:
                $ref: '#/components/schemas/item_id'
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              rate:
                $ref: '#/components/schemas/rate'
              quantity:
                $ref: '#/components/schemas/quantity'
              discount:
                $ref: '#/components/schemas/discount'
              tax_id:
                $ref: '#/components/schemas/tax_id'
              tds_tax_id:
                $ref: '#/components/schemas/tds_tax_id'
              tax_exemption_id:
                $ref: '#/components/schemas/tax_exemption_id'
              avatax_tax_code:
                $ref: '#/components/schemas/avatax_tax_code'
              avatax_use_code:
                $ref: '#/components/schemas/avatax_use_code'
              item_total:
                $ref: '#/components/schemas/item_total'
              product_type:
                $ref: '#/components/schemas/product_type'
              hsn_or_sac:
                $ref: '#/components/schemas/hsn_or_sac'
              project_id:
                $ref: '#/components/schemas/project_id'
              sat_item_key_code:
                $ref: '#/components/schemas/sat_item_key_code'
              unitkey_code:
                $ref: '#/components/schemas/unitkey_code'
        tax_id:
          $ref: '#/components/schemas/tax_id'
        email:
          $ref: '#/components/schemas/email'
        payment_gateways:
          type: array
          items:
            type: object
            properties:
              configured:
                $ref: '#/components/schemas/configured'
              additional_field1:
                $ref: '#/components/schemas/additional_field1'
              gateway_name:
                $ref: '#/components/schemas/gateway_name'
        tax_authority_id:
          $ref: '#/components/schemas/tax_authority_id'
        tax_exemption_id:
          $ref: '#/components/schemas/tax_exemption_id'
        avatax_use_code:
          $ref: '#/components/schemas/avatax_use_code'
        avatax_exempt_no:
          $ref: '#/components/schemas/avatax_exempt_no'
    update-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        recurring_invoice:
          type: object
          properties:
            recurring_invoice_id:
              $ref: '#/components/schemas/recurring_invoice_id'
            recurrence_name:
              $ref: '#/components/schemas/recurrence_name'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            tax_treatment:
              $ref: '#/components/schemas/tax_treatment'
            cfdi_usage:
              $ref: '#/components/schemas/cfdi_usage'
            allow_partial_payments:
              $ref: '#/components/schemas/allow_partial_payments'
            vat_treatment:
              $ref: '#/components/schemas/vat_treatment'
            place_of_supply:
              $ref: '#/components/schemas/place_of_supply'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            start_date:
              $ref: '#/components/schemas/start_date'
            end_date:
              $ref: '#/components/schemas/end_date'
            last_sent_date:
              $ref: '#/components/schemas/last_sent_date'
            next_invoice_date:
              $ref: '#/components/schemas/next_invoice_date'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            line_items:
              description: 'Line items of an invoice.'
              type: array
              items:
                type: object
                properties:
                  line_item_id:
                    $ref: '#/components/schemas/line_item_id'
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  name:
                    $ref: '#/components/schemas/name'
                  item_total:
                    $ref: '#/components/schemas/item_total'
                  sku:
                    $ref: '#/components/schemas/sku'
                  product_type:
                    $ref: '#/components/schemas/product_type'
                  project_id:
                    $ref: '#/components/schemas/project_id'
                  project_name:
                    $ref: '#/components/schemas/project_name'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            payment_gateways:
              type: array
              items:
                type: object
                properties:
                  configured:
                    $ref: '#/components/schemas/configured'
                  additional_field1:
                    $ref: '#/components/schemas/additional_field1'
                  gateway_name:
                    $ref: '#/components/schemas/gateway_name'
            payment_options:
              description: 'Boolean check to see if a payment gateway ahs been configured'
              type: object
              properties:
                configured:
                  $ref: '#/components/schemas/configured'
                additional_field1:
                  $ref: '#/components/schemas/additional_field1'
                gateway_name:
                  $ref: '#/components/schemas/gateway_name'
              example: true
            avatax_exempt_no:
              $ref: '#/components/schemas/avatax_exempt_no'
            avatax_use_code:
              $ref: '#/components/schemas/avatax_use_code'
    get-a-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'Details of a recurring invoice is displayed successfully.'
          readOnly: true
        recurring_invoice:
          type: object
          properties:
            recurring_invoice_id:
              $ref: '#/components/schemas/recurring_invoice_id'
            recurrence_name:
              $ref: '#/components/schemas/recurrence_name'
            reference_number:
              $ref: '#/components/schemas/reference_number'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            is_pre_gst:
              $ref: '#/components/schemas/is_pre_gst'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            tax_treatment:
              $ref: '#/components/schemas/tax_treatment'
            cfdi_usage:
              $ref: '#/components/schemas/cfdi_usage'
            allow_partial_payments:
              $ref: '#/components/schemas/allow_partial_payments'
            vat_treatment:
              $ref: '#/components/schemas/vat_treatment'
            place_of_supply:
              $ref: '#/components/schemas/place_of_supply'
            company_name:
              $ref: '#/components/schemas/company_name'
            customer_email:
              $ref: '#/components/schemas/customer_email'
            customer_mobile_phone:
              $ref: '#/components/schemas/customer_mobile_phone'
            customer_phone:
              $ref: '#/components/schemas/customer_phone'
            photo_url:
              $ref: '#/components/schemas/photo_url'
            currency_id:
              $ref: '#/components/schemas/currency_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            start_date:
              $ref: '#/components/schemas/start_date'
            end_date:
              $ref: '#/components/schemas/end_date'
            last_sent_date:
              $ref: '#/components/schemas/last_sent_date'
            next_invoice_date:
              $ref: '#/components/schemas/next_invoice_date'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            line_items:
              description: 'Line items of an invoice.'
              type: array
              items:
                type: object
                properties:
                  line_item_id:
                    $ref: '#/components/schemas/line_item_id'
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  name:
                    $ref: '#/components/schemas/name'
                  item_total:
                    $ref: '#/components/schemas/item_total'
                  sku:
                    $ref: '#/components/schemas/sku'
                  product_type:
                    $ref: '#/components/schemas/product_type'
                  project_id:
                    $ref: '#/components/schemas/project_id'
                  project_name:
                    $ref: '#/components/schemas/project_name'
            paid_invoices_total:
              $ref: '#/components/schemas/paid_invoices_total'
            unpaid_invoices_balance:
              $ref: '#/components/schemas/unpaid_invoices_balance'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            payment_gateways:
              $ref: '#/components/schemas/payment_gateways'
            payment_options:
              description: 'Boolean check to see if a payment gateway ahs been configured'
              type: object
              properties:
                configured:
                  $ref: '#/components/schemas/configured'
                additional_field1:
                  $ref: '#/components/schemas/additional_field1'
                gateway_name:
                  $ref: '#/components/schemas/gateway_name'
              example: true
    delete-a-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The recurring invoice is deleted successfully.'
          readOnly: true
    stop-a-recurring-invoice-request:
      type: object
      properties:
        recurring_invoice_id:
          description: 'Unique ID of the recurring invoice generated by the server.'
          type: string
          example: '90300000072369'
    stop-a-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The recurring invoice has been stopped.'
          readOnly: true
    resume-a-recurring-invoice-request:
      type: object
      properties:
        recurring_invoice_id:
          description: 'Unique ID of the recurring invoice generated by the server.'
          type: string
          example: '90300000072369'
    resume-a-recurring-invoice-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The recurring invoice has been resumed.'
          readOnly: true
    update-recurring-invoice-template-request:
      type: object
      properties:
        recurring_invoice_id:
          description: 'Unique ID of the recurring invoice generated by the server.'
          type: string
          example: '90300000072369'
        template_id:
          description: 'Unique ID of the recurring invoice template.'
          type: string
          example: '90300043563547'
    update-recurring-invoice-template-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The template of the recurring invoice has been updated.'
          readOnly: true
    list-recurring-invoice-history-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: 'The complete history and comments of a recurring invoice are displayed successfully.'
          readOnly: true
        comments:
          type: array
          items:
            type: object
            properties:
              comment_id:
                $ref: '#/components/schemas/comment_id'
              recurring_invoice_id:
                $ref: '#/components/schemas/recurring_invoice_id'
              comment_description:
                $ref: '#/components/schemas/comment_description'
              commented_by_id:
                $ref: '#/components/schemas/commented_by_id'
              commented_by:
                $ref: '#/components/schemas/commented_by'
              comment_type:
                $ref: '#/components/schemas/comment_type'
              operation_type:
                $ref: '#/components/schemas/operation_type'
              date:
                $ref: '#/components/schemas/date'
              date_description:
                $ref: '#/components/schemas/date_description'
              time:
                $ref: '#/components/schemas/time'
              transaction_id:
                $ref: '#/components/schemas/transaction_id'
              transaction_type:
                $ref: '#/components/schemas/transaction_type'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: 'https://accounts.zoho.com/oauth/v2/auth'
          scopes:
            ZohoInvoice.invoices.CREATE: 'Create Invoices'
            ZohoInvoice.invoices.UPDATE: 'Update Invoices'
            ZohoInvoice.invoices.READ: 'Read Invoices'
            ZohoInvoice.invoices.DELETE: 'Delete Invoices'
