Get Report By ID
Use this BIK API to retrieve a report for a store from an external source.
Request Parameters
Name | Type | Required/Optional | Description |
---|---|---|---|
reportHistoryId | number | Required | The report history ID for the report to be fetched. |
Request Information
Category | Value |
---|---|
HTTP request | POST |
URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-getReportById |
Sample Request
curl --location --request POST 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-getReportById' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"reportHistoryId": 44551,
}'
JSON response example:
{
"status": 200,
"success": true,
"data": {
"downloadLink": "https://firebasestorage.googleapis.com/sample-link",
"reportStatus": "COMPLETED"
}
}
Response parameters
Name | Type | Description |
---|---|---|
status | number | Response status |
success | boolean | Indicates if the response is successful |
data.downloadLink | string | Link to download the report in CSV format. |
data.reportStatus | ReportStatus | Current status of the report. Check the Report status type here. |
Report Status Type
Name | Type | Description |
---|---|---|
QUEUE | string | The report generation is queued. |
IN_PROGRESS | string | The report is being generated. |
COMPLETED | string | The report generation is complete. |
FAILED | string | The report generation has failed. |
Errors
Error Code | Meaning |
---|---|
400 | Invalid payload! -- Your request is invalid/invalid parameters. |
401 | Unauthorized -- User is not authenticated. |
404 | Not Found -- The specified API could not be found. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
Error response example:
{
"status": 400,
"errors": [
{
"message": "Invalid payload!"
}
]
}