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

# Update bill line

## Field support per integration

> [accordion] Exact Online
>
> > [!NOTE]
> >
> > Please ensure the query parameter *companyId* is accurately filled with the division code.
> > You can obtain this values by using the `GET Companies` endpoints available under the Authentication section.
>
> Supported response fields:
>
> **accountId** `string` *required*
>
> **deferredEndDate** `string`
>
> Date to identify the start of the range for deferred costs. Use together with `deferredStartDate`.
>
> **deferredStartDate** `string`
>
> Date to identify the start of the range for deferred costs. Use together with `deferredEndDate`.
>
> **description** `string`
>
> **dimensions** `Dimension[]`
>
> **properties**
>
> **name** `string` *required*
>
> **categoryName** `string` *required*
>
> **taxCode** `string`
>
> **taxRatePercentage** `number`
>
> **totalNetAmount** `number`
>
> The total amount for the item excluding tax.
>
> > [!NOTE]
> >
> > When the `taxCode` is provided and is of type INCLUSIVE, then the `totalNetAmount` will be treated as a gross amount (i.e., including tax).
>
> **totalTaxAmount** `number`


## OpenAPI

````yaml put /accounting/bills/{billId}/lineItems/{lineItemId}
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/bills/{billId}/lineItems/{lineItemId}:
    put:
      tags:
        - accounting
      operationId: createBillLine
      parameters:
        - name: billId
          required: true
          in: path
          schema:
            type: string
        - name: lineItemId
          required: true
          in: path
          schema:
            type: string
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
        - name: companyId
          required: false
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBillLineItem'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BillLineItem'
                        type: object
components:
  schemas:
    CreateBillLineItem:
      type: object
      properties:
        accountId:
          type: string
          example: 6733a433-9662-4a40-8e36-e38ebda94fe1
        accountNumber:
          type: string
          example: '200'
        deferredEndDate:
          type: string
          example: '2021-06-01T00:00:00Z'
        deferredStartDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        description:
          type: string
          example: SEOUL Guest Chair, red
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/LineItemDimension'
        itemId:
          type: string
          example: 4f3a2hf4-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: '03'
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          description: Discount applied to the line item, in the document currency.
          type: number
          example: 10
        totalDiscountPercentage:
          description: Discount applied to the line item, as a percentage.
          type: number
          example: 10
        totalGrossAmount:
          description: Gross amount of the line item — net plus tax (including VAT).
          type: number
          example: 109
        totalNetAmount:
          description: Net amount of the line item — before tax (excluding VAT).
          type: number
          example: 100
        totalTaxAmount:
          description: Tax (VAT) amount of the line item.
          type: number
          example: 19
        unitAmount:
          description: Price per unit, in the document currency.
          type: number
          example: 100
        unitDiscountAmount:
          description: Discount applied per unit, in the document currency.
          type: number
          example: 10
        unitDiscountPercentage:
          description: Discount applied per unit, as a percentage.
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    BillLineItem:
      type: object
      properties:
        id:
          type: string
          example: 987a2b3c-4d5e-6f7g-8h9i-0j1k2l3m4n5o
        accountId:
          type: string
          example: 6733a433-9662-4a40-8e36-e38ebda94fe1
        accountNumber:
          type: string
          example: '200'
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        deferredEndDate:
          type: string
          example: '2021-06-01T00:00:00Z'
        deferredStartDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        description:
          type: string
          example: SEOUL Guest Chair, red
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/LineItemDimension'
        itemId:
          type: string
          example: 4f3a2hf4-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: '03'
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          description: Discount applied to the line item, in the document currency.
          type: number
          example: 10
        totalDiscountPercentage:
          description: Discount applied to the line item, as a percentage.
          type: number
          example: 10
        totalGrossAmount:
          description: Gross amount of the line item — net plus tax (including VAT).
          type: number
          example: 109
        totalNetAmount:
          description: Net amount of the line item — before tax (excluding VAT).
          type: number
          example: 100
        totalTaxAmount:
          description: Tax (VAT) amount of the line item.
          type: number
          example: 19
        unitAmount:
          description: Price per unit, in the document currency.
          type: number
          example: 100
        unitDiscountAmount:
          description: Discount applied per unit, in the document currency.
          type: number
          example: 10
        unitDiscountPercentage:
          description: Discount applied per unit, as a percentage.
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
    LineItemDimension:
      type: object
      properties:
        name:
          type: string
          example: C1
        categoryName:
          type: string
          example: CostCenter
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
        partialErrors:
          type: array
          description: >-
            Secondary operations that failed after the main operation succeeded.
            See [Partial Errors](/guides/partial-errors).
          items:
            type: object
            properties:
              code:
                type: string
                example: FILE_UPLOAD_FAILED
              message:
                type: string
                example: >-
                  Attachment invoice.pdf could not be uploaded to the target
                  system.
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.