Skip to main content

generateCreditNotePdf

Requires permission sales:credit_note:read.

Generate a PDF for a credit note 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 GenerateCreditNotePdf($creditNoteId: ID!) {
generateCreditNotePdf(creditNoteId: $creditNoteId)
}

Variables:

{
"creditNoteId": "id"
}

Response:

{
"data": {
"generateCreditNotePdf": "string"
}
}
generateCreditNotePdf(
creditNoteId: ID!
template: String
): String!

Arguments​

generateCreditNotePdf.creditNoteId ● ID! non-null scalar​

The ID of the credit note.

generateCreditNotePdf.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.