Credit notes
Explore CreditNotes endpoints in Swagger.
Overview
Think of a credit note as a voucher issued to a customer. It is a reduction that can be applied against one or multiple invoices. A credit note can either reduce the amount owed or cancel out an invoice entirely.
In the Codat system a credit note is issued to a customer's accounts receivable.
It contains details of:
- The amount of credit remaining and its status.
- Payment allocations against the payments type, in this case an invoice.
- Which customers the credit notes have been issued to.
Data model
Field | Type | Description |
---|---|---|
id | string | Identifier for the credit note, unique to the company in the accounting platform. |
creditNoteNumber | string | Friendly reference for the credit note. |
customerRef | Reference to the customer the credit note has been issued to. | |
totalAmount | decimal | Total amount of credit that has been applied to the customer's accounts receivable. |
totalDiscount | decimal | Any discounts applied to the credit note amount. |
subTotal | decimal | Value of the credit note, including discounts and excluding tax. |
totalTaxAmount | decimal | Any tax applied to the credit note amount. |
discountPercentage | decimal | Percentage rate (from 0 to 100) of discounts applied to the credit note. |
remainingCredit | decimal | Unused balance of totalAmount originally raised. |
status | string | Current state of a credit note, either:
|
issueDate | string | Date of the credit note as recorded in the accounting system. |
allocatedOnDate | string | Date on which the credit note was fully allocated. |
currency | string | Currency of the credit note. |
currencyRate | decimal | Rate between the currency of the credit note and the base currency of the company. |
lineItems | An array of CreditNoteLineItems. | |
paymentAllocations | An array of CreditNotePaymentAllocations. | |
modifiedDate | string | Date the record was last updated in the Codat system. |
sourceModifiedDate | string | Date the record was last changed in the accounting system. |
note | string | Any additional information about the credit note. Where possible, Codat links to a data field in the accounting platform that is publicly available. This means that the contents of the note field are included when a credit note is emailed from the accounting platform to the customer. |
Line items
Field | Type | Description |
---|---|---|
description | string | Friendly name of each line item. For example, the goods or service for which credit has been issued. |
unitAmount | decimal | Unit price of the goods or service. |
quantity | decimal | Number of units of the goods or service for which credit has been issued. |
discountAmount | decimal | Value of any discounts applied. |
subTotal | decimal | Amount of credit associated with the line item, including discounts but excluding tax. |
taxAmount | decimal | Amount of tax associated with the line item. |
totalAmount | decimal | Total amount of the line item, including discounts and tax. |
accountRef | Reference to the account to which the line item is linked. | |
discountPercentage | decimal | Percentage rate of any discount applied to the line item. |
taxRateRef | Reference to the tax rate to which the line item is linked. | |
itemRef | Reference to the item the line is linked to. | |
trackingCategoryRef | Reference to the tracking categories to which the line item is linked. |
Payment allocations
Field | Type | Description |
---|---|---|
payment | ||
id | string | Identifier of the allocated payment. |
note | string | Notes attached to the allocated payment. |
reference | string | Reference to the allocated payment. |
accountRef | The account that the allocated payment is made from or to. | |
currency | string | Currency the payment has been made in. |
currencyRate | decimal | Conversion rate between the currency of the allocated payment and the currency of the company. |
paidOnDate | string | The date the payment was paid. |
totalAmount | decimal | Total amount that was paid. |
allocation | ||
currency | string | The currency of the transaction. |
currencyRate | decimal | The conversion rate between the currency of the allocated payment and the currency of the transaction. |
allocatedOnDate | string | The date the payment was allocated. |
totalAmount | decimal | The total amount that has been allocated. |
Requirements for reference fields
Reference fields are only populated if the corresponding data type has been synchronised. If you see null values for these fields, please complete a new sync for the corresponding data type. For example, sync the customers data type for customerRef.
Example data
[
{
"id": "0316bd24-8a01-4a3a-a0e5-a73f14ebcbec",
"creditNoteNumber": "5239277",
"customerRef": {
"id": "b5511228-b9ef-4713-91b1-ad2cf60eadb1",
"companyName": "Tool Hire Company"
},
"totalAmount": 550,
"totalDiscount": 0,
"subTotal": 0,
"totalTaxAmount": 0,
"discountPercentage": 0,
"remainingCredit": 550,
"status": "Submitted",
"issueDate": "2018-03-28T21:28:58.249Z",
"allocatedOnDate": null,
"note": "ABC",
"currency": "USD",
"currencyRate": null,
"lineItems": [
{
"description": "Anvil10000Lb",
"unitAmount": 50,
"quantity": 10,
"discountAmount": 0,
"subTotal": 500,
"taxAmount": 50,
"totalAmount": 550,
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3",
"name": null
},
"discountPercentage": null,
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498",
"name": null
},
"itemRef": {
"id": "1",
"name": null
}
}
],
"paymentAllocations": [],
"modifiedDate": null,
"sourceModifiedDate": null,
"note": "More information available on request."
}
]
Updated about 1 month ago