# Compare mandate versions

Returns the field changes between two versions. Console session or API key with payment:read.

`GET /v1/mandates/{id}/diff`

Returns the field changes between two versions. Console session or API key with payment:read.

Requires permission `payment:read`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Mandate id (mdt_...). |
| `from` | query | no | Version to compare from (default: the active version, else the previous one). |
| `to` | query | no | Version to compare to (default: the latest version). |

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **403**: Authenticated but not allowed: missing permission, passkey step-up required, or denied by policy.
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "from": 1,
  "to": 1,
  "changes": []
}
```
