Description
This endpoint retrieves the result of a previously completed data generation job. The format of the response depends on the format specified when the job was initially requested (csv or json).
Endpoint
CSV: GET https://yourdomain.pharmahrm.com/crm-api/db-function/result/{{job_id}}
JSON: GET https://yourdomain.pharmahrm.com/crm-api/db-function/result/{{job_id}}?batch={{batch_number}}
Authentication
Bearer Token (required)
Request
Headers
| Key | Value |
|---|---|
| Authorization | Bearer <token>
|
| Accept |
text/plain for CSV (optional) |
Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| job_id | Integer | Yes | Identifier of the submitted job |
Body
No request body is required.
Successful Response
200 OK
CSV Format
If the job was requested with the csv format, the response will be returned as plain text, with comma-separated values.
Content-Type: text/plain
Example Response:
name,manager,country,region,direction,position,Активен,user_id,workstartdate,workenddate,role
Гр... Лео... Л...,Ба.... Сер... В...,Україна,"Житомирська,Волинська",RX,XXXXX,0,7,2025-02-08,2025-02-08,ROLE_USER_RMData is comma-delimited. Fields are localized depending on the language settings
used in the system
Error Responses
{
"message": "string"
}| Code Range | Description |
|---|---|
| 400-499 | Client errors (e.g., invalid token, job not ready) |
| 500–599 | Server errors |