# Data package version ID

{% hint style="warning" %}

### API test authentication

The Open API block allows you to test OS APIs directly from the page with example data and parameters. To use this feature, you will need to add your API Key or OAuth2 token to the authentication field.

For help generating an API Key or OAuth2 token, please see the [Getting started with an API project](https://docs.os.uk/os-apis/core-concepts/getting-started-with-an-api-project) or [OAuth2 documentation](https://docs.os.uk/os-apis/accessing-os-apis/oauth-2-api).
{% endhint %}

## GET /dataPackages/{dataPackageId}/versions/{versionId}

> Get a specific data package version, including details of the files that are available to download.

```json
{"openapi":"3.0.0","info":{"title":"Ordnance Survey Download API","version":"1.0.0"},"tags":[{"name":"Data Packages","description":"Operations providing access to data packages.\nTo access data packages you must supply a valid API key or OAuth 2 access token.\n"}],"servers":[{"url":"https://api.os.uk/downloads/v1/"}],"security":[{"OAuth2":[]},{"APIKeyQuery":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.os.uk/oauth2/token/v1","scopes":{}}}},"APIKeyQuery":{"type":"apiKey","in":"query","name":"key"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"key"}},"parameters":{"dataPackageId":{"name":"dataPackageId","in":"path","description":"The id of the data package.","required":true,"schema":{"type":"string"}}},"schemas":{"DataPackageVersion":{"description":"Detailed information about a data package version, including a list of the files available to download.\n","allOf":[{"$ref":"#/components/schemas/DataPackageVersionSummary"},{"type":"object","required":["downloads"],"properties":{"nextVersionUrl":{"description":"Only populated if there is a newer version of the data package.","type":"string","format":"uri"},"previousVersionUrl":{"description":"Only populated if there is an older version of the data package.","type":"string","format":"uri"},"downloads":{"type":"array","items":{"$ref":"#/components/schemas/Download"}}}}]},"DataPackageVersionSummary":{"type":"object","description":"Summary information about a data package version.\n","required":["id","url","createdOn","reason","supplyType","productVersion","productFormat"],"properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdOn":{"type":"string","format":"date"},"reason":{"type":"string","enum":["INITIAL","UPDATE","EXPANSION","RESUPPLY","ONLINE_ORDER"]},"supplyType":{"type":"string","enum":["FULL","COU"]},"productVersion":{"type":"string"},"format":{"type":"string"},"dataPackageUrl":{"type":"string","format":"uri"}}},"Download":{"type":"object","description":"Information about a specific download file that is made available through this API.\n","required":["url","fileName"],"properties":{"url":{"description":"Getting this URL will return a HTTP redirect to the actual data.","type":"string","format":"uri"},"fileName":{"description":"The name of the file.","type":"string"},"size":{"description":"The file size, in bytes.","type":"integer"},"md5":{"description":"A MD5 checksum of the file data. This can be used to verify the integrity of the data once you have downloaded it.","type":"string"}}}},"responses":{"UnauthorizedError":{"description":"The API key or OAuth 2 access token is missing or invalid.","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"NotFoundError":{"description":"The request does not match any known content.\nThe response will contain a human readable message, and may also contain links to help you\nnavigate to other API endpoints.\n","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"dataPackagesUrl":{"type":"string","format":"uri"},"downloadCatalogueUrl":{"type":"string","format":"uri"},"productUrl":{"type":"string","format":"uri"},"productDownloadsUrl":{"type":"string","format":"uri"}}}}}}}},"paths":{"/dataPackages/{dataPackageId}/versions/{versionId}":{"get":{"summary":"Get a specific data package version, including details of the files that are available to download.","tags":["Data Packages"],"parameters":[{"$ref":"#/components/parameters/dataPackageId"},{"name":"versionId","in":"path","description":"The id of the data package version, or the string 'latest'.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A data package version, including download details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPackageVersion"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-apis/accessing-os-apis/os-downloads-api/technical-specification/data-package-version-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
