Shelf Tickets

Object

AdminTicketTemplatePage

Fields Type Description

id

Int!

The ID of the ticket template

name

String!

The name of the ticket template

folders

[String!]!

The folder paths the ticket template page exists in, one per banner

banners

[String!]!

The banners the ticket template page belongs to, empty when the admin database doesn't store the banners

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

mapped

ID

The id of the mapped ticket template page for this vendor, returns null if not mapped

Object

AdminTicketTemplate

Fields Type Description

id

Int!

The ID of the ticket template

name

String!

The name of the ticket template

folders

[String!]!

The folder paths the ticket template exists in, one per banner

type

TicketTemplateTypeEnum!

The type of items the ticket template is for, defaulting to PRODUCTS when the admin database doesn't store the type

ticketsPerPage

Int!

The number of tickets on a page, 0 when the admin database doesn't store the count

banners

[String!]!

The banners the ticket template belongs to, empty when the admin database doesn't store the banners

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

options

JSON!

The options for the templates, this is in the format key => label

fieldsTracked

[String!]!

The fields tracked by the template

mapped

ID

The id of the mapped ticket template for this vendor, returns null if not mapped

Object

PrintableTemplate

Fields Type Description

quantity

Int!

The suggested number of tickets to print

template

TicketTemplate!

The suggested template to print

Object

ShelfTicket

Fields Type Description

id

ID!

The ID of the ticket

product

Product!

The Product this shelf ticket is for

outlet

Outlet

The Outlet that this ticket is for

user

User

The User that added the ticket

createdAt

DateTime!

The time that the ticket was added

Object

TicketTemplateBuilderBox

Fields Type Description

x

Float!

The distance from the left of the ticket, in mm

y

Float!

The distance from the top of the ticket, in mm

width

Float!

The width of the element, in mm

height

Float!

The height of the element, in mm

rotation

Float!

The rotation of the element, in degrees

zIndex

Int!

The stacking order of the element, higher values are shown above lower ones

locked

Boolean!

Whether the element is locked from being moved in the builder

hideWhenEmpty

Boolean!

Whether the element is hidden when it has no content

Object

TicketTemplateBuilderConstantArgument

Implements

List of interfaces this object implements

Fields Type Description

name

String!

The name of the function's argument

source

TicketTemplateBuilderArgumentSourceEnum!

Where the argument's value comes from

value

String!

The value passed to the function

Object

TicketTemplateBuilderCustomElement

Implements

List of interfaces this object implements

Fields Type Description

id

String!

The ID of the element, only letters and numbers, used as the el_<id> field of the template

name

String

A name for the element, shown in the builder

kind

TicketTemplateBuilderElementKindEnum!

The kind of element

box

TicketTemplateBuilderBox!

Where the element is placed on the ticket

style

TicketTemplateBuilderStyle!

How the element is styled

format

TicketTemplateBuilderFormat!

How the element's text is formatted

custom

TicketTemplateBuilderCustom!

The script and styles of the element

Object

TicketTemplateBuilderCustom

Fields Type Description

script

String!

A JavaScript expression that provides the element's content

css

String!

CSS that's scoped to the element

Object

TicketTemplateBuilderFieldArgument

Implements

List of interfaces this object implements

Fields Type Description

name

String!

The name of the function's argument

source

TicketTemplateBuilderArgumentSourceEnum!

Where the argument's value comes from

field

TicketTemplateBuilderFieldReference!

The field passed to the function

Object

TicketTemplateBuilderFieldElement

Implements

List of interfaces this object implements

Fields Type Description

id

String!

The ID of the element, only letters and numbers, used as the el_<id> field of the template

name

String

A name for the element, shown in the builder

kind

TicketTemplateBuilderElementKindEnum!

The kind of element

box

TicketTemplateBuilderBox!

Where the element is placed on the ticket

style

TicketTemplateBuilderStyle!

How the element is styled

format

TicketTemplateBuilderFormat!

How the element's text is formatted

field

TicketTemplateBuilderFieldReference!

The field shown by the element

Object

TicketTemplateBuilderFieldReference

Fields Type Description

keys

[String!]!

The ticket fields to use, the first one that isn't empty is shown

fallback

String

Shown when all of the fields are empty

Object

TicketTemplateBuilderFormat

Fields Type Description

prefix

String

Text added before the content when it isn't empty

suffix

String

Text added after the content when it isn't empty

textCase

TicketTemplateBuilderTextCaseEnum

Changes the case of the text

Object

TicketTemplateBuilderFunctionArgument

Implements

List of interfaces this object implements

Fields Type Description

call

TicketTemplateBuilderFunctionCall!

The function whose result is passed to the function

name

String!

The name of the function's argument

source

TicketTemplateBuilderArgumentSourceEnum!

Where the argument's value comes from

Object

TicketTemplateBuilderFunctionCall

Fields Type Description

name

TicketTemplateBuilderFunctionEnum!

The function to call

arguments

[TicketTemplateBuilderArgumentInterface!]!

The arguments passed to the function

Object

TicketTemplateBuilderFunctionElement

Implements

List of interfaces this object implements

Fields Type Description

id

String!

The ID of the element, only letters and numbers, used as the el_<id> field of the template

name

String

A name for the element, shown in the builder

kind

TicketTemplateBuilderElementKindEnum!

The kind of element

box

TicketTemplateBuilderBox!

Where the element is placed on the ticket

style

TicketTemplateBuilderStyle!

How the element is styled

format

TicketTemplateBuilderFormat!

How the element's text is formatted

function

TicketTemplateBuilderFunctionCall!

The function whose result is shown by the element

parts

[TicketTemplateBuilderPart!]!

Styles for the parts of a function with a multi-part result, e.g. SPLIT_CURRENCY

Object

TicketTemplateBuilderLayout

Fields Type Description

version

Int!

The version of the layout format

elements

[TicketTemplateBuilderElementInterface!]!

The elements placed on the ticket

Object

TicketTemplateBuilderPartStyle

Fields Type Description

fontSize

Float

The font size, in pt, the element's font size is used when not set

fontWeight

Int

The font weight, e.g. 700 for bold

italic

Boolean

Whether the text is italic

color

String

The text colour, as a CSS colour

verticalAlign

TicketTemplateBuilderVerticalAlignEnum

Where the part sits against the other parts, e.g. TOP to raise the cents

marginLeft

Float

The space before the part, in mm, negative to move it closer to the part before

marginRight

Float

The space after the part, in mm, negative to move the next part closer

Object

TicketTemplateBuilderPart

Fields Type Description

name

String!

The part of the function's result, e.g. cents for SPLIT_CURRENCY

style

TicketTemplateBuilderPartStyle!

How the part is styled, on top of the element's style

Object

TicketTemplateBuilderShrinkToFit

Fields Type Description

minSize

Float!

The smallest font size, in pt

maxSize

Float!

The largest font size, in pt

maxLines

Int!

The most lines the text can wrap onto

Object

TicketTemplateBuilderStyle

Fields Type Description

fontFamily

String

The font family, from the template's fonts

fontSize

Float

The font size, in pt

fontWeight

Int

The font weight, e.g. 700 for bold

italic

Boolean

Whether the text is italic

color

String

The text colour, as a CSS colour

textAlign

TicketTemplateBuilderTextAlignEnum

The horizontal alignment of the content

verticalAlign

TicketTemplateBuilderVerticalAlignEnum

The vertical alignment of the content

lineHeight

Float

The line height, relative to the font size

backgroundColor

String

The background colour, as a CSS colour

borderWidth

Float

The border width, in mm

borderColor

String

The border colour, as a CSS colour

borderRadius

Float

The border radius, in mm

padding

Float

The padding inside the element, in mm

shrinkToFit

TicketTemplateBuilderShrinkToFit

Shrinks the font size so the text fits within the element

Object

TicketTemplateBuilderTextElement

Implements

List of interfaces this object implements

Fields Type Description

id

String!

The ID of the element, only letters and numbers, used as the el_<id> field of the template

name

String

A name for the element, shown in the builder

kind

TicketTemplateBuilderElementKindEnum!

The kind of element

box

TicketTemplateBuilderBox!

Where the element is placed on the ticket

style

TicketTemplateBuilderStyle!

How the element is styled

format

TicketTemplateBuilderFormat!

How the element's text is formatted

text

TicketTemplateBuilderText!

The text shown by the element

Object

TicketTemplateBuilderText

Fields Type Description

text

String!

The text to show, {field} is replaced with the field's value and {a|b|"text"} uses the first value that isn't empty

Object

TicketTemplatePage

Fields Type Description

id

ID!

The ID of the ticket template

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

mapped

AdminTicketTemplatePage

The ticket template page this is mapped to from the admin interface, if this is a custom page this value will be null

outlets

[Outlet!]!

The outlets the ticket template page is available at, when empty it's available at every outlet

Object

TicketTemplate

Fields Type Description

id

ID!

The ID of the ticket template

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

type

TicketTemplateTypeEnum!

The type of items the ticket template is for

builderLayout

TicketTemplateBuilderLayout

The layout used by the visual template builder, null when the template is only edited as code

mapped

AdminTicketTemplate

The ticket template this is mapped to from the admin interface, if this is a custom ticket this value will be null

options

JSON!

The options this ticket template is using, it's formatted as option => boolean, with true being enabled. Options will only exist for mapped templates

outlets

[Outlet!]!

The outlets the ticket template is available at, when empty it's available at every outlet

Object

Ticket

Fields Type Description

id

ID!

The ID of the ticket

outlet

Outlet

The Outlet that this ticket is for

user

User

The User that added the ticket

queuedAt

DateTime!

The time that the ticket was added to the queue

item

PrintableInterface!

The item that this ticket is for

templates

[PrintableTemplate!]

The suggested templates for this ticket

reasons

[PrintableReasonInterface!]

The reasons that this ticket was created