# updateReplenishmentOrder

Audience: Developer

**Served by:** [inventory](https://docs.pyck.cloud/api/services/inventory.md)

## Arguments

| Name | Type |
| --- | --- |
| `id` | ID! |
| `input` | [UpdateReplenishmentOrderInput](https://docs.pyck.cloud/api/inputs/updatereplenishmentorderinput.md)! |

## Returns

[ReplenishmentOrderOutput](https://docs.pyck.cloud/api/types/replenishmentorderoutput.md)

## Example

Updates an existing replenishment order. Supply any fields to change; omitted fields are left unchanged.

```graphql
mutation UpdateReplenishmentOrder($id: ID!, $input: UpdateReplenishmentOrderInput!) {
  updateReplenishmentOrder(id: $id, input: $input) {
    eventCount
    replenishmentOrder {
      createdAt
      createdBy
      data
      dataTypeID
      dataTypeSlug
      deletedAt
      deletedBy
      id
      supplierID
      tenantID
      updatedAt
      updatedBy
    }
    transactionID
  }
}
```

**Variables**

```json
{
  "id": "<replenishment order ID>",
  "input": {
    "supplierID": "<supplier UUID (optional)>"
  }
}
```
