Stocktakes

Mutation

adjustInventory — Returns ProductInventory

Scopes Required: express_stocktake

Arguments Type Description

product

ID!

The product to adjust the inventory of

outlet

ID!

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 true

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

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

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

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>"
}

Mutation

completeStocktake — Returns Stocktake

Scopes Required: perform_stocktake

Arguments Type Description

id

ID!

The id of the stocktake

fullStocktake

Boolean

Whether the stocktake is a full stocktake or a partial stocktake

categories

[ID]

The categories to include when completing the stocktake (partial stocktake only)

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

ID!

The outlet the stocktake is being performed on

displayExpected

Boolean

Whether the stocktake should display the expected inventory for the product

type

StocktakeTypeEnum

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

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

ID!

The id of the stocktake

items

[StocktakeCountInput]

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

Arguments Type Description

stocktake

ID!

The ID of the stocktake

barcode

String!

The barcode to update the association of

product

ID!

The new product to associate the barcode within the stocktake to

quantity

Float!

The barcode quantity to use

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

ID!

The id of the stocktake

items

[StocktakeUpdateInput]

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>"
}