POST

Count Events By Status


Counts events by status. To learn about working with query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

Permissions
Manage Bookings Services and Settings
Manage Events - all permissions
Read Events - all read permissions
Read Events
Manage Guest List
Manage Portfolio
Manage Restaurants - all permissions
Manage Events
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/events/v3/events/count-by-status

Body Params
filterstruct

Filter object in the following format:
"filter" : { "fieldName1": "value1" }.


facetArray <string>maxLength 100maxItems 20

Parameters to count events by.


includeDraftsboolean

Whether draft events should be returned in the response.
Note: This parameter requires the WIX_EVENTS.READ_DRAFT_EVENTS permission.

Response Object
pagingMetadataPagingMetadata

Metadata for the paginated results.


facetsMap <string, FacetCounts>format map

Filter facets.

Count events by the "Canceled" status
Request
cURL
curl -X POST 'https://www.wixapis.com/events/v3/events/count-by-status' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH TOKEN>' \ -d '{ "query": { "filter": { "status": { "$eq": "CANCELED" } }, "paging": { "limit": 10 } }, "facet": ["status"], "includeDrafts": false }'
Response
JSON
{ "pagingMetadata": { "count": 10, "offset": 0, "total": 10, "tooManyToCount": null, "cursors": null, "hasNext": null }, "facets": { "status": { "counts": { "CANCELED": 10 } } } }
Errors
400Invalid Argument

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?