# removeTransferExternalRef mutation


`removeTransferExternalRef` is a GraphQL mutation of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Removes the transfer's reference in an external source on the side you name. Call it when the
record in the other system no longer stands for this transfer.

- If `side` is omitted or null, it removes the reference without a side.
- It returns `changed: false` when there was no such reference.
- Works for an archived external source too.
- The permissions and the `NOT_FOUND` errors are those of
  [`setTransferExternalRef`](/chameleoon-max/mutation/set-transfer-external-ref).

> An error whose path runs below this field does not mean the call failed: the reference was
> removed, so do not retry. See [`Mutation`](/chameleoon-max/mutations).

## Arguments

- `id`: [`UUID!`](/chameleoon-max/type/uuid) · required
- `source`: `String!` · required
- `side`: [`TransferSide`](/chameleoon-max/type/transfer-side)

## Returns

[`TransferExternalRefResult!`](/chameleoon-max/type/transfer-external-ref-result)

## Example

**Mutation**

```graphql
mutation removeTransferExternalRef($id: UUID!, $source: String!) {
  removeTransferExternalRef(id: $id, source: $source) {
    transfer {
      stockVersion
      id
      number
      status
      version
      effectiveAt
    }
    changed
  }
}
```

**Variables**

```json
{
  "id": "00000000-0000-4000-8000-000000000001",
  "source": "example"
}
```

**Response**

```json
{
  "data": {
    "removeTransferExternalRef": {
      "transfer": {
        "stockVersion": "example",
        "id": "00000000-0000-4000-8000-000000000001",
        "number": "example",
        "status": "OPEN",
        "version": 1,
        "effectiveAt": "2026-01-01T00:00:00Z"
      },
      "changed": true
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
