# Get a package

`GET /v1/jobs/{id}/package`

Returns a job's package. Only the job's customer may. It gives the newest version, or the one `version` names: when the lab reopens a job to
correct or add to its data and finishes it again, the job gets a new version, and the earlier ones stay readable.
While a reopened job is `running` again, its newest package is still the one from before.

## Headers

- `Authorization` (Bearer key, required): An API key. [Request access](/) to get one.

## Path parameters

- `id` ([JobId](/docs/types/job-id.md) (string, pattern), required): A job's ID: `job_` and then the job's UUID in 26 characters of base32, as a TypeID (github.com/jetify-com/typeid).

## Query parameters

- `version` (integer, at least 0): A package's `version`. Leave it out for the newest.

## Responses

| Status | Meaning |
|---|---|
| 200 | The job's files, rewards and review. |
| 401 | Send a valid API key as `Authorization: Bearer <key>`. |
| 404 | No such job of this customer's, it has no package yet, or no such version. |
| 422 | A parameter or the body does not parse. |
| 500 | Something went wrong on our side. |

200 returns [Package](/docs/types/package.md). Every error is a [Problem](/docs/types/problem.md), whose `detail` says what went wrong.

## Examples

### cURL

```bash
$ curl https://api.sequencylabs.com/v1/jobs/job_01h455vb4pex5vsknk084sn02q/package \
  -H "Authorization: Bearer $SEQUENCY_API_KEY"
```

### Python

```python
import os
import httpx

response = httpx.get(
    "https://api.sequencylabs.com/v1/jobs/job_01h455vb4pex5vsknk084sn02q/package",
    headers={"Authorization": f"Bearer {os.environ['SEQUENCY_API_KEY']}"},
)
response.raise_for_status()
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://api.sequencylabs.com/v1/jobs/job_01h455vb4pex5vsknk084sn02q/package", {
  headers: {
    Authorization: `Bearer ${process.env.SEQUENCY_API_KEY}`,
  },
});
const data = await response.json();
```

### Response (200 OK)

```json
{
  "files": [
    {
      "media_type": "step_1",
      "path": "raw/nmr/1.zip",
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "size_bytes": 48210
    }
  ],
  "reason": null,
  "review": null,
  "rewards": [
    {
      "measure": "yield_pct",
      "measured": 10.0,
      "method": "Stirred 2 h at 25 C.",
      "reaction": null,
      "source": {
        "chemist": "step_1",
        "experiment_id": "step_1",
        "file": "raw/nmr/1.zip",
        "measured_at": "2026-12-01T09:15:00Z",
        "site": "step_1"
      }
    }
  ],
  "version": 1,
  "written_at": "2026-12-01T09:15:00Z"
}
```
