Generate a packet

Required scope: documents:download.

Starts generating a merged PDF from the client's eFolder. Set type to all, exhibits or medical. The documents and the exact file versions are fixed when the request is accepted, so documents added later are not included.

If an equivalent packet is already being generated, or a ready packet with the same selection is still readable, that packet is returned instead of starting another. A 202 response means generation is queued or running: poll Get a packet, or subscribe to the v2.packet.ready and v2.packet.failed webhooks. If a source file changes during generation, the packet fails with input_changed; generate a new packet with a new Idempotency-Key.

Requires an Idempotency-Key. Retrying with the same key and body within 24 hours returns the original result without repeating the action. A retry returns the original packet, even if it failed, and does not extend download access. Counts toward the heavy-operation rate limit.

POST /api/v2/clients/{id}/packets
Bearer token scope documents:download

Path parameters

· 1
id string required

Client ID.

Headers

· 1
Idempotency-Key string · min length: 1· max length: 128 · pattern required

Unique key for this operation, 1 to 128 visible ASCII characters (for example a UUID). Reuse it only when retrying the same request.

Body

required application/json
type string · enum required

values

  • all
  • exhibits
  • medical

Responses