Skip to content
campaiDeveloper
campai.com

Booking · Resources

POST/{organizationId}/{mandateId}/booking/resources/{resourceId}/visibility

Update visibility

Updates who sees a specific resource (everyone, only people linked to the organization in the Community-App, or only staff), where it is listed (only through its link, in the organization's own lists, or also in Discover of the Community-App, which needs everyone) and who may book it (whoever sees it, only staff, or nobody). Resources that attach it show the same.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • resource.edit

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • resourceIdidrequired

Body

Content-Type: application/json

  • visibilityobjectrequired
    3 properties
    • audiencestringrequired
      everyone organization staff
    • listingstringrequired
      link own discover
    • bookingstringrequired
      audience staff none
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/resources/YOUR_RESOURCE_ID/visibility' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

No response body is specified.

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.