generateQuotePdf
Requires permission sales:quote:read.
Generate a PDF for a quote 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:
- GraphQL
- cURL
mutation GenerateQuotePdf($quoteId: ID!) {
generateQuotePdf(quoteId: $quoteId)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation GenerateQuotePdf($quoteId: ID!) {\n generateQuotePdf(quoteId: $quoteId)\n}",
"variables": {
"quoteId": "id"
}
}
EOF
Variables:
{
"quoteId": "id"
}
Response:
{
"data": {
"generateQuotePdf": "string"
}
}
generateQuotePdf(
quoteId: ID!
template: String
): String!
Arguments
generateQuotePdf.quoteId ● ID! non-null scalar
The ID of the quote.
generateQuotePdf.template ● String scalar
The PDF template: professional, modern or classic. Omit to use the organization's 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.