Skip to main content
GET
/
my-account
/
orders
Get customer orders
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"
  }
}
This endpoint is currently shown as a preview of what’s currently in development and is subject to change.

Authorizations

Authorization
string
header
required

WordPress username and password

Query Parameters

page
integer
default:1

The pagination of orders to return

Required range: 1 <= x <= 100
per_page
integer
default:10

Limit amount of orders to return per page

Required range: 1 <= x <= 50
order
enum<string>
default:DESC

Order sort attribute ascending or descending

Available options:
ASC,
DESC

Response

Orders retrieved successfully

orders
object[]

List of customer orders

pagination
object

Pagination information