Get Public Lab Visit Print Payload (v1)
Method & Path
GET /api/v1/public/labs/visits/:token/print-payload
Actual backend path: /v1/public/labs/visits/:token/print-payload
Description
Returns the payload needed to render the public print view for a lab visit (no authentication). The token is generated from the workspace side and is intended to be shared with the Customer (client).
Authentication
None
Persona Access:
- Admin: Not applicable
- Workspace Owner: Not required
- Staff: Not required
- Customer: Allowed (link-based)
Headers
None
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Public share token (hex) |
Response 200 OK
{
"workspace": {
"id": "507f1f77bcf86cd799439011",
"name": "My Lab"
},
"client": {
"id": "507f1f77bcf86cd799439012",
"name": "Patient Name",
"dateOfBirth": "1990-01-01T00:00:00.000Z",
"gender": "male",
"contactMethods": [
{ "type": "phone", "value": "+9725xxxxxxx", "isPreferred": true }
]
},
"referral": {
"id": "507f1f77bcf86cd799439014",
"name": "Dr. Referral",
"countryCode": "+972",
"phone": "594033635",
"whatsappNumber": null
},
"labVisit": {
"id": "507f1f77bcf86cd799439013",
"workspaceId": "507f1f77bcf86cd799439011",
"clientId": "507f1f77bcf86cd799439012",
"labVisitType": "in-lab",
"labVisitStatus": "ready",
"labTestIds": [286406],
"labTestSnapshots": [],
"labVisitDate": "2026-01-12T10:00:00.000Z",
"labVisitNotes": null,
"labVisitPricing": {},
"labTestResults": [],
"deletedAt": null,
"createdAt": "2026-01-12T10:00:00.000Z",
"updatedAt": "2026-01-12T10:00:00.000Z"
},
"testResults": [],
"testProfiles": []
}
Common Errors
- 400 Bad Request: Missing/invalid token
- 404 Not Found: Token not found (invalidated or never existed)
- 500 Internal Server Error: Unexpected server error