latestOpenAPI 3.0.02026-08-10330179317.3 KB

0534e4d70b77

Stocks

List all stocks in your account

get/api/v1/stocks

Query parameters

tokenstring required
pageinteger

the default call is with page = 1

metastring

show summarized data information - true/false

stockable_typestring

inventory item type(In order to list all stocks of a stockable item)

stockable_idinteger

inventory item id (In order to list all stocks of a stockable item)

kendostring required

Implementation of the filter necessitates the utilization of all three components: field name, operator, and value

Valid field names are:

<table style="border-collapse: collapse; width: 100%;"> <tr> <td style="border: none; padding-right: 15px;"> <ul> <li>name</li> <li>id</li> <li>volume_to_display</li> <li>weight_to_display</li> <li>storage_location</li> <li>created_at</li> <li>owner_id</li> <li>description</li> <li>stored_on</li> <li>stored_by</li> </ul> </td> <td style="border: none;"> <ul> <li>privacy</li> <li>container_type</li> <li>units</li> <li>lot</li> <li>expiration_date</li> <li>aliquoted_by</li> <li>aliquoted_on</li> <li>content</li> <li>barcode</li> <li>concentration_to_display</li> </ul> </td> </tr> </table>

Valid operators are:

<table style="border-collapse: collapse; width: 100%;"> <tr> <td style="border: none; padding-right: 15px;"> <strong style="font-size: 90%;">String operators</strong> <ul> <li>contains: contains</li> <li>eq: is equal to</li> <li>neq: is not equal to</li> <li>doesnotcontain: not contains</li> <li>startswith: starts with</li> <li>endswith: ends with</li> <li>isnullorempty: is empty</li> <li>isnotnullorempty: is not empty</li> </ul> </td> <td style="border: none;"> <strong style="font-size: 90%;">Date & Number operators</strong> <ul> <li>_eq: is equal to</li> <li>_neq: is not equal to</li> <li>_gte: is after than or equal to</li> <li>_gt: is after than</li> <li>_lte: is before than or equal to</li> <li>_lt: is before than</li> <li>isnull: is empty</li> <li>isnotnull: is not empty</li> </ul> </td> </tr> </table>

Value: The desired search term

{
  "kendo": "true",
  "filter": {
    "logic": "and",
    "filters": {
      "0": {
        "field": "name",
        "operator": "contains",
        "value": "myValue"
      },
      "1": {
        "field": "id",
        "operator": "_eq"
      },
      "2": {
        "field": "stored_on",
        "operator": "_gt",
        "value": "2023-01-11"
      },
      "3": {
        "field": "content",
        "operator": "startswith",
        "value": "pla"
      },
      "4": {
        "field": "stored_by",
        "operator": "contains",
        "value": {
          "name": "User Name",
          "id": "[1]"
        }
      }
    }
  }
}

Response

OK