# Record an external filing

Source: https://amanucci.com/fr/docs/developers/api/filings/recordExternalFiling

## POST /v1/entities/{entityId}/filings/external

Record an external filing

Record an obligation filed or paid OUTSIDE the system — a payroll return the social secretariat filed, a tax prepayment the entity paid. Recorded `submitted`, `submittedVia: external`, the recorder named (the Activity row's actor): no payload, no grids, no validation, no signature, no step-up. `submitted: false` records a planned draft instead. Over a window (a month, a quarter, a fiscal-year quarter), never a period — an open VAT period stays open and reopenable. A firm seat with `filing.prepare` or `filing.sign`, or the client owner (a member is 403 `owner-required`). 422 `filing_kind_produced` for a return generated here; 409 `filing_exists` for a window already recorded.

Operation ID: `recordExternalFiling`

### 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/RecordExternalFiling"
      }
    }
  }
}
```

### Responses

#### 200 Duplicate-ok: this id already named the filing.

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

#### 201 The recorded filing.

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

#### 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"
    }
  }
}
```
