You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/includes/wp-api-v3/_order-actions.md
+180-8Lines changed: 180 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
The order actions API allows you to perform specific actions with existing orders like you can from the Edit Order screen in the web app.
4
4
5
-
_Note: currently only one action is available, other actions will be introduced at a later time._
5
+
_Note: currently only some actions are available, other actions will be introduced at a later time._
6
6
7
7
## Send order details to customer ##
8
8
9
-
This endpoint allows you to trigger an email to the customer with the details of their order, if the order contains a customer email address.
9
+
This endpoint allows you to trigger an email to the customer with the details of their order. In case the order doesn't yet have a billing email set, you can specify an email recipient. However, if the order does have an existing billing email, this will return an error, unless you also specify that the existing email should be overwritten by using the `force_email_update` parameter.
10
10
11
11
### HTTP request ###
12
12
@@ -19,11 +19,20 @@ This endpoint allows you to trigger an email to the customer with the details of
19
19
20
20
```shell
21
21
curl -X POST https://example.com/wp-json/wc/v3/orders/723/actions/send_order_details \
This endpoint allows you to trigger an email to a customer about the status of their order. This is similar to the [`send_order_details`](#send-order-details-to-customer) endpoint, but allows you to specify which email template to send, based on which email templates are relevant to the order. For example, an order that is on hold has the `customer_on_hold_order` template available. A completed order that also has a partial refund has both the `customer_completed_order` and `customer_refunded_order` templates available. Specifying the `customer_invoice` template is the same as using the `send_order_details` endpoint.
"message": "customer_completed_order is not a valid template for this order.",
174
+
"data": {
175
+
"status": 400
176
+
}
177
+
}
178
+
```
179
+
180
+
## Get available email templates for an order ##
181
+
182
+
This endpoint allows you to retrieve a list of email templates that are available for the specified order. You can also get this data embedded in the response for the [`orders` endpoint](#list-all-orders).
"description": "Order complete emails are sent to customers when their orders are marked completed and usually indicate that their orders have been shipped."
230
+
},
231
+
{
232
+
"id": "customer_invoice",
233
+
"title": "Order details",
234
+
"description": "Order detail emails can be sent to customers containing their order information and payment links."
0 commit comments