Retrieves the information entered during a visit in the “Control” 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_pdk",
"format": "csv",
"arguments": {
"date_from": "2025-08-04",
"date_till": "2025-08-04",
"preparation_ids": "1,2,3,4"
}
}| Field | Type | Required | Description |
|---|---|---|---|
| function | string | Yes | API method name. Use "api_get_pdk". |
| 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 | Accepts preparation IDs from Proxima CRM, separated by commas. Used to search for specific drugs. |
Successful Response
Example Response
preparation_id,flag1,flag2,flag3,flag4,flag5,int1,int2,int3,str1,str2,str3,date1,date2,date3,float1,float2,float3,task_id
1,1,,,,,1,1,,,,,,,,,,,53800
3,1,,,,,2,,,,,,,,,,,,53800
10,1,,,,,3,,,,,,,,,,,,53800| Field | Description |
|---|---|
| preparation_id | Drug identifier in Proxima CRM |
| flag1-flag5 | Boolean-type fields |
| int1-int3 | Integer-type fields |
| str1-str3 | String-type fields |
| date1-date3 | Date-type fields |
| float1-float3 | Float-type fields |
| 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 |