Skip to main content
PUT
/
api
/
billing
/
productbookingcredits
Update ProductBookingCredit
curl --request PUT \
  --url https://spaces.nexudus.com/api/billing/productbookingcredits \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Id": 123,
  "Name": "<string>",
  "ProductId": 123,
  "Credit": 123
}
'
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt

Use this file to discover all available pages before exploring further.

Updates an existing ProductBookingCredit 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 ProductBookingCredit-Edit role.

Enums

ValueName
1PricePlan
2Day
3Week
4Month
5Year
6LastDayOfMonth

Request Body

Required Fields

Id
integer
required
The Id of the ProductBookingCredit record to update.
Name
string
required
Credit name.
ProductId
integer
required
ID of the product linked to this record.
Credit
number
required
Credit amount.

Optional Fields

ElegibleResourceTypes
integer[]
List of elegible resource types linked to this record.
AddedElegibleResourceTypes
integer[]
The added elegible resource types value for this product booking credit.
RemovedElegibleResourceTypes
integer[]
The removed elegible resource types value for this product booking credit.
ElegibleProducts
integer[]
List of elegible products linked to this record.
AddedElegibleProducts
integer[]
The added elegible products value for this product booking credit.
RemovedElegibleProducts
integer[]
The removed elegible products value for this product booking credit.
ElegibleTariffs
integer[]
List of elegible tariffs linked to this record.
AddedElegibleTariffs
integer[]
The added elegible tariffs value for this product booking credit.
RemovedElegibleTariffs
integer[]
The removed elegible tariffs value for this product booking credit.
ExpireTimeInMonths
integer
The expire time in months value for this product booking credit.
ExpireTimeInWeeks
integer
The expire time in weeks value for this product booking credit.
CaneBeUsedForBookings
boolean
Whether this credit can be used to pay for bookings. Restrict to specific resource types with ElegibleResourceTypes.
CaneBeUsedForEvents
boolean
Whether this credit can be used to pay for event sign-ups. Restrict to specific categories with EventCategories.
EventCategories
integer[]
List of event categories linked to this record.
AddedEventCategories
integer[]
The added event categories value for this product booking credit.
RemovedEventCategories
integer[]
The removed event categories value for this product booking credit.
ExpirationType
integer
Expiration type. See eRecurrentChargePattern? enum above.
ExpiresIn
integer
Number of periods (of ExpirationType) until the released credit expires.
IsUniversalCredit
boolean
Whether this is a universal credit applicable to products, time passes and other charges. Restrict with ElegibleProducts, ElegiblePasses and AppliesToCharges; if all are empty the credit applies to all products, passes and charges.
ElegiblePasses
integer[]
List of elegible passes linked to this record.
AddedElegiblePasses
integer[]
The added elegible passes value for this product booking credit.
RemovedElegiblePasses
integer[]
The removed elegible passes value for this product booking credit.
AppliesToCharges
boolean
Whether this universal credit applies to other charges.

Code Examples

curl -X PUT \
  "https://spaces.nexudus.com/api/billing/productbookingcredits" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "Name": "",
    "ProductId": 0,
    "Credit": 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 productbookingcredit was updated successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "ProductBookingCredit 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": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}