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, null otherwise)
server {
name
userId
}
numGuests
# Tab totals
tax
subtotal
autograt
total
# Tab dates
opened
closed
# Items, Fees, Discounts, and Adjustments
itemsList(filter: $itemFilter) {
name
fee # true if this item represents a fee
discount # true if this item represents a discount
comped # true if this item was comped
voided # true if this item was voided
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
options {
name
price
quantity
id
key
}
adjustments {
itemAdjustmentId
quantity
unitPrice
adjustmentReason
adjustmentType
}
}
# Successful payments on the tab
paymentsList(condition: $paymentsListCondition) {
name
last4
tipAmount
autograt
tax
comp
subtotal
amount
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 2 days ago