Sales

Mutation

changeSaleItemReadyStatus — Returns Sale

Scopes Required: use_bump_screen

Arguments Type Description

sale

ID!

The sale to mark items as ready

items

[ID!]!

The items on the sale to mark as ready (the sale item IDs, not the product IDs)

ready

Boolean!

Whether the items are ready or not

changeTime

DateTime

The time the change occurred, defaults to now if not specified

Example Mutation
mutation ChangeSaleItemReadyStatus($sale: ID!, $items: [ID!]!, $ready: Boolean!) {
    changeSaleItemReadyStatus(sale: $sale, items: $items, ready: $ready) {
        id,
        clientId,
        status,
        accountSale,
        invoiceId
    }
}

# Example variables
{
    "sale": "<SALE>",
    "items": [
        "<ITEMS>"
    ],
    "ready": "<READY>"
}

Mutation

createSale — Returns Sale

Scopes Required: sell

Arguments Type Description

sale

SaleInput

The sale to upload

checkDuplicates

Boolean

Whether we should check if this is a duplicate sale

deleteLinked

Boolean

Whether to delete the linked sale (only if the linked sale was parked), defaults to false

preventCancellation

Boolean

Whether to prevent the sale from being voided, default to false

Example Mutation
mutation CreateSale($sale: SaleInput) {
    createSale(sale: $sale) {
        id,
        clientId,
        status,
        accountSale,
        invoiceId
    }
}

# Example variables
{
    "sale": {
        "register": "<REGISTER>",
        "user": "<USER>",
        "status": "COMPLETED",
        "items": [
            {
                "total": "<TOTAL>"
            }
        ],
        "payments": [
            {
                "method": "<METHOD>",
                "amount": "<AMOUNT>"
            }
        ]
    }
}

Mutation

unparkSale — Returns Sale

Scopes Required: sell

Arguments Type Description

id

ID!

The ID of the sale to unpark

time

DateTime

The time that the sale was unparked, if not provided we presume it was the current time

register

ID

The register that unparked the sale, if not provided we presume it was the register the sale was completed on

Example Mutation
mutation UnparkSale($id: ID!) {
    unparkSale(id: $id) {
        id,
        clientId,
        status,
        accountSale,
        invoiceId
    }
}

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

Mutation

updateSale — Returns Sale

No scope required

Arguments Type Description

id

ID

The ID of the sale to update

register

ID

The register to update the sale to

search

SaleSearchInput

Search criteria to find the sale

user

ID

The user to update the sale to

customer

ID

The customer to assign to the sale

saleTime

DateTime

The date and time to update the sale to

payments

[SalePaymentUpdateInput]

The payments to adjust on the sale

note

String

The external note to adjust on the sale

internalNote

String

The internal note to adjust on the sale

modifyReason

String!

The reason the sale was modified

Example Mutation
mutation UpdateSale($modifyReason: String!) {
    updateSale(modifyReason: $modifyReason) {
        id,
        clientId,
        status,
        accountSale,
        invoiceId
    }
}

# Example variables
{
    "modifyReason": "<MODIFY_REASON>"
}

Mutation

voidSale — Returns Sale

Scopes Required: history_cancel_sale

Arguments Type Description

id

ID!

The ID of the sale to void

voidReason

String

The reason the sale is being voided (this will update the sale's modifiedReason)

Example Mutation
mutation VoidSale($id: ID!) {
    voidSale(id: $id) {
        id,
        clientId,
        status,
        accountSale,
        invoiceId
    }
}

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