Skip to main content
PUT
/
api
/
content
/
communityperks
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
Updates an existing CommunityPerk record. You must include the Id of the record to update along with all required fields.

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-Edit role.

Enums

ValueName
1AllChildren
2AllParents
3AllLocations
4HomeLocationOnly
5HomeLocationChildren
6HomeLocationParents
7ThisLocationOnly
8AllParentChildren

Request Body

Required Fields

Id
integer
required
The Id of the CommunityPerk record to update.
BusinessId
integer
required
ID of the location this perk belongs to.
Title
string
required
Name of the perk as displayed on the Members Portal and the Admin Panel.
DisplayOrder
integer
required
Position of this perk in the list relative to other perks. Lower values appear first.

Optional Fields

PerkUrl
string
URL where customers are redirected when clicking the Claim button. If blank, no Claim button is shown. Must start with https://.
SummaryText
string
Short description shown under the perk title on the Perks listing page of the Members Portal.
FullText
string
Full description of the perk, displayed when a customer clicks on it from the Perks listing page.
NewImageUrl
string
URL of a new small image to upload for this perk.
ClearImageFile
boolean
Set to true to remove the current small image from this perk.
NewLargeImageUrl
string
URL of a new large image to upload for this perk.
ClearLargeImageFile
boolean
Set to true to remove the current large image from this perk.
Active
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.
GroupName
string
Group or category this perk belongs to, used to organise perks on the Members Portal.
ShowInHomePage
boolean
Whether to feature this perk on the Members Portal home page after users log in.
OnlyForContacts
boolean
Whether this perk is only available to contacts. Set both OnlyForContacts and OnlyForMembers to false to make the perk available to all customers.
OnlyForMembers
boolean
Whether this perk is only available to members. Set both OnlyForContacts and OnlyForMembers to false to make the perk available to all customers.
Tariffs
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.
AddedTariffs
integer[]
IDs of pricing plans to add to this perk’s allowed tariffs.
RemovedTariffs
integer[]
IDs of pricing plans to remove from this perk’s allowed tariffs.

Code Examples

curl -X PUT \
  "https://spaces.nexudus.com/api/content/communityperks" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BusinessId": 0,
    "Title": "",
    "DisplayOrder": 0,
    "Id": 87654321
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the update.
Value
object
Contains the Id of the updated record.
WasSuccessful
boolean
true if the communityperk was updated successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "CommunityPerk was successfully updated.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "Title: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Title"
    }
  ],
  "WasSuccessful": false
}