> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endstate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# endstate.units.get

> Returns a single unit by id, including its collection and issuance status. Accepts either an API key or a chip-tap session token; a session token can read only the unit it was issued for. Poll `collection.token.status` until it is `active`.

```ts theme={null}
get(unitId: string, options?: RequestOptions): Promise<Unit>
```

|             |                                                                |
| ----------- | -------------------------------------------------------------- |
| Endpoint    | [`GET /v1/units/{unit_id}`](/api-reference/units/fetch-a-unit) |
| Credential  | Secret key (`end_sk_...`), Session token (`end_sess_...`)      |
| Retry class | `read`                                                         |

Retried on network failure, timeout, `429`, and `5xx`.

## Example

```ts theme={null}
const result = await endstate.units.get(unit.id);
```

## Parameters

<ParamField body="unit_id" type="string" required>
  Unit id.
</ParamField>

## Returns

`200` - `Unit`.

<ResponseField name="id" type="string" required />

<ResponseField name="external_id" type="string | null" required />

<ResponseField name="name" type="string | null" required />

<ResponseField name="attributes" type="object | null" required />

<ResponseField name="created_at" type="string" required />

<ResponseField name="redirect_url" type="string | null" required>
  Tap redirect URL for this unit; takes precedence over product/collection/org defaults.
</ResponseField>

<ResponseField name="collection" type="object | null" required>
  The unit's collection. Null only for units created before collections existed.
</ResponseField>

<ResponseField name="chips" type="object[]" required>
  Chips paired to this unit.
</ResponseField>

## Errors

Branch on `error.code`, never on the HTTP status - several codes share one.

| Code                               | HTTP | Retry         |
| ---------------------------------- | ---- | ------------- |
| `auth.forbidden`                   | 403  | Do not retry  |
| `auth.unauthorized`                | 401  | Do not retry  |
| `internal.error`                   | 500  | Safe to retry |
| `rate_limit.exceeded`              | 429  | Safe to retry |
| `session_token.invalid_or_expired` | 401  | Do not retry  |
| `session_token.wrong_chip`         | 403  | Do not retry  |
| `unit.not_found`                   | 404  | Do not retry  |
| `validation.failed`                | 400  | Do not retry  |

See [Errors and retries](/sdks/core/errors-and-retries) for the error types and how to narrow them.
