## GET /api/v2/domains/{id}/reactivation

**Get domain reactivation availability and status**

Answer whether an expired domain in the registry restore window can be reactivated online, what it costs (reactivation fee + one-year renewal), and whether a reactivation is already in progress. Get `{id}` from `GET /api/v2/domains` `data[].id`. When `available` is true, create the reactivation invoice with `POST /api/v2/domains/{id}/actions/reactivate`. When a reactivation is already open, `available` is false and `reactivation.paymentInvoice.paymentUrl` is where the customer pays. Domains that can still be renewed normally (no restore fee) report `available: false` with `reasonCode: renewable_normally` — use the ordinary renewal flow (`POST /api/v2/domains/{id}/actions/renew`) for those instead of reactivation.

### Related Endpoints

- `GET /api/v2/domains/{id}`: Get domain details
- `PATCH /api/v2/domains/{id}`: Update domain settings
- `DELETE /api/v2/domains/{id}`: Delete domain

### Headers

- `Accept`: application/json
- `Authorization`: Bearer YOUR_API_KEY
- Required API scope: `read:domains`

### Parameters

- `id` (path, string, required): 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. Example: `dom_01hxa3b4c5d6e7f8g9h0j1k2m3`

### Request Example

```bash
curl -X GET "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/reactivation" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
```

### Response Schema

- `domainId` (string, required)
- `domainName` (string, required, nullable): Nullable (may be null when not applicable).
- `available` (boolean, required)
- `reason` (string, required, nullable): Nullable (may be null when not applicable).
- `reasonCode` (string, required, nullable): Nullable (may be null when not applicable).
  Allowed values: renewable_normally, not_openprovider, pricing_unavailable, not_restorable, restore_window_passed, already_in_progress
- `quote` (object, required, nullable): Nullable (may be null when not applicable).
- `quote.restoreFeeAmount` (number, optional)
- `quote.renewalAmount` (number, optional)
- `quote.renewalYears` (integer, optional)
- `quote.totalAmount` (number, optional)
- `quote.currencyCode` (string, optional)
- `quote.restorableUntil` (string, optional, nullable): Nullable (may be null when not applicable).
- `reactivation` (object, required, nullable): Nullable (may be null when not applicable).
- `reactivation.status` (string, optional)
  Allowed values: awaiting_payment, processing, completed, failed, cancelled
- `reactivation.createdAt` (string, optional, nullable): Nullable (may be null when not applicable).
- `reactivation.restorableUntil` (string, optional, nullable): Nullable (may be null when not applicable).
- `reactivation.renewalYears` (integer, optional)
- `reactivation.paymentInvoice` (object, optional, nullable): Nullable (may be null when not applicable).
- `reactivation.paymentInvoice.id` (string, optional)
- `reactivation.paymentInvoice.number` (string, optional, nullable): Nullable (may be null when not applicable).
- `reactivation.paymentInvoice.amount` (number, optional, nullable): Nullable (may be null when not applicable).
- `reactivation.paymentInvoice.currencyCode` (string, optional)
- `reactivation.paymentInvoice.dueAt` (string, optional, nullable): Nullable (may be null when not applicable).
- `reactivation.paymentInvoice.status` (string, optional)
- `reactivation.paymentInvoice.paymentUrl` (string, optional)

### Responses

#### 200 - Reactivation availability, quote, and latest reactivation record.
```json
{
  "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "domainName": "example.eu",
  "available": true,
  "reason": null,
  "reasonCode": null,
  "quote": {
    "restoreFeeAmount": 175,
    "renewalAmount": 169,
    "renewalYears": 1,
    "totalAmount": 344,
    "currencyCode": "SEK",
    "restorableUntil": "2026-08-30"
  },
  "reactivation": null
}
```

#### 400 - Invalid request. The response body is an RFC 7807 Problem Details document.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request body failed validation.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z",
  "errors": [
    {
      "pointer": "/items/0/domainName",
      "detail": "`domainName` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 401 - Unauthorized. Authentication is required.
```json
{
  "type": "https://developer.hostup.se/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required.",
  "code": "unauthorized",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 403 - Forbidden. The caller lacks a required scope or does not own the resource.
```json
{
  "type": "https://developer.hostup.se/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "The caller lacks a required scope or does not own the resource.",
  "code": "forbidden",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 404 - Domain not found or not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/domain_not_found",
  "title": "Domain not found",
  "status": 404,
  "detail": "The requested domain could not be found.",
  "code": "domain_not_found"
}
```

#### 429 - Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Too many requests. Retry after the limit resets.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```
