Skip to main content
Use the Boxpressd Sites SDK to display recent checkin activity for the venue associated with your API key. checkins are currently a venue-focused feature. If the resolved business context is not a venue, the SDK may return an empty list or report that checkins are unavailable for that business type.

Server Function

Use getBoxpressdCheckins when fetching checkins in server components, loaders, API routes, or other server-side code.
import { getBoxpressdCheckins } from "@boxpressd/sites-sdk/checkins"

export default async function CheckinsPage() {
  const checkins = await getBoxpressdCheckins({
    limit: 10
  })

  return (
    <section>
      {checkins.map((checkin) => (
        <article key={checkin.id}>
          <p>{checkin.user.displayName} checked in</p>
          <p>{checkin.createdAt}</p>
        </article>
      ))}
    </section>
  )
}

Function Signature

getBoxpressdCheckins(options?: GetBoxpressdCheckinsOptions): Promise<BoxpressdCheckin[]>

Options

OptionTypeDescription
limitnumberLimits the number of checkins returned.
offsetnumberSkips a number of checkins for pagination.
fromstringISO date string used to return checkins after a date.
tostringISO date string used to return checkins before a date.

React Hook

Use useCheckins when fetching checkins from client components.
"use client"

import { useCheckins } from "@boxpressd/sites-sdk/checkins"

export function RecentCheckins() {
  const {
    data: checkins,
    isLoading,
    error
  } = useCheckins({
    limit: 10
  })

  if (isLoading) {
    return <p>Loading checkins...</p>
  }

  if (error) {
    return <p>Unable to load checkins.</p>
  }

  return (
    <section>
      {checkins?.map((checkin) => (
        <article key={checkin.id}>
          <p>{checkin.user.displayName} checked in</p>
          <p>{checkin.createdAt}</p>
        </article>
      ))}
    </section>
  )
}

Hook Signature

useCheckins(options?: UseCheckinsOptions): {
  data: BoxpressdCheckin[] | undefined
  isLoading: boolean
  error: Error | null
  refetch: () => void
}
useCheckins is planned for the SDK and may not be available until a future release.

checkin Object

type BoxpressdCheckin = {
  id: string
  createdAt: string
  note?: string
  rating?: number
  user: {
    id?: string
    displayName: string
    avatarUrl?: string
  }
  venue?: {
    id: string
    name: string
  }
}

Username Fallback

The SDK normalizes user display names when checkin data is returned. The display name is resolved in this order:
display_namefirst_name + last initial"Boxpressd User"
This ensures public website components can show friendly activity even when a user profile has limited public information.

Example: Recent Activity Feed

const checkins = await getBoxpressdCheckins({
  limit: 5
})

Example: Paginated checkins

const checkins = await getBoxpressdCheckins({
  limit: 20,
  offset: 20
})
Internally, this SDK helper calls the Boxpressd API endpoint for the resolved venue:
GET /venues/{businessId}/checkins
For example:
GET /venues/stogies-chapin/checkins?limit=10
Most SDK users should use getBoxpressdCheckins or useCheckins instead of calling the API directly.

Best Practices

  • Use checkins as social proof on venue websites.
  • Keep public activity feeds short and recent.
  • Avoid exposing sensitive user details.
  • Use the SDK’s normalized display name instead of manually building user names.
  • Gracefully hide the section when no checkins are available.

Next Steps

Continue to:
  • Sessions
  • Events
  • Components Overview
  • API Reference