<!-- Generated by scripts/build-docs.js. Edit docs/swagger.yaml or docs/guides/, then run `npm run docs:build`. -->

# Get a user

`GET https://marketplace-api.sequifi.com/v1/users/{id}`

Module: Users · operationId: `getUser` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequifi.com/#/api/get-user

Returns one user by id, whatever their status, with the same fields as `GET /v1/users`. The user is at `data.users[0]`: the response uses the list wrapper, not a single object.

**Before you call:**

- `id` is the user id from `GET /v1/users`, not an onboarding id or your `employee_id`.
- Optional: `include=additional_offices` adds current Additional Office assignments. Other query parameters return `400`.

**Formats:**

- Same as `GET /v1/users`: `created_at` and `updated_at` are ISO 8601 UTC strings, `dob` is `YYYY-MM-DD` or `null`, and home address fields are `null` until the rep completes the profile step of onboarding.
- `current_page`, `per_page`, `total` and `last_page` are always `1`, `50`, `1` and `1`. Ignore them.
- `requestedBy` is the name of the API credential your token belongs to.

**Errors:**

- `400` `Invalid user id` when `id` does not start with a positive number. Trailing characters are ignored, so `4821abc` reads as `4821`.
- `400` `Only include is allowed when fetching a single user by id`.
- `400` for an unsupported or empty `include` value.
- `404` `User not found`.
- `401` when the token is missing, malformed, expired or revoked. It is rejected before the request is processed, so the body is only `{"message":"Unauthorized"}`, with no `status` or `data`.
- `500` if requested Additional Offices cannot be looked up; retry according to Errors and retries. A missing assignments table returns `[]`.

**Related:**

- `GET /v1/users` lists and filters users.
- `POST /v1/users` updates profile fields; `POST /v1/users/{id}/transfer`, `/position` and `/terminate` change assignment and employment.

## Path parameters

- `id` (integer, **required**): User id from `GET /v1/users`. Minimum: 1. Example: `4821`.

## Query parameters

- `include` (string): Request optional Additional Office assignments. Omit to leave additional_offices out of the response. One of: `additional_offices`. Example: `additional_offices`.

## Example request

```bash
curl -X GET "https://marketplace-api.sequifi.com/v1/users/4821" \
  -H "Authorization: Bearer $SEQUIFI_TOKEN"
```

## Responses

### 200: The user, as the only item of `data.users`

- `status` (integer): The HTTP status code, repeated. Example: `200`.
- `message` (string): Short text. Wording varies by endpoint; branch on the HTTP status, not on this text. Example: `success`.
- `data` (object)
  - `requestedBy` (string): Name of the API credential your token belongs to.
  - `current_page` (integer): Always 1.
  - `per_page` (integer): Always 50. Ignore it.
  - `total` (integer): Always 1.
  - `last_page` (integer): Always 1.
  - `users` (array of object): Exactly one user.
    - `id` (integer): User id. Every other user endpoint takes this id.
    - `employee_id` (string, nullable): Your company's own employee number.
    - `first_name` (string): First name.
    - `last_name` (string): Last name.
    - `email` (string): Email address.
    - `mobile_no` (string, nullable): Mobile number as stored. The format is not normalized.
    - `dob` (string (date), nullable): Date of birth, YYYY-MM-DD.
    - `home_address` (string, nullable): Formatted single-line home address. Null until the rep completes the profile step of onboarding.
    - `home_address_line_1` (string, nullable): Street line.
    - `home_address_line_2` (string, nullable): Apartment or suite line. Usually null.
    - `home_address_city` (string, nullable): City.
    - `home_address_state` (string, nullable): State, normally a 2-letter code.
    - `home_address_zip` (string, nullable): ZIP code.
    - `is_manager` (integer): 1 if the user is a manager. One of: `0`, `1`.
    - `status_id` (integer, nullable): Employment status. 1 is active; any other value is inactive (a dismissal through `POST /v1/users/termination` sets 2).
    - `worker_type` (string, nullable): Worker type, such as `1099` or `w2`. Compare case-insensitively.
    - `office_id` (integer, nullable): Current office. See `GET /v1/locations`.
    - `office_name` (string, nullable): Name of the current office.
    - `state_id` (integer, nullable): Work state id (not the home state).
    - `state_code` (string, nullable): Work state code, for example `TX`.
    - `city_id` (integer, nullable): Work city id.
    - `position_id` (integer, nullable): Primary position. See `GET /v1/positions`.
    - `position_name` (string, nullable): Name of the primary position.
    - `sub_position_id` (integer, nullable): Position in effect today in your company's time zone. Can differ from `position_id`.
    - `sub_position_name` (string, nullable): Name of the position in effect today in your company's time zone.
    - `wages_status` (integer): 1 when the rep's position pays wages (hourly or salary). A position setting, not a per-person flag. One of: `0`, `1`.
    - `onboarding_complete` (integer): 1 once every required self-onboarding step (documents, banking details, profile) is done. One of: `0`, `1`.
    - `hiring_status_id` (integer, nullable): Status of the rep's latest hiring record (7 = still completing self-onboarding, 14 = finished). Null when the user was not hired through hiring.
    - `hiring_status_name` (string, nullable): Label for `hiring_status_id`. Your company can rename it; use it for display only.
    - `onboarding_step_name` (string, nullable): The self-onboarding step the rep is on, using the names on the Onboarding page: `Not Started` (never logged in), `Personal Details`, `Tax + Banking Info`, `Tax Info`, `Banking Info` or `Documents`. The steps a rep sees depend on your payroll setup and their worker type. Set only while `hiring_status_id` is `7`, otherwise `null`. Refreshed every 15 minutes, so it can lag the Onboarding page by up to 15 minutes.
    - `onboarding_step_updated_at` (string, nullable): When `onboarding_step_name` last changed (company database time). `null` when `onboarding_step_name` is `null`.
    - `employee_personal_detail` (array of object): Your company's custom personal fields for this user. Null when none are stored.
      - `id` (integer): Custom field id from `GET /v1/custom-fields?type=employee`.
      - `field_name` (string, nullable): Field label.
      - `field_type` (string, nullable): Field type, for example `text`, `date` or `dropdown`.
      - `value` (any, nullable): Stored value, usually a string.
    - `employee_admin_only_fields` (array of object): Custom fields only admins can edit. Same item shape as `employee_personal_detail`. Write with `POST /v1/users`.
      - `id` (integer): Custom field id.
      - `field_name` (string, nullable): Field label.
      - `field_type` (string, nullable): Field type.
      - `value` (any, nullable): Stored value, usually a string.
    - `manager` (object, nullable): The user's manager, or null.
      - `id` (integer): Manager's user id.
      - `first_name` (string): First name.
      - `last_name` (string): Last name.
      - `email` (string): Email address.
    - `recruiter` (object, nullable): The user's recruiter, or null. Same fields as `manager`.
      - `id` (integer): Recruiter's user id.
      - `first_name` (string): First name.
      - `last_name` (string): Last name.
      - `email` (string): Email address.
    - `additional_offices` (array of object): Only returned with `include=additional_offices`. The user's current Additional Office assignments, the same set the user's profile page shows under Employment Package, except that assignments to archived offices are left out. Current means started on or before today and not ended before today; when an office has more than one current assignment, only the newest is returned. One entry per office, ordered by office name. `[]` when the user has none or the tenant has no assignments table. Other lookup failures return 500. Override pay for these offices is not included. "Today" means today in your company's time zone.
      - `office_id` (integer): Office id. See `GET /v1/locations`.
      - `office_name` (string, nullable): Office name.
      - `state_id` (integer, nullable): State id of the assignment.
      - `state_code` (string, nullable): State code, for example `TX`.
      - `effective_date` (string (date), nullable): Date the assignment started, YYYY-MM-DD. Null only for legacy records stored with a zero date.
      - `effective_end_date` (string (date), nullable): Last day of the assignment, YYYY-MM-DD, or null when it has no end date.
    - `created_at` (string (date-time)): When the user was created, ISO 8601 UTC.
    - `updated_at` (string (date-time)): When the user was last changed, ISO 8601 UTC.

Example (with_additional_offices): With include=additional_offices

```json
{
  "status": 200,
  "message": "success",
  "data": {
    "requestedBy": "acme",
    "current_page": 1,
    "per_page": 50,
    "total": 1,
    "last_page": 1,
    "users": [
      {
        "id": 4821,
        "employee_id": "EMP-1042",
        "first_name": "Alex",
        "last_name": "Morgan",
        "email": "alex.morgan@example.com",
        "dob": "1990-01-15",
        "mobile_no": "5125550142",
        "is_manager": 0,
        "status_id": 1,
        "worker_type": "1099",
        "office_id": 31,
        "home_address": "1200 Congress Ave, Austin, TX 78701, USA",
        "home_address_line_1": "1200 Congress Ave",
        "home_address_line_2": null,
        "home_address_city": "Austin",
        "home_address_state": "TX",
        "home_address_zip": "78701",
        "state_id": 44,
        "city_id": 1207,
        "created_at": "2024-01-15T10:00:00.000Z",
        "updated_at": "2026-06-01T08:30:00.000Z",
        "employee_personal_detail": [
          {
            "id": 2,
            "field_name": "Preferred first name",
            "field_type": "text",
            "value": "Alex"
          }
        ],
        "employee_admin_only_fields": null,
        "state_code": "TX",
        "office_name": "Austin",
        "wages_status": 0,
        "onboarding_complete": 1,
        "hiring_status_id": 14,
        "hiring_status_name": "Active",
        "onboarding_step_name": null,
        "onboarding_step_updated_at": null,
        "position_id": 4,
        "position_name": "Sales Rep",
        "sub_position_id": 12,
        "sub_position_name": "Senior Sales Rep",
        "manager": {
          "id": 87,
          "first_name": "Jordan",
          "last_name": "Lee",
          "email": "jordan.lee@example.com"
        },
        "recruiter": null,
        "additional_offices": []
      }
    ]
  }
}
```

### 400: Invalid id, unsupported include value, or a query parameter other than include

Example (invalid_id): id is not a positive number

```json
{
  "status": 400,
  "message": "Invalid user id",
  "data": {}
}
```

### 401: Missing, malformed, expired or revoked token. Rejected before processing, so the body has only `message`.

```json
{
  "message": "Unauthorized"
}
```

### 404: No user with that id

```json
{
  "status": 404,
  "message": "User not found",
  "data": {}
}
```

### 500: Internal server error

```json
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}
```
