Sales

Object

SaleActionInput

The value below corresponds to the type of action that was taken:

  • Product / customer scan: the barcode scanned
  • Product / customer search: the string searched
  • Product / customer key: the key's rules
  • Quantity override: the new quantity
  • Increment / decrement quantity: the amount incremented / decrement
  • Remove product: "keyboard" or "trash"
  • Remove customer: an empty string
  • Add / remove payment: the index of the payment method
Fields Type Description Validation

action

SaleActionEnum!

The action that was taken

timestamp

DateTime!

The time the action was taken

value

String!

The value related to the action

Maximum Length: 160

affecting

ID!

The ID of the object affected by this action

user

ID!

The user who performed the action

Object

SaleDiscountInput

Fields Type Description Validation

amount

Float

The amount that the sale was discounted by

Minimum: 0
Maximum: 10,000

reason

String

The reason the discount was applied

Object

SaleGiftCardInput

Fields Type Description Validation

id

String

The local ID of the gift card (you can put your ID here)

code

String!

The code used to identify the gift card (must be unique between active cards)

Minimum Length: 1
Maximum Length: 60

expiry

Date

The expiry for the gift card (if null this is calculated on Shopfront)

source

String

The enterprise that owns this gift card or internal (if not specified, internal will be used)

Object

SaleInput

Fields Type Description Validation

id

String

The local ID of the sale (you can set this to your ID)

linkedTo

ID

The sale this is linked to (e.g. for when a sale is being returned)

register

ID!

The register that the sale was completed on

user

ID!

The user who completed the sale

customer

ID

The customer who purchased the goods

status

SaleStatusEnum!

The status of the sale

invoiceId

String

The ID of the invoice (typically this is called an "Invoice Number")

Minimum Length: 1
Maximum Length: 40

note

String

Any public notes to add to the sale

internalNote

String

Any internal notes to add to the customer

orderReference

String

The order reference of this sale

Minimum Length: 1
Maximum Length: 160

discount

SaleDiscountInput

The discount applied to the sale

change

Float

The amount of change that was provided to the customer

Minimum: 0
Maximum: 10,000

refundReason

String

The reason for the refund (may be required depending upon Vendor settings), only valid when an item has negative quantity on the sale

metaData

JSON

Customisable unstructured meta data related to the sale

createdAt

DateTime

The time the sale was created

items

[SaleItemInput!]!

The items that are on the sale

payments

[SalePaymentInput!]!

The payments that are applied to the sale

actions

[SaleActionInput!]

The actions that occurred during the sale

Object

SaleItemInput

Fields Type Description Validation

user

ID

The user who sold the item (defaults to the sale's user)

note

String

Any publicly visible notes about the item

total

Float!

The total price for the item

Minimum: -10,000,000,000
Maximum: 10,000,000,000

product

SaleProductInput

The product that was sold (not valid when giftCard or surcharge is set)

giftCard

SaleGiftCardInput

The gift card that was sold (not valid when product or surcharge is set)

surcharge

SaleSurchargeInput

The surcharge that was added to the sale (not valid when product or giftCard is set)

metaData

JSON

Any miscellaneous data related to the item (you can put what you want here)

Object

SalePaymentInput

Fields Type Description Validation

method

String!

The payment method used (either the ID of the payment method or the string "loyalty")

subtype

String

The "subtype" of the payment (e.g. VISA / MASTERCARD for EFTPOS)

Minimum Length: 0
Maximum Length: 160

amount

Float!

The amount that was paid on the payment method (excluding cash out)

Minimum: -10,000,000,000
Maximum: 10,000,000,000

rounding

Float

The amount that was rounded

Minimum: -1,000,000
Maximum: 1,000,000

cashout

Float

The amount that was withdrawn with the payment

Minimum: 0
Maximum: 1,000,000

status

PaymentStatusEnum

The status of the payment method (defaults to COMPLETED)

register

ID

The register that the payment occurred on (defaults to the sale's register)

processTime

DateTime

The time that the payment took place (defaults to the sale's created time)

cancelledAt

DateTime

The time that the payment was cancelled (defaults to the processTime if this payment is cancelled)

metaData

JSON

Any miscellaneous data related to the payment (you can put what you want here)

receipt

String

The preformatted receipt for this payment method (e.g. the receipt from an EFTPOS terminal)

Object

SalePaymentUpdateInput

Fields Type Description

id

Int!

The ID of the payment method line to update

method

ID

The ID of the payment method used

register

ID

The register that the payment occurred on (defaults to the sale's register)

processTime

DateTime

The time that the payment took place (defaults to the sale's created time)

metaData

JSON

Any miscellaneous data related to the payment (you can put what you want here)

Object

SaleProductContainsInput

Fields Type Description Validation

id

ID!

The ID of the product

quantity

Float!

The quantity sold (in items)

Minimum: -100,000,000
Maximum: 100,000,000

contains

[SaleProductContainsInput]

The products this product contains

price

Float

The amount that this component adjusted the price of the parent package

Minimum: -1,000,000
Maximum: 1,000,000

Object

SaleProductInput

Fields Type Description Validation

id

ID!

The ID of the product

quantity

Float!

The quantity sold (in items)

Minimum: -100,000,000
Maximum: 100,000,000

contains

[SaleProductContainsInput]

The products this product contains

promotions

[SalePromotionInput]

The promotions applied to this product

taxRate

ID

The tax rate for the item (if none of taxRate, taxRatePercentage or taxAmount are specified the Product's taxRate is used). Only one of taxRate, taxRatePercentage or taxAmount can be provided

taxAmount

Float

The total value of tax paid on this item. Tax rates will be automatically matched and if they don't exist will be created. Tax rates are rounded to the nearest 0.25%, if further control is needed, specify one of taxRate or taxRatePercentage instead. Only one of taxRate, taxRatePercentage or taxAmount can be provided

Minimum: -10,000,000,000
Maximum: 10,000,000,000

taxRatePercentage

Float

The percentage rate of tax to pay (from 0%), existing tax rates in Shopfront will be automatically matched and created if they don't exist. Only one of taxRate, taxRatePercentage or taxAmount can be provided

Minimum: 0
Maximum: 1,000

cost

Float

The cost for the product (any rebates will be subtracted from this) (defaults to the current cost)

Minimum: -10,000,000,000
Maximum: 10,000,000,000

caseQuantity

Float

The case quantity at the time of sale (defaults to the current case quantity)

Minimum: 1
Maximum: 9,999

discount

SaleDiscountInput

The discount applied to this item

loyaltyValue

Float

The loyalty value of the item (in points)

Minimum: -10,000
Maximum: 10,000

Object

SalePromotionInput

Fields Type Description Validation

id

ID!

The ID of the promotion that was applied to the product

rebateAmount

Float

The total dollar value of the rebate applied

Minimum: 0
Maximum: 10,000

rebateQuantity

Float

How many times the rebate was applied to the product

Minimum: 0
Maximum: 10,000

savings

Float

The total dollar value of the promotional savings for the product

Minimum: -10,000
Maximum: 10,000

quantity

Float

How many times the promotion was applied to the product

Minimum: 0
Maximum: 10,000

Object

SaleSearchInput

Fields Type Description Validation

clientId

String!

The client ID of the sale

invoiceId

String

The invoice id (number) of the sale

Minimum Length: 1
Maximum Length: 40

Object

SaleSurchargeInput

Fields Type Description

taxRate

ID

The tax rate for the surcharge