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

# VMS Upload

> Push fulfilled requirement packets back to the VMS

After [ingestion](/guides/requirement-ingestion), Ready Health collects documents, searches, and statements against each requirement. When those items are `FULFILLED`, you upload the compiled packet to the VMS.

## Packets

A **packet** is one or more fulfilled artifacts grouped for a single VMS upload. Requirements share a `packetGroup` (for example `clinical` vs `hr`). `GET /placement/{id}` returns the packets on that placement:

```json theme={null}
{
  "packets": [
    {
      "id": "9c8b7a6d-1111-2222-3333-444444444444",
      "packetGroup": "clinical",
      "status": "COMPLETE"
    }
  ]
}
```

| Packet status | Meaning |
| - | - |
| `INCOMPLETE` | One or more requirements in the group are not fulfilled |
| `COMPLETE` | Requirements are fulfilled; ready to compile / upload |
| `COMPILING` | Packet file is being built |
| `COMPILED` | File is ready |
| `UPLOADING` | VMS upload is in progress |
| `UPLOADED` | VMS accepted the packet |
| `FAILED` | Compile or upload failed — retry after fixing the underlying items |

## Starting an upload

Call `POST /vms/upload-packet` with the packet id from the placement:

```json theme={null}
{
  "packet_id": "9c8b7a6d-1111-2222-3333-444444444444"
}
```

The call is accepted asynchronously (`202`):

```json theme={null}
{
  "status": "accepted",
  "taskId": "0f1e2d3c-aaaa-bbbb-cccc-dddddddddddd",
  "packetId": "9c8b7a6d-1111-2222-3333-444444444444",
  "packetGroup": "clinical"
}
```

Ready Health compiles the fulfilled documents in that group and writes them into the VMS placement (`vmsPlacementRefId` on the placement). Which VMS portal and how the files are attached is part of the integration config — you only pass the packet id.

## Tracking status

Poll `GET /placement/{id}/package-status`. Each packet includes `status`, `uploadedAt`, and `compiledFileId` once those exist.

Typical path:

```
COMPLETE → COMPILING → COMPILED → UPLOADING → UPLOADED
```

If status is `FAILED`, inspect the placement requirements (rejected / expired items), fix them, and call `POST /vms/upload-packet` again with the same `packet_id`.
