# finishOrder

> Required permission: RestaurantWrite

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

```graphql
finishOrder(
  restaurantId: ID!
  orderId: ID!
): Order
```

## Arguments

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

## Returns

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

## Example

```graphql
mutation FinishOrder($restaurantId: ID!, $orderId: ID!) {
  finishOrder(restaurantId: $restaurantId, orderId: $orderId) {
    id
    estimatedDeliveryTime
    grossAmount
    needsKitchenPrint
    deliveryHeroLongCode
    deliveryTime
  }
}
```

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