Get Tab Details
Tabs, whether created via the API, the POS, or by consumers can be retrieved with all of their items via the Graph API and returned list or the REST endpoint to get the items from a single tab.
query Location(
$locationUuid: String!
$limit: Int
$cursor: Cursor
$tabsCondition: TabCondition
$itemFilter: ItemFilter
$paymentsListCondition: PaymentCondition
) {
location(locationUuid: $locationUuid) {
tabs(first: $limit, after: $cursor, condition: $tabsCondition) {
nodes {
name
tabId
tabUuid
href # url to tab, useful for reference
status
# Server (when applicable, empty otherwise)
server {
name
userId
}
numGuests
# Tab totals
tax
subtotal
autograt
total
# Tab dates
opened
closed
# Revenue Centers in GoTab are Zones. Every order is placed with a Spot and every spot is attached to a Zone. Sorting by Orders will increase your payload and may require a lower # for pagination.
ordersList {
spot {
spotUuid
zone {
name
zoneUuid
}
}
}
# Items, Fees, Discounts, and Adjustments
itemsList(filter: $itemFilter) {
name
fee # true if this item represents a fee. Fees are tab and order level.
discount # true if this item represents a discount. Discounts are tab and order level.
comped # true if this item was comped. Comps are item level and happen when the tab is still open. Refunds are applied if the tab is closed.
voided # true if this item was voided. Voids are item level.
itemId
productId
sku # GoTab auto created SKU
externalInventoryId # external sku passed via the API
subtotal # current subtotal (price * quantity) of the item after adjustments have been applied
subtotalInitial # original subtotal (price * quantity) of the item before adjustments have been applied
quantity # is the current total of items after adjustments have been applied.
quantityInitial # is the original total of items before adjustments have been applied.
options {
name
price
quantity
id
key
}
adjustments {
itemAdjustmentId
quantity
unitPrice
adjustmentReason
adjustmentType
}
accountingStream {
accountingStreamId
# the name of the account stream is the sales category (aka revenue account).
name
# reporting groups are the ledger
reportingGroup
}
}
# Successful payments on the tab
paymentsList(condition: $paymentsListCondition) {
name
last4
tipAmount
autograt
tax
comp
subtotal
amount # amount = tax, autograt and subtotal.
totalAmount # totalAmount = tax, autograt, tipAmount and subtotal
paymentType
paymentSource
}
}
pageInfo {
hasNextPage
startCursor
endCursor
}
totalCount
}
}
}
{
"locationUuid": "",
"limit": 100,
"cursor": null,
"tabsCondition": {
"fiscalDay": yyyymmdd,
"hasPlacedOrders": true
},
"itemFilter": {
"ordered": {
"equalTo": true
}
},
"paymentsListCondition": {
"status": "SUCCESS"
}
}
Updated over 1 year ago