Skip to main content

Get Report By ID

Retrieves the status and download link of a previously generated report.

Request Parameters

NameTypeRequired/OptionalDescription
reportHistoryIdnumberRequiredThe report history ID of the report to retrieve.

Request Information

CategoryValue
HTTP requestPOST
URLhttps://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

NameTypeDescription
statusnumberHTTP status code
successbooleanIndicates whether the request succeeded
data.downloadLinkstringURL to download the report in CSV format
data.reportStatusReportStatusCurrent status of the report. Check the Report status type here.

Report Status Type

NameTypeDescription
QUEUEstringThe report generation is queued.
IN_PROGRESSstringThe report is being generated.
COMPLETEDstringThe report generation is complete.
FAILEDstringThe report generation has failed.

Errors

Error CodeMeaning
400Invalid payload! -- Your request is invalid/invalid parameters.
401Unauthorized -- User is not authenticated.
404Not Found -- The specified API could not be found.
500Internal Server Error -- We had a problem with our server. Try again later.

Error response example:

{
"status": 400,
"errors": [
{
"message": "Invalid payload!"
}
]
}