Skip to content

Create form packet

Request

Create a new form packet for a patient. Specify the patient and either a list of form template IDs or a form template group ID. Optionally set a due date and pre-fill form fields with known data using attribute name keys (see the prefill field for details). Use GET /form/template/{id}/attribute to discover available attribute names for a template.

Security
PartnerApiKey and PartnerOAuth
Path
accountIdinteger, (int64)required

Account identifier

locationIdinteger, (int64)required

Location identifier

Bodyapplication/jsonrequired
dueDatestring

Due date for completion (ISO 8601)

Example:"2025-01-20T17:00:00-05:00"
formTemplateGroupIdinteger, (int64)

Form template group ID. Either formTemplateGroupId or formTemplateIds is required. When both are provided, formTemplateGroupId takes precedence.

Example:500
formTemplateIdsArray of integers

List of form template IDs to include. Either formTemplateIds or formTemplateGroupId is required.

Example:
[ 101, 102, 103 ]
patientIdinteger, (int64)required

Patient ID

Example:67890
prefillobject

Pre-fill form fields with known data. Keys are form element attribute names (case-insensitive, trimmed) and values are the answer strings. Applied across all forms in the packet — each field whose attribute name matches a key will be pre-filled. Fields without a match are auto-filled from the patient record when possible. Use GET /form/template/{id}/attribute to discover available attribute names.

Example:
{ "email": "john@example.com", "first_name": "John" }
sendNotificationboolean

Send notification (email and SMS) to the patient. Defaults to false if not specified.

Example:true
curl -i -X POST \
  'https://api-docs.lobbie.com/_mock/openapi/partner/v2/account/{accountId}/location/{locationId}/form-packet' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "dueDate": "2025-01-20T17:00:00-05:00",
    "formTemplateGroupId": 500,
    "formTemplateIds": [
      101,
      102,
      103
    ],
    "patientId": 67890,
    "prefill": {
      "email": "john@example.com",
      "first_name": "John"
    },
    "sendNotification": true
  }'

Responses

Form packet created successfully

Bodyapplication/json
completedAtstring, (date-time)

Completion timestamp. Not monotonic: can transition back to null and re-set if forms are added to a completed packet, an EHR sync retracts completion, or staff manually clear it. Treat each form-packet.updated event as a state snapshot, not a terminal completion signal.

Example:"2025-01-18T14:30:00-05:00"
createdAtstring, (date-time)

Creation timestamp (UTC)

Example:"2025-01-15T14:00:00Z"
dueDatestring, (date-time)

Due date for completion (ISO 8601)

Example:"2025-01-20T17:00:00-05:00"
formTemplateIdsArray of integers

Form template IDs for the forms in this packet

Example:
[ 101, 102 ]
idinteger, (int64)

Unique form packet identifier

Example:12345
isActiveboolean

Whether the form packet is active. Inactive packets have been deactivated by the system (e.g. via appointment cancellation).

Example:true
isArchivedboolean

Whether the form packet has been archived via DELETE or PUT.

Example:false
locationIdinteger, (int64)

Location ID

Example:111
locationNamestring

Location name

Example:"Main Street Clinic"
patientIdinteger, (int64)

Patient ID

Example:67890
patientNamestring

Patient name

Example:"John Doe"
updatedAtstring, (date-time)

Last update timestamp (UTC)

Example:"2025-01-15T14:00:00Z"
Response
{ "completedAt": "2025-01-18T14:30:00-05:00", "createdAt": "2025-01-15T14:00:00Z", "dueDate": "2025-01-20T17:00:00-05:00", "formTemplateIds": [ 101, 102 ], "id": 12345, "isActive": true, "isArchived": false, "locationId": 111, "locationName": "Main Street Clinic", "patientId": 67890, "patientName": "John Doe", "updatedAt": "2025-01-15T14:00:00Z" }