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

# Create Invoice items

> Create a new invoice item with detailed product information, pricing, taxes, and period specifications.



## OpenAPI

````yaml POST /v1/invoice-items
openapi: 3.1.0
info:
  title: Well Document API
  version: 1.0.0
  description: API for uploading and managing financial documents in the Well platform
servers:
  - url: https://api.wellapp.ai
security: []
paths:
  /v1/invoice-items:
    post:
      summary: Create an invoice item
      description: >-
        Create a new invoice item with detailed product information, pricing,
        taxes, and period specifications.
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceItemPost'
            example:
              type: invoice_item
              attributes:
                line_id: '1'
                sku: WM-1001
                name: Wireless Mouse
                description: Ergonomic wireless mouse with USB receiver
                unit_price: 25
                currency: EUR
                unit: EA
                min_quantity: 1
                max_quantity: 500
                tax:
                  rate: 20
                  category: standard
                  scheme: VAT
                period:
                  start: '2025-06-26'
                  end: '2025-06-27'
              relationships:
                invoices:
                  data:
                    - type: invoice
                      id: invoice1
      responses:
        '201':
          description: Invoice item created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceItem'
              example:
                data:
                  type: invoice_item
                  id: item_001
                  attributes:
                    line_id: '1'
                    sku: WM-1001
                    name: Wireless Mouse
                    description: Ergonomic wireless mouse with USB receiver
                    unit_price: 25
                    currency: EUR
                    unit: EA
                    min_quantity: 1
                    max_quantity: 500
                    tax:
                      rate: 20
                      category: standard
                      scheme: VAT
                    period:
                      start: '2025-06-26'
                      end: '2025-06-27'
                    created_at: '2025-05-11T13:42:12Z'
                    updated_at: '2025-05-11T13:45:20Z'
                  relationships:
                    invoices:
                      data:
                        - type: invoice
                          id: invoice1
                    medias:
                      data:
                        - type: media
                          id: media-1
                included:
                  - type: invoice
                    id: invoice1
                    attributes:
                      reference_number: INV-2025-001
                      document_type: commercial_invoice
                      document_type_code: '380'
                      issue_date: '2025-01-15'
                      due_date: '2025-02-15'
                      local_currency: EUR
                      local_totals:
                        subtotal: '1000.00'
                        tax_total: '200.00'
                        total_amount: '1200.00'
                      terms: Payment due within 30 days
                      billing_context: subscription
                      payment_status:
                        paid: false
                        amount_paid: 0
                        amount_remaining: 1200
                      status: draft
                      description: Professional services invoice for January 2025
                      created_at: '2025-01-15T10:30:00Z'
                      updated_at: '2025-01-15T10:30:00Z'
                  - type: media
                    id: media-1
                    attributes:
                      media_type: logo
                      is_primary: true
                      url: >-
                        https://cdn.example.com/product-images/wireless-mouse.jpg
                      created_at: '2025-05-11T13:00:00Z'
                      updated_at: '2025-05-11T13:00:00Z'
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      description: Bearer token for authentication
  schemas:
    InvoiceItemPost:
      type: object
      description: Request schema for creating invoice items
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: invoice_item
              description: Resource type identifier
            attributes:
              $ref: '#/components/schemas/InvoiceItemsCreateAttributes'
            relationships:
              $ref: '#/components/schemas/InvoiceItemsCreateRelationsShip'
          required:
            - type
            - attributes
      required:
        - data
    InvoiceItem:
      type: object
      description: Response schema for invoice items
      properties:
        type:
          type: string
          const: invoice_item
          description: Resource type identifier
        id:
          type: string
          format: uuid
          description: Unique identifier for the invoice item
        attributes:
          $ref: '#/components/schemas/InvoiceItemsAttributes'
        relationships:
          type: object
          properties:
            invoices:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        const: invoice
                      id:
                        type: string
                        format: uuid
              description: Related invoices
            medias:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        const: media
                      id:
                        type: string
                        format: uuid
              description: Related media files
    BadRequestError:
      type: object
      properties:
        code:
          type: string
          example: SCHEMA_VALIDATION_ERROR
          description: Error code identifier
        status:
          type: integer
          example: 400
          description: HTTP status code
        title:
          type: string
          example: Validation Error
          description: Error title
        message:
          type: string
          example: The request is invalid
          description: Detailed error message
        details:
          type: array
          items:
            type: object
            properties:
              instancePath:
                type: string
                description: Path to the invalid field in the request
              schemaPath:
                type: string
                description: Path to the validation rule in the schema
              keyword:
                type: string
                description: Validation keyword that failed
              params:
                type: object
                description: Parameters related to the validation failure
              message:
                type: string
                description: Human-readable validation error message
          description: Array of detailed validation errors
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    UnauthorizedError:
      type: object
      properties:
        code:
          type: string
          example: UNAUTHORIZED
          description: Error code identifier
        status:
          type: integer
          example: 401
          description: HTTP status code
        title:
          type: string
          example: Unauthorized
          description: Error title
        message:
          type: string
          example: You are not authorized to access this resource
          description: Detailed error message
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    InvoiceItemsCreateAttributes:
      type: object
      properties:
        line_id:
          type: string
          description: Line identifier within the invoice
          example: '1'
        sku:
          type: string
          description: Stock Keeping Unit identifier
          example: WM-1001
        name:
          type: string
          description: Product or service name
          example: Wireless Mouse
        description:
          type: string
          description: Detailed description of the item
          example: Ergonomic wireless mouse with USB receiver
        unit_price:
          type: number
          format: decimal
          minimum: 0
          description: Unit price in local currency
          example: 25
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: ISO 4217 currency code
          example: EUR
        unit:
          type: string
          enum:
            - EA
            - HUR
            - KGM
            - ...
          description: >-
            Unit of measurement. See [all available
            units](/enums/invoice-line-unit) for complete list.
          example: EA
        min_quantity:
          type: integer
          minimum: 0
          description: Minimum quantity allowed
          example: 1
        max_quantity:
          type: integer
          minimum: 1
          description: Maximum quantity allowed
          example: 500
        tax:
          type: object
          properties:
            rate:
              type: number
              format: decimal
              minimum: 0
              maximum: 100
              description: Tax rate as percentage
              example: 20
            category:
              type: string
              enum:
                - standard
                - reduced
                - exempt
                - ...
              description: >-
                Tax category classification. See [all tax
                categories](/enums/tax-cat) for complete list.
              example: standard
            scheme:
              type: string
              enum:
                - VAT
                - EU_VAT
                - UK_VAT
                - ...
              description: >-
                Tax scheme classification. See [all tax
                schemes](/enums/tax-scheme) for complete list.
              example: VAT
        period:
          type: object
          properties:
            start:
              type: string
              format: date
              description: Service period start date
              example: '2025-06-26'
            end:
              type: string
              format: date
              description: Service period end date
              example: '2025-06-27'
      required:
        - line_id
        - name
        - unit_price
        - currency
    InvoiceItemsCreateRelationsShip:
      type: object
      properties:
        invoices:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: invoice
                  id:
                    type: string
                    format: uuid
                required:
                  - type
                  - id
        medias:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    format: uuid
                required:
                  - type
                  - id
    InvoiceItemsAttributes:
      type: object
      properties:
        line_id:
          type: string
          description: Line identifier within the invoice
          example: '1'
        sku:
          type: string
          description: Stock Keeping Unit identifier
          example: WM-1001
        name:
          type: string
          description: Product or service name
          example: Wireless Mouse
        description:
          type: string
          description: Detailed description of the item
          example: Ergonomic wireless mouse with USB receiver
        unit_price:
          type: number
          format: decimal
          minimum: 0
          description: Unit price in local currency
          example: 25
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: ISO 4217 currency code
          example: EUR
        unit:
          type: string
          description: Unit of measurement
          example: EA
        min_quantity:
          type: integer
          minimum: 0
          description: Minimum quantity allowed
          example: 1
        max_quantity:
          type: integer
          minimum: 1
          description: Maximum quantity allowed
          example: 500
        tax:
          type: object
          properties:
            rate:
              type: number
              format: decimal
              minimum: 0
              maximum: 100
              description: Tax rate as percentage
              example: 20
            category:
              type: string
              description: Tax category
              example: standard
            scheme:
              type: string
              description: Tax scheme identifier
              example: VAT
        period:
          type: object
          properties:
            start:
              type: string
              format: date
              description: Service period start date
              example: '2025-06-26'
            end:
              type: string
              format: date
              description: Service period end date
              example: '2025-06-27'
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2025-05-11T13:42:12Z'
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2025-05-11T13:45:20Z'

````