POST

Count Ticket Definitions


Counts ticket definitions by the saleStatus field, including those with the hidden status.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Events - all permissions
Manage Orders
Manage Ticket Definitions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/events-ticket-definitions/v3/ticket-definitions/count

Body Params
filterstruct

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


facetArray <string>maxLength 100maxItems 20

Parameters to count ticket definitions by.

  • Max: 20 facets.
Response Object
metadataMetadata

Metadata for the paginated results.


facetsMap <string, FacetCounts>format map

Filter facets.

Count ticket definitions by the "Sale started" status
Request
cURL
curl -X POST 'https://www.wixapis.com/events-ticket-definitions/events-ticket-definitions/v3/ticket-definitions/count' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH TOKEN>' \ -d '{ "filter": { "saleStatus": { "$eq": "SALE_STARTED" } }, "facet": ["saleStatus"] }'
Response
JSON
{ "metadata": { "total": 4 }, "facets": { "saleStatus": { "counts": { "SALE_STARTED": 4 } } } }
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?