---
title: "POST /salesInvoice/id/{id}/createCreditNote"
method: POST
path: "/salesInvoice/id/{id}/createCreditNote"
tags: ["salesInvoice"]
---

# POST /salesInvoice/id/{id}/createCreditNote

`POST /salesInvoice/id/{id}/createCreditNote`

## Request

- Base URL: `https://www.weclapp.com/api/nullapi/v2`
- URL: `https://www.weclapp.com/api/nullapi/v2/salesInvoice/id/{id}/createCreditNote`
- Auth: API key in header `AuthenticationToken`
- TypeScript: <https://skmtc.dev/weclapp/apis/weclapp-api/docs/salesInvoice/id/:id/createCreditNote/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Request body

- object
  - `itemIds` string[]
  - `customAttributes` CustomAttribute[]
    - `attributeDefinitionId` string
    - `booleanValue` boolean
    - `dateValue` integer
    - `entityId` string
    - `entityReferences` EntityReference[]
      - `entityId` string
      - `entityName` string
    - `numberValue` string, number
    - `selectedValueId` string
    - `selectedValues` OnlyId[]
      - `id` string
    - `stringValue` string

## Response `200`

createCreditNote response

- object
  - `result` SalesInvoice
    - `id` string
    - `version` string
    - `bookingDate` integer
    - `bookingText` string
    - `cancellationDate` integer
    - `cancellationNumber` string
    - `cancellationSlipCommissionBlock` boolean
    - `cancellationSlipCommissionSettlementDone` boolean
    - `collectiveInvoicePositionPrintType` 'ORDER_POSITION_GROUP' | 'OWN_POSITION_GROUP' | 'PERFORMANCE_RECORD_POSITION_GROUP' | 'SHIPMENT_POSITION_GROUP'
    - `commercialLanguage` string
    - `commission` string
    - `commissionBlock` boolean
    - `commissionSalesPartners` CommissionSalesPartner[]
      - `id` string
      - `version` string
      - `commissionFix` string, number
      - `commissionPercentage` string, number
      - `commissionType` 'FIX' | 'FIX_AND_MARGIN' | 'FIX_AND_REVENUE' | 'MARGIN' | 'NO_COMMISSION' | 'REVENUE', required
      - `createdDate` integer
      - `lastModifiedDate` integer
      - `salesPartnerSupplierId` string, required
    - `commissionSettlementDone` boolean
    - `cost` string, number
    - `costCenterId` string
    - `costTypeId` string
    - `createdDate` integer
    - `creatorId` string
    - `creditResetsOrderState` boolean
    - `currencyConversionDate` integer
    - `currencyConversionLocked` boolean
    - `currencyConversionRate` string, number
    - `customAttributes` CustomAttribute[]
      - `attributeDefinitionId` string
      - `booleanValue` boolean
      - `dateValue` integer
      - `entityId` string
      - `entityReferences` EntityReference[]
        - `entityId` string
        - `entityName` string
      - `numberValue` string, number
      - `selectedValueId` string
      - `selectedValues` OnlyId[]
        - `id` string
      - `stringValue` string
    - `customerHabitualExporterLetterOfIntentId` string
    - `customerId` string, required
    - `deliveryAddress` RecordAddress
      - `city` string
      - `company` string
      - `company2` string
      - `countryCode` 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AN' | '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' | 'CS' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DG' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EA' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'EU' | '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' | 'IC' | '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' | 'PS' | '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' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'UNKNOWN' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XI' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW'
      - `firstName` string
      - `globalLocationNumber` string
      - `lastName` string
      - `middleName` string
      - `phoneNumber` string
      - `postOfficeBoxCity` string
      - `postOfficeBoxNumber` string
      - `postOfficeBoxZipCode` string
      - `salutation` 'COMPANY' | 'FAMILY' | 'MR' | 'MRS' | 'NO_SALUTATION'
      - `state` string
      - `street1` string
      - `street2` string
      - `titleId` string
      - `zipcode` string
    - `deliveryDate` integer
    - `description` string
    - `directDebitFileCreated` boolean
    - `directDebitFileLatestDate` integer
    - `disableRecordEmailingRule` boolean
    - `dispatchCountryCode` 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AN' | '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' | 'CS' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DG' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EA' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'EU' | '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' | 'IC' | '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' | 'PS' | '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' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'UNKNOWN' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XI' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW'
    - `dueDate` integer
    - `dunningBlockDateUntilDate` integer
    - `dunningBlockNote` string
    - `dunningBlockState` 'BLOCKED' | 'TEMPORAL_BLOCKED' | 'UNBLOCKED'
    - `epcQrCodeReference` string
    - `factoring` boolean
    - `grossAmount` string, number
    - `grossAmountInCompanyCurrency` string, number
    - `grossAmountWithoutShippingCosts` string, number
    - `grossAmountWithoutShippingCostsInCompanyCurrency` string, number
    - `headerDiscount` string, number
    - `headerSurcharge` string, number
    - `invoiceDate` integer
    - `invoiceNumber` string
    - `lastModifiedDate` integer
    - `lastStatusChangeUserId` string
    - `netAmount` string, number
    - `netAmountInCompanyCurrency` string, number
    - `netAmountWithoutShippingCosts` string, number
    - `netAmountWithoutShippingCostsInCompanyCurrency` string, number
    - `nonStandardTaxId` string
    - `orderNumberAtCustomer` string
    - `paid` boolean
    - `paymentMethodId` string
    - `paymentStatus` 'CLEARED_WITH_CREDIT_NOTE' | 'CREDIT_NOTE_CLEARED' | 'NO_OPEN_ITEM' | 'OPEN' | 'PAID' | 'UNKNOWN', required
    - `precedingSalesInvoiceId` string
    - `pricingDate` integer
    - `quotationId` string
    - `recordAddress` RecordAddress
      - `city` string
      - `company` string
      - `company2` string
      - `countryCode` 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AN' | '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' | 'CS' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DG' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EA' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'EU' | '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' | 'IC' | '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' | 'PS' | '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' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'UNKNOWN' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XI' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW'
      - `firstName` string
      - `globalLocationNumber` string
      - `lastName` string
      - `middleName` string
      - `phoneNumber` string
      - `postOfficeBoxCity` string
      - `postOfficeBoxNumber` string
      - `postOfficeBoxZipCode` string
      - `salutation` 'COMPANY' | 'FAMILY' | 'MR' | 'MRS' | 'NO_SALUTATION'
      - `state` string
      - `street1` string
      - `street2` string
      - `titleId` string
      - `zipcode` string
    - `recordComment` string
    - `recordCommentInheritance` boolean
    - `recordCurrencyId` string, required
    - `recordEmailAddresses` EmailAddresses
      - `bccAddresses` string
      - `ccAddresses` string
      - `toAddresses` string
    - `recordFreeText` string
    - `recordFreeTextInheritance` boolean
    - `recordOpening` string
    - `recordOpeningInheritance` boolean
    - `recurringInvoiceId` string
    - `responsibleUserId` string
    - `salesChannel` string
    - `salesInvoiceItems` SalesInvoiceItem[]
      - `id` string
      - `version` string
      - `accountId` string
      - `addPageBreakBefore` boolean
      - `articleId` string
      - `commissionSalesPartners` CommissionSalesPartner[]
        - `id` string
        - `version` string
        - `commissionFix` string, number
        - `commissionPercentage` string, number
        - `commissionType` 'FIX' | 'FIX_AND_MARGIN' | 'FIX_AND_REVENUE' | 'MARGIN' | 'NO_COMMISSION' | 'REVENUE', required
        - `createdDate` integer
        - `lastModifiedDate` integer
        - `salesPartnerSupplierId` string, required
      - `contractItemId` string
      - `cost2CostCenterId` string
      - `costCenterItems` CostCenterWithDistributionPercentage[]
        - `id` string
        - `version` string
        - `costCenterId` string, required
        - `createdDate` integer
        - `distributionPercentage` string, number, required
        - `lastModifiedDate` integer
      - `costTypeId` string
      - `createdDate` integer
      - `creditedInvoiceItemId` string
      - `customAttributes` CustomAttribute[]
        - `attributeDefinitionId` string
        - `booleanValue` boolean
        - `dateValue` integer
        - `entityId` string
        - `entityReferences` EntityReference[]
          - `entityId` string
          - `entityName` string
        - `numberValue` string, number
        - `selectedValueId` string
        - `selectedValues` OnlyId[]
          - `id` string
        - `stringValue` string
      - `deliveryDate` integer
      - `description` string
      - `descriptionFixed` boolean
      - `discountPercentage` string, number
      - `grossAmount` string, number
      - `grossAmountInCompanyCurrency` string, number
      - `groupName` string
      - `itemType` 'DEFAULT' | 'FREE_TEXT' | 'SAMPLE' | 'SERVICE' | 'SERVICE_QUOTA'
      - `lastModifiedDate` integer
      - `manualQuantity` boolean
      - `manualUnitCost` boolean
      - `manualUnitPrice` boolean
      - `netAmount` string, number
      - `netAmountForStatistics` string, number
      - `netAmountForStatisticsInCompanyCurrency` string, number
      - `netAmountInCompanyCurrency` string, number
      - `note` string
      - `parentItemId` string
      - `positionNumber` integer
      - `quantity` string, number
      - `recommendedRetailPrice` string, number
      - `reductionAdditionItems` ReductionAdditionItem[]
        - `position` integer
        - `source` 'ARTICLE' | 'ARTICLE_AND_CUSTOMER' | 'ARTICLE_CATEGORY' | 'ARTICLE_CATEGORY_AND_CUSTOMER'
        - `specialPriceReduction` boolean
        - `title` string
        - `type` 'ADDITIONAL_ABS' | 'ADDITION_PERCENT' | 'REDUCTION_ABS' | 'REDUCTION_PERCENT'
        - `value` string, number
      - `salesInvoiceItemRelationships` SalesInvoiceItemRelationship[]
        - `performanceRecordItemId` string
        - `quantity` string, number
        - `salesOrderItemId` string
        - `shipmentItemId` string
      - `serialNumbers` string[]
      - `servicePeriodFrom` integer
      - `servicePeriodTo` integer
      - `shippingDate` integer
      - `taxId` string
      - `title` string
      - `unitCost` string, number
      - `unitCostInCompanyCurrency` string, number
      - `unitId` string
      - `unitPrice` string, number
      - `unitPriceInCompanyCurrency` string, number
    - `salesInvoiceType` 'ADVANCE_PAYMENT_INVOICE' | 'CREDIT_NOTE' | 'FINAL_INVOICE' | 'PART_PAYMENT_INVOICE' | 'PREPAYMENT_INVOICE' | 'RETAIL_INVOICE' | 'STANDARD_INVOICE'
    - `salesOrderId` string
    - `salesOrders` OnlyId[]
      - `id` string
    - `sentToRecipient` boolean
    - `sepaDirectDebitMandateId` string
    - `servicePeriodFrom` integer
    - `servicePeriodTo` integer
    - `shipmentMethodId` string
    - `shippingCostItems` SalesInvoiceShippingCostItem[]
      - `id` string
      - `version` string
      - `articleId` string
      - `createdDate` integer
      - `discountPercentage` string, number
      - `grossAmount` string, number
      - `grossAmountInCompanyCurrency` string, number
      - `lastModifiedDate` integer
      - `manualUnitCost` boolean
      - `manualUnitPrice` boolean
      - `netAmount` string, number
      - `netAmountInCompanyCurrency` string, number
      - `reductionAdditionItems` ReductionAdditionItem[]
        - `position` integer
        - `source` 'ARTICLE' | 'ARTICLE_AND_CUSTOMER' | 'ARTICLE_CATEGORY' | 'ARTICLE_CATEGORY_AND_CUSTOMER'
        - `specialPriceReduction` boolean
        - `title` string
        - `type` 'ADDITIONAL_ABS' | 'ADDITION_PERCENT' | 'REDUCTION_ABS' | 'REDUCTION_PERCENT'
        - `value` string, number
      - `taxId` string
      - `unitCost` string, number
      - `unitCostInCompanyCurrency` string, number
      - `unitPrice` string, number
      - `unitPriceInCompanyCurrency` string, number
    - `shippingDate` integer
    - `status` 'CANCELLED' | 'DOCUMENT_CREATED' | 'ENTRY_COMPLETED' | 'NEW' | 'OPEN_ITEM_CREATED', required
    - `statusHistory` SalesInvoiceStatusHistory[]
      - `status` 'CANCELLED' | 'DOCUMENT_CREATED' | 'ENTRY_COMPLETED' | 'NEW' | 'OPEN_ITEM_CREATED'
      - `statusDate` integer
      - `userId` string
    - `tags` string[]
    - `termOfPaymentId` string
    - `vatAmount` string, number
    - `vatAmountInCompanyCurrency` string, number
    - `vatRegistrationNumber` string

## Other responses

- `default`: error response

---

[API](https://skmtc.dev/weclapp/apis/weclapp-api.md) - [All operations](https://skmtc.dev/weclapp/apis/weclapp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/weclapp/apis/weclapp-api/revisions/0e021229755d?raw)
