Skip to main content

Get Report By ID

Use this BIK API to retrieve a report for a store from an external source.

Request Parameters

NameTypeRequired/OptionalDescription
reportHistoryIdnumberRequiredThe report history ID for the report to be fetched.

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
statusnumberResponse status
successbooleanIndicates if the response is successful
data.downloadLinkstringLink 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!"
}
]
}