Skip to content

B2B Integration

Server-to-server integrations for external systems (EMR, LIS, etc.) that need to request storage and retrieval operations.

  • OAuth 2.0 client credentials from your Crinsutrack administrator (see Authentication)
  • A tool for making HTTP requests (curl, Postman, or your preferred HTTP client)

The Crinsutrack API is organized around these core resources:

ResourceDescription
OrganizationTop-level account representing a company or institution
FacilityPhysical location (clinic, lab, storage site)
SubjectIndividual whose samples are stored
Sample ContainerPhysical container (vial, straw) holding cryopreserved material
ContainerStorage level within a storage solution (canister, cane, rack, box)
Storage SolutionPhysical storage unit (tank, dewar) holding containers
Procedure RequestRequest for storage/retrieval created by integrations, requires web app approval
ProcedureTracked activity: register storage, storage, retrieval, transfer, refill

All resources are scoped by organization. B2B integrations can only access data within their authorized organization’s facilities.


Register individuals for sample storage.

Terminal window
curl -X POST https://api.crinsutrack.com/api/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,
"facilityId": 1,
"code": "SUBJ-2024-001",
"firstName": "Jane",
"lastName": "Doe",
"dateOfBirth": "1990-05-15",
"createdAt": "2024-01-15T10:00:00Z"
}

Submit storage and retrieval requests. These requests are reviewed and approved by Crinsutrack web app users before becoming actual procedures that authorized devices (like SCARF) execute.

StateDescription
PENDINGRequest submitted, awaiting review
ACCEPTEDRequest approved, procedure created
REJECTEDRequest denied by web app user
CANCELLEDRequest cancelled by requester
Terminal window
curl -X POST https://api.crinsutrack.com/api/procedure-requests \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "STORE",
"facilityId": 1,
"subjectCode": "SUBJ-2024-001",
"sampleContainers": [
{ "sampleContainerId": "VL-001", "description": "Vial 1 - Tissue sample" },
{ "sampleContainerId": "VL-002", "description": "Vial 2 - Tissue sample" }
]
}'

Example Response:

{
"id": 5678,
"type": "STORE",
"status": "PENDING",
"facilityId": 1,
"subjectCode": "SUBJ-2024-001",
"sampleContainers": [
{ "sampleContainerId": "VL-001", "description": "Vial 1 - Tissue sample" },
{ "sampleContainerId": "VL-002", "description": "Vial 2 - Tissue sample" }
],
"procedureId": null,
"createdAt": "2024-01-15T10:00:00Z"
}

First, find sample containers for the subject:

Terminal window
curl "https://api.crinsutrack.com/api/sample-containers?subjectCode=SUBJ-2024-001" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Then request retrieval:

Terminal window
curl -X POST https://api.crinsutrack.com/api/procedure-requests \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "RETRIEVAL",
"facilityId": 1,
"subjectCode": "SUBJ-2024-001",
"sampleContainerIds": [456, 457]
}'

Monitor request status and linked procedures.

Terminal window
curl https://api.crinsutrack.com/api/procedure-requests/5678 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

When pending:

{
"id": 5678,
"type": "STORE",
"status": "PENDING",
"procedureId": null,
"createdAt": "2024-01-15T10:00:00Z"
}

When accepted:

{
"id": 5678,
"type": "STORE",
"status": "ACCEPTED",
"procedureId": 1234,
"acceptedAt": "2024-01-15T10:15:00Z",
"acceptedBy": "Jane Doe"
}
Terminal window
curl "https://api.crinsutrack.com/api/procedure-requests?status=PENDING" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Once a request is accepted, track the resulting procedure:

Terminal window
curl https://api.crinsutrack.com/api/procedures/1234 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

{
"id": 1234,
"type": "storage",
"status": "COMPLETED",
"facilityId": 1,
"storageId": 78,
"sampleContainerIds": [456, 457, 458],
"requestId": 5678,
"performedBy": "Jane Doe",
"createdAt": "2024-01-15T10:30:00Z",
"startedAt": "2024-01-15T10:30:05Z",
"completedAt": "2024-01-15T10:31:00Z",
"error": null
}
StateDescription
CREATEDProcedure created and awaiting device execution
IN_PROGRESSProcedure is currently being executed by a device
COMPLETEDProcedure finished successfully
CANCELLEDProcedure was cancelled before completion
FAILEDProcedure encountered an error and could not complete

Access subjects, sample containers, storage inventory, and procedures.

Terminal window
curl "https://api.crinsutrack.com/api/subjects?page=1&perPage=10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Terminal window
curl https://api.crinsutrack.com/api/subjects/123 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Terminal window
curl "https://api.crinsutrack.com/api/sample-containers?subjectCode=SUBJ-2024-001" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Terminal window
curl https://api.crinsutrack.com/api/sample-containers/456/location \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

{
"sampleContainerId": 456,
"storageId": 78,
"storageName": "Tank A-01",
"position": "Canister 3, Cane 2, Slot 5",
"storedAt": "2024-01-15T10:30:00Z"
}
Terminal window
curl "https://api.crinsutrack.com/api/storage?facilityId=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Terminal window
curl https://api.crinsutrack.com/api/storage/78/inventory \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Terminal window
curl "https://api.crinsutrack.com/api/procedures?facilityId=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Terminal window
curl https://api.crinsutrack.com/api/procedures/1234 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Note: B2B integrations can view procedures but cannot create them directly or change their status. Use Request Procedures to request storage/retrieval operations. See Roles & Permissions for details.


Most list endpoints support these query parameters:

ParameterDescriptionExample
pagePage number (default: 1)?page=2
perPageItems per page (default: 10)?perPage=25
field=valueExact match filter?status=active
field_like=valuePartial match (case-insensitive)?name_like=john
field_from=valueGreater than or equal?createdAt_from=2024-01-01
field_to=valueLess than or equal?createdAt_to=2024-12-31