Get subscription - Platform API

GET /subscriptions/{id} returns one of your subscriptions. The response has the same shape as one element of GET /subscriptions.

GET https://public-api.getblock.io/api/v1/subscriptions/{id}

Parameters

ParameterTypeRequiredDescription
idstringYesPath parameter. The subscription's id.

Request Example

bashcurl https://public-api.getblock.io/api/v1/subscriptions/s-plan \
  -H "Authorization: Bearer $GETBLOCK_API_KEY"
javascriptconst subscriptionId = 's-plan';

const response = await fetch(`https://public-api.getblock.io/api/v1/subscriptions/${subscriptionId}`, {
  headers: { Authorization: `Bearer ${process.env.GETBLOCK_API_KEY}` }
});
const body = await response.json();

console.log(body.paid_until);
pythonimport os
import requests

subscription_id = "s-plan"

body = requests.get(
    f"https://public-api.getblock.io/api/v1/subscriptions/{subscription_id}",
    headers={"Authorization": f"Bearer {os.environ['GETBLOCK_API_KEY']}"},
).json()

print(body["paid_until"])

Response Example

json{
  "id": "s-plan",
  "product_type": "plan",
  "product_id": "pro",
  "status": "active",
  "period": "1m",
  "type": "regular",
  "started_at": "2026-09-01T00:00:00Z",
  "paid_until": "2026-11-01T00:00:00Z",
  "current_period_end": "2026-11-01T00:00:00Z"
}

Response Parameters

FieldTypeDescription
idstringThe subscription record, unique per subscription.
product_typestringplan, enterprise_plan, or request_package.
product_idstringThe product, such as pro for a plan.
statusstringactive and grace_period are serving; cancelled and awaiting_render are not.
periodstringBilling period, such as 1m or 12m.
typestringregular or trial.
started_at, paid_until, current_period_endstringRFC 3339 UTC times.

Use Cases

  • Check the status and renewal date of one subscription

Error Handling

HTTPCause
401Missing or invalid API key.
404No such subscription among yours. A node subscription answers 404 here too: it belongs to /dedicated or /limitless.
502A GetBlock service behind the API did not answer. Retry later.

Error bodies carry an error message and a request_id. See Errors.