API reference

createOrderIntent

Required permission: Authenticated

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

Arguments

Name Type Description
restaurantId ID!
input OrderIntentInput!

Returns

OrderIntent

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 } }"}'