API Reference

Available queries

BatchNumberStockLevel - Returns a single Stock Level of a batch based on the id provided

query {
  BatchNumberStockLevel (id: 100012) {
    id
    on_hand
    variant
    batch_number
  }
}

BatchNumberStockLevels - Returns a list of Stock levels of batches based on the filter define

query {
  BatchNumberStockLevels {
    data {
      id
      on_hand
      variant
      batch_number
    }
  }
}


Available fields

id - Int
Unique identifier of the Batch stock level
on_hand - Float
On hand quantity for the batch
Variant - Variant
Variant data
Location - Location
Location data
batch_number - BatchNumber
Batch number informations


Filters

You can create filters based on following fields

variant_id
Example:{ "column": "VARIANT_ID", "operator": "EQ", "value": 100001 }
location_id
Example:{ "column": "LOCATION_ID", "operator": "EQ", "value": 100001 }
batch_number_id
Example:{ "column": "BATCH_NUMBER_ID", "operator": "EQ", "value": 100101 }
batch_number_label
Example:{ "column": "BATCH_NUMBER_LABEL", "operator": "EQ", "value": "lot abc" }

Sorting

You can sort data based on following fields : id, on_hand, variant_id, location_id, batch_number_id