Skip to content

Get Data

Request the list of available files

If a policy has a scheduled publish time, the policy may have one or multiple data files available. You can get the list of references to the data files by sending a GET request to /v2/policies/{policyId}/contributions

Response

A successful get response contains:

  • status code 200
  • a collection of all data files. Each contract contains:
    1. fileDate
    2. fileName
    3. fileSize
    4. fileId

Request to download a file

One you have retrieved the file Ids, you can download a specific file by sending a GET request to /v2/policies/{policyId}/data/{contributionId}

If you wish to download the latest file, send a GET request to /v2/policies/{policyId}/data

Decrypt a file

To decrypt an encrypted file, you can send a GET request to /v2/policies/{policyId}/data/unencrypted or /v2/policies/{policyId}/data/{contributionId}/unencrypted if the policy has multiple files available.

Response

A successful get response contains:

- status code 200
- attachment

If there are no files available, you will receive the response with status code 204

An example of this response would be:

{
  "fileName": "string",
  "fileSize": 0,
  "fileDate": "2021-12-08T20:05:43.286Z",
  "fileId": "string"
}

A failed retrieval response contains a 4xx or 5xx error code with details in the response body. Please refer to this REST API Tutorial for the full list of all HTTP status codes.


Last update: April 5, 2023