Documents
Vessel document library (manuals, certificates, surveys, etc.).
GET
/documents/{id}Get a document
Returns a single document with vessel, linked equipment (if any), and uploader.
Path parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string (uuid) | required | — |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data | any | required | — |
GET
/documents/vessel/{vesselId}List a vessel's documents
Excludes archived documents by default. Supports `?cursor=` pagination on the non-search path only — `?search=` runs a bounded hybrid vector+ILIKE query (matching title/category/OCR text) and does not support cursor. Document *creation* is not on the public surface — the only create route requires a multipart file upload, not a metadata-only body (see `docs/api.md` "Known gaps").
Path parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| vesselId | path | string (uuid) | required | — |
Query parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| cursor | query | string | optional | Opaque pagination cursor from a previous response's `pagination.cursor`. Omit this param entirely for the first page of cursor mode; pass `cursor=` (empty) is also accepted as "start from the beginning in cursor mode." Omitting `cursor` altogether (not even as an empty string) falls back to legacy `?page=` semantics on endpoints that still support it. |
| limit | query | integer | optional | — |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data | array<object> | required | — |
| data[].id | string (uuid) | optional | — |
| data[].vesselId | string (uuid) | null | optional | — |
| data[].scope | enum(vessel | global) | optional | — |
| data[].documentType | string | optional | DocumentType enum, e.g. manual, invoice, warranty, registration, insurance, survey, certificate. |
| data[].category | string | optional | — |
| data[].title | string | optional | — |
| data[].fileUrl | string | null | optional | — |
| data[].fileSize | integer | null | optional | — |
| data[].mimeType | string | null | optional | — |
| data[].equipmentId | string (uuid) | null | optional | — |
| data[].expirationDate | string (date-time) | null | optional | — |
| data[].uploadedBy | string (uuid) | optional | — |
| data[].tags | array<string> | optional | — |
| data[].status | string | optional | — |
| data[].currentVersion | integer | optional | — |
| data[].createdAt | string (date-time) | optional | — |
| data[].updatedAt | string (date-time) | optional | — |
| pagination | object | optional | Canonical cursor-pagination block. On endpoints not yet retrofitted for true cursor support, `cursor` is a best-effort display-only value (not decodable, no `?cursor=` branch accepts it back) — see each endpoint's description for whether it has full cursor support. |
| pagination.cursor | string | null | optional | Opaque token for the next page, or `null` when `hasMore` is `false`. |
| pagination.limit | integer | required | — |
| pagination.hasMore | boolean | required | — |
| pagination.total | integer | required | Total row count matching the filter (not just this page). |
