List reports
Try itLists the reports this key may run, with the query parameters each takes.
https:/ / tablebuddy.radioworkflow.com/ api/ v1/ reportsEvery report this key may run, in the report catalog's order, with the query parameters its span takes: run one with run-report. Report 24, Labor (labor), is listed only for a key that also carries payroll:read, made by someone who holds Pay rates and payroll. The tax report is titled with the restaurant's own tax label.
Authentication
Authorization: Bearer <key>, or the same key in x-api-key. A key acts as the person who made it, cut down to this endpoint’s scope, and never as an owner. How keys workreports.view)payroll:read (Read pay, labor cost and labor %) also on the key, what it grants counts here too. No other scope on the key changes what this endpoint does.Request headers
AuthorizationrequiredBearer <key>. x-api-key: <key> works too; Authorization wins when both are sent.Idempotency-KeyignoredQuery parameters
None. A query string is answered 422 invalid_request.
Response
Not paged: every report the key may run, at once.
currencystringISO 4217minor_digitsinteger0–3dataarray of objectdata[].idenum26 accepted values
daily-salesmonthly-salessales-by-rangeproduct-performanceitem-quantitiesinventorypurchasessuppliersfinancial-summaryorder-statusvatservice-chargediscountscash-collectionbank-collectionpayment-methodsgateway-settlementbank-settlementpending-settlementcashier-collectiondaily-closingtipspayableslabormenu-engineeringfood-usagedata[].titlestringdata[].descriptionstringdata[].spanenumdaymonthrangenowdata[].parametersarray of enumdaymonthfromtorangeviewAn answer may gain fields within v1: ignore the ones you do not know. Versioning
Response headers
request-idalwaysCache-Controlalwaysno-store: an answer is never cached.RateLimit-Limit, RateLimit-Remaining, RateLimit-Resetonce the key is knownx-error-codeon an errorerror.code in the body.Retry-Afteron a 429WWW-Authenticateon a 401, and a 403 insufficient_scopeErrors
insufficient_scopeFix: Scopes are fixed when a key is made: make a new key with the scope.
issuer_access_endedFix: Make a new key from an active account.
issuer_permission_changedFix: Ask an owner to restore the permission, or make a new key from an account that holds it.
permission_requiredFix: Use a key with the named scope, from a creator who holds the named permission.
invalid_requestFix: Send the request with no query string.
missing_api_keyNo Authorization: Bearer header and no x-api-key header.invalid_api_keyThe key is unknown, revoked or expired (answered alike).rate_limitedOver the key's 60 units a minute, or over 30 unknown keys a minute from one network (an address; an IPv6 caller's /64).internal_errorSomething failed on our side. Nothing kept the Idempotency-Key.curl -X GET "$TABLEBUDDY_URL/api/v1/reports" \ -H "Authorization: Bearer $TABLEBUDDY_API_KEY"
{
"currency": "USD",
"minor_digits": 2,
"data": [
{
"id": "payment-methods",
"title": "Collection by payment method",
"description": "What each payment method took, what was refunded on it, and its share.",
"span": "range",
"parameters": [
"from",
"to",
"range",
"view"
]
}
]
}