Skip to main content

generatePurchaseOrderPdf

Requires permission purchase:purchase_order:read.

Generate a PDF for a purchase order and return base64 encoded data

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation GeneratePurchaseOrderPdf($purchaseOrderId: ID!) {
generatePurchaseOrderPdf(purchaseOrderId: $purchaseOrderId)
}

Variables:

{
"purchaseOrderId": "id"
}

Response:

{
"data": {
"generatePurchaseOrderPdf": "string"
}
}
generatePurchaseOrderPdf(
purchaseOrderId: ID!
template: String
): String!

Arguments​

generatePurchaseOrderPdf.purchaseOrderId ● ID! non-null scalar​

The ID of the purchase order.

generatePurchaseOrderPdf.template ● String scalar​

The name of the PDF template to use. Omit for the default.

Type​

String scalar​

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.