Single resources are top-level
Every single-resource response returns the resource’s fields at the top level - there is no wrapper key. This applies uniformly to collections, units, chips, taps, session-token introspection, claims, transfers, and chip replacements.Earlier versions of this API wrapped single collection and unit responses in a
collection / unit envelope ({ "collection": {...} }). That envelope is
gone - if your integration reads response.collection.id from GET /v1/collections/{id} or response.unit.id from GET /v1/units/{id}, update
it to read the fields at the top level.unit, and the chip-pair response includes a unit snapshot. That nesting is part of the resource’s own shape, not an envelope.
For example, creating a collection and then polling it:
These examples use
fetch deliberately, to show the shapes on the wire.
@endstate-sdk/core preserves them exactly - it
renames nothing, so created.id, polled.contract.status, and
tap.session_token.token are the same paths in TypeScript.List responses
List endpoints wrap their array under a plural key alongsidepagination:
Response
Response
Errors
Errors use a separate, uniform envelope -{ "error": { "code", "message", "request_id" } } - across every endpoint. See Errors.
