# createPrinterJob

> Render Typst source to validate it, then add one job to an active printer queue.
Success means the job was queued, not that it has been printed.

Idempotency keys are scoped to the restaurant and authenticated user. Retrying
with the same input returns the existing job, even after it has been printed.
Changing the input requires a new key. Keys remain reserved while the job exists.

Required permission: RestaurantRead

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

```graphql
createPrinterJob(
  restaurantId: ID!
  input: PrinterJobInput!
): PrinterJob
```

## Arguments

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

## Returns

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

## Example

```graphql
mutation CreatePrinterJob($restaurantId: ID!, $input: PrinterJobInput!) {
  createPrinterJob(restaurantId: $restaurantId, input: $input) {
    id
    imageUrl
  }
}
```

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