Retrieves a list of all users from the Proxima CRM system. You can optionally filter the list by specific user IDs.
Request
Endpoint
POST https://yourdomain.pharmahrm.com/crm-api/db-function/run
Authentication
Bearer Token (required)
Request Structure
Headers
| Key | Value |
|---|---|
| Authorization | Bearer <token>
|
| Content-Type | application/json |
Request Body
{
"function": "api_get_users",
"format": "csv",
"arguments": {
"ids": "1,2,3,4"
}
}| Field | Type | Required | Description |
|---|---|---|---|
| function | string | Yes | The name of the method to call. Use “api_get_users” for this request |
| format | string | Yes | The response format - csv |
| arguments | object | Optional | Optional arguments specific to the method |
| ids | string | Optional | A comma-separated list of user IDs from the Proxima CRM database. Only users with matching IDs will be returned. If omitted, all users will be returned |
Successful Response
200 OK
Depending on the specified format (csv), the system returns a list of users as plain text.
Content-type
text/plain
Example Response
name,manager,country,region,direction,position,Active,user_id,workstartdate,workenddate,role
Ivan Petrov,A. Sidorov,Ukraine,Kyiv,RX,Medical Rep,0,12,2022-05-01,2025-05-01,ROLE_USER
| Field | Description |
|---|---|
| name | Full name of the user |
| manager | Direct manager of the user |
| country | Country where the user is working |
| region | Regions (oblasts) where the user is operating |
| direction | Product direction or line |
| position | Job title or position of the user |
| Active | Active status: 0 = active, 1 = inactive |
| user_id | Internal Proxima CRM database user ID |
| workstartdate | Date when the user started working |
| workenddate | Date when the user's work ends |
| role | System role of the user (e.g., ROLE_USER, ROLE_ADMIN) |
Error Responses
40x/50x
{
"message": "string"
}| Code Range | Description |
|---|---|
| 400-499 | Client-side error (e.g., bad token) |
| 500-599 | Server-side error (e.g., job failure) |