Skip to content
campaiDeveloper
campai.com

Booking · Resources

POST/{organizationId}/booking/resources/{resourceId}/bookingTemplateChangeReads only

Preview resource template change

Previews the effect of a booking template selection on a resource’s PDF tickets, wallet passes and QR check-in. Provide the organization ID, resource ID and a booking template ID, or null to follow the standard template. The response reports what would turn on or off and, when the resolved template changes, how many wallet passes have already been issued; otherwise, issuedPasses is zero. Nothing is saved.

Permissions

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

Who may call it

  • The caller must have organization access.
  • The caller needs resource.read.
  • If the resource is found, the caller also needs mandate.read for its mandate.

Request

Path parameters

  • organizationIdidrequired
  • resourceIdidrequired

Body

Content-Type: application/json

  • bookingTemplateidrequirednullable
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/booking/resources/YOUR_RESOURCE_ID/bookingTemplateChange' \
  --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

Content-Type: application/json

  • changesobject
    3 properties
    • ticketstringnullable
      on off

      changes.ticket is null when PDF tickets would not change.

    • passstringnullable
      on off

      changes.pass is null when wallet passes would not change.

    • qrCheckInstringnullable
      on off

      changes.qrCheckIn is null when QR check-in would not change.

  • issuedPassesinteger

    at least 0

    issuedPasses is zero when the same template applies before and after the selection.

Response200
{
  "changes": {
    "ticket": "on",
    "pass": "on",
    "qrCheckIn": "on"
  },
  "issuedPasses": 0
}

Errors

Other errors

StatusErrorWhen
404No fixed messageIf the resource is not found in the organization, the request returns NOT_FOUND.

Errors nearly every request can meet are listed under Errors.