latestOpenAPI 3.0.02026-08-10330179317.3 KB

0534e4d70b77

Sample Pooling

Creates a pool event

This endpoint facilitates the creation of pool events and allows for the aggregation of stocks based on selected logic.

It supports three methods for pooling:

  1. Fixed Amount Pooling: Using the createFixedSamplePoolingEvent schema, which draws a fixed amount from all listed stocks.

  2. Custom Amount Pooling: Using the createCustomSamplePoolingEvent schema, which allows for drawing custom amounts from each stock.

  3. Total Consumption Pooling: Using the createCustomSamplePoolingEvent schema, which draws and consumes the entire amount from each stock.

Ensure the request body matches the structure defined in the referenced schemas for successful operation.

post/api/v1/pool_events

Request body

OR
OR

Example request

{
  "token": "YOUR TOKEN IS HERE",
  "item": {
    "pool_type": "fixed",
    "unit": "µL",
    "stocks_list": [
      1291,
      1293
    ],
    "pooled_stock_info": {
      "stockable_type": "Biocollections::Bacterium",
      "storage_type": "System::Storage::Storage"
    }
  }
}

Response

OK

idinteger

The ID of the pool event

namestring

The description of pool purpose

unit_typestring
pool_typestring
unitstring
initial_amountstring
member_idinteger

The initiator of the pool action

stock_idinteger

The pooled stock ID

stock_namestring

The pooled stock name

stock_urlstring

Example response

{
  "id": 7,
  "unit_type": "volume",
  "pool_type": "fixed",
  "initial_amount": "2.0",
  "stock_url": "/storage/stocks/620"
}