OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Complete API → Set Batch

AI-generated

Summary

Create or update a batch in OnPrintShop using the Set Batch mutation with specified batch details.

Inputs

  • Batch ID — Numeric ID of the batch to update; set to 0 to create a new batch.
  • Input (JSON) (required) — JSON object specifying batch details including batch name, nesting size, nest width and height, print count, print and finishing instructions, front and rear print/cut filenames and image links, jobs array, and send mail flag.
  • Safe Mode — Boolean flag to block mutations in Complete API mode (optional safety).
  • Partial Response — Controls error handling when partial data is returned: fail or return partial data.
  • Return Fields Mode — Choose to return all fields or a custom selection of fields from the batch result.
  • Return Fields — Specify which fields (batch_link, batch_pdf_link, id, message, result) to return when using custom return fields mode.

Output shape

A single object representing the created or updated batch with fields such as result, message, id, batch_link, and batch_pdf_link.

The operation performs a GraphQL mutation 'setBatch' with 'batch_id' and 'input' and returns the mutation result. Errors during execution are propagated as node operation errors. If errors are returned in the response, an error is thrown. The response fields respect requested return fields and can include URLs linking to the batch or its PDF.

Links

Discussion