## GET /api/v2/me/open-orders

**List open orders**

Return the caller's recent orders that are still being set up: every order from the last 14 days with at least one line that is not active yet, newest first, at most 5. This is the source of the dashboard's order-progress card. Orders older than 14 days, cancelled orders, and renewal or upgrade orders (nothing new is being provisioned) are left out. Returns a bounded snapshot as `{ openOrders }`, not a paginated `data` list. Each order carries its invoice, if any, and one line per ordered item with the item's live state and the public ID of the resource it created, so a client can match lines against `GET /api/v2/domains`, `GET /api/v2/shared-hosting` and `GET /api/v2/vps`. For the single pending order that can be activated with BankID use `GET /api/v2/me/pending-orders`; for the full order use `GET /api/v2/orders/{id}`.

### Related Endpoints

- `GET /api/v2/me`: Get current account profile
- `PATCH /api/v2/me`: Update current account profile
- `GET /api/v2/me/preferences`: Get account preferences

### Headers

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

### Request Example

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

### Response Schema

- `openOrders` (array<object>, required)
- `openOrders[].id` (string, required) Example: `ord_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `openOrders[].number` (string, required, nullable): Nullable (may be null when not applicable). Example: `1117145835`
- `openOrders[].createdAt` (string, required, nullable): Nullable (may be null when not applicable). Example: `2026-09-15T10:12:00.000Z`
- `openOrders[].invoice` (object, required, nullable): Nullable (may be null when not applicable).
- `openOrders[].lines` (array<object>, required)
- `openOrders[].lines[].key` (string, required): Stable within the order: the normalized domain, or `<kind>:<line number>` for non-domain items. Example: `example.com`
- `openOrders[].lines[].kind` (string, required) Example: `transfer`
  Allowed values: transfer, register, hosting, vps, addon, other
- `openOrders[].lines[].label` (string, required): The domain, hostname or product name as the customer sees it. Example: `Example Label`
- `openOrders[].lines[].status` (string, required) Example: `pending`
  Allowed values: pending, active, failed, closed
- `openOrders[].lines[].resource` (object, required, nullable): Nullable (may be null when not applicable).
- `openOrders[].lines[].attention` (string, optional, nullable): Nullable (may be null when not applicable). Example: `null`
  Allowed values: registration_failed, transfer_failed

### Responses

#### 200 - Open-order snapshot.
```json
{
  "openOrders": [
    {
      "id": "ord_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "number": "1117145835",
      "createdAt": "2026-09-15T10:12:00.000Z",
      "invoice": {
        "id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3",
        "number": "202689534",
        "status": "paid",
        "total": 588,
        "currencyCode": "SEK",
        "dueAt": "2026-09-22T00:00:00.000Z"
      },
      "lines": [
        {
          "key": "example.com",
          "kind": "transfer",
          "label": "Example Label",
          "status": "pending",
          "resource": {
            "type": "domain",
            "id": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3"
          },
          "attention": null
        },
        {
          "key": "hosting:2",
          "kind": "hosting",
          "label": "Example Label",
          "status": "active",
          "resource": {
            "type": "account",
            "id": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3"
          },
          "attention": 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 - Not found. The resource does not exist or is not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/not_found",
  "title": "Not found",
  "status": 404,
  "detail": "The requested resource could not be found.",
  "code": "not_found",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 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"
}
```
