# Accounts API

Base URL: `https://interact-uat.hsbc.com/accounts-service`

### GET /health

**Service health check**

Health/readiness probe. **Note:** this endpoint is served from the server root (e.g. `https://host:port/health`), i.e. outside the `/accounts-service/` base path shown in `servers`. No parameters and no authentication are required.

#### Responses

- **200** — Service is healthy
- **503** — Service is unavailable
- **400** — Bad request — invalid or missing parameters
- **401** — Unauthorized — authentication credentials missing or invalid
- **403** — Forbidden — insufficient permissions for this resource
- **500** — Internal server error


#### Examples

```bash
curl "https://interact-uat.hsbc.com/accounts-service/health" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```javascript
const response = await fetch("https://interact-uat.hsbc.com/accounts-service/health", {
  headers: {
      "Authorization": "Bearer YOUR_TOKEN"
  },
});

const data = await response.json();
```

```python
import requests

url = "https://interact-uat.hsbc.com/accounts-service/health"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}

response = requests.get(url, headers=headers)
print(response.json())
```

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://interact-uat.hsbc.com/accounts-service/health"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .GET()
    .build();

HttpResponse<String> response = client.send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

#### Example response

```json
{
  "isHealthy": true,
  "isAvailable": true
}
```

