Skip to content
campaiDeveloper
campai.com

Booking ยท Punch cards

POST/{organizationId}/{mandateId}/booking/punchCards/{punchCardId}/archive

Archive punch card

Archives or restores a punch card using the organization, mandate and punch card IDs and an archived boolean. Archived cards can no longer be bought with a booking, but already issued cards keep their points and remain usable. The endpoint returns no value.

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 must have mandate.read permission.
  • The caller must have punchCard.edit permission.

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • punchCardIdidrequired

Body

Content-Type: application/json

  • archivedbooleanrequired
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/punchCards/YOUR_PUNCH_CARD_ID/archive' \
  --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.

What else happens

  • For a matching punch card, sets archivedAt to the current date when archived is true, or to null when it is false.

Errors

Other errors

StatusErrorWhen
404Punch card was not foundIf the punch card is not found, the endpoint returns HTTP 404 NOT_FOUND with key routes.booking.punchCards.noPunchCard.

Errors nearly every request can meet are listed under Errors.