> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pcibooking.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Download Data Block Content

> Download the content of a data block.

<Card title="Data Block Tokenization Guide" icon="book" href="/additional-functions/data-blocks">
  Store and manage arbitrary data securely with GDPR-compliant storage locations
</Card>

Downloads the content stored in a data block. The response body contains the raw data with the same content type that was used when uploading. Use this to retrieve sensitive documents or data that were previously stored via the [Upload Content](/api-reference/additional/upload-data-block-content) endpoint.

## Error Responses

| HTTP Status | Error Code | Description                                                                                                    |
| ----------- | ---------- | -------------------------------------------------------------------------------------------------------------- |
| 401         | -1003      | Not authenticated. The API key is missing or invalid.                                                          |
| 403         | -1003      | Not authorized. The authenticated user does not own this data block or lacks the `CanRetrieveData` permission. |
| 404         | -160       | Data block not found, or the data block exists but has no uploaded content.                                    |
| 500         | -150       | Internal system error.                                                                                         |

## Parameters

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key prefixed with `APIKEY`. Example: `APIKEY your-api-key`. See the [Authentication guide](/getting-started/authentication).
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  The ID of the data block returned in the [create method](/api-reference/additional/create-data-block).
</ParamField>

<RequestExample>
  ```javascript Node.js theme={null}
  const dataBlockId = '22222222';

  const response = await fetch(`https://service.pcibooking.net/api/datablock/${dataBlockId}/data`, {
    headers: {
      'Authorization': 'APIKEY your-api-key'
    }
  });

  const content = await response.text();
  console.log(content);
  ```

  ```python Python theme={null}
  import requests

  data_block_id = '22222222'

  response = requests.get(
      f'https://service.pcibooking.net/api/datablock/{data_block_id}/data',
      headers={
          'Authorization': 'APIKEY your-api-key'
      }
  )

  print(response.text)
  ```
</RequestExample>

## Response

<ResponseExample>
  ```text 200 theme={null}
  The response body contains the uploaded content with the original Content-Type header.
  ```

  ```json 400 theme={null}
  {
      "code": -125,
      "message": "Bad input data",
      "moreInfo": "...",
      "errorList": null
  }
  ```

  ```json 401 theme={null}
  {
      "code": -1003,
      "message": "Not authorized to access this resource",
      "moreInfo": "Bad or missing authorization data, expected APIKEY",
      "errorList": null
  }
  ```

  ```json 404 theme={null}
  {
      "code": -1001,
      "message": "Uri not found",
      "moreInfo": "Data block not found",
      "errorList": null
  }
  ```
</ResponseExample>
