API reference

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

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

Arguments

Name Type Description
restaurantId ID!
input PrinterJobInput!

Returns

PrinterJob

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