latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-041351024.8 MB

21d41189c461

Credit notes

Update credit note

The Update credit note endpoint updates an existing credit note for a given company's connection.

Credit notes are issued to a customer to indicate debt, typically with reference to a previously issued invoice and/or purchase.

Integration-specific behavior

Required data may vary by integration. To see what data to post, first call Get create/update credit note model.

put/companies/{companyId}/connections/{connectionId}/push/creditNotes/{creditNoteId}

Query parameters

timeoutInMinutesinteger

Time limit for the push operation to complete before it is timed out.

forceUpdateboolean

When updating data in the destination platform Codat checks the sourceModifiedDate against the lastupdated date from the accounting software, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to true then the update will override this check.

Request body

idstring

Identifier for the credit note, unique to the company in the accounting software.

creditNoteNumberstring nullable

Friendly reference for the credit note.

customerRefAccountingCustomerRef — unresolved $ref
withholdingTaxItems[] nullable— unresolved $ref
totalAmountnumber required

Total amount of credit that has been applied to the customer's accounts receivable

totalDiscountnumber required

Any discounts applied to the credit note amount.

subTotalnumber required

Value of the credit note, including discounts and excluding tax.

additionalTaxAmountnumber

Additional tax amount applied to credit note.

additionalTaxPercentagenumber

Percentage rate of any additional tax applied to the credit note.

totalTaxAmountnumber required

Any tax applied to the credit note amount.

discountPercentagenumber required

Percentage rate (from 0 to 100) of discounts applied to the credit note.

remainingCreditnumber required

Unused balance of totalAmount originally raised.

statusCreditNoteStatus required— unresolved $ref
issueDatestring

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:

2020-10-08T22:40:50Z
2021-01-01T00:00:00

When syncing data that contains DateTime fields from Codat, make sure you support the following cases when reading time information:

  • Coordinated Universal Time (UTC): 2021-11-15T06:00:00Z
  • Unqualified local time: 2021-11-15T01:00:00
  • UTC time offsets: 2021-11-15T01:00:00-05:00

Time zones

Not all dates from Codat will contain information about time zones.
Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.

allocatedOnDatestring

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:

2020-10-08T22:40:50Z
2021-01-01T00:00:00

When syncing data that contains DateTime fields from Codat, make sure you support the following cases when reading time information:

  • Coordinated Universal Time (UTC): 2021-11-15T06:00:00Z
  • Unqualified local time: 2021-11-15T01:00:00
  • UTC time offsets: 2021-11-15T01:00:00-05:00

Time zones

Not all dates from Codat will contain information about time zones.
Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.

currencyCurrency — unresolved $ref
currencyRateCurrencyRate — unresolved $ref
lineItemsCreditNoteLineItem[] nullable— unresolved $ref
paymentAllocationsItems[] nullable— unresolved $ref

An array of payment allocations.

notestring nullable

Any additional information about the credit note. Where possible, Codat links to a data field in the accounting software that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting software to the customer.

modifiedDatestring

The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache.

Use it to identify and retrieve records that have changed since your last fetch. For example, filtering modifiedDate to today will provide new records updated in Codat today.

This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports (read more).

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>.

sourceModifiedDatestring

The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice.

It is not populated (read more) when:

  • Pulling attachments
  • The accounting software does not provide modification dates for a data type
  • A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred
  • A record has been voided. For certain platforms that soft delete records, isDeleted metadata is used to identify void records

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>.

Response

Success

changesPushOperationChange[] nullable— unresolved $ref

Contains a single entry that communicates which record has changed and the manner in which it changed.

dataType'accountTransactions' | 'balanceSheet' | 'bankAccounts' | 'bankTransactions' | 'billCreditNotes' | 'billPayments' | 'bills' | 'cashFlowStatement' | 'chartOfAccounts' | 'company' | 'creditNotes' | 'customers' | 'directCosts' | 'directIncomes' | 'invoices' | 'itemReceipts' | 'items' | 'journalEntries' | 'journals' | 'paymentMethods' | 'payments' | 'profitAndLoss' | 'purchaseOrders' | 'salesOrders' | 'suppliers' | 'taxRates' | 'trackingCategories' | 'transfers' | 'banking-accountBalances' | 'banking-accounts' | 'banking-transactionCategories' | 'banking-transactions' | 'commerce-companyInfo' | 'commerce-customers' | 'commerce-disputes' | 'commerce-locations' | 'commerce-orders' | 'commerce-paymentMethods' | 'commerce-payments' | 'commerce-productCategories' | 'commerce-products' | 'commerce-taxComponents' | 'commerce-transactions'

Available data types

companyIdSchema required— unresolved $ref
pushOperationKeystring uuid required

A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted.

dataConnectionKeySchema required— unresolved $ref
requestedOnUtcstring required

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:

2020-10-08T22:40:50Z
2021-01-01T00:00:00

When syncing data that contains DateTime fields from Codat, make sure you support the following cases when reading time information:

  • Coordinated Universal Time (UTC): 2021-11-15T06:00:00Z
  • Unqualified local time: 2021-11-15T01:00:00
  • UTC time offsets: 2021-11-15T01:00:00-05:00

Time zones

Not all dates from Codat will contain information about time zones.
Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.

completedOnUtcstring

In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:

2020-10-08T22:40:50Z
2021-01-01T00:00:00

When syncing data that contains DateTime fields from Codat, make sure you support the following cases when reading time information:

  • Coordinated Universal Time (UTC): 2021-11-15T06:00:00Z
  • Unqualified local time: 2021-11-15T01:00:00
  • UTC time offsets: 2021-11-15T01:00:00-05:00

Time zones

Not all dates from Codat will contain information about time zones.
Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.

timeoutInMinutesinteger nullable

Number of minutes the push operation must complete within before it times out.

timeoutInSecondsinteger nullable

Number of seconds the push operation must complete within before it times out.

statusPushOperationStatus required— unresolved $ref
errorMessagestring nullable

A message about the error.

validationValidation — unresolved $ref
statusCodeinteger required

Push status code.