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

# Get Process Users

> Retrieve users eligible to be assigned to a specific process within a sub-project based on RBAC configuration.

### Query Parameters

<ParamField query="subProjectId" type="string" placeholder="sp_123" required>
  The unique identifier for the sub-project.
</ParamField>

<ParamField query="processId" type="string" placeholder="proc_123">
  The unique identifier for the specific process (optional).
</ParamField>

<ParamField query="page" type="string" placeholder="1">
  Pagination page number (optional).
</ParamField>

<ParamField query="perPageCount" type="string" placeholder="10">
  Number of results per page (optional).
</ParamField>

### Response

<ResponseField name="meta" type="object">
  <Expandable title="properties">
    <ResponseField name="page" type="string">
      Current page number.
    </ResponseField>

    <ResponseField name="perPageCount" type="string">
      Items per page.
    </ResponseField>

    <ResponseField name="totalCount" type="string">
      Total count of matching users.
    </ResponseField>

    <ResponseField name="totalPages" type="string">
      Total pages available.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="users" type="object[]">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Unique ID of the user.
    </ResponseField>

    <ResponseField name="name" type="string">
      Full name of the user.
    </ResponseField>

    <ResponseField name="email" type="string">
      Email address of the user.
    </ResponseField>

    <ResponseField name="role" type="string">
      Role or permission group of the user (e.g. `OWNER`, `MANAGER`, `ASSIGNEE`).
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl --location 'https://api.sarasfinance.com/v1/process/projects/getUsersForProcess?subProjectId=93d599a6-a396-4ef6-b30e-aff95c56c523&page=1&perPageCount=10' \
  --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "meta": {
      "page": "1",
      "perPageCount": "10",
      "totalCount": "2",
      "totalPages": "1"
    },
    "users": [
      {
        "id": "usr_9d82fb10",
        "name": "Alex Mercer",
        "email": "alex.mercer@sarasfinance.com",
        "role": "MANAGER"
      },
      {
        "id": "usr_c83b271d",
        "name": "Sarah Connor",
        "email": "sarah.connor@sarasfinance.com",
        "role": "ASSIGNEE"
      }
    ]
  }
  ```
</ResponseExample>

### Error Codes

| Code                                       | ID   | Description                          |
| :----------------------------------------- | :--- | :----------------------------------- |
| `ERROR_PROCESS_META_IS_MISSING_IN_REQUEST` | 1200 | Metadata missing in request          |
| `ERROR_SUBPROCESS_META_NOT_FOUND`          | 1202 | Sub-project metadata not found       |
| `ERROR_RBAC_SETTINGS_MISSING`              | 1203 | RBAC settings missing or invalid     |
| `ERROR_NOT_ALLOWED_TO_GET`                 | 1205 | User unauthorized to view users list |
