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.
You can only call this method when authenticated as a Wix app or Wix user identity.
Event ID.
Policy ID.
Move the given policyId
before the referenced policy.
Move the given policyId
after the referenced policy.
Policies in the new order.
curl -X POST 'https://www.wixapis.com/events/v2/policies/reorder' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
--data-binary '{
"eventId": "9d720f99-1b5a-4141-9877-d32985391e18",
"policyId": "7243931d-74e4-4d6a-91f0-4835fa79161e",
"beforePolicyId": "0edc5dc9-3c0b-4b80-80c7-452d4009bf89"
}'
{
"policies": [
{
"id": "eef70fb3-8567-4861-9f77-ebd2ad3682d5",
"revision": "2",
"createdDate": "2023-02-14T12:31:52.850Z",
"updatedDate": "2023-02-14T13:29:17.308Z",
"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": "3",
"createdDate": "2023-02-14T11:54:08.379Z",
"updatedDate": "2023-02-14T13:29:17.308Z",
"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"
},
{
"id": "0edc5dc9-3c0b-4b80-80c7-452d4009bf89",
"revision": "1",
"createdDate": "2023-02-14T12:54:28.557Z",
"updatedDate": "2023-02-14T12:54:28.557Z",
"name": "Terms and Conditions Event 3",
"body": "<p>All tickets or passes should be checked on purchase, as mistakes cannot always be rectified.</p>",
"eventId": "9d720f99-1b5a-4141-9877-d32985391e18"
}
]
}
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.