Get a report

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_on returns the newest report generated on that day, in the YYYY-MM-DD format. For example, generated_on=2026-09-15.
  • report_id returns one specific report, using the report_id from an earlier response or the X-Xeneta-Report-Id header.
📘

Generation day is in UTC

generated_on refers 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 to 2026-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 its report_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 codecodeCondition
200 - OKThe report was found and the body is the report object. A HEAD request returns the same headers without a body.
304 - Not ModifiedThe If-None-Match header names the report that would be returned, so there is nothing new. See Polling for new reports.
401 - Unauthorizedinvalid_api_keyThe API key is no longer active, or its user or company has been deactivated.
403 - ForbiddenThe API key is missing or unknown. The body is {"message": "Forbidden"}.
403 - ForbiddenforbiddenThe 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 Foundconfiguration_not_foundThe 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 Foundno_report_yetThe 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 Foundno_report_on_dateNo report was generated on the generated_on day.
404 - Not Foundreport_not_foundThe report_id does not belong to this configuration.
409 - Conflictmultiple_files_per_runThe configuration produces several files per run. See Configurations with several datasets.
422 - Unprocessable Contentinvalid_parameterconfiguration_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 Unavailable and 504 - Gateway Timeout are temporary, so retry them after an increasing delay. Any other unexpected error returns 500 - 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"
Query Params
string
required

Defines the Datalink configuration whose report you want, by the id that appears in the URL of the configuration's page in the Xeneta platform. Ids are case-sensitive. For example, xArk.

date

Selects the newest report generated on this day, in UTC, in the YYYY-MM-DD format. Cannot be combined with report_id.

string

Selects one specific report of the configuration, by the report_id returned in an earlier response. Cannot be combined with generated_on.

Headers
string

The ETag of the report you already have, for example "jB47D". If that report is still the one that would be returned, the response is 304 without a body.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*