Skip to main content

How to download the files

To download the files, make a GET request to the following endpoint:

/v1/trade/vehicles/bulk-download

Pass the API key and JWT token as HTTP headers, as shown in the following example:

How to authenticate with the API

curl -X GET https://api.example.com/v1/trade/vehicles/bulk-download \
-H "Authorization": "Bearer { issued access token }"
-H "X-API-Key": "{ issued api key }"

The response will be a JSON object containing URLs for each file that you can download. For example, if the API endpoint is called on a Wednesday, 5 URLs will be sent.

There will be:

  • 1 URL for the bulk file generated the previous Sunday
  • 4 URLs for the delta files generated on the Sunday, Monday, Tuesday and Wednesday

If something goes wrong when generating a delta file, the data for the missing export will be included in a later export.

The URLs are temporarily presigned URL links, allowing access to the files stored in S3. The links will expire 5 minutes after being generated, so you should download the files as soon as possible after receiving the response. If the URL links expire, call the API endpoint again to generate new URLs.

Downloads in progress will continue after the link expires.

Here is an example of the response:

{
  "bulk": [
    {
      "filename": "v1/public/bulk/year=2023/month=12/day=3/bulk-light-vehicle_03-12-2023.zip",
      "downloadUrl": "https://s3.example.com/v1/public/bulk/year=2023/month=12/day=3/bulk-light-vehicle_03-12-2023.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F2023-12-07%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2023-12-07T110808Z&X-Amz-Expires=300&X-Amz-Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024&X-Amz-SignedHeaders=host",
      "fileSize": 19778478487,
      "fileCreatedOn": "2023-12-03"
    }
  ],
  "delta": [
    {
      "filename": "v1/public/delta/year=2023/month=12/day=3/delta-light-vehicle_03-12-2023.zip",
      "downloadUrl": "https://s3.example.com/v1/public/delta/year=2023/month=12/day=3/delta-light-vehicle_03-12-2023.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F2023-12-07%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2023-12-07T110808Z&X-Amz-Expires=300&X-Amz-Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024&X-Amz-SignedHeaders=host",
      "fileSize": 19778478487,
      "fileCreatedOn": "2023-12-03"
    },
    {
      "filename": "v1/public/delta/year=2023/month=12/day=4/delta-light-vehicle_04-12-2023.zip",
      "downloadUrl": "https://s3.example.com/v1/public/delta/year=2023/month=12/day=4/delta-light-vehicle_04-12-2023.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F2023-12-07%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2023-12-07T110808Z&X-Amz-Expires=300&X-Amz-Signature=8d9b5998d2419d0191a8a9f3069b530ee4f2f137e6b8c0f59cfc232b4028d2d2&X-Amz-SignedHeaders=host",
      "fileSize": 16616,
      "fileCreatedOn": "2023-12-04"
    },
    {
      "filename": "v1/public/delta/year=2023/month=12/day=5/delta-light-vehicle_05-12-2023.zip",
      "downloadUrl": "https://s3.example.com/v1/public/delta/year=2023/month=12/day=5/delta-light-vehicle_05-12-2023.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F2023-12-07%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2023-12-07T110808Z&X-Amz-Expires=300&X-Amz-Signature=8d9b5998d2419d0191a8a9f3069b530ee4f2f137e6b8c0f59cfc232b4028d2d2&X-Amz-SignedHeaders=host",
      "fileSize": 16616,
      "fileCreatedOn": "2023-12-05"
    },
    {
      "filename": "v1/public/delta/year=2023/month=12/day=6/delta-light-vehicle_06-12-2023.zip",
      "downloadUrl": "https://s3.example.com/v1/public/delta/year=2023/month=12/day=6/delta-light-vehicle_06-12-2023.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F2023-12-07%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2023-12-07T110808Z&X-Amz-Expires=300&X-Amz-Signature=8d9b5998d2419d0191a8a9f3069b530ee4f2f137e6b8c0f59cfc232b4028d2d2&X-Amz-SignedHeaders=host",
      "fileSize": 15312,
      "fileCreatedOn": "2023-12-06"
    }
  ]
}

To download a file, you can use any HTTP client, such as curl, wget, or Postman. For example, to download the bulk file using curl, you can use the following command:

curl -O https://s3.example.com/v1/public/bulk/year=2023/month=12/day=5/bulk-light-vehicle_05-12-2023.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F2023-12-07%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=2023-12-07T110808Z&X-Amz-Expires=300&X-Amz-Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024&X-Amz-SignedHeaders=host