Woo orders
id: woocommerce-woo-orders-list owner: woocommerce method: GET path: /wp-json/headlesswp/v1/orders title: Woo orders usedBySite: true
GET /wp-json/headlesswp/v1/orders
Fetch the authenticated user's WooCommerce orders (including pending, failed, processing, and completed statuses).
Auth + CSRF
- Auth: cookie
- Proxy nonce required: yes.
- CSRF: proxy-enforced
X-WP-Noncefor this user-specific GET endpoint.
Request schema
No request body.
Query params:
Order status coverage:
-
pending -
failed -
processing -
completed -
page(number, optional, default1) -
perPage(number, optional, default20)
Response schema
{
"data": {
"orders": [
{
"id": 1001,
"status": "completed",
"currency": "USD",
"total": 149,
"createdAt": "2025-01-10T12:00:00Z",
"updatedAt": "2025-01-11T12:00:00Z",
"lineItems": [
{
"name": "HeadlessWP Pro Annual",
"quantity": 1,
"total": 149
}
],
"affiliateRef": "1",
"affiliateCampaign": "spring",
"affiliateReferralCreated": true,
"affiliateVisitId": 222,
"affiliateReferralId": 333,
"affiliateVisitConverted": true,
"orderAttributionSourceType": "referral",
"orderAttributionUtmSource": "affiliatewp",
"orderAttributionUtmMedium": "affiliate",
"orderAttributionUtmCampaign": "spring",
"orderAttributionUtmContent": "1",
"marketingUtmSource": "google",
"marketingUtmMedium": "cpc",
"marketingUtmCampaign": "spring-sale",
"marketingUtmContent": "hero"
}
],
"pagination": {
"page": 1,
"perPage": 20,
"total": 1,
"totalPages": 1
}
},
"meta": {
"correlationId": "string-or-null",
"correlation_id": "string-or-null",
"request_id": "string-or-null",
"timestamp": "2025-01-01T00:00:00Z"
}
}
Additive affiliate proof fields:
affiliateVisitId(number|null)affiliateReferralId(number|null)affiliateVisitConverted(boolean|null):trueonly after the Woo order reachesprocessingorcompletedand AffiliateWP referral acceptance is finalized.
Additive WooCommerce attribution proof fields:
orderAttributionSourceType(string|null)orderAttributionUtmSource(string|null)orderAttributionUtmMedium(string|null)orderAttributionUtmCampaign(string|null)orderAttributionUtmContent(string|null)
Additive marketing campaign context fields:
marketingUtmSource(string|null)marketingUtmMedium(string|null)marketingUtmCampaign(string|null)marketingUtmContent(string|null)
Attribution precedence note:
orderAttribution*fields represent Woo attribution (referral/utm/typein) and keep AffiliateWP precedence.marketingUtm*fields preserve valid checkoututm_*query context independently, including affiliate-attributed orders.
Error codes
NOT_AUTHENTICATED(401) when no valid cookie session is present.VALIDATION_FAILED(400) whenpage/perPageare invalid.