> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetoinvoice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate invoice

> Generate an invoice for a client.

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml /bundled/invoices.yaml POST /clients/{client_id}/invoices
openapi: 3.0.3
info:
  title: NeetoInvoice APIs
  version: 2.0.0
servers:
  - description: NeetoInvoice APIs
    url: https://{your-subdomain}.neetoinvoice.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
paths:
  /clients/{client_id}/invoices:
    post:
      tags:
        - Invoices
      summary: Generate an invoice
      description: Generate an invoice for a client.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/client_id_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invoice_request'
      responses:
        '201':
          description: Created - Invoice created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoice_response'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    client_id_param:
      in: path
      name: client_id
      description: >-
        Unique ID of the client for which you want to retrieve or update
        details. Refer to [Getting the Client
        ID](/getting-started/getting-client-id) section for detailed
        instructions.
      required: true
      schema:
        type: string
      example: a8b90a464cad12b48e45
  schemas:
    invoice_request:
      allOf:
        - type: object
          required:
            - email
            - number
            - total
          properties:
            email:
              type: string
              format: email
              description: Email of the person creating the invoice.
              example: john@example.com
            number:
              type: string
              description: Invoice identifier.
              example: INV-EXT-001
            total:
              type: number
              format: float
              description: Total amount of the invoice.
              example: 500
            issue_date:
              type: string
              description: Issue date of the invoice in MM/DD/YYYY format.
              example: 12/25/2023
            due_date:
              type: string
              description: Due date of the invoice in MM/DD/YYYY format.
              example: 01/25/2024
            due_date_period:
              type: number
              description: Due date period for the invoice in days.
              example: 30
            interval:
              type: string
              description: Billing interval for the invoice.
              example: monthly
            notes:
              type: string
              description: Additional notes for the invoice.
              example: 'Payment terms: Net 30 days'
            include_hours_by_person:
              type: boolean
              description: Whether to include hours breakdown by person.
              example: true
            include_hours_by_task:
              type: boolean
              description: Whether to include hours breakdown by task.
              example: false
            include_time_entries:
              type: boolean
              description: Whether to include detailed time entries.
              example: true
            send_automated_reminder_email:
              type: boolean
              description: Whether to send automated reminder emails.
              example: true
            include_payment_link:
              type: boolean
              description: Whether to include payment link in the invoice.
              example: true
            payment_provider:
              type: string
              description: Payment provider for the invoice.
              enum:
                - stripe
                - undefined
              example: undefined
            display_task_name:
              type: boolean
              description: Whether to display task names in the invoice.
              example: true
            display_person_name:
              type: boolean
              description: Whether to display person names in the invoice.
              example: true
            display_date:
              type: boolean
              description: Whether to display dates in the invoice.
              example: true
            display_note:
              type: boolean
              description: Whether to display notes in the invoice.
              example: true
            display_project_name:
              type: boolean
              description: Whether to display project names in the invoice.
              example: false
            project_id:
              type: array
              description: >-
                Projects on which the invoice is to be generated. Refer to
                [Getting the Project ID](/getting-started/getting-project-id)
                section for detailed instructions.
              items:
                type: string
              example:
                - 89d1b47d9f36af3c9ecf
                - 24e6a2fe31bb686c541a
            send_email:
              type: boolean
              description: >-
                Whether to send the invoice via email. If true, invoice_details
                is required.
              example: true
            invoice_details:
              type: object
              description: >-
                Email details for sending the invoice. Required when send_email
                is true.
              properties:
                subject:
                  type: string
                  description: Email subject for the invoice.
                  example: Invoice INV-EXT-001 from Your Company
                message:
                  type: string
                  description: Email message for the invoice.
                  example: Please find attached your invoice for the services rendered.
                attach_pdf_invoice:
                  type: string
                  description: Whether to attach PDF invoice.
                  enum:
                    - 'true'
                    - 'false'
                  example: 'true'
                send_me_a_copy:
                  type: string
                  description: Whether to send a copy to the sender.
                  enum:
                    - 'true'
                    - 'false'
                  example: 'false'
                recipient_ids:
                  type: array
                  description: >-
                    Array of recipient IDs for email delivery. Refer to [Getting
                    the Recipient ID](/getting-started/getting-recipient-id)
                    section for detailed instructions.
                  items:
                    type: string
                    format: uuid
                  example:
                    - 128c1dfc-b29f-4fda-9a05-8a90e197b81b
                    - 6be815a8-9a10-455c-95d9-b0b548664420
            tax_details:
              type: array
              description: Array of tax details for the invoice.
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of the tax.
                    example: GST
                  percentage:
                    type: number
                    description: Tax percentage.
                    example: 10
                  notes:
                    type: string
                    description: Notes for the tax.
                    example: Goods and Services Tax
                  selected:
                    type: boolean
                    description: Whether the tax is selected for the invoice.
                    example: true
        - oneOf:
            - title: Time Entries
              type: object
              required:
                - invoice_time_entries
              properties:
                invoice_time_entries:
                  type: array
                  description: Array of time entries to include in the invoice.
                  items:
                    type: object
                    required:
                      - time_entry_id
                      - project_id
                      - task_id
                      - user_id
                    properties:
                      time_entry_id:
                        type: string
                        format: uuid
                        description: >-
                          ID of the time entry. Refer to [Getting the Time Entry
                          ID](/getting-started/getting-time-entry-id) section
                          for detailed instructions.
                        example: 128c1dfc-b29f-4fda-9a05-8a90e197b81b
                      project_id:
                        type: string
                        description: Unique ID of the project.
                        example: f627c399-379d-4d07-a6f6-90b7c9470ac0
                      task_id:
                        $ref: '#/components/schemas/task_id_field'
                      user_id:
                        type: string
                        format: uuid
                        description: >-
                          User ID for this time entry. Refer to [Getting the
                          User ID](/getting-started/getting-user-id) section for
                          detailed instructions.
                        example: 5a2de667-243b-4da3-b090-b698a03d98da
                      notes:
                        type: string
                        description: Notes for the time entry.
                        example: Working on feature implementation
                      hours:
                        type: number
                        format: float
                        description: Hours worked.
                        example: 2.5
                      hourly_rate:
                        type: number
                        format: float
                        description: Hourly rate for this time entry.
                        example: 50
            - title: Services
              type: object
              required:
                - invoice_services
              properties:
                invoice_services:
                  type: array
                  description: Array of services to include in the invoice.
                  items:
                    type: object
                    properties:
                      notes:
                        type: string
                        description: Notes for this service.
                        example: Test Service
                      quantity:
                        type: number
                        description: Quantity of the service.
                        example: 1
                      unit_amount:
                        type: number
                        format: float
                        description: Unit amount for the service.
                        example: 500
                      project_id:
                        type: string
                        description: Project identifier for this service.
                        example: 3f0c0f87-ddc7-45f4-ad7a-c3690fa04963
                      file:
                        type: string
                        description: File attachment for the service.
                        nullable: true
    invoice_response:
      type: object
      properties:
        invoice:
          type: object
          properties:
            id:
              type: string
              format: uuid
            number:
              type: string
            total:
              type: number
              format: float
            status:
              type: string
            issue_date:
              type: string
              format: date
            due_date:
              type: string
              format: date
            notes:
              type: string
            client_id:
              type: string
              format: uuid
            organization_id:
              type: string
              format: uuid
            created_at:
              $ref: '#/components/schemas/date_time_field'
            updated_at:
              $ref: '#/components/schemas/date_time_field'
    task_id_field:
      type: string
      format: uuid
      description: >-
        Unique ID of the task. Refer to [Getting the Task
        ID](/getting-started/getting-task-id) section for detailed instructions.
      example: 4d0d7ad1-91ce-44d0-abfe-6718422716dd
    date_time_field:
      type: string
      format: date-time

````