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

# UpdateReturn

> Updates the header data of an existing return - external and internal comment, contact, company, warehouse and sales channel transmission. Line items are updated via the line item endpoint. The state of the return is inferred from its line items and cannot be set directly.

If a request with this mutation's Idempotency-Key was already completed, the response's `extensions` contains an `idempotency.{responseName}` entry with `wasReplayed: true`.



**mutation** `UpdateReturn(request: UpdateReturnCommandRequestInput!): Return!`

## Arguments

**`request`**: `UpdateReturnCommandRequestInput!` (required)

## Returns

`Return!`

**`id`**: `ID!`

Unique ID to identify a return.

---

**`returnNumber`**: `String!`

The number of the return.

---

**`returnDate`**: `DateTime!`

The date when the return was created.

---

**`customerId`**: `ID!`

The customer ID.

---

**`externalNumber`**: `String!`

An arbitrary external reference number for identifying the return.

---

**`origin`**: `ReturnOrigin!`

Indicates the origin of the return, specifying where or how the return was initiated.

---

**`companyId`**: `ID!`

The company of the corresponding sales order.

---

**`salesOrderId`**: `ID!`

The ID of the sales order if the return has exactly one corresponding sales order.

---

**`stateId`**: `ID!`

The ID of the return state.

---

**`warehouseId`**: `ID!`

The ID of the warehouse.

---

**`externalComment`**: `String!`

The external comment of the return.

---

**`internalComment`**: `String!`

The internal comment of the return.

---

**`contact`**: `String!`

The contact of the return.

---

**`transmitToSalesChannel`**: `Boolean!`

Indicates whether the return should be transmitted to the sales channel.

