Get domain renewal state

Return renewal state for one domain: pending renewal order or invoice, current renewal billing snapshot, renewal period, auto-renew state, days until expiry, and action gates. actions.canRenewNow is the source of truth for whether POST /api/v2/domains/{id}/actions/renew should be called. If hasPendingOrder is true and the customer wants to cancel the renewal proposal, call POST /api/v2/domains/{id}/actions/respond-to-renewal with { "accept": false }.

Domains & DNS Domains

Authentication

Required API scope: read:domains

Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.

Context

Path Parameters

id string required Example: dom_01hxa3b4c5d6e7f8g9h0j1k2m3

Public domain ID from `GET /api/v2/domains` `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Accept Example
Content-Type Example

Responses

200 Domain renewal state.
hasPendingOrder boolean · Example: false
orderId stringnull · Example: null
orderNumber stringnull · Example: null
invoiceId stringnull · Example: null
invoiceNumber stringnull · Example: null
proformaId stringnull · Example: null
invoiceStatus stringnull · Example: null
billing object
billing.amount numbernull required · Example: 159
billing.currencyCode string required · Example: SEK
billing.billingCycle string required · Example: annually
renewsFor object
renewsFor.billingCycle string · enum required · Example: annually
annually
renewsFor.months integer required · Example: 12
createdAt stringnull · Example: null
renewalInvoice null · Example: null
autoRenew booleannull · Example: true
daysUntilExpiry integernull · Example: 365
hasUpcomingRenewal boolean · Example: false
actions object
actions.canEnableAutoRenew object
actions.canEnableAutoRenew.allowed boolean required · Example: true
actions.canEnableAutoRenew.reason stringnull required · Example: null
actions.canEnableAutoRenew.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

actions.canRenewNow object
actions.canRenewNow.allowed boolean required · Example: true
actions.canRenewNow.reason stringnull required · Example: null
actions.canRenewNow.code stringnull · Example: pending_order

Machine-readable reason code when an action is blocked.

options array<object> · Example: []

Compatibility alias for integrations that still expect a renewal-options array. New clients should read `renewsFor` and `billing`.

400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Forbidden. The caller lacks a required scope or does not own the resource.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
GET https://cloud.hostup.se/api/v2/domains/{id}/renewal
For AI assistants
View as Markdown
cURL
curl -X GET "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/renewal" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Response
{
  "hasPendingOrder": true,
  "orderId": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "orderNumber": "1500276215",
  "invoiceId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "invoiceNumber": "202664206",
  "proformaId": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "invoiceStatus": "Paid",
  "billing": {
    "amount": 7,
    "currencyCode": "EUR",
    "billingCycle": "annually"
  },
  "renewsFor": {
    "billingCycle": "annually",
    "months": 12
  },
  "createdAt": "2026-04-27T12:00:00.000Z",
  "renewalInvoice": {
    "id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
    "number": "202664206",
    "amount": 7,
    "currencyCode": "EUR",
    "dueAt": "2026-05-11T23:59:59.000Z",
    "status": "paid",
    "paymentUrl": "/billing?invoice=202664206"
  },
  "autoRenew": true,
  "daysUntilExpiry": 30,
  "hasUpcomingRenewal": true,
  "actions": {
    "canEnableAutoRenew": {
      "allowed": false,
      "reason": "Auto-renew already enabled."
    },
    "canRenewNow": {
      "allowed": false,
      "reason": "Already renewed this period; next renewal available in 30 days."
    }
  }
}