> ## Documentation Index
> Fetch the complete documentation index at: https://developer.jtl-software.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MailPurchaseOrderCommandRequestInput

> Sends the purchase order by e-mail, as the mail channel of the template set defines it. The call returns at once with an output job; read its state with GetOutputJob. Errors: errorCode is PURCHASE_ORDER_NOT_FOUND (no purchase order with this ID); errorCode is OUTPUT_TEMPLATE_SET_NOT_FOUND (no template set with this ID); errorCode is OUTPUT_TEMPLATE_SET_DOCUMENT_TYPE_MISMATCH (the template set belongs to another document type than this document); errorCode is OUTPUT_NO_MATCHING_TEMPLATE (the template set has no template for this document and the requested channel); errorCode is OUTPUT_MAIL_RECIPIENT_MISSING (the document has no e-mail address to send to). - Request



**Kind**: `input`

## Fields

**`purchaseOrderId`**: `ID!` (required)

The ID of the purchase order.

---

**`templateSetId`**: `ID`

The template set to output with. Defaults to the standard template set of the document type. The Wawi picks the template inside the set by its own rules (language, company, customer group and so on).

---

**`idempotencyKey`**: `String`

Client-supplied idempotency key. When provided, a repeated request with the same key and payload replays the original result instead of re-executing the mutation.

