---
title: "Download batch as zip."
method: GET
path: "/batch/{batchId}/files"
---

# Download batch as zip.

`GET /batch/{batchId}/files`

## Request

- Base URL: `http://fss.ukho.gov.uk`
- URL: `http://fss.ukho.gov.uk/batch/{batchId}/files`
- Auth: HTTP bearer

Download all the files in a batch as a single Zip file.

## Path parameters

- `batchId` string, GUID, required

## Headers

- `Range` string, bytes=startByte-endByte or bytes=startByte-

## Response `200`

OK - returns the file content.

## Other responses

- `206`: Partial Content - The response is a partial content because a Range was specified for a part of the file.
- `307`: Temporary Redirect - the file should be downloaded from the URL provided in the `Location` header. For reasons of download performance, when downloading a large file the client will be redirected to a direct/accelerated URL. The URL may include a temporary access token. The request to the URL should be a `GET` request with the full URL including any query parameters. No additional headers (including authorize headers) will be required. Note - the redirect URL is likely to have a time and/or IP address limited access token attached to it, so should not be stored.
- `400`: Bad request - Could be a bad batch ID or a batch ID that doesn't exist; a bad format in the range header (note that invalid values in the range header would result in a 416 response (Range Not Satisfiable)).
- `401`: Unauthorised - either you have not provided any credentials, or your credentials are not recognised.
- `403`: Forbidden - you have been authorised, but you are not allowed to access this resource.
- `404`: File not found - The whole batch zip is not ready yet, but may be available in the future. Subsequent requests by the client are expected. Creation of the whole batch zip file is a background process. The service will return 404 on this endpoint until the whole batch zip file is ready.
- `410`: Gone - the specified batch has expired and is no longer available.
- `416`: Range Not Satisfiable - If the offset in the Range header is invalid and exceeds the file’s total length, the request will return status code 416 (Range Not Satisfiable).
- `429`: You have sent too many requests in a given amount of time. Please back-off for the time in the Retry-After header (in seconds) and try again.

---

[API](https://skmtc.dev/uk-hydrographic-office/apis/ukho-file-share-service-apis.md) - [All operations](https://skmtc.dev/uk-hydrographic-office/apis/ukho-file-share-service-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/uk-hydrographic-office/apis/ukho-file-share-service-apis/revisions/31121f0e92c4?raw)
