# updateOpenOrder

> Required permission: RestaurantOpenOrderWrite

Source: https://docs.gastrogate.io/docs/api/mutations/updateOpenOrder

```graphql
updateOpenOrder(
  restaurantId: ID!
  openOrderId: ID!
  patch: OpenOrderPatch!
): OpenOrder
```

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `restaurantId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |
| `openOrderId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |
| `patch` | [`OpenOrderPatch`](https://docs.gastrogate.io/docs/api/types/OpenOrderPatch.md)! |  |

## Returns

[`OpenOrder`](https://docs.gastrogate.io/docs/api/types/OpenOrder.md)

## Example

```graphql
mutation UpdateOpenOrder($restaurantId: ID!, $openOrderId: ID!, $patch: OpenOrderPatch!) {
  updateOpenOrder(restaurantId: $restaurantId, openOrderId: $openOrderId, patch: $patch) {
    id
    amountCanceled
    amountMoved
    amountPaid
    amountPayable
    batchesLength
  }
}
```

```bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { updateOpenOrder(...) { __typename } }"}'
```
