Stocktakes
Mutation
adjustInventory — Returns ProductInventory
Scopes Required: express_stocktake
| Arguments | Type | Description |
|---|---|---|
|
product |
The product to adjust the inventory of |
|
|
outlet |
The outlet that should be affected by the adjustment |
|
|
cases |
Float |
Amount of cases to adjust, defaults to 0 |
|
items |
Float |
Amount of items to adjust, defaults to 0 |
|
override |
Boolean |
Whether the adjust overrides the current inventory or adds to the current inventory, defaults to |
|
barcode |
String |
The barcode that was used in this adjustment |
Example Mutation
mutation AdjustInventory($product: ID!, $outlet: ID!) {
adjustInventory(product: $product, outlet: $outlet) {
quantity,
singleLevel,
caseLevel,
reorderLevel,
reorderLevelSingles
}
}
# Example variables
{
"product": "<PRODUCT>",
"outlet": "<OUTLET>"
}Mutation
applyStocktake — Returns Stocktake
No scope required
Updates product counts in completed stocktakes
| Arguments | Type | Description |
|---|---|---|
|
id |
The id of the stocktake |
|
|
zero |
Boolean! |
Whether the inventory of the products not in the stocktake should be zeroed or not |
Example Mutation
mutation ApplyStocktake($id: ID!, $zero: Boolean!) {
applyStocktake(id: $id, zero: $zero) {
id,
name,
type,
status,
displayExpected
}
}
# Example variables
{
"id": "<ID>",
"zero": "<ZERO>"
}Mutation
cancelStocktake — Returns Stocktake
Scopes Required: perform_stocktake
| Arguments | Type | Description |
|---|---|---|
|
id |
The id of the stocktake to cancel |
Example Mutation
mutation CancelStocktake($id: ID!) {
cancelStocktake(id: $id) {
id,
name,
type,
status,
displayExpected
}
}
# Example variables
{
"id": "<ID>"
}Mutation
completeExternalStocktake — Returns ExternalStocktake
Scopes Required: perform_stocktake
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the external stocktake to complete |
Example Mutation
mutation CompleteExternalStocktake($id: ID!) {
completeExternalStocktake(id: $id) {
id,
zeroStock,
overrideStock,
status,
timestamp
}
}
# Example variables
{
"id": "<ID>"
}Example Mutation
mutation CompleteStocktake($id: ID!) {
completeStocktake(id: $id) {
id,
name,
type,
status,
displayExpected
}
}
# Example variables
{
"id": "<ID>"
}Mutation
createStocktake — Returns Stocktake
Scopes Required: perform_stocktake
| Arguments | Type | Description |
|---|---|---|
|
name |
String! |
The name of the stocktake |
|
outlet |
The outlet the stocktake is being performed on |
|
|
displayExpected |
Boolean |
Whether the stocktake should display the expected inventory for the product |
|
type |
The type of the stocktake, Determines what happens when the stocktake is applied |
Example Mutation
mutation CreateStocktake($name: String!, $outlet: ID!) {
createStocktake(name: $name, outlet: $outlet) {
id,
name,
type,
status,
displayExpected
}
}
# Example variables
{
"name": "<NAME>",
"outlet": "<OUTLET>"
}Mutation
deleteExternalStocktake — Returns ExternalStocktake
Scopes Required: perform_stocktake
| Arguments | Type | Description |
|---|---|---|
|
id |
The ID of the external stocktake to delete |
Example Mutation
mutation DeleteExternalStocktake($id: ID!) {
deleteExternalStocktake(id: $id) {
id,
zeroStock,
overrideStock,
status,
timestamp
}
}
# Example variables
{
"id": "<ID>"
}Mutation
stocktakeCount — Returns Stocktake
Scopes Required: perform_stocktake
| Arguments | Type | Description |
|---|---|---|
|
stocktake |
The id of the stocktake |
|
|
items |
The list of items that are being counted |
Example Mutation
mutation StocktakeCount($stocktake: ID!) {
stocktakeCount(stocktake: $stocktake) {
id,
name,
type,
status,
displayExpected
}
}
# Example variables
{
"stocktake": "<STOCKTAKE>"
}Mutation
updateExternalStocktakeBarcode — Returns ExternalStocktake
Scopes Required: perform_stocktake
Example Mutation
mutation UpdateExternalStocktakeBarcode($stocktake: ID!, $barcode: String!, $product: ID!, $quantity: Float!) {
updateExternalStocktakeBarcode(stocktake: $stocktake, barcode: $barcode, product: $product, quantity: $quantity) {
id,
zeroStock,
overrideStock,
status,
timestamp
}
}
# Example variables
{
"stocktake": "<STOCKTAKE>",
"barcode": "<BARCODE>",
"product": "<PRODUCT>",
"quantity": "<QUANTITY>"
}Mutation
updateStocktake — Returns Stocktake
Scopes Required: perform_stocktake
Updates product counts in completed stocktakes
| Arguments | Type | Description |
|---|---|---|
|
id |
The id of the stocktake |
|
|
items |
The list of items that are being updated |
Example Mutation
mutation UpdateStocktake($id: ID!) {
updateStocktake(id: $id) {
id,
name,
type,
status,
displayExpected
}
}
# Example variables
{
"id": "<ID>"
}