Reports

Mutation

deleteReport — Returns FavouriteReportInterface

Scopes Required: run_actions_reports run_sales_reports run_inventory_reports run_purchase_reports

Arguments Type Description

id

ID!

The ID of the report to delete

Example Mutation
mutation DeleteReport($id: ID!) {
    deleteReport(id: $id) {
        id,
        name,
        layers,
        nextEmailDate,
        syntaxErrors
    }
}

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

Mutation

saveReport — Returns boolean

No scope required

Arguments Type Description

id

ID

The ID of the report (specify if updating a report, leave if saving a new report)

name

String

The name of the report

type

ReportTypeEnum

The type of report this is

layers

Float

The maximum layers of depth that the reports will export (if unset will export all data)

query

String

The report query to run

Example Mutation
mutation SaveReports($id: ID) {
    saveReport(id: $id)
}

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

Mutation

saveSpecialReport — Returns boolean

No scope required

Arguments Type Description

id

ID

The ID of the report (specify if updating a report, leave if saving a new report)

name

String

The name of the report

type

SpecialReportTypeEnum

The type of report this is

layers

Float

The maximum layers of depth that the reports will export (if unset will export all data)

query

SpecialReportQueryInput!

The report query to run

Example Mutation
mutation SaveSpecialReport($query: SpecialReportQueryInput!) {
    saveSpecialReport(query: $query)
}

# Example variables
{
    "query": {
        "parameters": "<PARAMETERS>"
    }
}

Mutation

updateReportEmailSettings — Returns FavouriteReportInterface

Scopes Required: modify_report_email_settings

Arguments Type Description

id

ID!

The ID of the report to update the email settings for

emailSettings

FavouriteReportEmailSettingsInput

The email settings to use

Example Mutation
mutation UpdateEmailSettings($id: ID!) {
    updateReportEmailSettings(id: $id) {
        id,
        name,
        layers,
        nextEmailDate,
        syntaxErrors
    }
}

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