Skip to main content

orderGetPDF

Generate and retrieve a PDF document for an order.

Creates a PDF representation of the order including all order details, items, addresses, and financial information. Can generate PDF for a specific revision if revision number is provided. Uses the default order PDF template, or the document template given by templateId (see orderPdfTemplates).

Possible errors:

  • ORDER_NOT_FOUND: Order with the specified ID does not exist
  • ORDER_REVISION_NOT_FOUND_ERROR: Specified revision does not exist
  • DOCUMENT_TEMPLATE_NOT_FOUND_ERROR: The document template given by templateId does not exist
  • TEMPLATE_RENDER_ERROR: Failed to generate PDF due to template or rendering error
  • VALIDATION_ERROR: Invalid order ID or revision number provided
  • FORBIDDEN: Insufficient permissions to access order PDF
orderGetPDF(
orderId: Int!
revisionNumber: Int
templateId: String
): Base64File!

Arguments​

orderGetPDF.orderId ● Int! non-null scalar​

Unique identifier of the order to generate PDF for

orderGetPDF.revisionNumber ● Int scalar​

Optional revision number to generate PDF for specific revision

orderGetPDF.templateId ● String scalar​

Optional id of the document template to render the PDF with, see orderPdfTemplates. When omitted, the default template is used

Type​

Base64File object​