openapi: 3.0.0
info:
  title: Projects
  description: A project is a series of tasks performed over a period of time, to achieve certain targets. There can be many number of people working on a single project and a project may consist of single or multiple tasks. A project is billed and charged upon a customer whom the project was taken up for.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.com/books/v3
    description: API Endpoint
tags:
  - name: projects
    description: Projects Module
paths:
  /projects:
    post:
      tags:
        - projects
      operationId: create_project
      summary: Create a project
      description: Create a project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-project-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-a-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    get:
      tags:
        - projects
      operationId: list_projects
      summary: List projects
      description: List all projects with pagination.
      parameters:
        - name: filter_by
          in: query
          description: 'Filter projects by any status. Allowed Values: <code>Status.All</code>, <code>Status.Active</code> and <code>Status.Inactive</code>'
          required: false
          schema:
            type: string
          example: Status.All
        - name: customer_id
          in: query
          description: Search projects by customer id.
          required: false
          schema:
            type: string
          example: '460000000044001'
        - name: sort_column
          in: query
          description: 'Sort projects. Allowed Values: <code>project_name</code>, <code>customer_name</code>, <code>rate</code> and <code>created_time</code>'
          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-projects-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.READ
    put:
      tags:
        - projects
      operationId: update_projects_using_custom_field
      summary: Update a project using a custom field's unique value
      description: A custom field will have unique values if it's configured to not accept duplicate values. Now, you can use that custom field's value to update a project by providing its API name in the X-Unique-Identifier-Key header and its value in the X-Unique-Identifier-Value header. Based on this value, the corresponding project will be retrieved and updated. Additionally, there is an optional X-Upsert header. If the X-Upsert header is true and the custom field's unique value is not found in any of the existing projects, a new project will be created if the necessary payload details are available
      parameters:
        - name: X-Unique-Identifier-Key
          in: header
          description: Unique CustomField Api Name
          required: true
          schema:
            type: string
            example: cf_unique_cf
        - name: X-Unique-Identifier-Value
          in: header
          description: Unique CustomField Value
          required: true
          schema:
            type: string
            example: unique Value
        - name: X-Upsert
          in: header
          description: If there is no record is found unique custom field value , will create new invoice
          required: false
          schema:
            type: boolean
            example: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-project-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.UPDATE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}:
    put:
      tags:
        - projects
      operationId: update_project
      summary: Update project
      description: Update details of a project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-project-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.UPDATE
    get:
      tags:
        - projects
      operationId: get_project
      summary: Get a project
      description: Get the details of a project.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-a-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.READ
    delete:
      tags:
        - projects
      operationId: delete_project
      summary: Delete project
      description: Deleting a existing project.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.DELETE
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/active:
    post:
      tags:
        - projects
      operationId: mark_project_active
      summary: Activate project
      description: Mark project as active.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/activate-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/inactive:
    post:
      tags:
        - projects
      operationId: mark_project_inactive
      summary: Inactivate a project
      description: Marking a project as inactive.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inactivate-a-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/clone:
    post:
      tags:
        - projects
      operationId: clone_project
      summary: Clone project
      description: Cloning a project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/clone-project-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/clone-project-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/users:
    post:
      tags:
        - projects
      operationId: add_project_user
      summary: Assign users
      description: Assign a users to a project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/assign-users-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/assign-users-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    get:
      tags:
        - projects
      operationId: list_project_users
      summary: List Users
      description: Get list of users associated with a project.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-users-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.READ
    parameters:
      - name: project_id
        in: path
        required: true
        description: Unique identifier of the project.
        schema:
          type: string
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/users/invite:
    post:
      tags:
        - projects
      operationId: invite_project_user
      summary: Invite user
      description: Invite and user to the project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invite-user-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invite-user-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    parameters:
      - name: project_id
        in: path
        required: true
        description: Unique identifier of the project.
        schema:
          type: string
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/users/{user_id}:
    put:
      tags:
        - projects
      operationId: update_project_user
      summary: Update user
      description: Update details of a user.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-user-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-user-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.UPDATE
    get:
      tags:
        - projects
      operationId: get_project_user
      summary: Get a Project User
      description: Get details of a user in project.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-a-user-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.READ
    delete:
      tags:
        - projects
      operationId: delete_project_user
      summary: Delete user
      description: Remove user from a project.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-user-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.DELETE
    parameters:
      - name: project_id
        in: path
        required: true
        description: Unique identifier of the project.
        schema:
          type: string
        example: '460000000044019'
      - name: user_id
        in: path
        required: true
        description: Unique identifier of the user.
        schema:
          type: string
        example: '460000000024003'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/comments:
    post:
      tags:
        - projects
      operationId: add_project_comment
      summary: Post comment
      description: Post comment to a project.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/post-comment-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/post-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.CREATE
    get:
      tags:
        - projects
      operationId: list_project_comments
      summary: List comments
      description: Get comments for a project.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-comments-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.READ
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/comments/{comment_id}:
    delete:
      tags:
        - projects
      operationId: delete_project_comment
      summary: Delete comment
      description: Deleting a comment.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.DELETE
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - name: comment_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the comment.
        example: '460000000044027'
      - $ref: '#/components/parameters/organization_id'
  /projects/{project_id}/invoices:
    get:
      tags:
        - projects
      operationId: list_project_invoices
      summary: List invoices
      description: Lists invoices created for this project.
      parameters:
        - name: sort_column
          in: query
          description: 'Sort invoices raised. Allowed Values: <code>invoice_number</code>, <code>date</code>, <code>total</code>, <code>balance</code> and <code>created_time</code>'
          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-invoices-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ZohoBooks.projects.READ
    parameters:
      - name: project_id
        in: path
        schema:
          type: string
        required: true
        description: Unique identifier of the project.
        example: '460000000044019'
      - $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/project-response'
    project-response:
      type: object
      properties:
        project_id:
          $ref: '#/components/schemas/project_id'
        project_name:
          $ref: '#/components/schemas/project_name'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        customer_name:
          $ref: '#/components/schemas/customer_name'
        currency_code:
          $ref: '#/components/schemas/currency_code'
        description:
          $ref: '#/components/schemas/description'
        status:
          $ref: '#/components/schemas/status'
        billing_type:
          $ref: '#/components/schemas/billing_type'
        rate:
          $ref: '#/components/schemas/rate'
        budget_type:
          $ref: '#/components/schemas/budget_type'
        total_hours:
          $ref: '#/components/schemas/total_hours'
        total_amount:
          $ref: '#/components/schemas/total_amount'
        billed_hours:
          $ref: '#/components/schemas/billed_hours'
        billed_amount:
          $ref: '#/components/schemas/billed_amount'
        un_billed_hours:
          $ref: '#/components/schemas/un_billed_hours'
        un_billed_amount:
          $ref: '#/components/schemas/un_billed_amount'
        billable_hours:
          $ref: '#/components/schemas/billable_hours'
        billable_amount:
          $ref: '#/components/schemas/billable_amount'
        non_billable_hours:
          $ref: '#/components/schemas/non_billable_hours'
        non_billable_amount:
          $ref: '#/components/schemas/non_billable_amount'
        cost_budget_amount:
          $ref: '#/components/schemas/cost_budget_amount'
        is_recurrence_associated:
          $ref: '#/components/schemas/is_recurrence_associated'
        recurring_invoices:
          $ref: '#/components/schemas/recurring_invoices'
        created_time:
          $ref: '#/components/schemas/created_time'
        show_in_dashboard:
          $ref: '#/components/schemas/show_in_dashboard'
        tasks:
          type: array
          items:
            type: object
            properties:
              task_id:
                $ref: '#/components/schemas/task_id'
              task_name:
                $ref: '#/components/schemas/task_name'
              description:
                $ref: '#/components/schemas/description'
              rate:
                $ref: '#/components/schemas/rate'
              budget_hours:
                $ref: '#/components/schemas/budget_hours'
              total_hours:
                $ref: '#/components/schemas/total_hours'
              billed_hours:
                $ref: '#/components/schemas/billed_hours'
              un_billed_hours:
                $ref: '#/components/schemas/un_billed_hours'
              non_billable_hours:
                $ref: '#/components/schemas/non_billable_hours'
              status:
                $ref: '#/components/schemas/status'
              is_billable:
                $ref: '#/components/schemas/is_billable'
              task_custom_fields:
                $ref: '#/components/schemas/task_custom_fields'
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                $ref: '#/components/schemas/user_id'
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              status:
                $ref: '#/components/schemas/status'
              rate:
                $ref: '#/components/schemas/rate'
              budget_hours:
                $ref: '#/components/schemas/budget_hours'
              total_hours:
                $ref: '#/components/schemas/total_hours'
              billed_hours:
                $ref: '#/components/schemas/billed_hours'
              un_billed_hours:
                $ref: '#/components/schemas/un_billed_hours'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    filter_by:
      description: 'Filter projects by any status. Allowed Values: <code>Status.All</code>, <code>Status.Active</code> and <code>Status.Inactive</code>'
      type: string
      example: Status.All
    customer_id:
      description: Search projects by customer id.
      type: string
      example: '460000000044001'
    invoice_id:
      type: string
      example: '460000000044001'
    invoice_number:
      type: string
      example: INV-00004
    reference_number:
      type: string
      example: ' '
    total:
      type: string
      example: '310.75'
    balance:
      type: string
      example: '48.75'
    sort_column:
      description: 'Sort projects. Allowed Values: <code>project_name</code>, <code>customer_name</code>, <code>rate</code> and <code>created_time</code>'
      type: string
      example: created_time
    created_time:
      type: string
      example: 2013-09-18T18:05:27+0530
    rate:
      type: number
      format: float
      example: 5000
    status:
      type: string
      example: active
    billing_type:
      description: 'The way you bill your customer. Allowed Values: <code>fixed_cost_for_project</code>, <code>based_on_project_hours</code>, <code>based_on_staff_hours</code> and <code>based_on_task_hours</code>'
      type: string
      example: fixed_cost_for_project
    description:
      type: string
      example: A simple algorithm is to be tested with vehicle detection application.
    customer_name:
      type: string
      example: SAF Instruments Inc
    project_name:
      description: Name of the project. <code>Max-length [100]</code>
      type: string
      example: REAL TIME TRAFFIC FLUX
    project_id:
      type: string
      example: '460000000044019'
    per_page:
      type: number
      format: double
      example: 450
    page:
      type: number
      format: double
      example: 10
    report_name:
      type: string
      example: Projects
    has_more_page:
      type: boolean
      example: false
    sort_order:
      type: string
      example: D
    currency_code:
      type: string
      example: USD
    budget_type:
      type: string
      example: ' '
    total_hours:
      type: string
      example: '12:26'
    has_attachment:
      type: boolean
      example: false
    billable_hours:
      type: string
      example: '12:26'
    is_billable:
      type: boolean
      example: true
    non_billable_hours:
      type: string
      example: '0.00'
    billed_hours:
      type: string
      example: '12:27'
    un_billed_hours:
      type: string
      example: '00:00'
    cost_rate:
      type: number
      format: double
      example: '10.00'
    task_id:
      type: string
      example: '460000000044009'
    task_name:
      type: string
      example: Distribution Analysis
    budget_hours:
      description: Task budget hours.
      type: string
      example: '0'
    user_id:
      description: ID of the user to be added to the project.
      type: string
      example: '460000000024003'
    is_current_user:
      type: boolean
      example: true
    user_name:
      description: Name of the user. <code>Max-length [200]</code>
      type: string
      example: John David
    email:
      description: Email of the user. <code>Max-length [100]</code>
      type: string
      example: johndavid@zilliuminc.com
    user_role:
      description: 'Role to be assigned. Allowed Values: <code>staff</code>, <code>admin</code> and <code>timesheetstaff</code>'
      type: string
      example: admin
    budget_amount:
      type: string
      example: ' '
    cost_budget_amount:
      description: Budgeted Cost to complete this project
      type: number
      format: double
      example: '1000.00'
    tasks:
      type: array
      items:
        type: string
    users:
      type: array
      items:
        type: object
        required:
          - user_id
        properties:
          user_id:
            $ref: '#/components/schemas/user_id'
    project:
      type: object
    comments:
      type: array
      items:
        type: string
    comment_id:
      type: string
      example: '460000000044027'
    commented_by_id:
      type: string
      example: '460000000024003'
    commented_by:
      type: string
      example: John David
    date_description:
      type: string
      example: 19 days ago
    time:
      type: string
      example: 6:52 PM
    date:
      type: string
      example: 6:52 PM
    due_date:
      type: string
      example: 6:52 PM
    total_amount:
      type: number
      format: double
      example: 500
    billed_amount:
      type: number
      format: double
      example: 500
    un_billed_amount:
      type: number
      format: double
      example: 0
    billable_amount:
      type: number
      format: double
      example: 500
    non_billable_amount:
      type: number
      format: double
      example: 0
    is_recurrence_associated:
      type: boolean
      example: false
    recurring_invoices:
      type: array
      items:
        type: string
    show_in_dashboard:
      type: boolean
      example: true
    task_custom_fields:
      type: string
      example: ''
    create-a-project-request:
      required:
        - project_name
        - customer_id
        - billing_type
        - user_id
      type: object
      properties:
        project_name:
          description: Name of the project. <code>Max-length [100]</code>
          type: string
          example: Network Distribution
        customer_id:
          description: ID of the customer.
          type: string
          example: '460000000044001'
        currency_id:
          type: string
          example: '460000000098001'
        description:
          description: Project description. <code>Max-length [500]</code>
          type: string
          example: Distribution for the system of intermediaries between the producer of goods and/or services and the final user
        billing_type:
          description: 'The way you bill your customer. Allowed Values: <code>fixed_cost_for_project</code>, <code>based_on_project_hours</code>, <code>based_on_staff_hours</code> and <code>based_on_task_hours</code>'
          type: string
          example: based_on_task_hours
        rate:
          description: Hourly rate for a task.
          type: string
          example: ' '
        budget_type:
          description: 'The way you budget. Allowed Values: <code>total_project_cost</code>, <code>total_project_hours</code>, <code>hours_per_task</code> and <code>hours_per_staff</code>'
          type: string
          example: ' '
        budget_hours:
          description: Task budget hours
          type: string
          example: ' '
        budget_amount:
          description: Give value, if you are estimating total project revenue budget.
          type: string
          example: ' '
        cost_budget_amount:
          description: Budgeted Cost to complete this project
          type: number
          format: double
          example: '1000.00'
        user_id:
          description: ID of the user to be added to the project.
          type: string
          example: INV-00003
        tasks:
          type: array
          items:
            type: object
            required:
              - task_name
            properties:
              task_name:
                description: Name of the task. <code>Max-length [100]</code>
                type: string
                example: INV-00003
              description:
                description: Task description. <code>Max-length [500]</code>
                type: string
                example: INV-00003
              rate:
                description: Hourly rate of a task.
                type: string
                example: INV-00003
              budget_hours:
                description: Task budgeting.
                type: string
                example: INV-00003
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                description: ID of the user to be added to the project.
                type: string
                example: INV-00003
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              status:
                $ref: '#/components/schemas/status'
              rate:
                description: Hourly rate for a task.
                type: string
                example: ' '
              budget_hours:
                description: Task budget hours
                type: string
                example: ' '
              total_hours:
                $ref: '#/components/schemas/total_hours'
              billed_hours:
                $ref: '#/components/schemas/billed_hours'
              un_billed_hours:
                $ref: '#/components/schemas/un_billed_hours'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    create-a-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The project has been created.
          readOnly: true
        project:
          $ref: '#/components/schemas/project-response'
    list-projects-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        projects:
          type: array
          items:
            type: object
            properties:
              project_id:
                $ref: '#/components/schemas/project_id'
              project_name:
                $ref: '#/components/schemas/project_name'
              customer_id:
                $ref: '#/components/schemas/customer_id'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              description:
                $ref: '#/components/schemas/description'
              status:
                $ref: '#/components/schemas/status'
              billing_type:
                $ref: '#/components/schemas/billing_type'
              rate:
                $ref: '#/components/schemas/rate'
              created_time:
                $ref: '#/components/schemas/created_time'
              has_attachment:
                $ref: '#/components/schemas/has_attachment'
              total_hours:
                $ref: '#/components/schemas/total_hours'
              billable_hours:
                $ref: '#/components/schemas/billable_hours'
        page_context:
          type: array
          items:
            type: object
            properties:
              page:
                $ref: '#/components/schemas/page'
              per_page:
                $ref: '#/components/schemas/per_page'
              report_name:
                $ref: '#/components/schemas/report_name'
              has_more_page:
                $ref: '#/components/schemas/has_more_page'
              sort_order:
                $ref: '#/components/schemas/sort_order'
              sort_column:
                $ref: '#/components/schemas/sort_column'
    update-project-request:
      required:
        - project_name
        - customer_id
        - billing_type
        - user_id
      type: object
      properties:
        project_name:
          description: Name of the project. <code>Max-length [100]</code>
          type: string
          example: Network Distribution
        customer_id:
          description: ID of the customer.
          type: string
          example: '460000000044001'
        currency_id:
          type: string
          example: '460000000098001'
        description:
          description: Project description. <code>Max-length [500]</code>
          type: string
          example: Distribution for the system of intermediaries between the producer of goods and/or services and the final user
        billing_type:
          description: 'The way you bill your customer. Allowed Values: <code>fixed_cost_for_project</code>, <code>based_on_project_hours</code>, <code>based_on_staff_hours</code> and <code>based_on_task_hours</code>'
          type: string
          example: based_on_task_hours
        rate:
          description: Hourly rate for a task.
          type: string
          example: ' '
        budget_type:
          description: 'The way you budget. Allowed Values: <code>total_project_cost</code>, <code>total_project_hours</code>, <code>hours_per_task</code> and <code>hours_per_staff</code>'
          type: string
          example: ' '
        budget_hours:
          description: Task budget hours
          type: string
          example: ' '
        budget_amount:
          description: Give value, if you are estimating total project revenue.
          type: string
          example: ' '
        cost_budget_amount:
          description: Budgeted Cost to complete this project
          type: number
          format: double
          example: '1000.00'
        user_id:
          description: ID of the user to be added to the project.
          type: string
          example: INV-00003
        tasks:
          type: array
          items:
            type: object
            required:
              - task_name
            properties:
              task_name:
                description: Name of the task. <code>Max-length [100]</code>
                type: string
                example: INV-00003
              description:
                description: Task description. <code>Max-length [500]</code>
                type: string
                example: INV-00003
              rate:
                description: Hourly rate of a task.
                type: string
                example: INV-00003
              budget_hours:
                description: Task budgeting.
                type: string
                example: INV-00003
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                description: ID of the user to be added to the project.
                type: string
                example: INV-00003
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              status:
                $ref: '#/components/schemas/status'
              rate:
                description: Hourly rate for a task.
                type: string
                example: ' '
              budget_hours:
                description: Task budget hours
                type: string
                example: ' '
              total_hours:
                $ref: '#/components/schemas/total_hours'
              billed_hours:
                $ref: '#/components/schemas/billed_hours'
              un_billed_hours:
                $ref: '#/components/schemas/un_billed_hours'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    update-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The project information has been updated.
          readOnly: true
        project:
          type: object
          properties:
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            description:
              $ref: '#/components/schemas/description'
            status:
              $ref: '#/components/schemas/status'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            rate:
              $ref: '#/components/schemas/rate'
            budget_type:
              $ref: '#/components/schemas/budget_type'
            total_hours:
              $ref: '#/components/schemas/total_hours'
            total_amount:
              $ref: '#/components/schemas/total_amount'
            billed_hours:
              $ref: '#/components/schemas/billed_hours'
            billed_amount:
              $ref: '#/components/schemas/billed_amount'
            un_billed_hours:
              $ref: '#/components/schemas/un_billed_hours'
            un_billed_amount:
              $ref: '#/components/schemas/un_billed_amount'
            billable_hours:
              $ref: '#/components/schemas/billable_hours'
            billable_amount:
              $ref: '#/components/schemas/billable_amount'
            non_billable_hours:
              $ref: '#/components/schemas/non_billable_hours'
            non_billable_amount:
              $ref: '#/components/schemas/non_billable_amount'
            cost_budget_amount:
              $ref: '#/components/schemas/cost_budget_amount'
            is_recurrence_associated:
              $ref: '#/components/schemas/is_recurrence_associated'
            recurring_invoices:
              $ref: '#/components/schemas/recurring_invoices'
            created_time:
              $ref: '#/components/schemas/created_time'
            show_in_dashboard:
              $ref: '#/components/schemas/show_in_dashboard'
            tasks:
              type: array
              items:
                type: object
                properties:
                  task_id:
                    $ref: '#/components/schemas/task_id'
                  task_name:
                    $ref: '#/components/schemas/task_name'
                  description:
                    $ref: '#/components/schemas/description'
                  rate:
                    $ref: '#/components/schemas/rate'
                  budget_hours:
                    $ref: '#/components/schemas/budget_hours'
                  total_hours:
                    $ref: '#/components/schemas/total_hours'
                  billed_hours:
                    $ref: '#/components/schemas/billed_hours'
                  un_billed_hours:
                    $ref: '#/components/schemas/un_billed_hours'
                  non_billable_hours:
                    $ref: '#/components/schemas/non_billable_hours'
                  status:
                    $ref: '#/components/schemas/status'
                  is_billable:
                    $ref: '#/components/schemas/is_billable'
                  task_custom_fields:
                    $ref: '#/components/schemas/task_custom_fields'
            users:
              type: array
              items:
                type: object
                properties:
                  user_id:
                    $ref: '#/components/schemas/user_id'
                  is_current_user:
                    $ref: '#/components/schemas/is_current_user'
                  user_name:
                    $ref: '#/components/schemas/user_name'
                  email:
                    $ref: '#/components/schemas/email'
                  user_role:
                    $ref: '#/components/schemas/user_role'
                  status:
                    $ref: '#/components/schemas/status'
                  rate:
                    $ref: '#/components/schemas/rate'
                  budget_hours:
                    $ref: '#/components/schemas/budget_hours'
                  total_hours:
                    $ref: '#/components/schemas/total_hours'
                  billed_hours:
                    $ref: '#/components/schemas/billed_hours'
                  un_billed_hours:
                    $ref: '#/components/schemas/un_billed_hours'
                  cost_rate:
                    $ref: '#/components/schemas/cost_rate'
    get-a-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        project:
          type: object
          properties:
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            description:
              $ref: '#/components/schemas/description'
            status:
              $ref: '#/components/schemas/status'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            rate:
              $ref: '#/components/schemas/rate'
            budget_type:
              $ref: '#/components/schemas/budget_type'
            total_hours:
              $ref: '#/components/schemas/total_hours'
            total_amount:
              $ref: '#/components/schemas/total_amount'
            billed_hours:
              $ref: '#/components/schemas/billed_hours'
            billed_amount:
              $ref: '#/components/schemas/billed_amount'
            un_billed_hours:
              $ref: '#/components/schemas/un_billed_hours'
            un_billed_amount:
              $ref: '#/components/schemas/un_billed_amount'
            billable_hours:
              $ref: '#/components/schemas/billable_hours'
            billable_amount:
              $ref: '#/components/schemas/billable_amount'
            non_billable_hours:
              $ref: '#/components/schemas/non_billable_hours'
            non_billable_amount:
              $ref: '#/components/schemas/non_billable_amount'
            cost_budget_amount:
              $ref: '#/components/schemas/cost_budget_amount'
            is_recurrence_associated:
              $ref: '#/components/schemas/is_recurrence_associated'
            recurring_invoices:
              $ref: '#/components/schemas/recurring_invoices'
            created_time:
              $ref: '#/components/schemas/created_time'
            show_in_dashboard:
              $ref: '#/components/schemas/show_in_dashboard'
            tasks:
              type: array
              items:
                type: object
                properties:
                  task_id:
                    $ref: '#/components/schemas/task_id'
                  task_name:
                    $ref: '#/components/schemas/task_name'
                  description:
                    $ref: '#/components/schemas/description'
                  rate:
                    $ref: '#/components/schemas/rate'
                  budget_hours:
                    $ref: '#/components/schemas/budget_hours'
                  total_hours:
                    $ref: '#/components/schemas/total_hours'
                  billed_hours:
                    $ref: '#/components/schemas/billed_hours'
                  un_billed_hours:
                    $ref: '#/components/schemas/un_billed_hours'
                  non_billable_hours:
                    $ref: '#/components/schemas/non_billable_hours'
                  status:
                    $ref: '#/components/schemas/status'
                  is_billable:
                    $ref: '#/components/schemas/is_billable'
                  task_custom_fields:
                    $ref: '#/components/schemas/task_custom_fields'
    delete-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The project has been deleted.
          readOnly: true
    activate-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The selected Projects have been marked as active.
          readOnly: true
    inactivate-a-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The selected projects have been marked as inactive.
          readOnly: true
    clone-project-request:
      required:
        - project_name
      type: object
      properties:
        project_name:
          description: Name of the project. <code>Max-length [100]</code>
          type: string
          example: Network Distribution
        description:
          description: Project description. <code>Max-length [500]</code>
          type: string
          example: Distribution for the system of intermediaries between the producer of goods and/or services and the final user
    clone-project-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Project has been cloned successfully.
          readOnly: true
        project:
          type: object
          properties:
            project_id:
              $ref: '#/components/schemas/project_id'
            project_name:
              $ref: '#/components/schemas/project_name'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            description:
              $ref: '#/components/schemas/description'
            status:
              $ref: '#/components/schemas/status'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            rate:
              $ref: '#/components/schemas/rate'
            budget_type:
              $ref: '#/components/schemas/budget_type'
            total_hours:
              $ref: '#/components/schemas/total_hours'
            total_amount:
              $ref: '#/components/schemas/total_amount'
            billed_hours:
              $ref: '#/components/schemas/billed_hours'
            billed_amount:
              $ref: '#/components/schemas/billed_amount'
            un_billed_hours:
              $ref: '#/components/schemas/un_billed_hours'
            un_billed_amount:
              $ref: '#/components/schemas/un_billed_amount'
            billable_hours:
              $ref: '#/components/schemas/billable_hours'
            billable_amount:
              $ref: '#/components/schemas/billable_amount'
            cost_budget_amount:
              $ref: '#/components/schemas/cost_budget_amount'
            non_billable_hours:
              $ref: '#/components/schemas/non_billable_hours'
            non_billable_amount:
              $ref: '#/components/schemas/non_billable_amount'
            is_recurrence_associated:
              $ref: '#/components/schemas/is_recurrence_associated'
            recurring_invoices:
              $ref: '#/components/schemas/recurring_invoices'
            created_time:
              $ref: '#/components/schemas/created_time'
            show_in_dashboard:
              $ref: '#/components/schemas/show_in_dashboard'
            tasks:
              type: array
              items:
                type: object
                properties:
                  task_id:
                    $ref: '#/components/schemas/task_id'
                  task_name:
                    $ref: '#/components/schemas/task_name'
                  description:
                    $ref: '#/components/schemas/description'
                  rate:
                    $ref: '#/components/schemas/rate'
                  budget_hours:
                    $ref: '#/components/schemas/budget_hours'
                  total_hours:
                    $ref: '#/components/schemas/total_hours'
                  billed_hours:
                    $ref: '#/components/schemas/billed_hours'
                  un_billed_hours:
                    $ref: '#/components/schemas/un_billed_hours'
                  non_billable_hours:
                    $ref: '#/components/schemas/non_billable_hours'
                  status:
                    $ref: '#/components/schemas/status'
                  is_billable:
                    $ref: '#/components/schemas/is_billable'
                  task_custom_fields:
                    $ref: '#/components/schemas/task_custom_fields'
            users:
              type: array
              items:
                type: object
                properties:
                  user_id:
                    $ref: '#/components/schemas/user_id'
                  is_current_user:
                    $ref: '#/components/schemas/is_current_user'
                  user_name:
                    $ref: '#/components/schemas/user_name'
                  email:
                    $ref: '#/components/schemas/email'
                  user_role:
                    $ref: '#/components/schemas/user_role'
                  status:
                    $ref: '#/components/schemas/status'
                  rate:
                    $ref: '#/components/schemas/rate'
                  budget_hours:
                    $ref: '#/components/schemas/budget_hours'
                  total_hours:
                    $ref: '#/components/schemas/total_hours'
                  billed_hours:
                    $ref: '#/components/schemas/billed_hours'
                  un_billed_hours:
                    $ref: '#/components/schemas/un_billed_hours'
                  cost_rate:
                    $ref: '#/components/schemas/cost_rate'
    assign-users-request:
      required:
        - cost_rate
      type: object
      properties:
        users:
          $ref: '#/components/schemas/users'
        cost_rate:
          type: number
          format: double
          example: '10.00'
    assign-users-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Users added
          readOnly: true
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                $ref: '#/components/schemas/user_id'
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              status:
                $ref: '#/components/schemas/status'
              rate:
                $ref: '#/components/schemas/rate'
              budget_hours:
                $ref: '#/components/schemas/budget_hours'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    list-users-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                $ref: '#/components/schemas/user_id'
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              status:
                $ref: '#/components/schemas/status'
              rate:
                $ref: '#/components/schemas/rate'
              budget_hours:
                $ref: '#/components/schemas/budget_hours'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    invite-user-request:
      required:
        - user_name
        - email
      type: object
      properties:
        user_name:
          $ref: '#/components/schemas/user_name'
        email:
          $ref: '#/components/schemas/email'
        user_role:
          $ref: '#/components/schemas/user_role'
        rate:
          description: Hourly rate for a task.
          type: string
          example: ' '
        budget_hours:
          $ref: '#/components/schemas/budget_hours'
        cost_rate:
          $ref: '#/components/schemas/cost_rate'
    invite-user-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The staff has been added.
          readOnly: true
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                $ref: '#/components/schemas/user_id'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    update-user-request:
      type: object
      properties:
        user_name:
          $ref: '#/components/schemas/user_name'
        user_role:
          $ref: '#/components/schemas/user_role'
        rate:
          $ref: '#/components/schemas/rate'
        budget_hours:
          $ref: '#/components/schemas/budget_hours'
        cost_rate:
          $ref: '#/components/schemas/cost_rate'
    update-user-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The staff information has been updated.
          readOnly: true
        users:
          type: array
          items:
            type: object
            properties:
              user_id:
                $ref: '#/components/schemas/user_id'
              user_name:
                $ref: '#/components/schemas/user_name'
              email:
                $ref: '#/components/schemas/email'
              user_role:
                $ref: '#/components/schemas/user_role'
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              cost_rate:
                $ref: '#/components/schemas/cost_rate'
    get-a-user-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        user:
          type: object
          properties:
            user_id:
              $ref: '#/components/schemas/user_id'
            is_current_user:
              $ref: '#/components/schemas/is_current_user'
            user_name:
              $ref: '#/components/schemas/user_name'
            email:
              $ref: '#/components/schemas/email'
            user_role:
              $ref: '#/components/schemas/user_role'
            cost_rate:
              $ref: '#/components/schemas/cost_rate'
    delete-user-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The staff has been removed
          readOnly: true
    post-comment-request:
      required:
        - description
      type: object
      properties:
        description:
          description: Project description. <code>Max-length [500]</code>
          type: string
          example: Billing based on task hours
    post-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Comments added.
          readOnly: true
        comments:
          type: array
          items:
            type: object
            properties:
              project_id:
                $ref: '#/components/schemas/project_id'
              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'
              date:
                $ref: '#/components/schemas/date'
              date_description:
                $ref: '#/components/schemas/date_description'
              time:
                $ref: '#/components/schemas/time'
    list-comments-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        comments:
          type: array
          items:
            type: object
            properties:
              comment_id:
                $ref: '#/components/schemas/comment_id'
              project_id:
                $ref: '#/components/schemas/project_id'
              description:
                $ref: '#/components/schemas/description'
              commented_by_id:
                $ref: '#/components/schemas/commented_by_id'
              commented_by:
                $ref: '#/components/schemas/commented_by'
              is_current_user:
                $ref: '#/components/schemas/is_current_user'
              date:
                $ref: '#/components/schemas/date'
              date_description:
                $ref: '#/components/schemas/date_description'
              time:
                $ref: '#/components/schemas/time'
    delete-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The comment has been deleted.
          readOnly: true
    list-invoices-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        invoices:
          type: array
          items:
            type: object
            properties:
              invoice_id:
                $ref: '#/components/schemas/invoice_id'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              status:
                $ref: '#/components/schemas/status'
              invoice_number:
                $ref: '#/components/schemas/invoice_number'
              reference_number:
                $ref: '#/components/schemas/reference_number'
              date:
                $ref: '#/components/schemas/date'
              due_date:
                $ref: '#/components/schemas/due_date'
              total:
                $ref: '#/components/schemas/total'
              balance:
                $ref: '#/components/schemas/balance'
              created_time:
                $ref: '#/components/schemas/created_time'
        page_context:
          type: object
          properties:
            page:
              $ref: '#/components/schemas/page'
            per_page:
              $ref: '#/components/schemas/per_page'
            report_name:
              $ref: '#/components/schemas/report_name'
            has_more_page:
              $ref: '#/components/schemas/has_more_page'
            sort_order:
              $ref: '#/components/schemas/sort_order'
            sort_column:
              $ref: '#/components/schemas/sort_column'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.com/oauth/v2/auth
          scopes:
            ZohoBooks.projects.CREATE: Create Projects
            ZohoBooks.projects.UPDATE: Update Projects
            ZohoBooks.projects.READ: Read Projects
            ZohoBooks.projects.DELETE: Delete Projects
