Skip to main content
POST
Create CommunityPerk
A CommunityPerk represents a perk, discount, or benefit that a location offers to its customers in partnership with other businesses. Perks can be discounts, free trials, or any other benefit negotiated with a partner business — for example, 50% off a car rental or a free hot drink at a nearby café. They are published on the Members Portal where customers can view and claim them. Use Active to control visibility — when false, the perk is only visible on the Admin Panel. Use ShowInHomePage to feature a perk on the Members Portal home page after users log in. Availability can be restricted via OnlyForContacts and OnlyForMembers. If neither flag is set, the perk is available to all customers. Use Tariffs to further restrict access to customers on specific pricing plans. Which perks are listed in a location is also controlled by the Access.Data.Perks BusinessSetting, whose value is an eDataVisibilityCriteria enum integer. This determines which locations’ perks are visible to customers at a given location — for example ThisLocationOnly (7) shows only perks belonging to the current location, while AllLocations (3) shows perks from all locations in the network.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the CommunityPerk-Create role.

Enums

Request Body

Required Fields

integer
required
ID of the location this perk belongs to.
string
required
Name of the perk as displayed on the Members Portal and the Admin Panel.
integer
required
Position of this perk in the list relative to other perks. Lower values appear first.
integer
required
Number of times customers have clicked on this perk.

Optional Fields

string
URL where customers are redirected when clicking the Claim button. If blank, no Claim button is shown. Must start with https://.
string
Short description shown under the perk title on the Perks listing page of the Members Portal.
string
Full description of the perk, displayed when a customer clicks on it from the Perks listing page.
string
URL of a new small image to upload for this perk.
boolean
Set to true to remove the current small image from this perk.
string
URL of a new large image to upload for this perk.
boolean
Set to true to remove the current large image from this perk.
boolean
Whether this perk is published and visible to customers on the Members Portal. When false, the perk is only visible on the Admin Panel.
string
Group or category this perk belongs to, used to organise perks on the Members Portal.
boolean
Whether to feature this perk on the Members Portal home page after users log in.
boolean
Whether this perk is only available to contacts. Set both OnlyForContacts and OnlyForMembers to false to make the perk available to all customers.
boolean
Whether this perk is only available to members. Set both OnlyForContacts and OnlyForMembers to false to make the perk available to all customers.
integer[]
IDs of the pricing plans (tariffs) whose members can see and claim this perk. Leave empty to make the perk available regardless of pricing plan.

Code Examples

Response

200

integer
HTTP status code. 200 on success.
string
A human-readable message confirming the creation.
object
Contains the Id of the newly created record.
boolean
true if the communityperk was created successfully.
array
null on success.
Example Response

400

string
A summary of the validation error(s), in the format PropertyName: error message.
any
null on validation failure.
object[]
Array of validation errors.
boolean
false when the request fails validation.
Example Response