Retrieves the information entered during a visit in the “Control” card. The set of completed parameters depends on the client’s specific 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 |
{
"function": "api_get_pdk_json",
"format": "json",
"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_json". |
| format | string | Yes | Response format - json |
| 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
[
{
"int1": 1,
"int2": 1,
"int3": 1,
"str1": null,
"str2": null,
"str3": null,
"date1": null,
"date2": null,
"date3": null,
"flag1": 1,
"flag2": null,
"flag3": null,
"flag4": null,
"flag5": null,
"float1": null,
"float2": null,
"float3": null,
"task_id": 51974,
"preparation_id": 6
}
]| 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
40x/50x
{
"message": "string"
}| Code | Meaning |
|---|---|
| 400 | Bad request (e.g., missing required parameters) |
| 401 | Unauthorized access (invalid or missing token) |
| 500 | Internal server error |