Get booking stats is a WordPress ability from LatePoint — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get booking stats

Read-only
LatePoint Booking & Events latepoint/get-booking-stats

Get aggregate booking counts, revenue, or duration totals for a date range.

Requires the LatePoint plugin on WordPress 6.9+ (the WordPress Abilities API is only available from 6.9 onward). All abilities also require the site's 'latepoint_abilities_api' master toggle to be enabled; write abilities additionally require the 'latepoint_abilities_api_edit' setting, and destructive abilities additionally require the 'latepoint_abilities_api_delete' setting. Each ability further requires the current user to hold the matching LatePoint capability (e.g. 'booking__view', 'customer__edit'), and some abilities also verify the user is allowed to act on that specific record.

What it does

This ability computes an aggregate statistic — booking count, price total, or duration total — over a given date range, optionally scoped to an agent, service, or location. If you set group_by to agent_id, service_id, or location_id, the result comes back broken down by that dimension instead of a single number. The aggregation is automatically scoped to the agents/services/locations the current user is allowed to access. An invalid stat or group_by value returns an error rather than a result.

See it in action

You ask your AI assistant

"How much revenue did we generate from bookings in June 2026, broken down by agent?"

Inputs

Name Type Required Description
stat string Yes Metric to aggregate.
date_from string Yes Period start (Y-m-d).
date_to string Yes Period end (Y-m-d).
agent_id integer No Restrict the aggregation to this agent ID.
service_id integer No Restrict the aggregation to this service ID.
location_id integer No Restrict the aggregation to this location ID.
group_by string No Optional grouping dimension.

Returns

An object with the requested stat name and its result: a single numeric total when group_by isn't set, or an array of {value, group_by_value} objects when it is. Returns an error if the stat or group_by parameter is invalid.

Permission

The current user must have LatePoint's 'booking__view' capability, and the site's 'latepoint_abilities_api' Abilities API setting must be enabled.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.