Skip to content

List the tenant's registered units (the fleet)

GET
/resources
curl --request GET \
--url https://quikstik-core.fly.dev/resources \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'

Every registered unit for the tenant with its tenant-defined kind (opaque to core — ebike, kayak, classroom), its human label (#281, what staff actually say), and its lifecycle status. The read behind an assignment picker: assignment itself travels the relationship-edge surface (kind: assigned_resource), which needs the unit id this returns.

Status is returned, not filtered. A picker excludes maintenance/retired itself; a fleet view wants them visible (the same caller-filters posture GET /bookings takes with cancelled bookings). Ordered by label.

Accepts a session or an operator API key scoped participants.read (identity-auth), so an unattended day board can render the picker without an interactive sign-in.

?available_for=booking:{id} (the booking page) narrows the list to units that are not retired and not held by another open booking in that booking’s departure window, each with unit_label and size (the unit’s kind) next to status; an unknown booking is 404.

x-tenant-id
required
string format: uuid

Tenant identifier (UUID).

Authn/authz semantics are intentionally TBD for this contract slice; this header exists to keep the contract explicitly multi-tenant from day 0.

available_for
string
/^booking:[0-9a-fA-F-]{36}$/

booking:{booking_id} — only units free for that booking’s departure.

The tenant’s units, label-ordered (an empty fleet is an empty array)

Media typeapplication/json
Array<object>
object
resource_id
required

The unit id an assignment edge points at.

string format: uuid
kind
required

Tenant-defined vocabulary, opaque to core (ebike, kayak, classroom).

string
label
required

The human identifier staff actually say.

string
status
required
string
Allowed values: active maintenance retired

Example

[
{
"kind": "ebike",
"label": "#281",
"status": "active"
}
]

Missing or invalid session bearer token

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

The session’s effect authority does not cover this operation

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}

No durable backend is wired for this operation (fail-closed)

Media typeapplication/json
object
reason
required

Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).

string

Example

{
"reason": "sold_out"
}