Profiles API
REST API for user profile management.
Namespace: frs-users/v1Base URL: /wp-json/frs-users/v1/
Endpoints
List Profiles
GET /profilesParameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | int | 1 | Page number |
per_page | int | 20 | Items per page (max 100) |
role | string | - | Filter by role |
search | string | - | Search name/email |
orderby | string | last_name | Sort field |
order | string | asc | Sort direction |
Example
bash
curl 'https://myhub21.com/wp-json/frs-users/v1/profiles?role=loan_officer&per_page=10'Response
json
{
"data": [
{
"id": 123,
"user_id": 45,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"role": "loan_officer",
"nmls_id": "123456",
"job_title": "Senior Loan Officer",
"phone": "555-1234",
"avatar_url": "https://..."
}
],
"total": 1,
"pages": 1,
"page": 1
}Get Profile
GET /profiles/{id}Example
bash
curl 'https://myhub21.com/wp-json/frs-users/v1/profiles/123'Response
json
{
"id": 123,
"user_id": 45,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"role": "loan_officer",
"nmls_id": "123456",
"job_title": "Senior Loan Officer",
"phone": "555-1234",
"company": "21st Century Lending",
"bio": "Experienced loan officer...",
"avatar_url": "https://...",
"social": {
"facebook": "https://facebook.com/johndoe",
"linkedin": "https://linkedin.com/in/johndoe"
},
"meta": {
"frs_department": "Sales",
"frs_reports_to": 42
}
}Get Profile by User ID
GET /profiles/user/{user_id}Example
bash
curl 'https://myhub21.com/wp-json/frs-users/v1/profiles/user/45'Create Profile
POST /profilesBody
json
{
"user_id": 45,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"role": "loan_officer",
"nmls_id": "123456",
"job_title": "Loan Officer",
"phone": "555-1234"
}Response
json
{
"id": 124,
"message": "Profile created successfully"
}Update Profile
PUT /profiles/{id}Body
json
{
"job_title": "Senior Loan Officer",
"phone": "555-5678"
}Response
json
{
"id": 123,
"message": "Profile updated successfully"
}Delete Profile
DELETE /profiles/{id}Response
json
{
"message": "Profile deleted successfully"
}Profile Fields
Standard Fields
| Field | Type | Required | Description |
|---|---|---|---|
user_id | int | Yes | WordPress user ID |
first_name | string | Yes | First name |
last_name | string | Yes | Last name |
email | string | Yes | Email address |
role | string | Yes | Profile role |
nmls_id | string | No | NMLS number |
job_title | string | No | Job title |
phone | string | No | Phone number |
company | string | No | Company name |
bio | string | No | Biography |
Social Fields
| Field | Type | Description |
|---|---|---|
facebook | string | Facebook URL |
twitter | string | Twitter URL |
linkedin | string | LinkedIn URL |
instagram | string | Instagram URL |
Roles
| Role | Slug |
|---|---|
| Loan Officer | loan_officer |
| Realtor Partner | realtor_partner |
| Staff | staff |
| Leadership | leadership |
| Assistant | assistant |
Error Codes
| Code | Status | Description |
|---|---|---|
rest_forbidden | 403 | Insufficient permissions |
rest_profile_not_found | 404 | Profile not found |
rest_invalid_param | 400 | Invalid parameter |