Returns a Datalink report with a link to download it.
Selecting a report
By default, the endpoint returns the newest report of the configuration. To request a different one, pass one of the following parameters, but not both:
generated_onreturns the newest report generated on that day, in theYYYY-MM-DDformat. For example,generated_on=2026-09-15.report_idreturns one specific report, using thereport_idfrom an earlier response or theX-Xeneta-Report-Idheader.
Generation day is in UTC
generated_onrefers to the day the report was generated, in UTC, not to the period its data covers. A report generated at 23:59 UTC on 15 September 2026 belongs to2026-09-15, whatever your local time zone. If several reports were generated on the same day, the newest one is returned. To get an earlier one, use itsreport_id.
If no report was generated on the requested day, the endpoint returns 404 with the code no_report_on_date. It never falls back to an earlier day.
The endpoint ignores any parameters it does not recognize.
Configurations with several datasets
An ocean configuration that exports several datasets produces several files per run. The endpoint cannot return those yet, and responds with 409 and the code multiple_files_per_run. To download that data through the API, set up one configuration per dataset.
Error responses
Every error response from this endpoint carries a code that does not change, so your integration can rely on it:
{
"detail": {
"code": "invalid_parameter",
"parameter": "generated_on"
}
}The only exceptions are server errors and a missing or unknown API key. A request without a valid API key is rejected before it reaches Datalink, with 403 and the body {"message": "Forbidden"}.
Response codes
In addition to the standard response codes, this endpoint behaves as follows.
| Response code | code | Condition |
|---|---|---|
200 - OK | The report was found and the body is the report object. A HEAD request returns the same headers without a body. | |
304 - Not Modified | The If-None-Match header names the report that would be returned, so there is nothing new. See Polling for new reports. | |
401 - Unauthorized | invalid_api_key | The API key is no longer active, or its user or company has been deactivated. |
403 - Forbidden | The API key is missing or unknown. The body is {"message": "Forbidden"}. | |
403 - Forbidden | forbidden | The user of the API key lacks a permission the configuration requires: access to Datalink for the configuration's product, to Datalink configurations, or to one of its datasets. |
404 - Not Found | configuration_not_found | The user of the API key has not created a configuration with this id. This covers unknown ids, configurations created by someone else and configurations that have been deleted. |
404 - Not Found | no_report_yet | The configuration has not generated a report yet, or its newest report is not available for download. The response carries a Retry-After: 300 header. |
404 - Not Found | no_report_on_date | No report was generated on the generated_on day. |
404 - Not Found | report_not_found | The report_id does not belong to this configuration. |
409 - Conflict | multiple_files_per_run | The configuration produces several files per run. See Configurations with several datasets. |
422 - Unprocessable Content | invalid_parameter | configuration_id is missing or is not a valid id, generated_on is not a valid YYYY-MM-DD date, report_id is not a valid id, or both generated_on and report_id were passed. The parameter field names the rejected parameter. |
Retrying server errors
502 - Bad Gateway,503 - Service Unavailableand504 - Gateway Timeoutare temporary, so retry them after an increasing delay. Any other unexpected error returns500 - Internal Server Error.
Examples
Each example below calls the endpoint, reads url from the response and downloads the file. The -f option makes curl stop when the endpoint returns an error, instead of trying to download a link that is not there. Name the file after the format in the response, since air reports are ZIP archives.
Newest report
url=$(curl -fsS -H "X-Auth: $XENETA_API_KEY" \
"https://api.xeneta.com/v3.0/datalink/report?configuration_id=xArk" | jq -er .url) &&
curl -fsS -o latest.csv "$url"Report generated on a given day
url=$(curl -fsS -H "X-Auth: $XENETA_API_KEY" \
"https://api.xeneta.com/v3.0/datalink/report?configuration_id=xArk&generated_on=2026-09-15" | jq -er .url) &&
curl -fsS -o report-2026-09-15.csv "$url"One specific report
url=$(curl -fsS -H "X-Auth: $XENETA_API_KEY" \
"https://api.xeneta.com/v3.0/datalink/report?configuration_id=xArk&report_id=U4nnv" | jq -er .url) &&
curl -fsS -o report-U4nnv.csv "$url"