draftOrderInvoiceSend mutation
Sends an email invoice for a draft order.
Required access
write_draft_orders
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation draftOrderInvoiceSend($id: ID!) { draftOrderInvoiceSend(id: $id) {<font style="color:#1F61A0;">draftOrder</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">field</font>
<font style="color:#1F61A0;">message</font>
<font style="color:#555555;">}</font>
}
}
{
“id”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”
}
Arguments
EmailInput fields
- bcc (
[[String!]](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
Specifies any bcc recipients for the email. - body (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
Specifies the email body. - customMessage (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
Specifies a custom message to include in the email. - from (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
Specifies the email sender. - subject (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
Specifies the email subject. - to (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
Specifies the email recipient.
Return fields
- draftOrder (
[DraftOrder](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorder)
)
The draft order an invoice email is sent for. - userErrors (
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror)
)
List of errors that occurred executing the mutation.