Shelf Tickets

Mutation

addShelfTickets — Returns [ShelfTicket]

Scopes Required: see_shelf_tickets

Arguments Type Description

products

[ID!]!

The products to add to shelf tickets, this may contain duplicate values

outlet

ID

The outlet to assign the shelf tickets to, if not specified it will add a ticket to all outlets

Example Mutation
mutation AddShelfTickets($products: [ID!]!) {
    addShelfTickets(products: $products) {
        id,
        createdAt
    }
}

# Example variables
{
    "products": [
        "<PRODUCTS>"
    ]
}

Mutation

addTicketQueue — Returns [Ticket]

Scopes Required: see_shelf_tickets

Arguments Type Description

products

[ID!]

The products to add to ticket queue, this may contain duplicate values

promotions

[ID!]

The promotions to add to the ticket queue, this may contain duplicate values

families

[ID!]

The families to add to the ticket queue, this may contain duplicate values

outlets

[ID!]

The outlets to assign the tickets to, if not specified it will add a ticket to all outlets

Example Mutation
mutation AddTicketQueue($products: [ID!]) {
    addTicketQueue(products: $products) {
        id,
        queuedAt
    }
}

# Example variables
{
    "products": [
        "<PRODUCTS>"
    ]
}

Mutation

createTicketTemplate — Returns TicketTemplate

Scopes Required: modify_ticket_templates

Arguments Type Description

name

String!

The name of the ticket template

styles

String!

The styles to apply to the ticket template (in CSS)

transformationScript

String!

The transformation script to use (in JavaScript)

width

Float!

The width of the template panel on a page (in millimeters)

height

Float!

The height of the template panel on a page (in millimeters)

fonts

[URL!]

The fonts used by the ticket template

fieldsTracked

[String!]

The fields tracked by the ticket template

Example Mutation
mutation CreateTicketTemplate($name: String!, $styles: String!, $transformationScript: String!, $width: Float!, $height: Float!) {
    createTicketTemplate(name: $name, styles: $styles, transformationScript: $transformationScript, width: $width, height: $height) {
        id,
        name,
        styles,
        transformationScript,
        width
    }
}

# Example variables
{
    "name": "<NAME>",
    "styles": "<STYLES>",
    "transformationScript": "<TRANSFORMATION_SCRIPT>",
    "width": "<WIDTH>",
    "height": "<HEIGHT>"
}

Mutation

createTicketTemplatePage — Returns TicketTemplatePage

Scopes Required: modify_ticket_templates

Arguments Type Description

name

String!

The name of the ticket template

horizontalPanels

Int!

The number of ticket template panels horizontally

verticalPanels

Int!

The number of ticket template panels vertically

pageWidth

Float!

The width of the page (in millimeters)

pageHeight

Float!

The height of the template panel on a page (in millimeters)

pageMargin

String!

The margin of the page (formatted as a CSS margin)

horizontalPanelSpacing

Float!

The spacing between the panels horizontally (in millimeters)

verticalPanelSpacing

Float!

The spacing between the panels vertically (in millimeters)

cuttingWidth

Float!

The width of the cutting line to display (in millimeters), this will be overlaid on the tickets

Example Mutation
mutation CreateTicketTemplatePage($name: String!, $horizontalPanels: Int!, $verticalPanels: Int!, $pageWidth: Float!, $pageHeight: Float!, $pageMargin: String!, $horizontalPanelSpacing: Float!, $verticalPanelSpacing: Float!, $cuttingWidth: Float!) {
    createTicketTemplatePage(name: $name, horizontalPanels: $horizontalPanels, verticalPanels: $verticalPanels, pageWidth: $pageWidth, pageHeight: $pageHeight, pageMargin: $pageMargin, horizontalPanelSpacing: $horizontalPanelSpacing, verticalPanelSpacing: $verticalPanelSpacing, cuttingWidth: $cuttingWidth) {
        id,
        name,
        horizontalPanels,
        verticalPanels,
        pageWidth
    }
}

# Example variables
{
    "name": "<NAME>",
    "horizontalPanels": "<HORIZONTAL_PANELS>",
    "verticalPanels": "<VERTICAL_PANELS>",
    "pageWidth": "<PAGE_WIDTH>",
    "pageHeight": "<PAGE_HEIGHT>",
    "pageMargin": "<PAGE_MARGIN>",
    "horizontalPanelSpacing": "<HORIZONTAL_PANEL_SPACING>",
    "verticalPanelSpacing": "<VERTICAL_PANEL_SPACING>",
    "cuttingWidth": "<CUTTING_WIDTH>"
}

Mutation

deleteShelfTickets — Returns boolean

Scopes Required: see_shelf_tickets

Arguments Type Description

tickets

[ID!]!

The tickets to delete

Example Mutation
mutation DeleteShelfTickets($tickets: [ID!]!) {
    deleteShelfTickets(tickets: $tickets)
}

# Example variables
{
    "tickets": [
        "<TICKETS>"
    ]
}

Mutation

deleteTicketTemplate — Returns boolean

Scopes Required: modify_ticket_templates

Arguments Type Description

id

ID!

The ID of the ticket template to delete

Example Mutation
mutation DeleteTicketTemplate($id: ID!) {
    deleteTicketTemplate(id: $id)
}

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

Mutation

deleteTicketTemplatePage — Returns boolean

Scopes Required: modify_ticket_templates

Arguments Type Description

id

ID!

The ID of the ticket template page to delete

Example Mutation
mutation DeleteTicketTemplatePage($id: ID!) {
    deleteTicketTemplatePage(id: $id)
}

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

Mutation

mapTicketTemplate — Returns TicketTemplate

Scopes Required: modify_ticket_templates

Arguments Type Description

id

Int!

The ID of the ticket template to map from the master database

options

JSON!

The options this ticket template should use, this is provided in the format option => boolean

Example Mutation
mutation MapTicketTemplate($id: Int!, $options: JSON!) {
    mapTicketTemplate(id: $id, options: $options) {
        id,
        name,
        styles,
        transformationScript,
        width
    }
}

# Example variables
{
    "id": "<ID>",
    "options": "<OPTIONS>"
}

Mutation

mapTicketTemplatePage — Returns TicketTemplatePage

Scopes Required: modify_ticket_templates

Arguments Type Description

id

Int!

The ID of the ticket template page to map from the master database

Example Mutation
mutation MapTicketTemplatePage($id: Int!) {
    mapTicketTemplatePage(id: $id) {
        id,
        name,
        horizontalPanels,
        verticalPanels,
        pageWidth
    }
}

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

Mutation

markTicketsAsPrinted — Returns boolean

Scopes Required: see_shelf_tickets

Arguments Type Description

tickets

[ID!]!

The tickets to mark as printed

Example Mutation
mutation MarkTicketsAsPrinted($tickets: [ID!]!) {
    markTicketsAsPrinted(tickets: $tickets)
}

# Example variables
{
    "tickets": [
        "<TICKETS>"
    ]
}

Mutation

updateMappedTicketTemplate — Returns TicketTemplate

Scopes Required: modify_ticket_templates

Arguments Type Description

id

ID!

The ID of the mapped ticket template to update

options

JSON!

The options this ticket template should use, this is provided in the format option => boolean

Example Mutation
mutation UpdateMappedTicketTemplate($id: ID!, $options: JSON!) {
    updateMappedTicketTemplate(id: $id, options: $options) {
        id,
        name,
        styles,
        transformationScript,
        width
    }
}

# Example variables
{
    "id": "<ID>",
    "options": "<OPTIONS>"
}

Mutation

updateTicketTemplate — Returns TicketTemplate

Scopes Required: modify_ticket_templates

Arguments Type Description

id

ID!

The ID of the ticket template to update

name

String

The name of the ticket template

styles

String

The styles to apply to the ticket template (in CSS)

transformationScript

String

The transformation script to use (in JavaScript)

width

Float

The width of the template panel on a page (in millimeters)

height

Float

The height of the template panel on a page (in millimeters)

fonts

[URL!]

The fonts used by the template

fieldsTracked

[String!]

The fields tracked by the template

Example Mutation
mutation UpdateTicketTemplate($id: ID!) {
    updateTicketTemplate(id: $id) {
        id,
        name,
        styles,
        transformationScript,
        width
    }
}

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

Mutation

updateTicketTemplatePage — Returns TicketTemplatePage

Scopes Required: modify_ticket_templates

Arguments Type Description

id

ID!

The ID of the ticket template page to update

name

String

The name of the ticket template

horizontalPanels

Int

The number of ticket template panels horizontally

verticalPanels

Int

The number of ticket template panels vertically

pageWidth

Float

The width of the page (in millimeters)

pageHeight

Float

The height of the template panel on a page (in millimeters)

pageMargin

String

The margin of the page (formatted as a CSS margin, only supports millimeters as units)

horizontalPanelSpacing

Float

The spacing between the panels horizontally (in millimeters)

verticalPanelSpacing

Float

The spacing between the panels vertically (in millimeters)

cuttingWidth

Float

The width of the cutting line to display (in millimeters), this will be overlaid on the tickets

Example Mutation
mutation UpdateTicketTemplatePage($id: ID!) {
    updateTicketTemplatePage(id: $id) {
        id,
        name,
        horizontalPanels,
        verticalPanels,
        pageWidth
    }
}

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