Documentation is still being updated. Some content maybe unfinished.
curl --request GET \
--url {protocol}://{host}/wp-json/cocart/preview/my-account/orders \
--header 'Authorization: Basic <encoded-value>'{
"orders": [
{
"order_id": 789,
"order_status": "Completed",
"order_date": "December 15, 2024, 2:20 pm",
"item_count": 3,
"order_total": "$89.97",
"order_actions": {
"view": {
"url": "https://example.com/wp-json/cocart/preview/my-account/orders/789",
"label": "View"
}
}
},
{
"order_id": 788,
"order_status": "Processing",
"order_date": "December 10, 2024, 10:15 am",
"item_count": 1,
"order_total": "$29.99",
"order_actions": {
"view": {
"url": "https://example.com/wp-json/cocart/preview/my-account/orders/788",
"label": "View"
}
}
}
],
"pagination": {
"previous": null,
"next": "https://example.com/wp-json/cocart/preview/my-account/orders?page=2"
}
}Retrieve customer order history with pagination
A valid request URL is required to generate request examples{
"orders": [
{
"order_id": 789,
"order_status": "Completed",
"order_date": "December 15, 2024, 2:20 pm",
"item_count": 3,
"order_total": "$89.97",
"order_actions": {
"view": {
"url": "https://example.com/wp-json/cocart/preview/my-account/orders/789",
"label": "View"
}
}
},
{
"order_id": 788,
"order_status": "Processing",
"order_date": "December 10, 2024, 10:15 am",
"item_count": 1,
"order_total": "$29.99",
"order_actions": {
"view": {
"url": "https://example.com/wp-json/cocart/preview/my-account/orders/788",
"label": "View"
}
}
}
],
"pagination": {
"previous": null,
"next": "https://example.com/wp-json/cocart/preview/my-account/orders?page=2"
}
}WordPress username and password
The pagination of orders to return
1 <= x <= 100Limit amount of orders to return per page
1 <= x <= 50Order sort attribute ascending or descending
ASC, DESC Was this page helpful?