Update draft journal entry
PUT
/v1/journal-entries/{id}Changes a draft; only the fields you send change. lines replaces all lines, and lines that do not sum to exactly zero return 400 validation_error. A draft reconciled with a bank line must keep its line on that bank account. Booked and canceled entries cannot be changed here.
Returns 409 when the entry is not a draft, when Numina's bookkeeping agent is working on it, when you send lines for a foreign-currency draft, or when you send an attachment_id and the entry is linked to an invoice, already has a different document, or the document is already on another entry.
Requires one ofjournal:writewrite:draftwrite:ledger
Path parameters
- Journal entry ID, as returned when it was created
Body
application/json
- Transaction date in YYYY-MM-DD format
- Transaction description
- Set the contact; null clears it
- linesarray of objectsReplaces all lines. Send the full set, in DKK; it must sum to exactly zero.
+Show 3 child attributesHide child attributes
- Account number in chart of accounts
- Signed amount in DKK: debit is positive, credit is negative. The lines must sum to exactly zero. With a
vat_code, the amount includes VAT and the VAT is split out when the entry is booked. - vat_codestringVAT code (e.g., 'U25' for 25% sales VAT). Stored for later calculation during booking.
- Put a document from POST /v1/attachments on this draft. To replace a document, take the current one off first. Null takes the current one off; the document itself stays.
Errors
400Invalid input or validation failed401Invalid or missing authentication403Missing scope, or the company is archived404The resource does not exist in this company409The entry cannot take this change. Retry in a few minutes if the agent is the cause.429Rate limit exceeded500Internal Server Error
Every error has the same shape. See Errors.
curl -X PUT https://api.numina.app/v1/journal-entries/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer numi_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": "2024-01-15",
"text": "Cash sale",
"contact_id": "550e8400-e29b-41d4-a716-446655440000",
"lines": [
{
"account_number": 3000,
"amount": -1000,
"vat_code": "U25"
}
],
"attachment_id": "550e8400-e29b-41d4-a716-446655440000"
}'const response = await fetch("https://api.numina.app/v1/journal-entries/550e8400-e29b-41d4-a716-446655440000", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.NUMINA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"date": "2024-01-15",
"text": "Cash sale",
"contact_id": "550e8400-e29b-41d4-a716-446655440000",
"lines": [
{
"account_number": 3000,
"amount": -1000,
"vat_code": "U25"
}
],
"attachment_id": "550e8400-e29b-41d4-a716-446655440000"
}),
});
const data = await response.json();import os
import requests
response = requests.put(
"https://api.numina.app/v1/journal-entries/550e8400-e29b-41d4-a716-446655440000",
headers={
"Authorization": f"Bearer {os.environ['NUMINA_API_KEY']}",
},
json={
"date": "2024-01-15",
"text": "Cash sale",
"contact_id": "550e8400-e29b-41d4-a716-446655440000",
"lines": [
{
"account_number": 3000,
"amount": -1000,
"vat_code": "U25"
}
],
"attachment_id": "550e8400-e29b-41d4-a716-446655440000"
},
)
data = response.json()Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"date": "2026-01-15",
"text": "Invoice payment from customer",
"status": "open",
"contact_id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2026-01-15T10:30:00Z",
"external_reference": "payroll-run-2026-01",
"lines": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"account_number": 3000,
"account_id": "550e8400-e29b-41d4-a716-446655440001",
"account_name": "Revenue",
"amount": -1000,
"text": "Invoice payment",
"vat_code": "U25",
"currency_code": "DKK",
"currency_rate": 1
}
],
"state": "draft",
"attachment": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"file_name": "string",
"status": "string",
"attachment_number": 42
}
}