# Correct an entered journal entry

`POST https://api.fiscalisto.com/v1/accounting/manual_entries/{id}`

Replaces it with what you send, with the same rules as when entering it.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | The object's id. |
| `Idempotency-Key` | header |  | Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge). |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string | yes | The journal entry's date (YYYY-MM-DD). |
| `description` | string | yes | Its description. (up to 300 characters) |
| `kind` | `adjustment`, `accrual`, `reclassification`, `other` |  | adjustment, accrual, reclassification or other. (default "adjustment") |
| `journal_type` | `journal`, `income`, `expense` |  | The journal entry type: journal, income or expense. (default "journal") |
| `reverse_next_month` | boolean |  | Only with kind accrual or adjustment: the entry reverses itself on the 1st of the following month (an accrual, for when the invoice arrives; a closing adjustment like the foreign exchange revaluation). (default false) |
| `uuid` | string or null |  | The UUID of the CFDI it relates to, if there's one. |
| `uuid_tax_id` | string or null |  | With uuid: the RFC of the other party of that CFDI. |
| `repeat_until` | string or null |  | A recurring journal entry: it repeats every month, on the same day (the last one if the date is the last of the month), until this month (YYYY-MM), up to 60 months. null: only on its date. |
| `lines` | array of object | yes | Its debits and credits: each line one or the other; debits add up the same as credits. (up to 500) |
| `lines[].account` | string | yes | The account's number in your catalog (GET /v1/accounting/accounts), for example 205-06. (up to 100 characters) |
| `lines[].debit` | number |  | The debit. (from 0 to 1000000000000; default 0) |
| `lines[].credit` | number |  | The credit. (from 0 to 1000000000000; default 0) |
| `lines[].cost_center` | string or null |  | Its cost center (ccn_…, GET /v1/cost_centers), optional: results by cost center and budgets read it. |
| `lines[].currency` | string or null |  | A line in another currency: its ISO 4217 key (USD, EUR…). With it go foreign_amount and exchange_rate, and debit or credit is their product in pesos. |
| `lines[].foreign_amount` | number or null |  | The line's amount in its currency. |
| `lines[].exchange_rate` | number or null |  | The line's exchange rate: pesos per unit of its currency. |
| `lines[].cfdi_uuid` | string or null |  | The CFDI that documents this line, apart from the entry's: that way an entry carries several. |
| `lines[].cfdi_tax_id` | string or null |  | The RFC of whoever issued or received the line's CFDI. |

Example:

```json
{
  "date": "2026-10-31",
  "description": "Ajuste de honorarios del contador de octubre",
  "kind": "adjustment",
  "lines": [
    {
      "account": "601-84",
      "debit": 4500
    },
    {
      "account": "205-06",
      "credit": 4500
    }
  ]
}
```

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const manualJournalEntry = await fiscalisto.manualEntries.update("mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e", {
  date: "2026-10-31",
  description: "Ajuste de honorarios del contador de octubre",
  kind: "adjustment",
  lines: [
    { account: "601-84", debit: 4500 },
    { account: "205-06", credit: 4500 },
  ],
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

manual_journal_entry = fiscalisto.manual_entries.update("mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e", {
    "date": "2026-10-31",
    "description": "Ajuste de honorarios del contador de octubre",
    "kind": "adjustment",
    "lines": [
        {"account": "601-84", "debit": 4500},
        {"account": "205-06", "credit": 4500},
    ],
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$manualJournalEntry = $fiscalisto->manualEntries->update('mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e', [
    'date' => '2026-10-31',
    'description' => 'Ajuste de honorarios del contador de octubre',
    'kind' => 'adjustment',
    'lines' => [
        ['account' => '601-84', 'debit' => 4500],
        [
            'account' => '205-06',
            'credit' => 4500,
        ],
    ],
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var manualJournalEntry = await fiscalisto.ManualEntries.UpdateAsync("mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e", new UpdateManualEntryParams
{
    Date = "2026-10-31",
    Description = "Ajuste de honorarios del contador de octubre",
    Kind = "adjustment",
    Lines = new()
    {
        new() { Account = "601-84", Debit = 4500 },
        new() { Account = "205-06", Credit = 4500 },
    },
}, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	manualJournalEntry, err := client.ManualEntries.Update(ctx, "mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e", &fiscalisto.UpdateManualEntryParams{
		Date:        "2026-10-31",
		Description: "Ajuste de honorarios del contador de octubre",
		Kind:        fiscalisto.String("adjustment"),
		Lines: []fiscalisto.UpdateManualEntryParamsLine{
			{Account: "601-84", Debit: fiscalisto.Float64(4500)},
			{Account: "205-06", Credit: fiscalisto.Float64(4500)},
		},
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(manualJournalEntry.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.UpdateManualEntryParams;
import com.fiscalisto.model.UpdateManualEntryParamsLine;
import java.util.List;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var manualJournalEntry = fiscalisto.manualEntries().update("mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e", new UpdateManualEntryParams()
        .setDate("2026-10-31")
        .setDescription("Ajuste de honorarios del contador de octubre")
        .setKind("adjustment")
        .setLines(List.of(
                new UpdateManualEntryParamsLine()
                        .setAccount("601-84")
                        .setDebit(4500),
                new UpdateManualEntryParamsLine()
                        .setAccount("205-06")
                        .setCredit(4500)
        )), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(manualJournalEntry.getId());
```

## Response 200

OK.

A `ManualJournalEntry` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `object` | `"manual_journal_entry"` | yes | What kind of object it is («invoice», «customer»…). |
| `issuer` | string | yes | The issuer. |
| `date` | string | yes | The journal entry's date. |
| `description` | string | yes | Its description. |
| `kind` | `adjustment`, `accrual`, `reclassification`, `other` | yes | adjustment, accrual, reclassification or other. |
| `journal_type` | `journal`, `income`, `expense` | yes | The journal entry type: journal, income or expense. |
| `reverse_next_month` | boolean | yes | true: an accrual or a closing adjustment (such as foreign exchange revaluation) that reverses on its own on day 1 of the next month. |
| `reverses_on` | string or null | yes | The day of its reversal, or null if it doesn't reverse. |
| `repeat_until` | string or null | yes | The last month (YYYY-MM) it repeats each month, or null if it is for a single date. |
| `uuid` | string or null | yes | The UUID of the CFDI it relates to, or null. |
| `uuid_tax_id` | string or null | yes | The RFC of the other party to that CFDI, or null. |
| `total` | number | yes | The sum of its debits (equal to that of its credits). |
| `lines` | array of object | yes | Its lines: the account and its debit or credit. |
| `lines[].account` | string | yes | The account number. |
| `lines[].account_name` | string | yes | The account name. |
| `lines[].grouping_code` | string | yes | Its SAT grouping code. |
| `lines[].debit` | number | yes | The debit, in pesos. |
| `lines[].credit` | number | yes | The credit, in pesos. |
| `lines[].cost_center` | string or null | yes | Its cost center (ccn_…), or null. |
| `lines[].currency` | string or null | yes | Its currency (ISO 4217) if it is another one, or null if in pesos. |
| `lines[].foreign_amount` | number or null | yes | Its amount in that currency, or null. |
| `lines[].exchange_rate` | number or null | yes | Its exchange rate, or null. |
| `lines[].cfdi_uuid` | string or null | yes | The UUID of this line's CFDI, or null. |
| `lines[].cfdi_tax_id` | string or null | yes | The RFC of the other party to that CFDI, or null. |
| `created_at` | string (date-time) or null | yes | When it was entered. |
| `updated_at` | string (date-time) or null | yes | When it last changed. |

```json
{
  "id": "mje_OufpKqnrvx9p1Yc4Wm9Qx2Lr7aZbNs3T0e",
  "object": "manual_journal_entry",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "date": "2026-10-31",
  "description": "Provisión de honorarios del contador de octubre",
  "kind": "accrual",
  "journal_type": "journal",
  "reverse_next_month": true,
  "reverses_on": "2026-11-01",
  "repeat_until": null,
  "uuid": null,
  "uuid_tax_id": null,
  "total": 5000,
  "lines": [
    {
      "account": "601-12",
      "account_name": "Honorarios a personas físicas residentes nacionales",
      "grouping_code": "601.12",
      "debit": 5000,
      "credit": 0,
      "cost_center": null,
      "currency": null,
      "foreign_amount": null,
      "exchange_rate": null,
      "cfdi_uuid": null,
      "cfdi_tax_id": null
    },
    {
      "account": "205-06",
      "account_name": "Otros acreedores diversos a corto plazo",
      "grouping_code": "205.06",
      "debit": 0,
      "credit": 5000,
      "cost_center": null,
      "currency": null,
      "foreign_amount": null,
      "exchange_rate": null,
      "cfdi_uuid": null,
      "cfdi_tax_id": null
    }
  ],
  "created_at": "2026-10-31T18:20:00-06:00",
  "updated_at": "2026-10-31T18:20:00-06:00"
}
```

## Errors

- `account_missing` (400): That account isn't in the issuer's chart of accounts: see it with GET /v1/accounting/accounts or add it with POST /v1/accounting/accounts.
- `asset_already_disposed` (400): The fixed asset was already sold or written off: undo that with DELETE /v1/accounting/fixed_assets/{id}/disposal if it was a mistake.
- `asset_not_disposed` (400): The fixed asset isn't disposed of: there's no disposal to undo.
- `bank_movement_not_bookable` (400): That movement doesn't go to the books this way: a deposit must be classified in the reconciliation as a loan, transfer, refund or interest (its invoice explains the rest), and a withdrawal marked as paid invoices or ignored goes back to pending first.
- `bank_movement_not_posted` (400): That bank movement has no journal entry: there's nothing to remove.
- `bank_movement_posted` (400): That bank movement already has its journal entry: remove it with DELETE /v1/accounting/bank_movements/{id}/post to book it to another account.
- `entry_unbalanced` (400): The journal entry doesn't balance or a line is wrong: debits must add up to the same as credits, and each line has a debit or a credit, not both. The message gives the sums.
- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.
- `period_closed` (400): That month of the books is closed: nothing dated in it can be booked, changed or deleted. Reopen it with POST /v1/accounting/closed_period to correct it.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
