> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetPolicy

# Package: eventManagement

# Namespace: PolicyManagement

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/policies-v2/get-policy.md

## Permission Scopes:
Read Policies: SCOPE.DC-EVENTS.READ-POLICIES

## Introduction

Retrieves a policy.

---

## REST API

### Schema

```
 Method: getPolicy
 Description: Retrieves a policy.
 URL: https://www.wixapis.com/events-policies/v2/policies/{policyId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  policyId
 Method parameters: 
   param name: policyId | type:   none | required: true 
 Return type: GetPolicyResponse
  - name: policy | type: Policy | description: Retrieved policy.  
     - name: id | type: string | description: Policy GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the policy is updated.  To prevent conflicting changes, the current revision must be used when updating a policy.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the policy was created in `yyyy-mm-ddThh:mm:sssZ` format.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the policy was updated in `yyyy-mm-ddThh:mm:sssZ` format.  | read-only: true | validation: format date-time
     - name: name | type: string | description: Policy name that is visible in the dashboard and checkout form.  Min: 1 character  <br/> Max: 40 characters  | validation: minLength 1, maxLength 40
     - name: body | type: string | description: Policy body. Usually contains various terms and conditions.  Min: 1 character Max: 50,000 characters  <b>Note:</b> You can format text using various HTML tags such as `<p>`, `<b>`, `<ul>`, etc.  | validation: minLength 1, maxLength 50000
     - name: eventId | type: string | description: GUID of the event to which the policy belongs.  | validation: format GUID, immutable


```

### Examples

### Get Policy
```curl
curl -X GET 'https://www.wixapis.com/events/v2/policies/7243931d-74e4-4d6a-91f0-4835fa79161e' \
-H 'Authorization: <AUTH TOKEN>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.events.policies.getPolicy(policyId)
 Description: Retrieves a policy.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  policyId
 Method parameters: 
   param name: policyId | type: string | description: Policy GUID. | required: true | validation: format GUID
 Return type: PROMISE<Policy>
  - name: _id | type: string | description: Policy GUID.  | read-only: true | validation: format GUID
  - name: revision | type: string | description: Revision number, which increments by 1 each time the policy is updated.  To prevent conflicting changes, the current revision must be used when updating a policy.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the policy was created in `yyyy-mm-ddThh:mm:sssZ` format.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the policy was updated in `yyyy-mm-ddThh:mm:sssZ` format.  | read-only: true 
  - name: name | type: string | description: Policy name that is visible in the dashboard and checkout form.  Min: 1 character  <br/> Max: 40 characters  | validation: minLength 1, maxLength 40
  - name: body | type: string | description: Policy body. Usually contains various terms and conditions.  Min: 1 character Max: 50,000 characters  <b>Note:</b> You can format text using various HTML tags such as `<p>`, `<b>`, `<ul>`, etc.  | validation: minLength 1, maxLength 50000
  - name: eventId | type: string | description: GUID of the event to which the policy belongs.  | validation: format GUID, immutable


```

### Examples

### Get Policy
```javascript
import { policies } from '@wix/events';

// define policy ID
const policyId = '6933ddf1-26c7-46c3-9924-e78c833d6cca';

// get policy
async function getPolicy() {
   try {
     const result = await policies.getPolicy(policyId);
     return result;
   } 
    catch (error) {
     console.error(error);
     // Handle the error
   }
 };

/* Returns a promise that resolves to
   the policy.
{
  "_id": "6933ddf1-26c7-46c3-9924-e78c833d6cca",
  "revision": "1",
  "_createdDate": "2023-03-07T13:18:09.185Z",
  "_updatedDate": "2023-03-07T13:18:09.185Z",
  "name": "Terms and Conditions Event 2",
  "body": "<p>Nobody will be allowed admission to the Event without a valid ticket or pass.</p>",
  "eventId": "3d3d5c04-ece0-45a8-85f0-11a58edaa192"
}
*/
```

### getPolicy (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { policies } from '@wix/events';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { policies },
  // Include the auth strategy and host as relevant
});


async function getPolicy(policyId) {
  const response = await myWixClient.policies.getPolicy(policyId);
};
```

---