# Hovi Business Wallet API

> A company wallet: receive, hold and present credentials.

Source: https://docs-dev.hovi.id/api/business-wallet

OpenAPI spec (JSON): https://docs-dev.hovi.id/api-specs/business-wallet-api.json

Version: v0.1.0

The Hovi Business Wallet API lets a business (legal person) receive, hold, and prove EU digital credentials (EUDI). It plugs the Core SDK directly for OID4VC / OID4VP operations.

Base URLs: `https://api-test.businesswallet.hovi.app`, `https://api.businesswallet.hovi.app`

## Authentication

- bearerAuth: `Authorization: Bearer <token>`. Business Wallet session token

## Endpoints

- Organization
  - `GET /organizations/`: List My Wallets
  - `POST /organizations/switch`: Switch Wallet
  - `POST /organizations/leave`: Leave Wallet
- Team
  - `GET /team/`: List Team
  - `POST /team/invitations`: Invite Member
  - `POST /team/invitations/{invitationId}/resend`: Resend Invite
  - `DELETE /team/invitations/{invitationId}`: Revoke Invite
  - `PATCH /team/members/{userId}`: Change Member Role
  - `DELETE /team/members/{userId}`: Remove Member
  - `POST /invitations/lookup`: Look Up Invite
  - `POST /invitations/accept`: Accept Invite
  - `POST /invitations/decline`: Decline Invite
- Audit Logs
  - `GET /audit-logs/`: List Audit Logs
- Registers
  - `GET /registers/companies`: Search Finnish Companies
  - `GET /registers/companies/{businessId}`: Get Finnish Company
  - `GET /registers/country`: Get Visitor Country
  - `GET /registers/lei/{lei}`: Look Up LEI
- Issuers
  - `GET /issuers/`: List Issuers
  - `GET /issuers/{partnerId}`: Get Issuer
- Credential Requests
  - `GET /credential-requests/`: List Credential Requests
  - `POST /credential-requests/`: Request Credential
  - `POST /credential-requests/{requestId}/complete`: Complete Credential Request
  - `GET /credential-requests/{requestId}`: Get Credential Request
  - `POST /credential-requests/{requestId}/cancel`: Cancel Credential Request

## Organization

Business organization and wallet

### List My Wallets

`GET /organizations/`

Returns every organization wallet the signed-in account belongs to, oldest first, with the account\'s role and permissions in it. active marks the session\'s active wallet; onboardingCompleted is false for a wallet whose setup was not finished.

**Responses**

- `200`: Success
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "organizations": [
      {
        "organization": {},
        "role": "admin",
        "active": true,
        "onboardingCompleted": true
      }
    ]
  }
}
```

### Switch Wallet

`POST /organizations/switch`

Makes the given wallet the active one for this session, and the one opened at the next sign-in. Answers like GET /auth/me.

**Request body** (`application/json`)

**Responses**

- `200`: Success
- `400`: Invalid input
- `403`: The account is not a member of this wallet
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "user": {},
    "organization": {}
  }
}
```

### Leave Wallet

`POST /organizations/leave`

Removes the signed-in account from the given wallet; the wallet and its other members are not changed. The account that created the wallet, and the wallet\'s last admin, cannot leave and delete the wallet instead. When it was the active wallet, the session moves to the account\'s next wallet (organization is null when there is none: onboarding). Answers like GET /auth/me.

**Request body** (`application/json`)

**Responses**

- `200`: Success
- `400`: Invalid input
- `403`: The account is not a member of this wallet
- `409`: The account created the wallet (ownerCannotLeave), or is its last admin (lastAdmin)
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "user": {},
    "organization": {}
  }
}
```

## Team

### List Team

`GET /team/`

The members of the active wallet, oldest first, with their role, and its open invites (expiresAt in the past: the link no longer works; resend or revoke it). isOwner marks the account that created the wallet: it stays an admin and cannot be removed. Any member can read it.

**Responses**

- `200`: Success
- `409`: No wallet yet
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "members": [
      {
        "id": "uuid",
        "name": "Jane Doe",
        "email": "jane@company.fi",
        "role": "admin",
        "status": "active",
        "isOwner": true,
        "joinedAt": "2026-11-12T10:00:00.000Z",
        "lastActiveAt": null
      }
    ],
    "invitations": [
      {
        "id": "uuid",
        "email": "sara@company.fi",
        "role": "member",
        "status": "invited",
        "invitedAt": "2026-11-12T10:00:00.000Z",
        "expiresAt": "2026-11-19T10:00:00.000Z"
      }
    ]
  }
}
```

### Invite Member

`POST /team/invitations`

Emails a link to join the active wallet with the given role. The link works for 7 days and only for an account with this email address. The address follows the sign-up rule (company domains, and ALLOWED_EMAIL_DOMAINS when set). Admins only.

**Request body** (`application/json`)

**Responses**

- `201`: Invite sent
- `400`: Invalid input, acting permissions for an observer (observerViewOnly: observers only view, audit:read at most), a personal email provider (personalEmail), or a company domain outside ALLOWED_EMAIL_DOMAINS (emailDomainNotAllowed)
- `403`: Not an admin
- `409`: Already a member (alreadyMember), already invited (alreadyInvited), too many open invites, or the wallet is not set up yet (onboardingNotCompleted)
- `500`: Internal Server Error
- `503`: The email could not be sent; no invite was made

Example `201` response:

```json
{
  "success": true,
  "response": {
    "invitation": {}
  }
}
```

### Resend Invite

`POST /team/invitations/{invitationId}/resend`

Emails the invite again with a new link that works for 7 days; the earlier link stops working. Admins only.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `invitationId` | path | string | Yes |  |

**Responses**

- `200`: Sent
- `404`: No open invite with this id
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "invitation": {}
  }
}
```

### Revoke Invite

`DELETE /team/invitations/{invitationId}`

The invite link stops working. Admins only.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `invitationId` | path | string | Yes |  |

**Responses**

- `200`: Revoked
- `404`: No open invite with this id
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true
}
```

### Change Member Role

`PATCH /team/members/{userId}`

Changes the role and the scoped permissions (credentials:receive, credentials:delete, proofs:share, messages:use, audit:read; the role\'s defaults when none are sent). Admins only. The owner\'s role and the admin\'s own role cannot be changed.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `userId` | path | string | Yes |  |

**Request body** (`application/json`)

**Responses**

- `200`: Changed
- `400`: Invalid input, or acting permissions for an observer (observerViewOnly: observers only view, audit:read at most)
- `404`: Not a member of this wallet
- `409`: The owner (ownerProtected), the admin themselves (notYourself), or the last admin (lastAdmin)
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "role": "observer",
    "permissions": [
      "credentials:read",
      "audit:read"
    ]
  }
}
```

### Remove Member

`DELETE /team/members/{userId}`

Admins only. The owner cannot be removed, and an admin leaves the wallet instead of removing themselves. The member loses access at once.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `userId` | path | string | Yes |  |

**Responses**

- `200`: Removed
- `404`: Not a member of this wallet
- `409`: The owner (ownerProtected), the admin themselves (notYourself), or the last admin (lastAdmin)
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true
}
```

### Look Up Invite

`POST /invitations/lookup`

The wallet, inviter, invited email and role of an open invite link, so the invite page can show it before signing in. Public, limited per IP. An expired, revoked or used link answers invitationInvalid, without saying which.

**Request body** (`application/json`)

**Responses**

- `200`: Open invite
- `404`: The link no longer works
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "invitation": {
      "walletName": "Nordivo",
      "inviterName": "Anas",
      "email": "sara@company.fi",
      "role": "member",
      "expiresAt": "2026-11-19T10:00:00.000Z"
    }
  }
}
```

### Accept Invite

`POST /invitations/accept`

Adds the signed-in account to the wallet with the invited role and makes it the session\'s active wallet. Only for the account with the invited email address; its email counts as verified. Answers like GET /auth/me.

**Request body** (`application/json`)

**Responses**

- `200`: Joined
- `403`: Signed in with another email address
- `404`: The link no longer works
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "user": {},
    "organization": {}
  }
}
```

### Decline Invite

`POST /invitations/decline`

The invite link stops working. Only for the account with the invited email address.

**Request body** (`application/json`)

**Responses**

- `200`: Declined
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true
}
```

## Audit Logs

### List Audit Logs

`GET /audit-logs/`

Who did what in the active wallet, newest first: sign-ins (account.signed_in, in the wallet the session opened), credential.requested, credential.received, credential.deleted, proof.shared, proof.declined, member.invited, member.invite_revoked, member.joined, member.role_changed, member.access_changed, member.removed, wallet.left and organization.updated. actor is null when the account no longer exists. page starts at 0; limit is at most 100. The filters apply to the whole log and total counts the matching entries. Members with audit:read only.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | No | Page number, from 0 |
| `limit` | query | integer | No | Entries per page, 1 to 100 (default 50) |
| `action` | query | string | No | Only these actions, comma separated, for example member.role_changed,member.access_changed |
| `from` | query | string | No | Only entries at or after this ISO 8601 time, for example 2026-11-01T00:00:00.000Z |
| `to` | query | string | No | Only entries at or before this ISO 8601 time, for example 2026-11-30T23:59:59.999Z |
| `q` | query | string | No | Free text, at most 100 characters, matched case-insensitively against the entry details and the name and email of who did it |

**Responses**

- `200`: Success
- `400`: Invalid page, limit, action, from, to or q
- `403`: Not an admin
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "entries": [
      {
        "id": "id",
        "action": "proof.shared",
        "details": {
          "credential": "LPID",
          "verifier": "Verifier Oy"
        },
        "actor": {
          "id": "uuid",
          "name": "Jane Doe",
          "email": "jane@company.fi"
        },
        "createdAt": "2026-11-12T10:00:00.000Z"
      }
    ],
    "total": 1,
    "page": 0,
    "limit": 50
  }
}
```

## Registers

### Search Finnish Companies

`GET /registers/companies`

Searches the Finnish Trade Register (PRH) by company name, or returns the company with that Business ID. Best matches first, at most 8.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | string | Yes | Company name (3 to 100 characters) or a Finnish Business ID |

**Responses**

- `200`: Success
- `400`: Invalid query
- `500`: Internal Server Error
- `503`: Register not responding

Example `200` response:

```json
{
  "success": true,
  "response": {
    "companies": []
  }
}
```

### Get Finnish Company

`GET /registers/companies/{businessId}`

Returns the company with this Business ID from PRH and its LEI from GLEIF when it has a valid one.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `businessId` | path | string | Yes |  |

**Responses**

- `200`: Success
- `404`: Not in the register
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "company": {},
    "lei": {},
    "source": "gleif+prh"
  }
}
```

### Get Visitor Country

`GET /registers/country`

The country of the visitor\'s IP address (ISO code, from IPinfo), to preselect it in onboarding. null when it is not known.

**Responses**

- `200`: Success
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "country": "FI"
  }
}
```

### Look Up LEI

`GET /registers/lei/{lei}`

Returns the GLEIF record of the LEI and the Finnish company with the Business ID on that record. Only LEIs registered in Finland are supported.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `lei` | path | string | Yes |  |

**Responses**

- `200`: Success
- `400`: Not a Finnish LEI
- `404`: Unknown LEI
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "company": {},
    "lei": {},
    "source": "gleif+prh"
  }
}
```

## Issuers

### List Issuers

`GET /issuers/`

Marketplace partners that issue a credential after a sign-in (OID4VCI authorization code flow): their business profile (name, legal name, category, country, Business ID, LEI, website, logo) and the credential each offers (name, description). A credential is requested by the partner id. Each wallet sees the partners shown to every wallet and the ones shown to its own organization; sandbox partners only while the wallet has sandbox on. environment is sandbox or production (test is also true for sandbox partners).

**Responses**

- `200`: Success
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "issuers": []
  }
}
```

### Get Issuer

`GET /issuers/{partnerId}`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `partnerId` | path | string | Yes |  |

**Responses**

- `200`: Success
- `404`: Unknown issuer
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "issuer": {}
  }
}
```

## Credential Requests

### List Credential Requests

`GET /credential-requests/`

Credential requests of the organization (up to 100), newest first, with status awaiting_sign_in, issued, failed, expired or cancelled.

**Responses**

- `200`: Success
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "requests": []
  }
}
```

### Request Credential

`POST /credential-requests/`

Requests the credential a marketplace partner offers, by the partner id from GET /issuers. The wallet asks the partner for a credential offer that needs a sign-in, and answers with the issuer and credential as the offer describes them (offer) and the issuer sign-in page (authorizationUrl) to open in a browser or show as a QR code. The request expires after 10 minutes.

**Request body** (`application/json`)

**Responses**

- `201`: Started
- `404`: Unknown partner
- `500`: Internal Server Error
- `501`: The sign-in of this issuer is not supported yet
- `503`: The issuer or the wallet service is not responding

Example `201` response:

```json
{
  "success": true,
  "response": {
    "request": {},
    "offer": {
      "issuer": {},
      "credential": {}
    },
    "authorizationUrl": "https://issuer.example/authorize?..."
  }
}
```

### Complete Credential Request

`POST /credential-requests/{requestId}/complete`

Called by the callback page after the issuer sign-in, with the code (and iss) from the redirect, or with the error the issuer sent when the user refused or cancelled (the request then fails as signInRefused). Stores the credential in the requesting organization wallet. Works without a session, so the sign-in can finish on another device, and is rate limited per client IP. An iss that is not the sign-in server of the offer leaves the request pending. Answers only the status, and the issuer and credential name from the offer.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `requestId` | path | string | Yes |  |

**Request body** (`application/json`)

**Responses**

- `200`: Issued
- `400`: The issuer refused
- `409`: Expired or already finished
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "status": "issued",
    "issuerName": "",
    "credentialName": ""
  }
}
```

### Get Credential Request

`GET /credential-requests/{requestId}`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `requestId` | path | string | Yes |  |

**Responses**

- `200`: Success
- `404`: Not a request of this organization
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "request": {}
  }
}
```

### Cancel Credential Request

`POST /credential-requests/{requestId}/cancel`

Cancels a request that is still waiting for the sign-in.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `requestId` | path | string | Yes |  |

**Responses**

- `200`: Cancelled
- `409`: Already finished
- `500`: Internal Server Error

Example `200` response:

```json
{
  "success": true,
  "response": {
    "request": {}
  }
}
```
