Subjects
Subjects are individuals whose cryopreserved samples are stored. B2B integrations can create subjects and retrieve their sample container information.
Create a subject
Section titled “Create a subject”curl -X POST https://api.crinsutrack.com/api/v1/external/subjects \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "facilityId": 1, "code": "SUBJ-2024-001", "firstName": "Jane", "lastName": "Doe", "dateOfBirth": "1990-05-15" }'Example Response:
{ "id": 123, "facility": { "id": 1, "name": "Main Facility" }, "code": "SUBJ-2024-001", "firstName": "Jane", "lastName": "Doe", "createdAt": "2024-01-15T10:00:00Z"}List subjects
Section titled “List subjects”curl "https://api.crinsutrack.com/api/v1/external/subjects?page=1&perPage=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"Example Response:
[ { "id": 123, "facility": { "id": 1, "name": "Main Facility" }, "code": "SUBJ-2024-001", "firstName": "Jane", "lastName": "Doe", "createdAt": "2024-01-15T10:00:00Z" }]Get a specific subject
Section titled “Get a specific subject”curl https://api.crinsutrack.com/api/v1/external/subjects/123 \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"Example Response:
{ "id": 123, "facility": { "id": 1, "name": "Main Facility" }, "code": "SUBJ-2024-001", "firstName": "Jane", "lastName": "Doe", "createdAt": "2024-01-15T10:00:00Z"}List sample containers by subject
Section titled “List sample containers by subject”curl "https://api.crinsutrack.com/api/v1/external/sample-containers?subjectCode=SUBJ-2024-001" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"Example Response:
[ { "id": 456, "name": "VL-001", "subject": { "id": 123, "code": "SUBJ-2024-001" }, "description": "Vial 1 - Tissue sample", "storedAt": "2024-01-15T10:30:00Z" }, { "id": 457, "name": "VL-002", "subject": { "id": 123, "code": "SUBJ-2024-001" }, "description": "Vial 2 - Tissue sample", "storedAt": "2024-01-15T10:31:00Z" }]Get sample container location
Section titled “Get sample container location”curl https://api.crinsutrack.com/api/v1/external/sample-containers/456/location \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"Example Response:
{ "id": 456, "name": "VL-001", "description": "Vial 1 - Tissue sample", "storageSolution": { "id": 78, "name": "Tank A" }, "position": { "canister": "C1", "cane": "CN1" }, "storedAt": "2024-01-15T10:30:00Z"}