Get User in Phin Api Route
The "Get User in Phin API Route" retrieves a single user by their unique ID, returning a user object with mandatory fields like id, first name, last name, email, status, welcomed, and creationMethod, along with optional fields such as department name and supervisor details, and responds with either the user data directly or a 500 error if the retrieval fails.
Get User in Phin Api Route
This route is used to get a single user in Phin by Id.
User Attribute Reference
| Field Name | Description | Value Type | Optional (Y/N) |
| id | Unique Id of the user | String | N |
| first | First name | String | N |
| last | Last name | String | N |
| String | N | ||
| status | Status in Phin (active/slept) | String | N |
| deptname | Department Name | String | Y |
| supvemail | Supervisor Email | String | Y |
| supvname | Supervisor Name | String | Y |
| ophone | Office Phone Number (Azure only) | String | Y |
| phone | Phone number | String | Y |
| welcomed | Has this user received a welcome email? | Boolean | N |
| createdBy | Some methods of creating users populate this field with a string. | String | Y |
| creationMethod | Some methods of creating users populate this field with a string. | String | N |
Response Reference
The response body is the user object itself. It is not wrapped in a "user" or "users" key, and the identifier field is "id" (not "userId").
| Field | Type | Example |
|---|---|---|
| (body) | Object | { "id": "sampleId", "first": "Don", "last": "Johnson", "email": "[email protected]", ... } |
Response Sample
{
"id": "sampleId",
"first": "Pepe",
"last": "Silvia",
"email": "[email protected]",
"status": "active",
"welcomed": false,
"createdBy": "UserSync"
}
Error Reference
| Code | Message | Explanation | |
|---|---|---|---|
| 500 | Failed to get users. Please try again or contact Phin Support for assistance. | Something went wrong fetching the inventory of users. Try again later or contact Phin. |
Was this article helpful?
YesNo