Skip to main content

Order notes

The order notes API allows you to create, view, and delete individual order notes.
Order notes are added by administrators and programmatically to store data about an order, or order events.

Order note properties

AttributeTypeDescription
idintegerUnique identifier for the resource. READ-ONLY
authorstringOrder note author. READ-ONLY
date_createddate-timeThe date the order note was created, in the site's timezone. READ-ONLY
date_created_gmtdate-timeThe date the order note was created, as GMT. READ-ONLY
notestringOrder note content. MANDATORY
customer_notebooleanIf true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only. Default is false.
added_by_userbooleanIf true, this note will be attributed to the current user. If false, the note will be attributed to the system. Default is false.

Create an order note

This API helps you to create a new note for an order.

POST /wp-json/wc/v3/orders/<id>/notes
curl -X POST https://example.com/wp-json/wc/v3/orders/723/notes \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"note": "Order ok!!!"
}'

Retrieve an order note

This API lets you retrieve and view a specific note from an order.

GET /wp-json/wc/v3/orders/<id>/notes/<note_id>
curl https://example.com/wp-json/wc/v3/orders/723/notes/281 \
-u consumer_key:consumer_secret

List all order notes

This API helps you to view all the notes from an order.

GET /wp-json/wc/v3/orders/<id>/notes
curl https://example.com/wp-json/wc/v3/orders/723/notes \
-u consumer_key:consumer_secret

Available parameters

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Options: view and edit. Default is view.
typestringLimit result to customers or internal notes. Options: any, customer and internal. Default is any.

Delete an order note

This API helps you delete an order note.

DELETE /wp-json/wc/v3/orders/<id>/notes/<note_id>
curl -X DELETE https://example.com/wp-json/wc/v3/orders/723/notes/281?force=true \
-u consumer_key:consumer_secret

Available parameters

ParameterTypeDescription
forcestringRequired to be true, as resource does not support trashing.