Order Transactions and Initial Orders
Junction uses the concept of order transactions to group related orders together and provide unified results. An order transaction represents a single testing journey, which will include at a minimum, oneinitial order.
An order transaction is created whenever a new initial order is created and a link is established between the two entities.
-
initialorders are orders that are not derived from another order. This is denoted in the order’soriginfield. -
Order transactions have a
statusfield, which can either beactive,completed, orcancelled.active- one or more orders belonging to the order transaction are in progresscompleted- all expected lab work for this transaction is completed and no further updates are expectedcancelled- all orders belonging to the order transaction have been cancelled
- An order can only ever belong to one order transaction
order_id and order_transaction_id when placing an order in Junction.
Both of these IDs will be needed when implementing some of Junction’s current and future features like redraws.
API Endpoints
The following endpoints are available to retrieve order transaction information and combined results for all orders within a transaction:GET /v3/order_transaction/{order_transaction_id}- Get an order transaction’s details and list of ordersGET /v3/order_transaction/{order_transaction_id}/result- Get combined results for an order transaction in JSON formatGET /v3/order_transaction/{order_transaction_id}/result/pdf- Get combined results for an order transaction in PDF format
GET /v3/orders- Get a list of filtered orders (including the ability to filter by order transaction ID)GET /v3/order/{order_id}- Get an individual orderGET /v3/order/{order_id}/result- Get an individual order’s results