Stocktakes

Query

externalStocktake — Returns ExternalStocktake

Scopes Required: see_stocktake

Arguments Type Description

id

ID!

The ID of the external stocktake to retrieve

Example Query
query GetExternalStocktake($id: ID!) {
    externalStocktake(id: $id) {
        id,
        zeroStock,
        overrideStock,
        status,
        timestamp
    }
}

# Example variables
{
    "id": "<ID>"
}

Query

externalStocktakes — Returns ConnectionType of ExternalStocktake

Scopes Required: see_stocktake

Sortable Fields

Fields from ExternalStocktake that can be used to sort the connection items

  • createdAt
Example Query
query GetExternalStocktakes {
    externalStocktakes {
        edges {
            node {
                id,
                zeroStock,
                overrideStock,
                status,
                timestamp
            }
        },
        pageInfo {
            hasNextPage,
            endCursor
        }
    }
}

Query

stocktake — Returns Stocktake

Scopes Required: see_stocktake

Arguments Type Description

id

ID!

The ID of the stocktake to retrieve

Example Query
query GetStocktake($id: ID!) {
    stocktake(id: $id) {
        id,
        name,
        type,
        status,
        displayExpected
    }
}

# Example variables
{
    "id": "<ID>"
}

Query

stocktakes — Returns ConnectionType of Stocktake

Scopes Required: see_stocktake

Sortable Fields

Fields from Stocktake that can be used to sort the connection items

  • name
  • createdAt
  • completedAt
Arguments Type Description

source

[StocktakeSourceEnum!]

Which source of the stocktakes to filter by, defaults to advanced stocktakes only

status

StocktakeStatusEnum

The status of the stocktakes to filter by

createdStart

Date

The start of when the stocktakes were created (inclusive)

createdEnd

Date

The end of when the stocktakes were created (inclusive)

completedStart

Date

The start of when the stocktakes were completed (inclusive)

completedEnd

Date

The end of when the stocktakes were completed (inclusive)

outlets

[ID!]

The outlets to get stocktakes from

Example Query
query GetStocktakes($source: [StocktakeSourceEnum!]) {
    stocktakes(source: $source) {
        edges {
            node {
                id,
                name,
                type,
                status,
                displayExpected
            }
        },
        pageInfo {
            hasNextPage,
            endCursor
        }
    }
}

# Example variables
{
    "source": [
        "EXTERNAL"
    ]
}