> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onnucleus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Authenticate and perform your first core banking operations in 5 minutes.

This guide walks you through executing your first authenticated API requests against the Nucleus Core Banking engine.

## Prerequisites

1. **Base URL:** `https://api.onnucleus.com/nucleus/api/v1` (or `https://localhost:8443/nucleus/api/v1` locally)
2. **Tenant Identifier:** Your institution's slug, e.g. `pilot-mfb`
3. **Credentials:** Basic Auth username/password or API key issued by your core banking administrator

***

## Step 1: Health & Connectivity

Before making authenticated calls, verify engine connectivity:

<CodeGroup>
  ```bash cURL theme={null}
  curl -k -s https://localhost:8443/nucleus/actuator/health
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://localhost:8443/nucleus/actuator/health");
  const data = await res.json();
  console.log(data); // { status: "UP" }
  ```

  ```python Python theme={null}
  import urllib.request, json, ssl

  ctx = ssl.create_default_context()
  ctx.check_hostname = False
  ctx.verify_mode = ssl.CERT_NONE

  resp = urllib.request.urlopen("https://localhost:8443/nucleus/actuator/health", context=ctx)
  print(json.loads(resp.read().decode()))
  ```
</CodeGroup>

***

## Step 2: Authenticate and Inspect Permissions

Authenticate against your tenant to receive your session key and assigned permission matrix:

```bash theme={null}
curl -k -X POST "https://localhost:8443/nucleus/api/v1/authentication?tenantIdentifier=pilot-mfb" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "superadmin.pilot-mfb",
    "password": "YourSecurePassword123!"
  }'
```

### Sample Response:

```json theme={null}
{
  "username": "superadmin.pilot-mfb",
  "userId": 4,
  "base64EncodedAuthenticationKey": "c3VwZXJhZG1pbi5waWxvdC1tZmI6WW91clNlY3VyZVBhc3N3b3JkMTIzIQ==",
  "authenticated": true,
  "officeId": 1,
  "officeName": "Head Office",
  "roles": [
    { "id": 1, "name": "Super user" }
  ],
  "permissions": ["ALL_FUNCTIONS"]
}
```

***

## Step 3: Fetch Branch Hierarchy

Every operational transaction must originate from a valid operating branch:

```bash theme={null}
curl -k -s "https://localhost:8443/nucleus/api/v1/offices?tenantIdentifier=pilot-mfb" \
  -H "Authorization: Basic c3VwZXJhZG1pbi5waWxvdC1tZmI6WW91clNlY3VyZVBhc3N3b3JkMTIzIQ==" \
  -H "Nucleus-Platform-TenantId: pilot-mfb"
```

```json theme={null}
[
  {
    "id": 1,
    "name": "Head Office",
    "hierarchy": "."
  },
  {
    "id": 2,
    "name": "Victoria Island Branch",
    "externalId": "BR-001",
    "hierarchy": ".1."
  }
]
```

***

## Step 4: Onboard a New Customer

Onboard a customer under Victoria Island Branch (`officeId: 2`):

```bash theme={null}
curl -k -X POST "https://localhost:8443/nucleus/api/v1/clients?tenantIdentifier=pilot-mfb" \
  -H "Authorization: Basic c3VwZXJhZG1pbi5waWxvdC1tZmI6WW91clNlY3VyZVBhc3N3b3JkMTIzIQ==" \
  -H "Nucleus-Platform-TenantId: pilot-mfb" \
  -H "Content-Type: application/json" \
  -d '{
    "officeId": 2,
    "firstname": "Chinedu",
    "lastname": "Okafor",
    "externalId": "CUST-1002",
    "dateFormat": "dd MMMM yyyy",
    "locale": "en",
    "active": true,
    "activationDate": "12 September 2026",
    "legalFormId": 1
  }'
```

### Sample Response:

```json theme={null}
{
  "officeId": 2,
  "clientId": 2,
  "resourceId": 2,
  "changes": {
    "cif": "CIF00000002",
    "accountNo": "000000002"
  },
  "resourceExternalId": "CUST-1002"
}
```

Congratulations! You have verified connectivity, authenticated as an administrator, inspected branch hierarchies, and onboarded your first banking customer.
