New frontmatter'd docs with handler-compatible examples: - devices/get_device.md (DeviceInfo shape) - devices/regenerate_device_token.md (token + sync_urls) - devices/get_device_mappings.md (wrapper + DeviceMappingSummary) - devices/update_device_mapping.md (UpdateDeviceMappingRequest) - devices/download_sidecar_config.md (sidecar config JSON file) - devices/link_book.md (LinkBookRequest; one UNVERIFIED marker on required-tag) Schema registry: 6 new entries; DeviceMappingSummary hoisted to package scope. Gate passes (the UNVERIFIED marker is logged, not a failure). Excludes /api/devices-page (htmx page route, per ground rules).
1.2 KiB
1.2 KiB
method, path, auth, area
| method | path | auth | area |
|---|---|---|---|
| PUT | /api/devices/:id/collections/:collectionId | jwt | devices |
Update Device Collection Mapping
Updates a device shelf-to-collection mapping's shelf name and sync direction.
Example request
{
"device_shelf_name": "Kobo",
"sync_direction": "bidirectional"
}
Example response
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"collection_id": "770e8400-e29b-41d4-a716-446655440000",
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"device_shelf_name": "Kobo",
"sync_direction": "bidirectional",
"created_at": "2026-10-24 13:57:01.81234 +0000 UTC"
}
Request fields
| Field | Type | Required | Notes |
|---|---|---|---|
| device_shelf_name | string | yes | |
| sync_direction | string | yes | one of bidirectional, book_to_device, device_to_book, none |
Errors
| Status | Body | When |
|---|---|---|
| 400 | {"error": "invalid mapping id"} / {"error": "invalid request"} |
malformed id or body |
| 500 | {"error": "..."} |
unexpected server error |