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
createPrinterJob(
restaurantId: ID!
input: PrinterJobInput!
): PrinterJobArguments
| Name | Type | Description |
|---|---|---|
restaurantId |
ID! |
|
input |
PrinterJobInput! |
Returns
Example
mutation CreatePrinterJob($restaurantId: ID!, $input: PrinterJobInput!) {
createPrinterJob(restaurantId: $restaurantId, input: $input) {
id
imageUrl
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { createPrinterJob(...) { __typename } }"}'