Classifications

Mutation

addOrderNoteToFamily — Returns Boolean

Scopes Required: edit_products

This allows you to quickly apply an order note to all products within a family. This is a once-off action and will not automatically apply the order note in the future.

Arguments Type Description

family

ID!

The family to apply the order note to

orderNote

String

The order note to apply

invoiceNote

String

The invoice note to apply

Example Mutation
mutation AddOrderNoteToFamily($family: ID!) {
    addOrderNoteToFamily(family: $family)
}

# Example variables
{
    "family": "<FAMILY>"
}

Mutation

addTagToCategory — Returns Boolean

Scopes Required: edit_products

This allows you to quickly apply a single tag to all products within a category. This is a once-off action and will not automatically apply the tag in the future.

Arguments Type Description

category

ID!

The category to apply the tag to

tag

ID!

The tag to apply

Example Mutation
mutation AddTagToCategory($category: ID!, $tag: ID!) {
    addTagToCategory(category: $category, tag: $tag)
}

# Example variables
{
    "category": "<CATEGORY>",
    "tag": "<TAG>"
}

Mutation

assignBrand — Returns Brand

Scopes Required: edit_products

Assign a brand to a list of products

Arguments Type Description

id

ID!

The ID of the brand to apply to the provided products

products

[ID]

The products to replace the brand

Example Mutation
mutation AssignBrand($id: ID!) {
    assignBrand(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

assignCategory — Returns Category

Scopes Required: edit_products

Assign a category to a list of products

Arguments Type Description

id

ID!

The ID of the category to apply to the provided products

products

[ID]

The products to replace the category

Example Mutation
mutation AssignCategory($id: ID!) {
    assignCategory(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

assignFamily — Returns Family

Scopes Required: edit_products

Assign a family to a list of products, this will price align to the first product

Arguments Type Description

id

ID!

The ID of the family to apply to the provided products

products

[ID]

The products to replace the family

Example Mutation
mutation AssignFamily($id: ID!) {
    assignFamily(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

assignTag — Returns Tag

Scopes Required: edit_products

Assign a tag to a list of products

Arguments Type Description

id

ID!

The ID of the tag to apply to the provided products

products

[ID]

The products to replace the tag

action

AssignTagActionEnum

How the products should be assigned to the tag, defaults to REPLACE

Example Mutation
mutation AssignTag($id: ID!) {
    assignTag(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

createBrand — Returns Brand

Scopes Required: create_classifications

Create a brand

Arguments Type Description

name

String!

The name of the brand to create

mdbId

Int

The ID that corresponds to this brand from the master database, this can be safely ignored

Example Mutation
mutation CreateBrand($name: String!) {
    createBrand(name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "name": "<NAME>"
}

Mutation

createCategory — Returns Category

Scopes Required: create_classifications

Create a category

Arguments Type Description

name

String!

The name of the category to create

mdbId

Int

The ID that corresponds to this category from the master database, this can be safely ignored

metcashMSC

String

The Metcash classification for this category

Example Mutation
mutation CreateCategory($name: String!) {
    createCategory(name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "name": "<NAME>"
}

Mutation

createFamily — Returns Family

Scopes Required: create_classifications

Create a family

Arguments Type Description

name

String!

The name of the family to create

mdbId

Int

The ID that corresponds to this family from the master database, this can be safely ignored

Example Mutation
mutation CreateFamily($name: String!) {
    createFamily(name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "name": "<NAME>"
}

Mutation

createTag — Returns Tag

Scopes Required: create_classifications

Create a tag

Arguments Type Description

name

String!

The name of the tag to create

mdbId

Int

The ID that corresponds to this tag from the master database, this can be safely ignored

Example Mutation
mutation CreateTag($name: String!) {
    createTag(name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "name": "<NAME>"
}

Mutation

deleteBrand — Returns Brand

Scopes Required: delete_classifications

Delete a brand, this won't remove any products

Arguments Type Description

id

ID!

The ID of the brand to delete

Example Mutation
mutation DeleteBrand($id: ID!) {
    deleteBrand(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

deleteCategory — Returns Category

Scopes Required: delete_classifications

Delete a category, this won't remove any products

Arguments Type Description

id

ID!

The ID of the category to delete

Example Mutation
mutation DeleteCategory($id: ID!) {
    deleteCategory(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

deleteFamily — Returns Family

Scopes Required: delete_classifications

Delete a family, this won't remove any products

Arguments Type Description

id

ID!

The ID of the family to delete

Example Mutation
mutation DeleteFamily($id: ID!) {
    deleteFamily(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

deleteTag — Returns Tag

Scopes Required: delete_classifications

Delete a tag, this won't remove any products

Arguments Type Description

id

ID!

The ID of the tag to delete

Example Mutation
mutation DeleteTag($id: ID!) {
    deleteTag(id: $id) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

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

Mutation

updateBrand — Returns Brand

Scopes Required: edit_classifications

Update the name and master database id of a brand

Arguments Type Description

id

ID!

The ID of the brand to update

name

String!

The updated name of the brand

mdbId

Int

The ID that corresponds to the master database reference of this brand, can be safely ignored

Example Mutation
mutation UpdateBrand($id: ID!, $name: String!) {
    updateBrand(id: $id, name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "id": "<ID>",
    "name": "<NAME>"
}

Mutation

updateCategory — Returns Category

Scopes Required: edit_classifications

Update the name and master database id of a category

Arguments Type Description

id

ID!

The ID of the category to update

name

String!

The updated name of the category

mdbId

Int

The ID that corresponds to the master database reference of this category, can be safely ignored

metcashMSC

String

The Metcash classification for this category

Example Mutation
mutation UpdateCategory($id: ID!, $name: String!) {
    updateCategory(id: $id, name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "id": "<ID>",
    "name": "<NAME>"
}

Mutation

updateFamily — Returns Family

Scopes Required: edit_classifications

Update the name and master database id of a family

Arguments Type Description

id

ID!

The ID of the family to update

name

String!

The updated name of the family

mdbId

Int

The ID that corresponds to the master database reference of this family, can be safely ignored

Example Mutation
mutation UpdateFamily($id: ID!, $name: String!) {
    updateFamily(id: $id, name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "id": "<ID>",
    "name": "<NAME>"
}

Mutation

updateTag — Returns Tag

Scopes Required: edit_classifications

Update the name and master database id of a tag

Arguments Type Description

id

ID!

The ID of the tag to update

name

String!

The updated name of the tag

mdbId

Int

The ID that corresponds to the master database reference of this tag, can be safely ignored

ticketTemplates

[ID!]

The ticket templates that are used by products with this tag

Example Mutation
mutation UpdateTag($id: ID!, $name: String!) {
    updateTag(id: $id, name: $name) {
        id,
        name,
        parent,
        deleted,
        mdbId
    }
}

# Example variables
{
    "id": "<ID>",
    "name": "<NAME>"
}