Prerequisites
- A sandbox Team and API key from the Junction Dashboard. See API Keys.
- Your sandbox base URL.
- An HTTP client or a supported Junction SDK.
{{BASE_URL}} for your sandbox base URL and YOUR_API_KEY for your Team API key. The API key header remains x-vital-api-key.
1. Create a patient
In the Junction API, a user represents a patient. Setclient_user_id to the stable identifier your system uses for that patient.
id. You will provide it as user_id when creating the order. See Create User for the complete request and response.
2. Select a lab test
Retrieve the lab tests available to your sandbox Team:id. See Get Available Tests for filters and pagination.
Sandbox Teams include tests for the standard collection modalities. You can also create a custom lab test when you need a specific marker set.
3. Create the order
Provide the patient ID, select the lab test inorder_set, and include the patient’s demographics and collection address. Patient names must meet the patient name requirements.
order. Creating this initial order also creates an order transaction representing the full testing journey. Save order.id and order_transaction.id: use the order ID for order-specific operations and the transaction ID to group the initial order with any related orders and retrieve their combined results. Inspect order.status and order.events as the individual order progresses. See Create Order for all ordering options.
4. Test the order workflow
Sandbox orders remain in their initial state until you simulate their progression. Use the Junction Dashboard or the Simulate Order endpoint, then verify that your integration receives the expected webhook events. See Testing in Sandbox for supported simulations, modality-specific test data, and result customization.Next steps
- Learn how order statuses work in Order Status and Lifecycle.
- Learn how related orders and combined results work in Order Transactions.
- Review the workflow for the order’s testing modality.
- Configure patient communications if Junction should contact the patient.
- Continue through the integration lifecycle with Orders and Results.