> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capcells.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Record a cession

> Record that the loan was sold: one cut-off date, and everything yours stops at it.

A cession records that the Loan left your book on the **cut-off** — the one date the body states. The Loan reports `ceded` from it; charging, quoting and every further fact stop at it; and the debt goes on being owed, to somebody else. [Selling a loan](/lending/cession) carries what stops, what the cut-off may not be, and what running the sale leaves to you.

The body names no buyer and no price: the Platform models no assignee. A counterparty you want on record goes in `context`.

## Path parameters

<ParamField path="tenant_id" type="string" required>
  The Tenancy acting.
</ParamField>

<ParamField path="loan_id" type="string" required>
  The Loan. Another Tenancy's and one that never existed are both `404`.
</ParamField>

## Body

<ParamField body="on" type="string" required>
  The cut-off: the day the Loan stopped being yours to service. Yours to state, never read from a clock.
</ParamField>

<ParamField body="reference" type="string" required>
  Your name for the act, in the one act namespace of the Tenancy.
</ParamField>

<ParamField body="actor" type="string" required>
  Whoever acted, your own reference.
</ParamField>

<ParamField body="basis" type="string" required>
  Why, in your words.
</ParamField>

<ParamField body="context" type="object">
  Stored, echoed beside the fact, read by nothing — where the deal and the buyer go, if you want them on record.
</ParamField>

## Response

`201` with [the whole Loan](/api-reference/loans/read): `state` reads `ceded`, and the listing row carries `ceded_on` beside it. Retry `200`; a differing body under the recorded `reference`, `409` `reference_reused`.

While the cession stands it is the only fact the Loan admits retracting; money reported against the Loan after the cut-off's value date is refused `409` `cession_in_force`.

## Refusals

| Condition | Status and code | What clears it |
| - | - | - |
| A fact still in force falls on or after the cut-off | <Badge color="orange">422</Badge> `invalid_event` | State a later cut-off, or retract that fact |
| The Loan is `cancelled` | <Badge color="orange">422</Badge> `invalid_event` | Nothing — a Loan that never began has nothing to sell |
| A cession already stands | <Badge color="red">409</Badge> `already_ceded` | Retract it — a second sale would disagree about the day the Loan left |

A `written_off` Loan is ordinary to sell — a sold book is mostly a charged-off book. The Loan reads `ceded`, the write-off stays among its facts, and its cost goes on being reported.

<RequestExample>
  ```bash Record a cession theme={null}
  BODY='{
    "on": "2026-04-15",
    "reference": "cession-0001",
    "actor": "ops-0007",
    "basis": "portfolio sale, tranche 3",
    "context": { "deal": "2026-Q2-A" }
  }'

  curl -X POST "https://api.capcells.com/v1/tenants/$TENANT_ID/loans/$LOAN_ID/cession" \
    -H "Authorization: $(capcells_sign "$CAPCELLS_API_KEY" POST "/v1/tenants/$TENANT_ID/loans/$LOAN_ID/cession" "$BODY")" \
    -H "Content-Type: application/json" \
    -d "$BODY"
  ```
</RequestExample>

<ResponseExample>
  ```json 201, the recorded event theme={null}
  {
    "state": "ceded",
    "events": [
      { "id": "…0001", "kind": "issued", "occurred_on": "2026-03-02", "recorded_at": "2026-08-31T11:27:14.548589Z" },
      {
        "id": "…0002",
        "kind": "ceded",
        "occurred_on": "2026-04-15",
        "recorded_at": "2026-08-31T11:27:14.679093Z",
        "act": {
          "reference": "cession-0001",
          "actor": "ops-0007",
          "basis": "portfolio sale, tranche 3",
          "context": { "deal": "2026-Q2-A" }
        }
      }
    ],
    "anomalies": [],
    …
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.