# createOrderIntent

> Required permission: Authenticated

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

```graphql
createOrderIntent(
  restaurantId: ID!
  input: OrderIntentInput!
): OrderIntent
```

## Arguments

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

## Returns

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

## Example

```graphql
mutation CreateOrderIntent($restaurantId: ID!, $input: OrderIntentInput!) {
  createOrderIntent(restaurantId: $restaurantId, input: $input) {
    id
    createdAt
    updatedAt
    finalizeAccessToken
    metadata
    state
  }
}
```

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