About Policies v2

With Policies APIs, you can manage the policies for a particular event. For example, you can create, update, and delete policies. You can also reorder policies in the Event Dashboard and checkout form.

Policies define terms & conditions for the events, such as terms for canceling attendance, transferring a ticket to another person, and so on. For example: "Participants are entitled to a 100% refund if canceling attendance 1 week prior to the event. After this date, participants will be refunded 50% of the ticket price."

A policy agreement checkbox will be added to the RSVP or checkout form. The policy text can be read in a pop-up window if you click the policy name. By default, there are no policies when you first create an event.

Before you begin

It’s important to note the following points before starting to code:

  • Install the Wix Events & Tickets app from Wix App Market.
  • You can create up to 3 policies per event.

Use cases

Terminology

  • Policy: text that defines terms & conditions, as relevant.
  • Event Dashboard: control center, which allows you to manage their site events settings and features.
  • Checkout form: the final step in the ticket purchasing process where the customer fills in personal info, reads policies, and pays.
Was this helpful?
Yes
No

Policies v2: Supported Filters and Sorting

The following table shows field support for filters and sorting for the Policy object:

FieldQuery Filter OperatorsSortable
id$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable
eventId$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable
name$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable
body$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable
revision$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable
updatedDate$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable
createdDate$eq, $ne, $lt, $lte, $gt, $gte, $in, $nin, $hasSome, $existsSortable

Related content: API Query Language, Policy Query endpoint

Was this helpful?
Yes
No

Policies v2: Sample Use Cases & Flows

This article presents possible use cases and corresponding sample flows that your app can support. It provides a useful starting point as you plan your app's implementation.

Sync event policies with external ticketing system

If you're using a Wix site to manage events and another system to handle ticketing, you can synchronize policies between them whenever a policy is updated on the site. For instance, if the refund policies on the Wix site change, and now the policies guarantee a full refund up to only 5 days before the event, this change also needs to be reflected on your ticketing system for checkout purposes.

To upload and update all event policies defined on the Wix site to your external system for the first time, follow these steps:

  1. Create a custom field in your system that stores the policy ID for a particular event to ensure a 1-to-1 relationship with the external ticketing system. Craft your code so that this ID won't be overwritten by future updates from your app.

  2. Create a mapping from the site policies fields to the system fields that will be used whenever site policies and the external system are synchronized.

  3. Query Policies by eventId and send the relevant information to the external ticketing system.

  4. On an ongoing basis, listen for changes to site policies with these webhooks:

  5. When one of the above webhooks is triggered, you'll receive the policy in the payload. You can bring those changes to the ticketing system by retrieving the relevant info from the payload, and use mapping to take action on the external system:

    • For updated policies retrieve the updatedEvent.currentEntityAsJson.id, updatedEvent.currentEntityAsJson.body and/or updatedEvent.currentEntityAsJson.name values.

    • For created policies retrieve the relevant info from the createdEvent.currentEntityAsJson object.

    • For deleted policies retrieve the createdEvent.currentEntityAsJson.id value.

Was this helpful?
Yes
No

Policy Object

Attributes
idstringRead-onlyformat GUID
Policy ID.

revisionobjectRead-only
Revision number, which increments by 1 each time the policy is updated. To prevent conflicting changes, the existing revision must be used when updating a policy. You'll get an error if you try to use the previous revision.

createdDatestringRead-onlyformat date-time
Date and time when the policy was created in yyyy-mm-ddThh:mm:sssZ format.

updatedDatestringRead-onlyformat date-time
Date and time of the policy's latest update in yyyy-mm-ddThh:mm:sssZ format.

namestringminLength 1maxLength 40

bodystringminLength 1maxLength 50000

eventIdstringformat GUID
ID of the event to which the policy belongs.
Was this helpful?
Yes
No

PostCreate Policy

Creates a policy. You can create up to 3 policies per event. If you try to create more than 3, you'll get the "Maximum number of policies for the event has been reached" error.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Policies
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/events/v2/policies

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PatchUpdate Policy

Updates a policy. Each time the policy is updated, revision increments by 1. The existing revision must be included when updating the policy. This ensures you're working with the latest policy and prevents unintended overwrites.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Policies
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
PATCH
https://www.wixapis.com/events/v2/policies/{policy.id}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

GetGet Policy

Retrieves a policy.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Policies
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
GET
https://www.wixapis.com/events/v2/policies/{policyId}

Was this helpful?
Yes
No

DeleteDelete Policy

Permanently deletes a policy.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Policies
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
DELETE
https://www.wixapis.com/events/v2/policies/{policyId}

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

PostQuery Policies

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Policies
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/events/v2/policies/query

Was this helpful?
Yes
No

PostReorder Event Policies

Changes policy order in an event dashboard and agreement checkbox on the checkout form. By default, the policies are arranged by the created date in descending order.

Note: It is possible to use both beforePolicyId and afterPolicyId at the same time but only the last one defined will be executed.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Policies
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token
Endpoint
POST
https://www.wixapis.com/events/v2/policies/reorder

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

Policy Created

Triggered when a policy is created.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.events.v2.policy.

slugstring
Event name. Expected created.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

createdEventobject
Event information.
Was this helpful?
Yes
No

Policy Updated

Triggered when a policy is updated.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.events.v2.policy.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.
Was this helpful?
Yes
No

Policy Deleted

Triggered when a policy is deleted.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.events.v2.policy.

slugstring
Event name. Expected deleted.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

deletedEventstruct
Event information.
Was this helpful?
Yes
No