Skip to main content
GET
/
my-account
/
subscriptions
/
{id}
Get specific subscription details
curl --request GET \
  --url {protocol}://{host}/wp-json/cocart/preview/my-account/subscriptions/{id} \
  --header 'Authorization: Basic <encoded-value>'
{
  "subscription_number": "123",
  "parent_order": "456",
  "order": "https://example.com/wp-json/cocart/preview/my-account/orders/456",
  "subscription_status": "Active",
  "is_manual": false,
  "start_date": {
    "title": "Start date",
    "value": "December 15, 2024"
  },
  "last_order_date_created": {
    "title": "Last order date",
    "value": "December 15, 2024"
  },
  "next_payment": {
    "title": "Next payment date",
    "value": "January 15, 2025"
  },
  "end_date": {
    "title": "End date",
    "value": "N/A"
  },
  "trial_end": {
    "title": "Trial end date",
    "value": "N/A"
  },
  "payment": {
    "title": "Payment",
    "value": "Credit Card (Stripe)"
  },
  "billing_address": "John Doe, 123 Main St, Apt 4B, Anytown, CA, 12345, US",
  "shipping_address": "John Doe, 123 Main St, Apt 4B, Anytown, CA, 12345, US",
  "notes": [
    {
      "date": "December 15, 2024, 2:30pm",
      "note": "Subscription activated successfully"
    }
  ],
  "actions": {
    "suspend": {
      "url": "https://example.com/wp-json/cocart/preview/my-account/subscriptions/123/on-hold",
      "name": "Suspend"
    },
    "cancel": {
      "url": "https://example.com/wp-json/cocart/preview/my-account/subscriptions/123/cancel",
      "name": "Cancel"
    }
  }
}
This endpoint is currently shown as a preview of what’s currently in development and is subject to change.
This endpoint supports only the official WooCommerce Subscriptions extension.

Authorizations

Authorization
string
header
required

WordPress username and password

Path Parameters

id
integer
required

Unique identifier for the subscription

Query Parameters

email
string<email>

The subscription billing email address

Response

Subscription details retrieved successfully

subscription_number
string

Subscription number

Example:

"789"

parent_order
string

Parent order ID

Example:

"456"

order
string<uri>

Link to parent order

Example:

"https://example.com/wp-json/cocart/preview/my-orders/456"

subscription_status
string

Subscription status

Example:

"Active"

is_manual
boolean

Whether subscription requires manual renewal

Example:

false

start_date
object
last_order_date_created
object
next_payment
object
end_date
object
trial_end
object
payment
object
billing_address
string

Formatted billing address as comma-separated string

Example:

"John Doe, 123 Main St, Anytown, CA, 12345, US"

shipping_address
string

Formatted shipping address as comma-separated string

Example:

"John Doe, 123 Main St, Anytown, CA, 12345, US"

notes
object[]

Customer-facing subscription notes

actions
object

Available subscription actions (view, suspend, reactivate, cancel, etc.)