Skip to main content

sendPurchaseOrderEmail

Requires permission purchase:purchase_order:update.

Emails a purchase order to the supplier and returns success with a message. Needs the purchase order update permission and the purchase orders feature on your plan.

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 SendPurchaseOrderEmail($purchaseOrderId: ID!, $recipientEmail: String!) {
sendPurchaseOrderEmail(
purchaseOrderId: $purchaseOrderId
recipientEmail: $recipientEmail
) {
emailActivityId
error
message
messageId
replyToAddress
success
}
}

Variables:

{
"purchaseOrderId": "id",
"recipientEmail": "string"
}

Response:

{
"data": {
"sendPurchaseOrderEmail": {
"emailActivityId": "string",
"error": "string",
"message": "string",
"messageId": "string",
"replyToAddress": "string",
"success": true
}
}
}
sendPurchaseOrderEmail(
message: String
purchaseOrderId: ID!
recipientEmail: String!
subject: String
): SendEmailResult!

Arguments​

sendPurchaseOrderEmail.message ● String scalar​

The message text. Omit for the default text.

sendPurchaseOrderEmail.purchaseOrderId ● ID! non-null scalar​

The ID of the purchase order.

sendPurchaseOrderEmail.recipientEmail ● String! non-null scalar​

The email address to send to.

sendPurchaseOrderEmail.subject ● String scalar​

The email subject. Omit for the default subject.

Type​

SendEmailResult object​

The result of sending an email.