Skip to main content
GET
Error

Authorizations

Authorization
string
header
required

Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.

Query Parameters

page
integer
default:1

1-based page index to return. Defaults to 1.

Required range: 1 <= x <= 9007199254740991
pageSize
integer
default:20

Rows per page, 1..100. Defaults to 20.

Required range: 1 <= x <= 100
segment
enum<string>

Restrict the returned rows to one RFM bucket (segment client), e.g. champions.

Available options:
champions,
loyal,
at_risk,
new,
lost
tier
string

Restrict the returned rows to one loyalty-tier label, e.g. Or.

Minimum string length: 1
postalCodePrefix
string

Restrict the returned rows to customers whose postal code starts with this prefix (75 targets all of Paris). Customers with no postal code on file never match.

Minimum string length: 1
optIn
enum<string>

Restrict the returned rows to customers with this marketing opt-in state.

Available options:
true,
false
minMonetaryCents
string

Restrict the returned rows to customers at or above this lifetime spend, in cents.

Pattern: ^\d+$
maxMonetaryCents
string

Restrict the returned rows to customers at or below this lifetime spend, in cents.

Pattern: ^\d+$
minFrequency
string

Restrict the returned rows to customers with at least this many finalized purchases.

Pattern: ^\d+$
maxFrequency
string

Restrict the returned rows to customers with at most this many finalized purchases.

Pattern: ^\d+$
minRecencyDays
string

Restrict the returned rows to customers whose last purchase is at least this many days old (the lapsed / win-back facet). Customers who never purchased never match.

Pattern: ^\d+$
maxRecencyDays
string

Restrict the returned rows to customers who purchased within this many days (the recently-active facet). Customers who never purchased never match.

Pattern: ^\d+$

Response

Whole-base per-segment counts plus one page of the (optionally filtered) rows.

Whole-base per-segment counts plus one page of the (optionally filtered) rows.

items
object[]
required

The rows on this page, in the query's sort order.

total
integer
required

Total rows matching the filter across ALL pages, not just this one.

Required range: 0 <= x <= 9007199254740991
page
integer
required

The 1-based page number served.

Required range: 0 < x <= 9007199254740991
pageSize
integer
required

Rows requested per page.

Required range: 0 < x <= 9007199254740991
pageCount
integer
required

Total number of pages; stop walking when page reaches it.

Required range: 0 <= x <= 9007199254740991
referenceDate
string
required
baseTotal
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
counts
object
required