Packs

Packs track physical items dispensed to participants — medication kits, device boxes, sample packs. A pack type defines what is recorded about each pack; packs of that type are then created in bulk, held at a site, and assigned to participants as they are handed out.

Listing packs and types needs trial.listPacks (or site.listPacks on a site); creating and editing needs trial.writePacks or site.writePacks; deleting needs trial.deletePacks; assigning a pack to a participant needs trial.assignPacks or site.assignPacks.

Endpoints

Method Path Description
GET /trials/<trialId>/pack-types Pack types, as {"packTypes": [...]}.
POST /trials/<trialId>/pack-types Create a pack type.
GET PUT DELETE /pack-types/<packTypeId> Read, update or delete one.
GET /trials/<trialId>/packs?packType= Packs, as {"packs": [...]}, optionally of one type.
POST /trials/<trialId>/packs Create one pack, or up to 500.
GET PUT DELETE /packs/<packId> Read, update or delete a pack.
PUT /packs/update Update several at once: {"ids": [...], ...fields}.
POST /packs/delete Delete several: {"ids": [...]}.

Assigning a pack to a participant is done from the participant: PUT /trials/<trialId>/participants/<participantId>/packs/<packId> — see Participant management.

Pack type fields

Field Type Notes
name string 2–120 characters.
description string Up to 2000 characters.
standardFields list of strings Which of the built-in fields packs of this type use: name, batchNumber. Both by default.
extendedFields list Custom fields: each {"key", "label", "type"} with type one of text, integer, float, date, datetime, boolean. Up to 50.

Pack fields

POST /trials/<trialId>/packs takes a packType (required) and the fields below for one pack, or {"packType": "…", "packs": [{...}, …]} for many; the response is {"packs": [...]}.

Field Type Notes
name string Up to 200 characters. Typically the pack's own number or label.
batchNumber string Up to 100 characters.
extended object Values for the type's extendedFields, keyed by key.
assignedToSite site _id Where the pack is held. null for the trial level.
availableToAllGroups, availableToGroups boolean, list of group _ids Which participants it may be given to.

A pack that has been assigned carries the participant it went to and when.