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

**List open orders**

Lists your recent orders that are still being set up or still waiting for payment. An order is included when it is from the last 14 days and has a line that is still pending or an unpaid invoice. Cancelled orders, renewals and upgrades are left out. Returns at most 5 orders, newest first. The list is not paginated. Each order has its invoice and one line per ordered item, with the item's state and the ID of what it created. For the full order, use `GET /api/v2/orders/{id}`.

### Related Endpoints

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

### Headers

- `Authorization`: Bearer $HOSTUP_API_KEY
- Scope: `read:orders`

### Request Example

```bash
curl "https://cloud.hostup.se/api/v2/me/open-orders" \
  -H "Authorization: Bearer $HOSTUP_API_KEY"
```

### Response Schema

- `openOrders` (array<object>, required): Orders still being set up or still unpaid. At most 5.
- `openOrders[].id` (string, required): The order ID (`ord_…`). Example: `ord_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `openOrders[].number` (string, required, nullable): The order number shown to the customer. Example: `1117145835`
- `openOrders[].createdAt` (string, required, nullable): When the order was placed. Example: `2026-09-15T10:12:00.000Z`
- `openOrders[].invoice` (object, required, nullable): The order's invoice. Null when the order has no invoice.
- `openOrders[].lines` (array<object>, required): One line per ordered item.
- `openOrders[].lines[].key` (string, required): Identifies the line within the order: the domain name for a domain line, otherwise a key such as `hosting:…`. Treat it as opaque. Example: `example.com`
- `openOrders[].lines[].kind` (string, required): What the line is: a domain `register` or `transfer`, `hosting` (web hosting), `vps`, an `addon` or `other`. 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): `pending`: being registered, transferred or set up. `active`: live. `failed`: could not be set up. `closed`: cancelled or ended. Example: `pending`
  Allowed values: pending, active, failed, closed
- `openOrders[].lines[].started` (boolean, required): True when work on this pending line has begun, even while the invoice is unpaid. Always false when `status` is not `pending`. Example: `false`
- `openOrders[].lines[].resource` (object, required, nullable): What the line created. Null until it exists.
- `openOrders[].lines[].attention` (string, required, nullable): Set when a domain registration or transfer failed and the customer must act. The domain's page in the client area shows what to do. Example: `null`
  Allowed values: registration_failed, transfer_failed

### Responses

#### 200 - Your open orders, newest first.
```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",
          "started": true,
          "resource": {
            "type": "domain",
            "id": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3"
          },
          "attention": null
        },
        {
          "key": "hosting:1",
          "kind": "hosting",
          "label": "Example Label",
          "status": "active",
          "started": false,
          "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 is invalid.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 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": "Rate limit exceeded. Please try again later.",
  "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"
}
```
