For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get API key
HomeAPI Reference
HomeAPI Reference
  • Overview
    • API reference
  • API Reference
      • GETList credit notes
      • POSTCreate a credit note
      • GETGet a credit note
      • DELSoft-delete a credit note
      • PATCHUpdate a credit note
      • POSTIssue a credit note (transition draft → exposed)
Get API key
LogoLogo
API ReferenceCredit Notes

Get a credit note

||View as Markdown|
GET
https://app.lucanto.eu/api/v1/accounts/:account_id/credit_notes/:id
GET
/api/v1/accounts/:account_id/credit_notes/:id
$curl https://app.lucanto.eu/api/v1/accounts/42/credit_notes/1 \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "id": 1,
3 "type": "credit_note",
4 "status": "draft",
5 "currency": "EUR",
6 "created_at": "2024-01-15T09:30:00Z",
7 "updated_at": "2024-01-15T09:30:00Z",
8 "number": "CN2023-0001",
9 "issue_date": "2023-01-15",
10 "delivery_date": "2023-01-15",
11 "exchange_rate": "1.0000",
12 "included_in_turnover": true,
13 "reverse_charge": true,
14 "reverse_charge_text": "Reverse charge applied according to EU VAT rules.",
15 "discount_description": "Seasonal discount",
16 "discount_percentage": "10.00",
17 "discount_amount": "50.00",
18 "order_number": "ORD-2023-0456",
19 "text_opening": "Thank you for your business.",
20 "text_closing": "Please contact us if you have any questions.",
21 "footer_note": "Payment due within 30 days.",
22 "recipient_note": "Customer requested expedited processing.",
23 "internal_note": "Reviewed by accounting department.",
24 "pdf_language": "en",
25 "pdf_locale": "en_US",
26 "pdf_compact_mode": true,
27 "hide_signature": true,
28 "delivery_type": "email",
29 "sent_status": "sent",
30 "email_sent_at": "2024-01-15T09:30:00Z",
31 "seen_timestamp": "2024-01-15T09:30:00Z",
32 "purchaser_id": 101,
33 "supplier_id": 202,
34 "bank_account_id": 303,
35 "project_id": 404,
36 "document_items": [
37 {
38 "id": 1,
39 "name": "Returned Widget Model X",
40 "description": "Credit for returned defective units",
41 "order": 1,
42 "quantity": "5",
43 "measure_unit": "pcs",
44 "unit_price": "100.00",
45 "vat_rate": "21.00",
46 "discount_description": "Bulk return discount",
47 "discount_percentage": "5.00",
48 "discount_unit_price": "95.00",
49 "created_at": "2024-01-15T09:30:00Z",
50 "updated_at": "2024-01-15T09:30:00Z"
51 }
52 ],
53 "purchaser": {
54 "id": 101,
55 "registration_id": "12345678",
56 "tax_id": "CZ12345678",
57 "vat_id": "CZ12345678",
58 "vat_payer_type": "standard",
59 "vat_period": "monthly",
60 "email": "client@example.com",
61 "phone_number": "+420123456789",
62 "web": "https://clientwebsite.com",
63 "invoice_address": {
64 "id": 1001,
65 "name": "Client Company Ltd.",
66 "contact": "John Doe",
67 "street": "123 Business Rd",
68 "municipality": "Prague",
69 "postal_code": "11000",
70 "country_id": 203
71 },
72 "postal_address": {
73 "id": 1002,
74 "name": "Client Company Ltd.",
75 "contact": "John Doe",
76 "street": "123 Business Rd",
77 "municipality": "Prague",
78 "postal_code": "11000",
79 "country_id": 203
80 }
81 },
82 "supplier": {
83 "id": 202,
84 "registration_id": "87654321",
85 "tax_id": "CZ87654321",
86 "vat_id": "CZ87654321",
87 "vat_payer_type": "standard",
88 "vat_period": "monthly",
89 "email": "sales@lucanto.eu",
90 "phone_number": "+420987654321",
91 "web": "https://lucanto.eu",
92 "invoice_address": {
93 "id": 2001,
94 "name": "Lucanto s.r.o.",
95 "contact": "Accounting Dept.",
96 "street": "456 Supplier St",
97 "municipality": "Brno",
98 "postal_code": "60200",
99 "country_id": 203
100 },
101 "postal_address": {
102 "id": 2002,
103 "name": "Lucanto s.r.o.",
104 "contact": "Accounting Dept.",
105 "street": "456 Supplier St",
106 "municipality": "Brno",
107 "postal_code": "60200",
108 "country_id": 203
109 }
110 }
111}

Returns 404 if the ID belongs to a document of a different type (e.g. an invoice ID) — cross-type isolation per the Phase 2a controller-architecture decision.

Was this page helpful?
Previous

Create a credit note

Next

Soft-delete a credit note

Built with

Authentication

AuthorizationBearer

Devise JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are tracked in api_jwt_denylists.

OR
AuthorizationBearer
Lucanto API key. Three prefixes: - `lct_pat_<random><checksum>` — personal access token (owner: User) - `lct_live_<random><checksum>` — workspace token, live data - `lct_test_<random><checksum>` — workspace token, sandbox account (Phase 3) Issue keys at `/settings/api_keys` (personal) or `/:account_id/settings/api_keys` (workspace). Plaintext token is shown once and never again.

Path parameters

account_idlongRequired>=1

Workspace (account) ID. The numeric ID shown in your URLs.

idlongRequired>=1
Credit note ID

Response

OK
idlong
typeenum
Allowed values:
statusenum

Credit note lifecycle state. The same sync_payment_status! callback that derives invoice statuses also fires on credit notes (it’s on the base Document model), so the full payment-derived state set can appear here even though credit notes are not themselves a payment obligation. Practically: consumers should treat draft and exposed as the meaningful credit-note lifecycle states; the paid-family states reflect how the credit note has been applied against the source invoice’s payment allocation.

currencystring

ISO-4217 currency code.

created_atdatetime
updated_atdatetime
numberstring or null

Credit note number (formatted via number_series, e.g. ‘DOB2026-0001’). Null for drafts.

issue_datedate or null
delivery_datedate or null
exchange_ratestring or nullformat: "decimal"
included_in_turnoverboolean or null
reverse_chargeboolean or null
reverse_charge_textstring or null
discount_descriptionstring or null
discount_percentagestring or nullformat: "decimal"
discount_amountstring or nullformat: "decimal"
order_numberstring or null
text_openingstring or null
text_closingstring or null
footer_notestring or null
recipient_notestring or null
internal_notestring or null
pdf_languagestring or null
pdf_localestring or null
pdf_compact_modeboolean or null
hide_signatureboolean or null
delivery_typestring or null
sent_statusstring or null
email_sent_atdatetime or null
seen_timestampdatetime or null
purchaser_idlong or null
InvoiceAccount ID of the customer.
supplier_idlong or null
InvoiceAccount ID of the workspace's own legal entity.
bank_account_idlong or null
project_idlong or null
document_itemslist of objects
purchaserobject or null
supplierobject or null

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error

Lucanto API key. Three prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data
  • lct_test_<random><checksum> — workspace token, sandbox account (Phase 3)

Issue keys at /settings/api_keys (personal) or /:account_id/settings/api_keys (workspace). Plaintext token is shown once and never again.