BizKitHub
DocsAPI ReferenceBranch/bff/branch/customers
getBranchAdmin BFF

/bff/branch/customers

Returns one DataGrid page of distinct customers (shop__contact) that have at least one shop__order_item attributed to the branch via branch_id. Drives the "Customers" tab grid in apiUrl mode — accepts page, limit, orderBy, filterFulltextQuery. itemCount is the count over the FILTERED set so paginator math is correct. Use /customers-summary for the header total.

BranchgetBffBranchCustomers

Parameters

5 query

Query parameters

· 5
branchSlugstringRequired

Branch slug.

Examplegymroom-plzen
pagestring | numberOptional

Page number (1-based).

Range: 1
limitstring | numberOptional

Items per page.

Range: 1500
orderBystringOptional

Sort directive in field:direction form. Supported fields: firstVisitDate, lastVisitDate, orderCount, itemCount, totalRevenue, name, email.

ExamplelastVisitDate:desc
filterFulltextQuerystringOptional

Free-text search across name, email and phone.

Exampleexample_filterFulltextQuery

Response schema

1 status code documented

200Success
itemsobject[]Required
Each array item:
idstringRequired

Contact external id.

namestringRequired

Pre-formatted display name: "First Last (Company)" if both, else whichever is available.

firstNamestringOptional
lastNamestringOptional
companyNamestringOptional
emailstring | nullRequired
One of 2:
Variant 1
string

Customer e-mail. null for phone-only customers and anonymised contacts — UI should fall back to name / companyName / phone.

Variant 2
null
phonestringOptional
firstVisitDateDate | string | string | numberRequired
One of 4:
Variant 1
Date
Variant 2
stringdate-time
Variant 3
stringdate
Variant 4
number
lastVisitDateDate | string | string | numberRequired
One of 4:
Variant 1
Date
Variant 2
stringdate-time
Variant 3
stringdate
Variant 4
number
orderCountnumberRequired
itemCountnumberRequired
totalRevenuenumberRequired

Sum of (price × count − sale) over every order item the customer has at this branch; storno items subtract.

lastOrderobjectRequired
orderNumberstringRequired
hashstringRequired
scorenumberRequired
accountAgeDaysnumberRequired
orderPaidnumberRequired
orderNotPaidnumberRequired
orderNewnumberRequired
orderProcessingnumberRequired
orderStornonumberRequired
orderDonenumberRequired
itemCountnumberRequired

Total number of distinct customers matching the current filter — paginator denominator.

Response example

application/json
{
  "items": [
    {
      "id": "example_id",
      "name": "example_name",
      "firstName": "example_firstName",
      "lastName": "example_lastName",
      "companyName": "example_companyName",
      "phone": "example_phone",
      "orderCount": 0,
      "itemCount": 0,
      "totalRevenue": 0,
      "lastOrder": {
        "orderNumber": "example_orderNumber",
        "hash": "example_hash"
      },
      "score": 0,
      "accountAgeDays": 0,
      "orderPaid": 0,
      "orderNotPaid": 0,
      "orderNew": 0,
      "orderProcessing": 0,
      "orderStorno": 0,
      "orderDone": 0
    }
  ],
  "itemCount": 0
}

Request example

GET /bff/branch/customers

get
curl -X GET "https://api.bizkithub.com/bff/branch/customers?branchSlug=gymroom-plzen&orderBy=lastVisitDate%3Adesc&filterFulltextQuery=example_filterFulltextQuery" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key