getPolicy( )


Retrieves a policy by ID.

The getPolicy() function returns a Promise that resolves to a policy whose ID matches the given ID.

Permissions
Manage Events - all permissions
Manage Policies
Read Policies
Manage Events
Learn more about app permissions.
Method Declaration
Copy
function getPolicy(policyId: string): Promise<Policy>;
Method Parameters
policyIdstringRequired

Policy ID.

Returns
Return Type:Promise<Policy>
JavaScript
import { policies } from "@wix/events"; async function getPolicy(policyId) { const response = await policies.getPolicy(policyId); }
Errors

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

Did this help?