1 operation. Every schema and example on this page is generated from the platform contract.
Returns the DB-driven ambient background (video | image | colour, with poster + playback speed for video) and the app text colour for a store, resolved by priority store override > business_type default > global default. Backgrounds are swappable via the database, in bulk per business type or per individual merchant, with no app release. `version` is the client cache-bust token. No money, no PII.
Store whose ambient background + text theme to resolve (also authorises the merchant).
Which kind of background to render. Determines which value field is populated.
videoimagecolorLooping video URL when kind=video, else null.
Optional still poster for the video (Reduce-Motion / while-loading), else null.
Static image URL when kind=image, else null.
Solid background colour (6-digit hex, leading #) when kind=color, else null.
Video playback speed multiplier (e.g. 0.5 = calm half-speed). Ignored for image/color.
Back-compat: the resolved PRIMARY text colour (= textColors.primary; 6-digit hex, leading #), or null → the app uses its built-in ink. Kept until the multi-role client ships.
DB-overridden app text theme, five independently-swappable semantic roles (business app is forced-light: one hex per role, no light/dark pair). Each role is resolved by priority store override > business_type default > global default, independently, and is null when no scope set it → the app uses its built-in ink for that role. Status colours (red/amber/green) are NOT here (semantic-locked in the app).
Primary body ink (6-digit hex, leading #), or null → app default.
Secondary text ink, or null → app default.
Muted / tertiary text ink, or null → app default.
Title / heading ink, or null → app default.
Accent text ink, or null → app default.
The canonical business type the store resolved to (e.g. coffee_shop), or null if unknown.
Which scope won the background resolution, or null when no background config exists yet.
storebusiness_typeglobalCache-bust token: epoch-ms of the newest of the resolved background / text-theme rows. Changes when either changes.
curl -G "https://www.membber.com/api/v1/ambient-background" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
--data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.GET("/api/v1/ambient-background", {
params: { query: { store_id: "6659c139-0000-4000-8000-d0c500000066" } },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.getAmbientBackground(
query: .init(storeId: "6659c139-0000-4000-8000-d0c500000066")
).ok.body.json
print(response){
"kind": "video",
"videoUrl": "https://example.com/image.jpg",
"posterUrl": "https://example.com/image.jpg",
"imageUrl": "https://example.com/image.jpg",
"hexColor": "<hexColor>",
"playbackRate": 1,
"textColor": "<textColor>",
"textColors": {
"primary": "<primary>",
"secondary": "<secondary>",
"muted": "<muted>",
"title": "Morning class",
"accent": "<accent>"
},
"businessType": "<businessType>",
"source": "store",
"version": 1
}