# Post an entry

Source: https://amanucci.com/nl/docs/developers/api/ledger/postJournalEntry

## POST /v1/entities/{entityId}/journal-entries

Post an entry

Post a balanced entry by explicit lines — THE signed act. Propose and post run as ONE unit: you get an entry that is posted or an error, never a dangling proposal you must remember to finish. The caller must hold a signing seat on the entity — a firm accountant, or an organisation owner the firm's owner signing policy lets post (403 `signing-reserved` when the firm reserved it) — with a step-up under fifteen minutes old, and the `verification.id` of that step-up is recorded on the posted row so a reviewer can prove presence at signing years later. Idempotent end to end: `dedup_key` hashes the CONTENT of the lines, so a retry of the same entry returns the same `entryId` with `deduped: true` rather than posting twice.

Operation ID: `postJournalEntry`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/PostEntry"
      }
    }
  }
}
```

### Responses

#### 200 Duplicate-ok: this exact input had already posted.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/PostEntryResult"
    }
  }
}
```

#### 201 The posted entry.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/PostEntryResult"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 409 The world is not in the state the request assumed: a stale `expectedSeq`, or a transition already made.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
