Returns a list of institutions (companies) that have been visited at least once. There is no time period limitation on the visit history.
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_company",
"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_company" 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 company IDs from the Proxima CRM database. Only companies with matching IDs will be returned. If omitted, all visited companies will be returned |
Successful Response
200 OK
Depending on the specified format (csv), the system returns a list of visited institutions as plain text.
Content-Type
text/plain
Example Response
company_name,company_type,company_address,company_categ,company_categ_by_direction,company_code,company_chain,company_main,isarchive,company_isshop,company_morionid,company_region,company_city,company_phone,company_gps_lat,company_gps_lng,company_country,company_id Health Clinic,Pharmacy,Kyiv St. 12,A,B,40112233,PharmaNet,MainCorp,No,1,AXM12345,Kyiv,Kyiv,+380441234567,50.4501,30.5234,Ukraine,1033
| Field | Description |
|---|---|
| company_name | Name of the institution |
| company_type | Type of the institution (e.g., Pharmacy, Clinic) |
| company_address | Institution address |
| company_categ | General category of the institution |
| company_categ_by_direction | Category by product line or direction |
| company_code | Tax identification number of the legal entity |
| company_chain | Name of the pharmacy/medical network (if applicable) |
| comapny_main | Main or parent institution name |
| isarchive | Archive flag — reason for archiving (if archived) |
| company_isshop | Flag indicating if the location is a retail point (1 = yes) |
| company_morionid | Institution identifier from the Axioma database |
| company_region | Administrative region of the institution |
| company_city | City of the institution |
| company_phone | Contact phone number |
| company_gps_lat | GPS latitude |
| company_gps_lng | GPS longitude |
| company_id | Internal Proxima CRM institution ID |
Error Responses
40x/50x
{
"message": "string"
}
| Code Range | Description |
|---|---|
| 400-499 | Client-side error (e.g., invalid token, bad request) |
| 500-599 | Server-side error (e.g., job execution failure) |