# Bioprints API (1.0.0)

Servers:

- Production; a test tenant's key works here too: `https://api.bioprints.io`

Authenticate with the tenant's key as `Authorization: Bearer bpk_<key id>_<secret>`; the reader calls take a registry key the same way.

## Contract

- [Returns this OpenAPI document.](https://docs.bioprints.io/api/get-open-api-document.md): `GET /palm/v1/openapi.json`

## Palms

- [Enrolls one or both hands of a person.](https://docs.bioprints.io/api/enroll-hands.md): `POST /palm/v1/people/{subjectReference}/hands`
- [Lists a person's hands.](https://docs.bioprints.io/api/list-hands.md): `GET /palm/v1/people/{subjectReference}/hands`
- [Freezes a person.](https://docs.bioprints.io/api/freeze-person.md): `POST /palm/v1/people/{subjectReference}:freeze`
- [Unfreezes a person.](https://docs.bioprints.io/api/unfreeze-person.md): `POST /palm/v1/people/{subjectReference}:unfreeze`
- [Identifies whose palm a capture is.](https://docs.bioprints.io/api/identify.md): `POST /palm/v1/people:identify`
- [Verifies that a capture is a person.](https://docs.bioprints.io/api/verify.md): `POST /palm/v1/people/{subjectReference}:verify`
- [Removes a person.](https://docs.bioprints.io/api/revoke-person.md): `DELETE /palm/v1/people/{subjectReference}`
- [Removes one of a person's hands.](https://docs.bioprints.io/api/revoke-hand.md): `DELETE /palm/v1/people/{subjectReference}/hands/{hand}`
- [Freezes one of a person's hands.](https://docs.bioprints.io/api/freeze-hand.md): `POST /palm/v1/people/{subjectReference}/hands/{hand}:freeze`
- [Unfreezes one of a person's hands.](https://docs.bioprints.io/api/unfreeze-hand.md): `POST /palm/v1/people/{subjectReference}/hands/{hand}:unfreeze`

## Readers

- [Adds a sold reader to your tenant.](https://docs.bioprints.io/api/add-reader.md): `POST /palm/v1/readers`
- [Freezes a reader taken back.](https://docs.bioprints.io/api/freeze-reader.md): `POST /palm/v1/readers/{serial}:freeze`
- [Deletes a reader from your tenant.](https://docs.bioprints.io/api/delete-reader.md): `DELETE /palm/v1/readers/{serial}`

## Tenant

- [Lists the hands removed from your tenant.](https://docs.bioprints.io/api/list-deletions.md): `GET /palm/v1/deletions`
- [Returns your tenant's view of Bioprints.](https://docs.bioprints.io/api/get-status.md): `GET /palm/v1/status`

## Error body

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string, nullable |  | A URI reference naming the kind of problem, as RFC 9457 defines it. |
| `title` | string, nullable |  | Always `Request refused`; the reason is in `code`. |
| `status` | integer (int32), nullable |  | The HTTP status, repeated. |
| `detail` | string, nullable |  | Text for a person reading it, when there is any. |
| `instance` | string, nullable |  | A URI reference naming this occurrence, as RFC 9457 defines it, when there is one. |
| `code` | string: `capture_malformed`, `capture_quality_too_low`, `engine_busy`, `engine_unavailable`, `gallery_full`, `hand_already_enrolled`, `hand_not_enrolled`, `idempotency_key_in_flight`, `idempotency_key_invalid`, `idempotency_key_mismatch`, `idempotency_key_missing`, `key_invalid`, `no_match`, `not_verified`, `palm_already_enrolled`, `rate_limited`, `reader_not_found`, `reader_unavailable`, `request_invalid`, `sensor_not_allowed`, `subject_not_found`, `tenant_busy`, `tenant_suspended` | yes | The machine-readable reason; branch on it, never on the text. |

Every refusal code is listed in [Error codes](https://docs.bioprints.io/errors.md).
