> ## 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.

# Create credit note

## Field support per integration

<AccordionGroup>
  <Accordion title="Lexware Office" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/lexoffice.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=efe4da1d7b59a552d1938ec981ccbc1e" width="24" height="24" data-path="logo/lexoffice.svg">
    Supported Request Parameters:

    <ResponseField name="contactId" type="string" required />

    <ResponseField name="creditNoteDate" type="string" required>
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="creditNoteLines" type="LineItem[]" required>
      <Expandable title="properties">
        <ResponseField name="type" type="enum" required>
          Available options: `SERVICE_ITEM`, `MATERIAL`, `CUSTOM`, `TEXT`
        </ResponseField>

        <ResponseField name="itemId" type="string">
          Required if type is `SERVICE_ITEM` or `MATERIAL`
        </ResponseField>

        <ResponseField name="itemName" type="string" required />

        <ResponseField name="quantity" type="number">
          Required if type is `SERVICE_ITEM`, `MATERIAL`, or `CUSTOM`
        </ResponseField>

        <ResponseField name="unitName" type="string">
          Required if type is `SERVICE_ITEM`, `MATERIAL`, or `CUSTOM`
        </ResponseField>

        <ResponseField name="unitAmount" type="number">
          Required if type is `SERVICE_ITEM`, `MATERIAL`, or `CUSTOM`. Unit price (net or gross depending on taxRule)
        </ResponseField>

        <ResponseField name="taxRatePercentage" type="number">
          Required if type is `SERVICE_ITEM`, `MATERIAL`, or `CUSTOM`. Tax rate percentage (e.g., 19 for 19%)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="currency" type="enum" required>
      Available options (3-letter ISO 4217):
      `EUR`
    </ResponseField>

    <ResponseField name="taxRule" type="enum" required>
      Determines whether unitAmount is net or gross. For NET, TAXFREE, and most options, unitAmount is net. For GROSS, unitAmount is gross.

      Available options: `NET`, `TAXFREE`, `INTRACOMMUNITY_GOODS`, `INTRACOMMUNITY_SERVICE`, `EXPORT_SERVICE`, `EXPORT_GOODS`, `GROSS`, `CONSTRUCTION_SERVICE`
    </ResponseField>
  </Accordion>

  <Accordion title="Snelstart" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/snelstart.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=a18e70fedba8b4166ced134d0ad1b8e3" width="24" height="24" data-path="logo/snelstart.svg">
    Supported Request Parameters:

    <ResponseField name="contactId" type="string" required />

    <ResponseField name="creditNoteNumber" type="string" required />

    <ResponseField name="creditNoteLines" type="LineItem[]" required>
      <Expandable title="properties">
        <ResponseField name="itemId" type="string" required>
          Ledger account UUID.
        </ResponseField>

        <ResponseField name="totalNetAmount" type="number" required />

        <ResponseField name="description" type="string" />

        <ResponseField name="taxCode" type="enum">
          Must be provided together with `taxRatePercentage`. Available options: `Hoog`, `Laag`, `Overig`, `Geen`
        </ResponseField>

        <ResponseField name="taxRatePercentage" type="number">
          Must be provided together with `taxCode`. Tax rate percentage (e.g., 21 for 21%).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="creditNoteDate" type="string">
      ISO-8601 date format, e.g., 2024-01-01T00:00:00Z
    </ResponseField>

    <ResponseField name="reference" type="string" />

    <ResponseField name="paymentTermId" type="string">
      Number of days for payment term (0–999), e.g., `"30"` for 30 days.
    </ResponseField>
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml POST /accounting/creditNotes
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/creditNotes:
    post:
      tags:
        - accounting
      operationId: createCreditNote
      parameters:
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
          required: true
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCreditNoteRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/CreditNoteResponseDto'
components:
  schemas:
    CreateCreditNoteRequestDto:
      type: object
      properties:
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        contactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        creditNoteDate:
          type: string
          example: '2025-01-01T00:00:00Z'
        creditNoteLines:
          type: array
          items:
            $ref: '#/components/schemas/CreateCreditNoteLineItemRequestDto'
        creditNoteNumber:
          type: string
          example: PRES1000
        currency:
          type: string
          example: EUR
        paymentStatus:
          type: string
          example: PENDING
          enum:
            - NO_OPEN_ITEM
            - PENDING
            - PAID
            - PARTLY_PAID
            - CANCELED
            - PARTIAL_CANCELLATION
            - BAD_DEBT
            - DEBITED
            - CREDIT_NOTE_CLEARED
            - UNKNOWN
        paymentTermId:
          type: string
          example: '21'
        reference:
          type: string
          example: RCXF197253F
        status:
          type: string
          example: DRAFT
          enum:
            - DRAFT
            - CORRECTIVE
            - SUBMITTED
            - DOCUMENT_CREATED
            - OPEN
            - PARTIALLY_PAID
            - PAID
            - PARTIALLY_OVERDUE
            - OVERDUE
            - VOIDED
        taxRule:
          type: string
          example: NET
          enum:
            - NET
            - TAXFREE
            - INTRACOMMUNITY_GOODS
            - INTRACOMMUNITY_SERVICE
            - EXPORT_SERVICE
            - EXPORT_GOODS
            - REVERSE_CHARGE
            - GROSS
            - CONSTRUCTION_SERVICE
            - PHOTOVOLTAIC_EQUIPMENT
            - SMALL_BUSINESS_EXEMPTION
            - NON_DOMESTIC_SERVICE
            - OSS_GOODS
            - OSS_ELECTRONIC_SERVICES
            - OSS_SERVICES
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    CreditNoteResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 987a2b3c-4d5e-6f7g-8h9i-0j1k2l3m4n5o
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
        contactId:
          type: string
          example: eaa28f49-6028-4b6e-bb12-d8f6278073fc
        createdDate:
          type: string
          example: '2025-01-01T00:00:00Z'
        creditNoteDate:
          type: string
          example: '2025-01-01T00:00:00Z'
        creditNoteLines:
          type: array
          items:
            $ref: '#/components/schemas/CreditNoteLineItemResponseDto'
        creditNoteNumber:
          type: string
          example: PRES1000
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        paymentStatus:
          type: string
          example: PENDING
          enum:
            - NO_OPEN_ITEM
            - PENDING
            - PAID
            - PARTLY_PAID
            - CANCELED
            - PARTIAL_CANCELLATION
            - BAD_DEBT
            - DEBITED
            - CREDIT_NOTE_CLEARED
            - UNKNOWN
        paymentTermId:
          type: string
          example: '21'
        reference:
          type: string
          example: RCXF197253F
        status:
          type: string
          example: DRAFT
          enum:
            - DRAFT
            - CORRECTIVE
            - SUBMITTED
            - DOCUMENT_CREATED
            - OPEN
            - PARTIALLY_PAID
            - PAID
            - PARTIALLY_OVERDUE
            - OVERDUE
            - VOIDED
        taxRule:
          type: string
          example: NET
          enum:
            - NET
            - TAXFREE
            - INTRACOMMUNITY_GOODS
            - INTRACOMMUNITY_SERVICE
            - EXPORT_SERVICE
            - EXPORT_GOODS
            - REVERSE_CHARGE
            - GROSS
            - CONSTRUCTION_SERVICE
            - PHOTOVOLTAIC_EQUIPMENT
            - SMALL_BUSINESS_EXEMPTION
            - NON_DOMESTIC_SERVICE
            - OSS_GOODS
            - OSS_ELECTRONIC_SERVICES
            - OSS_SERVICES
        totalDiscountAmount:
          type: string
          example: 10
        totalDiscountPercentage:
          type: string
          example: 10
        totalGrossAmount:
          type: string
          example: 109
        totalNetAmount:
          type: string
          example: 100
        totalTaxAmount:
          type: string
          example: 19
        updatedDate:
          type: string
          example: '2025-01-01T00:00:00Z'
    Address:
      type: object
      properties:
        addressLine1:
          type: string
          example: Main street 45
        addressLine2:
          type: string
          example: 2nd floor
        city:
          type: string
          example: Berlin
        countryCode:
          type: string
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          example: DE
        postalCode:
          type: string
          example: '10243'
        type:
          type: string
          enum:
            - BILLING
            - DELIVERY
            - SELLING
          example: BILLING
    CreateCreditNoteLineItemRequestDto:
      type: object
      properties:
        id:
          type: string
          example: 9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        description:
          type: string
          example: SEOUL Guest Chair, red
        itemId:
          type: string
          example: '4271'
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: TAX19
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        type:
          type: string
          enum:
            - SERVICE_ITEM
            - MATERIAL
            - CUSTOM
            - TEXT
        unitAmount:
          type: number
          example: 100
        unitDiscountAmount:
          type: number
          example: 10
        unitDiscountPercentage:
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    CreditNoteLineItemResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 9fc4f3a2-5b8e-4d1b-8a0c-9f6e7d2f3e4b
        createdDate:
          type: string
          example: '2025-01-01T00:00:00Z'
        description:
          type: string
          example: SEOUL Guest Chair, red
        itemId:
          type: string
          example: '4271'
        itemName:
          type: string
          example: RED CHAIR
        quantity:
          type: number
          example: 1
        taxCode:
          type: string
          example: TAX19
        taxRatePercentage:
          type: number
          example: 19
        totalDiscountAmount:
          type: number
          example: 10
        totalDiscountPercentage:
          type: number
          example: 10
        totalGrossAmount:
          type: number
          example: 109
        totalNetAmount:
          type: number
          example: 100
        totalTaxAmount:
          type: number
          example: 19
        type:
          type: string
          enum:
            - SERVICE_ITEM
            - MATERIAL
            - CUSTOM
            - TEXT
          example: SERVICE_ITEM
        unitAmount:
          type: number
          example: 100
        unitDiscountAmount:
          type: number
          example: 10
        unitDiscountPercentage:
          type: number
          example: 10
        unitName:
          type: string
          example: PIECE
        updatedDate:
          type: string
          example: '2025-01-01T00:00:00Z'
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````