# List the attribution trail for a loan

`GET /lokta-lms/api/v1/loan-attribution-corrections`

Lists every change of partner for one loan, newest first.

Every change of introducer for one loan, newest first, including the change that removed its partner altogether.

**Address the trail by `loan_id`, not by an attribution id.** Correcting a loan back to Direct deletes the attribution row, so `/loan-attributions/{id}/corrections` stops resolving at exactly the moment the record of who removed the partner becomes most worth reading. This endpoint keeps answering, because the trail belongs to the loan and always did.

`from_partner` null is the first attribution of a previously-Direct loan; `to_partner` null is a correction back to Direct. Both null is impossible and is refused; a correction that changed nothing would put a reason in the audit trail for an event that never happened.

An empty list means this loan has always been Direct and nobody has ever changed that.

## Parameters
- `loan_id` (query, integer, required): Core numeric loan id

## Responses
- `default`: default response

## Example request (cURL)
```bash
curl -X GET \
  'https://default.lokta.tech/lokta-lms/api/v1/loan-attribution-corrections?loan_id={loan_id}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

Interactive: https://developer.lokta.ai/reference#operation/byLoan
