Retrieves the information entered during a visit in the “Arrangement” card. The set of completed parameters depends on the client’s specific configuration. Use api_get_entitymap to get the configuration.
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_arrangement",
"format": "csv",
"arguments": {
"date_from": "2025-08-04",
"date_till": "2025-08-04",
"preparation_ids": "1,2,3,4",
"brend_ids": "1,2,3,4"
}
}| Field | Type | Required | Description |
|---|---|---|---|
| function | string | Yes | API method name. Use "api_get_arrangement". |
| format | string | Yes | Response format - csv |
| arguments | object | Yes | Parameters block |
| date_from | string | Yes | Start date for forming the list of visits (by visit start date). Format: YYYY-MM-DD
|
| date_till | string | Yes | End date for forming the list of visits (by visit end date). Format: YYYY-MM-DD
|
| preparation_ids | string | No | Drug IDs from Proxima CRM. Used to search for specific drugs. Comma-separated. |
| brend_ids | string | No | Brand IDs from Proxima CRM. Used to search for specific drugs. Comma-separated, string type. |
Successful Response
Example Response
preparation_id,brend_id,potential,plancount,factcount,patalog,task_id
1,6,,2,2,,51365
13,1,1,5,5,,51365
14,4,3,5,5,,51365| Field | Description |
|---|---|
| preparation_id | Drug identifier in Proxima CRM. Only preparation_id or brend_id will be present, depending on the client’s settings. |
| brend_id | Brand identifier in Proxima CRM. Only preparation_id or brend_id will be present, depending on the client’s settings. |
| potential | Numeric value (float). Business meaning is defined by the project settings. |
| plancount | Numeric value (float). Business meaning is defined by the project settings. |
| factcount | Numeric value (float). Business meaning is defined by the project settings. |
| patalog | Text value. Name of the nosology within which numeric values are indicated |
| task_id | Visit ID in Proxima CRM where the data was entered |
Error Response
40х/50х
{
"message": "string"
}| Code | Meaning |
|---|---|
| 400 | Bad request (e.g., missing required parameters) |
| 401 | Unauthorized access (invalid or missing token) |
| 500 | Internal server error |