POST

Query Policies


Retrieves a list of policies according to the provided filters and paging.

Permissions
Manage Events - all permissions
Manage Policies
Read Policies
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/events-policies/v2/policies/query

Body Params
queryQueryRequired

Query options. See API Query Langauge for more details.

Response Object
policiesArray <Policy>

List of policies.


metadataMetadata

Metadata for the paginated results.

Query policies by event ID and sort by created date in descending order
Request
cURL
curl -X POST 'https://www.wixapis.com/events/v2/policies/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH TOKEN>' \ --data-binary '{ "query": { "filter": { "eventId": { "$eq": "9d720f99-1b5a-4141-9877-d32985391e18" } }, "sort": [ { "fieldName": "createdDate", "order": "DESC" } ] } }'
Response
JSON
{ "policies": [ { "id": "eef70fb3-8567-4861-9f77-ebd2ad3682d5", "revision": "1", "createdDate": "2023-02-14T12:31:52.850Z", "updatedDate": "2023-02-14T12:31:52.850Z", "name": "Terms and Conditions Event 1", "body": "<p>Tickets to this Event are issued on behalf of the Organiser and are subject to the following terms and conditions.</p>", "eventId": "9d720f99-1b5a-4141-9877-d32985391e18" }, { "id": "7243931d-74e4-4d6a-91f0-4835fa79161e", "revision": "1", "createdDate": "2023-02-14T11:54:08.379Z", "updatedDate": "2023-02-14T11:54:08.379Z", "name": "Terms and Conditions Event 2", "body": "Nobody will be allowed admission to the Event without a valid ticket or pass.", "eventId": "9d720f99-1b5a-4141-9877-d32985391e18" } ], "metadata": { "count": 2, "cursors": {} } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?