CreditNote
Type: schema
Description
A rule 53 correction to a Commerce Engine-issued invoice. Issued on approved returns or cancellation of invoiced goods; payment refunds alone do not create credit notes.
TypeScript Definition
typescript
CreditNote: {{
number?: string;
/** Format: date */
issued_on?: string;
reason?: string;
/** @description Supplier, recipient, original supply location and tax heads retained when the document was issued. */
document_context?: {
[key: string]: unknown;
} | null;
lines?: ({
invoice_item_id?: number;
/** @description Which of the invoice line's tax rates this credit applies to, counted from 0 in the order of the line's tax_lines. Goods lines only. */
tax_band_index?: number;
sku?: string | null;
description?: string;
hsncode?: string | null;
/** @constant */
unit?: "NOS";
quantity?: string;
free_quantity?: string;
rate?: string;
taxable_value?: string;
tax?: string;
tax_components?: {
[key: string]: string;
};
/** @description Original discount credited separately only when the earlier invoice taxed the pre-discount value. */
discount?: string;
tax_component_rates?: {
[key: string]: string;
};
/** @enum {string} */
charge?: "shipping" | "handling";
/** @description Which of the invoice's shipping or handling charge parts this credit applies to, counted from 0 in the order of its charge_tax_lines. Charge lines only. */
charge_index?: number;
} & {
[key: string]: unknown;
})[];
taxable_value?: number;
tax?: number;
total?: number;
/** @description Retained rounding adjustment credited with a full shipment cancellation. */
round_off?: number;
/** @description Discount adjustment retained for an earlier invoice that calculated tax before discounts. Already-net taxable values are not discounted again. */
discount?: number;
};
}OpenAPI Schema
json
{
"title": "CreditNote",
"description": "A rule 53 correction to a Commerce Engine-issued invoice. Issued on approved returns or cancellation of invoiced goods; payment refunds alone do not create credit notes.",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/CreditNote",
"description": "API reference for the CreditNote schema"
},
"properties": {
"number": {
"type": "string",
"maxLength": 16
},
"issued_on": {
"type": "string",
"format": "date"
},
"reason": {
"type": "string"
},
"document_context": {
"description": "Supplier, recipient, original supply location and tax heads retained when the document was issued.",
"type": [
"object",
"null"
],
"additionalProperties": true
},
"lines": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"properties": {
"invoice_item_id": {
"type": "integer"
},
"tax_band_index": {
"description": "Which of the invoice line's tax rates this credit applies to, counted from 0 in the order of the line's tax_lines. Goods lines only.",
"type": "integer"
},
"sku": {
"type": [
"string",
"null"
]
},
"description": {
"type": "string"
},
"hsncode": {
"type": [
"string",
"null"
]
},
"unit": {
"type": "string",
"const": "NOS"
},
"quantity": {
"type": "string"
},
"free_quantity": {
"type": "string"
},
"rate": {
"type": "string"
},
"taxable_value": {
"type": "string"
},
"tax": {
"type": "string"
},
"tax_components": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"discount": {
"description": "Original discount credited separately only when the earlier invoice taxed the pre-discount value.",
"type": "string"
},
"tax_component_rates": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"charge": {
"type": "string",
"enum": [
"shipping",
"handling"
]
},
"charge_index": {
"description": "Which of the invoice's shipping or handling charge parts this credit applies to, counted from 0 in the order of its charge_tax_lines. Charge lines only.",
"type": "integer"
}
}
}
},
"taxable_value": {
"type": "number"
},
"tax": {
"type": "number"
},
"total": {
"type": "number"
},
"round_off": {
"description": "Retained rounding adjustment credited with a full shipment cancellation.",
"type": "number"
},
"discount": {
"description": "Discount adjustment retained for an earlier invoice that calculated tax before discounts. Already-net taxable values are not discounted again.",
"type": "number"
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions