API Queries - Fetch
If, when using the Report API function, a report is not generated instantly, you can use the fetch function to check if the report is ready and retrieve the report once it is ready. This function requires additional parameters. Failing to include them will result in an error response.
- reportid - ID of the report you wish to retrieve (Required)
- start - The starting offset for results. Default is 0 (Optional)
- num - The number of results to show from the report. Default is 100, maximum is 1,000 (Optional)
Note: Make sure to URL encode all values.
Example query and response:
If the requested report is not yet ready, the status "Generating" will be returned. Try again in a few minutes.
Once the report is ready, it will be returned in CSV format, wrapped in XML.
If the report is empty or there is no more data, the response will still include the header row:
Possible error responses for this function are:
- 411 - Report ID is Missing or Invalid
- General errors, such as 200 - Internal Error or 300 - Username or password invalid.